@@ -56,88 +56,20 @@ On a successful request, the response will contain the following headers.
56
56
#### Response Body Example
57
57
```
58
58
{
59
- time: new Date("2018-01-12T22:04:54.364Z"),
60
- expires: new Date("2018-01-12T22:19:54.364Z"),
61
- memo:
62
- "Payment request for BitPay invoice TmyrxFvAi4DjFNy3c7EjVm for merchant Robs Fake Business",
63
- paymentUrl: "https://localhost:5555/i/TmyrxFvAi4DjFNy3c7EjVm",
64
- paymentId: "TmyrxFvAi4DjFNy3c7EjVm",
65
- paymentOptions: [
66
- {
67
- network: "mainnet",
68
- chain: "BTC",
69
- instructions: [
70
- {
71
- requiredFeePerByte: 1000,
72
- outputs: [
73
- {
74
- amount: 39300,
75
- address: "mthVG9kuRTJQtXieJVDSrrvWyM7QDZ3rcV"
76
- }
77
- ]
78
- }
79
- ]
80
- },
81
- {
82
- chain: "BCH",
83
- network: "mainnet",
84
- instructions: [
85
- {
86
- requiredFeePerByte: 1000,
87
- outputs: [
88
- {
89
- amount: 39300,
90
- address: "mthVG9kuRTJQtXieJVDSrrvWyM7QDZ3rcV"
91
- }
92
- ]
93
- }
94
- ]
95
- },
96
- {
97
- chain: "ETH",
98
- network: "mainnet",
99
- instructions: [
100
- {
101
- gasPrice: "0x09184e72a000",
102
- gasLimit: "0x2710",
103
- to: "0xd8fD14fB0E0848Cb931c1E54a73486c4B968BE3D",
104
- value: "0x64",
105
- chainId: 1,
106
- data:
107
- "0x000000000000000000000000000000000000000000000000000000000000000000000000"
108
- }
109
- ]
110
- },
59
+ "network": "test",
60
+ "currency": "BTC",
61
+ "requiredFeePerByte": 200,
62
+ "outputs": [
111
63
{
112
- chain: "ETH",
113
- network: "mainnet",
114
- tokenInformation: {
115
- currency: "GUSD",
116
- type: "ERC20",
117
- address: "0x2E05e01f8A9dF371FCdD8342D3834a57267a0cD1"
118
- },
119
- instructions: [
120
- {
121
- gasPrice: "0x09184e72a000",
122
- gasLimit: "0x5958",
123
- to: "0x2E05e01f8A9dF371FCdD8342D3834a57267a0cD1",
124
- value: "0x00",
125
- chainId: 1,
126
- data:
127
- "0x095ea7b3000000000000000000000000d8fd14fb0e0848cb931c1e54a73486c4b968be3d0000000000000000000000000000000000000000000000000000000000000064"
128
- },
129
- {
130
- gasPrice: "0x09184e72a000",
131
- gasLimit: "0x5958",
132
- to: "0x2E05e01f8A9dF371FCdD8342D3834a57267a0cD1",
133
- value: "0x00",
134
- chainId: 1,
135
- data:
136
- "0xa9059cbb0000000000000000000000002e05e01f8a9df371fcdd8342d3834a57267a0cd10000000000000000000000000000000000000000000000000000000000000064"
137
- }
138
- ]
64
+ "amount": 39300,
65
+ "address": "mthVG9kuRTJQtXieJVDSrrvWyM7QDZ3rcV"
139
66
}
140
- ]
67
+ ],
68
+ "time": "2018-01-12T22:04:54.364Z",
69
+ "expires": "2018-01-12T22:19:54.364Z",
70
+ "memo": "Payment request for BitPay invoice TmyrxFvAi4DjFNy3c7EjVm for merchant Robs Fake Business",
71
+ "paymentUrl": "https://test.bitpay.com/i/TmyrxFvAi4DjFNy3c7EjVm",
72
+ "paymentId": "TmyrxFvAi4DjFNy3c7EjVm"
141
73
}
142
74
```
143
75
@@ -151,21 +83,17 @@ A POST request should be made to the payment protocol url with a `Content-Type`
151
83
152
84
```
153
85
{
154
- "chain": "<chain 3 letter code>",
155
86
"currency": "<currency 3 letter code>",
156
- "unsignedTransactions ": "<array of unsigned transactions in hexedecimal string format>",
87
+ "unsignedTransaction ": "<unsigned transaction in hexedecimal string format>",
157
88
"weightedSize": <signed transaction weighted size in bytes>
158
89
}
159
90
```
160
91
161
92
#### Example Request Body
162
93
```
163
94
{
164
- "chain": "BTC",
165
95
"currency": "BTC",
166
- "unsignedTransactions": [
167
- "0200000001919572700aef4a9b66ac2389ea8e8899b1c2c0b3ffe03c12c2d28e7a2574d3540100000000feffffff02c80f5f91000000001976a9140cd9a12aa54ad7b098988c67692a62196c1dbdc988ac98470200000000001976a9140f8cf402ad6478377750d572089d1e1a3ca099a788ac00000000"
168
- ],
96
+ "unsignedTransaction": "0200000001919572700aef4a9b66ac2389ea8e8899b1c2c0b3ffe03c12c2d28e7a2574d3540100000000feffffff02c80f5f91000000001976a9140cd9a12aa54ad7b098988c67692a62196c1dbdc988ac98470200000000001976a9140f8cf402ad6478377750d572089d1e1a3ca099a788ac00000000"
169
97
"weightedSize": 225
170
98
}
171
99
```
@@ -202,7 +130,6 @@ A POST request should be made to the payment protocol url with a `Content-Type`
202
130
203
131
```
204
132
{
205
- "chain": "<chain 3 letter code>",
206
133
"currency": "<currency 3 letter code>",
207
134
"transactions": [
208
135
"<transaction in hexedecimal string format>"
@@ -213,7 +140,6 @@ A POST request should be made to the payment protocol url with a `Content-Type`
213
140
#### Example Request Body
214
141
```
215
142
{
216
- "chain": "BTC",
217
143
"currency": "BTC",
218
144
"transactions": [
219
145
"02000000011f0f762184cbc8e94b307fab6f805168724f123a23cd48aac4a9bac8768cfd67000000004847304402205079b96def679f04de9698dd8b9f58dff3e4a13c075f5939c6edfbb8698c8cc802203eac5a3d6410a9f94a86828a4e207f8083fe0bf1c77a74a0cb7add49100d427001ffffffff0284990000000000001976a9149097a519e42061e4977b07b69735ed842b755c0088ac08cd042a010000001976a914cf4b90bca14deab1315c125b8b74b7d31eea97b288ac00000000"
0 commit comments