An invoice is a request for a cryptocurrency payment which is linked to its unique cryptocurrency address and the amount that has to be paid while the invoice is valid.
The invoice amount can be expressed either in cryptocurrency or fiat currency.
As cryptocurrency payments are made over a separate network, when creating an invoice, we generate a unique payment address for each cryptocurrency so we can match customers to their payments. When a customer makes a cryptocurrency payment, the transaction is then broadcast to the cryptocurrency network for validation/confirmation.
Every time the customer sends cryptocurrency to the invoice address, we send the first callback with the
transaction_createdevent. It means that the payment has just been identified, but it has not been validated by the network yet. When the transaction is completely verified and confirmed by the network, we send another callback with the
transacion_confirmedevent, and the invoice automatically changes its status from
The invoice is only valid for a limited time (10 minutes max). This is due to the fact that for each invoice Cryptopay freezes the exchange rate for 10 minutes.
In some cases, customers make payments after the invoice has expired. In this case, the invoice status will be updated to
There are also cases where customers may overpay or underpay the invoices. When this happens, the invoice changes its status to
underpaidcontext. In any of the above user scenarios, the
unresolvedpayment status can be updated to
refundedmanually, or Cryptopay will automatically update the status as soon as the payment is validated by the network if the appropriate settings have been selected on the Settings > API > How to handle unresolved invoices in your account.