Invoice callbacks
Sent to your callback URL whenever the status of an invoice changes.
Body
Invoice ID.
The foreign_id you provided when creating the invoice.
invoice The currency and amount received for the invoice so far, in the invoice currency, or in the convert_to currency for invoices with automatic conversion. The amount is 0 while nothing has been paid and for cancelled invoices. For partially paid invoices, including failed ones, it holds the part of the amount received.
Transactions related to the invoice. The transaction_type field shows what each entry is:
blockchain: an incoming transaction on the blockchaininternal: an incoming transaction for an off-chain payment, which is never sent to the blockchainexchange: the conversion of the payment, present only for invoices with automatic conversion
An invoice can be paid with several transactions (installments), in which case all of them are listed. Once the full amount is received, the invoice is marked as confirmed.
- blockchain
- internal
- exchange
Fees charged for the invoice payment.
The reason the invoice failed. Empty string otherwise. Possible values:
Timer expired. User not paid.: the invoice expired before any payment was receivedTimer expired. User paid less than requested.: the customer paid less than the required invoice amount before the invoice expiredTimer expired. Transactions were in status processing too long.: a payment was detected but remained in processing for too long without being finalizedCancelled by customer.: the invoice was cancelled via /v2/invoices/{foreign_id}/cancel
Invoice status:
pending: the invoice has been created and is waiting for payment, or has been partially paid and is waiting for the remaining amount. Until the customer selects a payment currency, the callback has nocrypto_addressandcurrency_sentconfirmed: the invoice has been paid in full, with one or several transactions, and can be treated as completed on your sideprocessing: a payment transaction has been detected in the mempool but has not yet been finalized. Treat the invoice as pending until you receive theconfirmedcallbackfailed: the invoice was not paid and will not be completed. Use theerrorfield to determine the reason
pending, confirmed, processing, failed Unix time in seconds when the rate was fixed, that is, when the customer selected a payment currency. null until then, and for invoices cancelled via the API.
Unix time in seconds when the invoice expires. null for invoices cancelled via the API.
The end_user_reference you provided when creating the invoice.
Details of the address the customer pays to. Absent until the customer selects a payment currency, and from invoices cancelled via the API.
The invoice amount in the payment currency. Absent until the customer selects a payment currency, and from invoices cancelled via the API.