Invoices

An invoice payable in the chosen coin and network.

How it works

  • You create an invoice with a fiat amount: amount has at most two decimals and currency is its currency (USD by default).
  • The service converts the amount into the chosen cryptocurrency at the current rate.
  • The response keeps the original values in sourceAmount, sourceCurrency and sourceRate, while amount holds the crypto amount to pay.
  • After the payment, Atomic Pay tracks the transaction and waits for the required confirmations.
  • Each invoice state change triggers a webhook. You can also check the state via GET /invoices/{invoiceId}.

Amount calculation

  • remainingAmount = max(0, amount - confirmedAmount)
  • overpaidAmount = max(0, confirmedAmount - amount)
  • If confirmed and pending amounts together cover the invoice, the status may be confirming.