curl --request POST \
--url https://app.cryptoprocessing.com/api/v2/invoices/{foreign_id}/cancel/ \
--header 'X-processing-key: <api-key>' \
--header 'X-processing-signature: <api-key>'{
"errors": {
"error": "Invoice cannot be failed in its current state.",
"code": "invalid_invoice_state"
}
}Use this endpoint to cancel an invoice. You can only cancel invoices while they are still at the created, pending or processing stage. Invoices that have the confirmed or failed statuses cannot be cancelled.
curl --request POST \
--url https://app.cryptoprocessing.com/api/v2/invoices/{foreign_id}/cancel/ \
--header 'X-processing-key: <api-key>' \
--header 'X-processing-signature: <api-key>'{
"errors": {
"error": "Invoice cannot be failed in its current state.",
"code": "invalid_invoice_state"
}
}Your API key.
The request body, signed with HMAC-SHA512 with your secret key. You can find the secret key in your account.
The unique identifier of the invoice you need to cancel.
OK