@@ -147,3 +147,75 @@ curl --location --request GET 'http://cryptoprocessing.io/api/v1/checkout/stores
147
147
```
148
148
149
149
Callbacks is used to sent notifications once invoice is updated.
150
+
151
+ ## Deactivate invoice
152
+
153
+ > PUT https://cryptoprocessing.io/api/v1/checkout/invoices/:invoice_id/deactivate
154
+
155
+ > Example request
156
+
157
+ ``` shell
158
+ curl -X PUT ' https://cryptoprocessing.io/api/v1/checkout/invoices/8f314370-83ab-4c00-8c77-c9874d4b2a6a/deactivate' \
159
+ -H ' Content-Type: application/json' \
160
+ -H ' Authorization: Token <token>' \
161
+ -d ' '
162
+ ```
163
+
164
+ > The above command returns JSON structured like this:
165
+
166
+ ``` json
167
+ {
168
+ "id" : " 165152de-4fde-4c40-ab3e-354a580c8e99" ,
169
+ "store_id" : " 8f314370-83ab-4c00-8c77-c9874d4b2a6a" ,
170
+ "amount" : " 1001.54" ,
171
+ "currency" : " EUR" ,
172
+ "status" : " NEW" ,
173
+ "success_redirect_url" : " https://example.com/process/success" ,
174
+ "error_redirect_url" : " https://example.com/process/error" ,
175
+ "created_at" : " 2020-12-30T12:49:49.899Z" ,
176
+ "updated_at" : " 2020-12-30T12:49:49.899Z" ,
177
+ "customer_email" :
" [email protected] " ,
178
+ "btc_address" : " 2N9HjtJZLvoiZ4kpXnJv9nGPSAYydEQhJQW" ,
179
+ "btc_amount" : " 0.044237474907194096" ,
180
+ "btc_rate" : " 0.000044169453948114" ,
181
+ "usd_amount" : " 1181.8172" ,
182
+ "usd_rate" : " 1.18" ,
183
+ "activated" : false
184
+ }
185
+ ```
186
+
187
+ ## Activate invoice
188
+
189
+ > PUT https://cryptoprocessing.io/api/v1/checkout/invoices/:invoice_id/activate
190
+
191
+ > Example request
192
+
193
+ ``` shell
194
+ curl -X PUT ' https://cryptoprocessing.io/api/v1/checkout/invoices/8f314370-83ab-4c00-8c77-c9874d4b2a6a/activate' \
195
+ -H ' Content-Type: application/json' \
196
+ -H ' Authorization: Token <token>' \
197
+ -d ' '
198
+ ```
199
+
200
+ > The above command returns JSON structured like this:
201
+
202
+ ``` json
203
+ {
204
+ "id" : " 165152de-4fde-4c40-ab3e-354a580c8e99" ,
205
+ "store_id" : " 8f314370-83ab-4c00-8c77-c9874d4b2a6a" ,
206
+ "amount" : " 1001.54" ,
207
+ "currency" : " EUR" ,
208
+ "status" : " NEW" ,
209
+ "success_redirect_url" : " https://example.com/process/success" ,
210
+ "error_redirect_url" : " https://example.com/process/error" ,
211
+ "created_at" : " 2020-12-30T12:49:49.899Z" ,
212
+ "updated_at" : " 2020-12-30T12:49:49.899Z" ,
213
+ "customer_email" :
" [email protected] " ,
214
+ "btc_address" : " 2N9HjtJZLvoiZ4kpXnJv9nGPSAYydEQhJQW" ,
215
+ "btc_amount" : " 0.044237474907194096" ,
216
+ "btc_rate" : " 0.000044169453948114" ,
217
+ "usd_amount" : " 1181.8172" ,
218
+ "usd_rate" : " 1.18" ,
219
+ "activated" : true
220
+ }
221
+ ```
0 commit comments