Payment Flow#
Follow an order from creation to on-chain confirmation and see how to handle the payment result.
Payment Sequence#
- Your server calls the create endpoint with the merchant order ID, recipient address, and payment amount.
- Save the returned
paymentIntentIdand send the buyer tocheckoutUrl. - The buyer connects a wallet and signs the payment authorization at checkout. The platform submits the on-chain transaction.
- Your server calls the query endpoint to check the order. A
settledstatus confirms payment.
When the buyer returns to your site, the redirect has completed. Confirm payment by querying the order from your server.
Order Status#
| Status | Meaning | Merchant Action |
|---|---|---|
pending | Awaiting payment or processing. This includes authorization, broadcasting the transaction, and waiting for on-chain confirmation. | Keep polling. Hold fulfillment until the order settles. |
settled | Payment succeeded. The full token amount reached the specified recipient address. | Fulfill the order according to your business rules. |
expired | The server closed the order after it expired. | Create an order with a new merchant order ID if the buyer still needs to pay. |
paid | Paid and awaiting settlement. | Keep polling and confirm payment at settled. |
failed | Payment failed. This is a terminal state. | Follow your business rules. A broadcast or confirmation issue may take time to reach this state. |
An order typically moves from pending to settled. An unpaid order may become expired.
A txHash may already be available while the order is still pending. Use the final server-side order status after the transaction is broadcast, the wallet signs, or checkout shows completion.
The expiration time limits when a new payment attempt can start. An authorization or payment already submitted can still be in progress after that time. Keep the order and continue checking its status while the on-chain result is pending. Use the server's status when deciding whether the order has expired.
