You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Update InvoiceRequest notification_url definition to use SHOULD instead of MAY
- Capitalize MUST, SHOULD, etc.
- Update InvoiceRequest Message Creation steps to specifically define behavior for empty amount or amount out of bounds
- Add implementation section with references to Addressimo reference Store & Forward server and a client implementation in functest_ir.py
- Add flow diagrams for BIP70 extension and moble-to-mobile example with store and forward service
An invalid or unparsable message or communications error must be communicated to the party that initiated the communication. This
146
-
should be done through standard HTTP Status Code messaging ([https://tools.ietf.org/html/rfc7231 RFC 7231 Section 6]).
136
+
An invalid or unparsable message or communications error MUST be communicated to the party that initiated the communication. This
137
+
SHOULD be done through standard HTTP Status Code messaging ([https://tools.ietf.org/html/rfc7231 RFC 7231 Section 6]).
147
138
148
139
===InvoiceRequest Message Creation===
149
140
* Create an InvoiceRequest message
150
141
* sender_public_key MUST be set to the public key of an EC keypair
151
142
* nonce MUST be set to a non-repeating number. The current epoch time in microseconds SHOULD be used, unless the creating device doesn't have access to a RTC (in the case of a smart card, for example)
152
-
* Amount is optional
143
+
* Amount is optional. If the amount is not specified by the InvoiceRequest, the Receiver MAY specify the amount in the returned PaymentRequest. If an amount is specified by the InvoiceRequest and a PaymentRequest cannot be generated for that amount, the InvoiceRequest SHOULD be rejected with HTTP status code 406.
153
144
* Set notification_url to URL that the Receiver will submit completed ReturnPaymentRequest to
154
145
* If NOT including certificate, set pki_type to "none"
155
146
* If including certificate:
@@ -160,7 +151,7 @@ should be done through standard HTTP Status Code messaging ([https://tools.ietf.
160
151
161
152
===InvoiceRequest Validation===
162
153
* Validate sender_public_key is a valid EC public key
163
-
* The nonce must not be repeated. The service receiving the InvoiceRequest may use whatever method to make sure that the nonce is never repeated.
154
+
* The nonce MUST not be repeated. The service receiving the InvoiceRequest MAY use whatever method to make sure that the nonce is never repeated.
164
155
* Validate notification_url if set, contains characters deemed valid for a URL (avoiding XSS related characters, etc).
165
156
* If pki_type is None, InvoiceRequest is VALID
166
157
* If pki_type is x509+sha256 and signature is valid for the serialized InvoiceRequest where signature is set to "", InvoiceRequest is VALID
@@ -186,6 +177,21 @@ should be done through standard HTTP Status Code messaging ([https://tools.ietf.
186
177
** Use HMAC_DRBG.GENERATE(32) as the Encryption Key (256 bits)
187
178
** Use HMAC_DRBG.GENERATE(16) as the Initialization Vector (IV) (128 bits)
188
179
180
+
==Implementation==
181
+
A reference implementation for a Store & Forward server supporting this proposal can be found here: [https://github.com/netkicorp/addressimo Addressimo]
182
+
A reference client implementation can be found in the InvoiceRequest functional testing for Addressimo here: [https://github.com/netkicorp/addressimo/blob/master/functest/functest_ir.py InvoiceRequest Client Reference Implementation]
183
+
184
+
==BIP70 Extension==
185
+
The following flowchart is borrowed from BIP70 and expanded upon in order to visually describe how this BIP is an extension to BIP70.
186
+
187
+
<img src="bip-ir/bip70-extension.png"></img>
188
+
189
+
==Mobile to Mobile Example==
190
+
The following diagram shows a sample flow in which one mobile client is sending value to a second mobile client with the use
191
+
of an InvoiceRequest, a Store & Forward server, and a ReturnPaymentRequest.
0 commit comments