Create the invoice
UsePOST /api/payments/initialize with the verified merchant’s server-side API key. Finish wallet setup first: the server takes business identity and payout wallet from that merchant, not client-supplied recipient or merchant data.
checkout.createSession SDK integration.
Supported fields and response
The initialize schema acceptsamount, currency, optional tokenAddress, email, merchant, agentSCA, webhookUrl, payoutAddress and direction, with caller-specific authorization. Merchant payout is still server-resolved; consumer payout semantics are different. See initialize.
- Amounts are positive decimals with up to 6 decimal places; the configured cap is 10,000,000. Prefer decimal strings.
- Mainnet invoice creation settles USDC only. Same-token payment needs no conversion.
recipient,successUrl,cancelUrl, arbitrarymetadataand SDK-style checkout descriptions are not supported initialize fields. Do not promise automatic redirects or echoed order metadata.- The response includes
success,reference,checkoutUrl,agent,dataand canonicaltoken. A newly created invoice usesdata.status: 'ready'; that is not a top-level paid status. - A 120-minute
expiresAtis stored on the invoice but not returned at the initialize response’s top level. Read the verification view for that deadline.
Hosted and embedded URLs
Use the returned/checkout/{reference} URL. Embedded checkout is /checkout/embed/{reference}. Bare /checkout, /pay and /api/checkout/pay are not replacement payment paths.
Keep API keys on your server. The current widget signs through the connected browser wallet; a logged-in Circle consumer is not automatically that signer. Check network, actual signer, frozen recipient and amount before authorization. A connection, widget animation, URL visit or QR scan is not settlement evidence or spending permission.
Verify before fulfillment
GET /api/payments/verify/{reference} is a public cached invoice/receipt view. Its top-level status: true means the read succeeded. Payment success is data.status === 'SUCCESS'; the endpoint does not itself re-read or settle the chain.
Compare the saved order’s amount, currency and frozen merchantSCA, then inspect actual transaction evidence and recipient credit when needed. paid_at is a legacy creation timestamp; use issuedAt/settledAt for their distinct meanings. Do not fulfill from a return URL or unverified client hash.
Use your own durable order mapping and fulfill once transactionally. Inspect any in-flight payment before replacing an expired invoice so you do not collect twice.
Use GET/read-only evidence when inspecting an already paid invoice. POST /api/payments/verify-onchain can retry a failed platform fee even when the customer payment is already settled. Do not retry a fee that already succeeded, and do not use a paid invoice as a replay probe. Read mainnet availability.
Webhooks
webhookUrl notifications can include payment.settled with route-specific fields such as txHash from verify-onchain or arcTxHash from other handlers. Current outbound deliveries are unsigned and best-effort, not authenticated SDK event objects. There is no durable retry queue or guaranteed failed/expired notification.
Treat notifications as hints and reconcile independently. Read webhooks.

