Invoices
An invoice payable in the chosen coin and network.
How it works
- You create an invoice with a fiat amount:
amounthas at most two decimals andcurrencyis its currency (USDby default). - The service converts the amount into the chosen cryptocurrency at the current rate.
- The response keeps the original values in
sourceAmount,sourceCurrencyandsourceRate, whileamountholds 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.