Payment Lifecycle
Every payment goes through a series of statuses:
Settlement
When a payment is markedpaid, the settlement process begins automatically:
- Platform fee is deducted
- Partner commission is calculated (if applicable)
- Net amount is transferred to the merchant’s receive account
- Webhook is sent with
settlement_status: "paid"
Amounts
All amounts in the API are in the smallest unit of the currency:1000USD = $10.00settlement_amountof1000= 10.00 USDC
Creating a Payment
The
amount.value is in the smallest unit of the currency. For USD, this means cents.
So 1000 = $10.00.checkout_id and a qrCode (SEP-7 URI) that the customer can scan with any Stellar wallet.
Idempotency
Network retries and double-submits can otherwise create duplicate payments. To makePOST /payments safe to retry, send an Idempotency-Key header — a unique string (max 255 characters) that identifies the logical request:
- If a request with the same key is replayed after the first one completed, the original payment’s response is returned — no second payment is created.
- If the original request is still being processed, the retry receives 409. The 409 is always transient — use a short exponential back-off (e.g. retry after 1s, then 2s).
- Reusing a key with a different request body returns 422 (it indicates a client bug).
- A key longer than 255 characters returns 400.
order-1234). The official e-commerce plugins (WooCommerce, PrestaShop, Odoo) do this automatically, keyed by the order.
If you omit the header, each request creates a new payment.