@@ -40,53 +40,81 @@ A list of payment options will be returned.
40
40
41
41
```
42
42
{
43
- "time": "2019-06-13T18:07:33.495Z ",
44
- "expires": "2019-06-13T18:22:33.495Z ",
45
- "memo": "Payment request for BitPay invoice R4GvGy1ZbZhLWxcHq4u2hm for merchant Micah's Cool Store ",
46
- "paymentUrl": "https://mriggan.bp:8088 /i/R4GvGy1ZbZhLWxcHq4u2hm ",
47
- "paymentId": "R4GvGy1ZbZhLWxcHq4u2hm ",
43
+ "time": "2020-01-24T18:57:44.509Z ",
44
+ "expires": "2020-01-24T19:12:44.509Z ",
45
+ "memo": "Payment request for BitPay invoice AonN46AuFPYTC8PKG8cPPV for merchant BitPay Visa® Load (USD-USA) ",
46
+ "paymentUrl": "https://bitpay.com /i/AonN46AuFPYTC8PKG8cPPV ",
47
+ "paymentId": "AonN46AuFPYTC8PKG8cPPV ",
48
48
"paymentOptions": [
49
49
{
50
50
"chain": "BTC",
51
51
"currency": "BTC",
52
- "network": "regtest",
53
- "estimatedAmount": 15100,
54
- "decimals": 8
52
+ "network": "main",
53
+ "estimatedAmount": 13400,
54
+ "requiredFeeRate": 6.544,
55
+ "minerFee": 1600,
56
+ "decimals": 8,
57
+ "selected": false
55
58
},
56
59
{
57
60
"chain": "BCH",
58
61
"currency": "BCH",
59
- "network": "regtest",
60
- "estimatedAmount": 240800,
61
- "decimals": 8
62
+ "network": "main",
63
+ "estimatedAmount": 315200,
64
+ "requiredFeeRate": 1,
65
+ "minerFee": 0,
66
+ "decimals": 8,
67
+ "selected": false
62
68
},
63
69
{
64
70
"chain": "ETH",
65
71
"currency": "ETH",
66
- "network": "regtest",
67
- "estimatedAmount": 3864000000000000,
68
- "decimals": 18
72
+ "network": "main",
73
+ "estimatedAmount": 6195000000000000,
74
+ "requiredFeeRate": 13555555557,
75
+ "minerFee": 0,
76
+ "decimals": 18,
77
+ "selected": false
69
78
},
70
79
{
71
80
"chain": "ETH",
72
81
"currency": "GUSD",
73
- "network": "regtest ",
82
+ "network": "main ",
74
83
"estimatedAmount": 100,
75
- "decimals": 2
84
+ "requiredFeeRate": 13555555557,
85
+ "minerFee": 0,
86
+ "decimals": 2,
87
+ "selected": false
88
+ },
89
+ {
90
+ "chain": "ETH",
91
+ "currency": "PAX",
92
+ "network": "main",
93
+ "estimatedAmount": 1000000000000000000,
94
+ "requiredFeeRate": 13555555557,
95
+ "minerFee": 0,
96
+ "decimals": 18,
97
+ "selected": false
76
98
},
77
99
{
78
100
"chain": "ETH",
79
101
"currency": "USDC",
80
- "network": "regtest ",
102
+ "network": "main ",
81
103
"estimatedAmount": 1000000,
82
- "decimals": 6
104
+ "requiredFeeRate": 13555555557,
105
+ "minerFee": 0,
106
+ "decimals": 6,
107
+ "selected": false
83
108
},
84
109
{
85
- "chain": "ETH",
86
- "currency": "PAX",
87
- "network": "regtest",
88
- "estimatedAmount": 1000000000000000000,
89
- "decimals": 18
110
+ "chain": "XRP",
111
+ "currency": "XRP",
112
+ "network": "main",
113
+ "estimatedAmount": 4494841,
114
+ "requiredFeeRate": 12,
115
+ "minerFee": 0,
116
+ "decimals": 6,
117
+ "selected": true
90
118
}
91
119
]
92
120
}
@@ -238,6 +266,32 @@ A POST request should be made to the payment protocol url with a JSON dictionary
238
266
}
239
267
```
240
268
269
+ #### XRP Response
270
+ ```
271
+ {
272
+ "time": "2020-01-24T18:57:44.509Z",
273
+ "expires": "2020-01-24T19:12:44.509Z",
274
+ "memo": "Payment request for BitPay invoice AonN46AuFPYTC8PKG8cPPV for merchant BitPay Visa® Load (USD-USA)",
275
+ "paymentUrl": "https://bitpay.com/i/AonN46AuFPYTC8PKG8cPPV",
276
+ "paymentId": "AonN46AuFPYTC8PKG8cPPV",
277
+ "chain": "XRP",
278
+ "network": "main",
279
+ "instructions": [
280
+ {
281
+ "type": "transaction",
282
+ "requiredFeeRate": 12,
283
+ "outputs": [
284
+ {
285
+ "amount": 4494841,
286
+ "invoiceID": "326661FF10DF1F00B10DD96D58B4D026FB32CBF2E8DF5D3E22716092AAD4F082",
287
+ "address": "rKpTKoJSFbCoZkwydRv7NWTiBgNrdTXJ24"
288
+ }
289
+ ]
290
+ }
291
+ ]
292
+ }
293
+ ```
294
+
241
295
#### Headers
242
296
On a successful request, the response will contain the following headers.
243
297
@@ -329,6 +383,35 @@ A 200 return code means that the transaction is valid. Additional fields are av
329
383
}
330
384
```
331
385
386
+ #### Example XRP Body
387
+ ```
388
+ {
389
+ "chain": "XRP",
390
+ "currency": "XRP",
391
+ "transactions": [
392
+ {
393
+ "tx": "120000228000000024000000095011F6751F266C7E664CB3CDAE77D091ED73E3D365591D8FA769BEA9F694C5C4A5DF614000000000448E1768400000000000000C81148FF291E50F16A206B96D383E1F86CC47E21727DA8314C5B8A782192BFF4D8FF629A88BEEB417A4D9EEB2"
394
+ }
395
+ ]
396
+ }
397
+ ```
398
+
399
+ #### Example XRP Response
400
+ ```
401
+ {
402
+ "payment": {
403
+ "currency": "XRP",
404
+ "chain": "XRP",
405
+ "transactions": [
406
+ {
407
+ "tx": "120000228000000024000000095011F6751F266C7E664CB3CDAE77D091ED73E3D365591D8FA769BEA9F694C5C4A5DF614000000000448E1768400000000000000C81148FF291E50F16A206B96D383E1F86CC47E21727DA8314C5B8A782192BFF4D8FF629A88BEEB417A4D9EEB2"
408
+ }
409
+ ]
410
+ },
411
+ "memo": "Payment appears valid"
412
+ }
413
+ ```
414
+
332
415
333
416
## Payment
334
417
Now that the server has told us our payment is acceptable, we can send the fully signed transaction.
@@ -369,10 +452,24 @@ A POST request should be made to the payment protocol url with `{chain, transact
369
452
}
370
453
```
371
454
455
+
456
+ #### Example XRP Request Body
457
+ ```
458
+ {
459
+ "chain": "XRP",
460
+ "currency": "XRP",
461
+ "transactions": [
462
+ {
463
+ "tx": "120000228000000024000000095011F6751F266C7E664CB3CDAE77D091ED73E3D365591D8FA769BEA9F694C5C4A5DF614000000000448E1768400000000000000C7321030834A2B07BD552337FEA00C32E8DDDDB541BC7353DA7E982B4C191BFE432D3BE74473045022100A2D1E2A0B0E01EAAA36F67F650463391E4390F9F540D4C7553E1698F866A16E002201C5CB68137805ECC73F2D4459E7840842C255065A716475CDDFCA007EA570A1581148FF291E50F16A206B96D383E1F86CC47E21727DA8314C5B8A782192BFF4D8FF629A88BEEB417A4D9EEB2"
464
+ }
465
+ ]
466
+ }
467
+ ```
468
+
372
469
### Response
373
470
The response will be a JSON format payload containing the original payment body and a memo field which should be displayed to the user.
374
471
375
- #### Response Example
472
+ #### ETH - GUSD Response Example
376
473
``` JSON
377
474
{
378
475
"payment" : {
@@ -388,6 +485,19 @@ The response will be a JSON format payload containing the original payment body
388
485
"memo" : " Transaction received by BitPay. Invoice will be marked as paid if the transaction is confirmed."
389
486
}
390
487
```
488
+ #### XRP Response Example
489
+ ```
490
+ {
491
+ "payment": {
492
+ "transactions": [
493
+ {
494
+ "tx": "120000228000000024000000095011F6751F266C7E664CB3CDAE77D091ED73E3D365591D8FA769BEA9F694C5C4A5DF614000000000448E1768400000000000000C7321030834A2B07BD552337FEA00C32E8DDDDB541BC7353DA7E982B4C191BFE432D3BE74473045022100A2D1E2A0B0E01EAAA36F67F650463391E4390F9F540D4C7553E1698F866A16E002201C5CB68137805ECC73F2D4459E7840842C255065A716475CDDFCA007EA570A1581148FF291E50F16A206B96D383E1F86CC47E21727DA8314C5B8A782192BFF4D8FF629A88BEEB417A4D9EEB2"
495
+ }
496
+ ]
497
+ },
498
+ "memo": "Transaction received by BitPay. Invoice will be marked as paid if the transaction is confirmed."
499
+ }
500
+ ```
391
501
392
502
## Signatures
393
503
0 commit comments