Skip to main content
The customer pays directly to the merchant wallet; FlareHQ never holds checkout funds. Your backend creates an invoice and returns its hosted URL. Creating the invoice does not submit a payment. Hosted checkout is live on Arc Mainnet. The customer authorizes a USDC payment to the invoice’s frozen merchant wallet; FlareHQ never holds the funds. Creating an invoice does not submit a payment. Read mainnet availability.

Create the invoice

Use POST /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.
This example has not been run against an authenticated production account. There is no verified checkout.createSession SDK integration.

Supported fields and response

The initialize schema accepts amount, 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, arbitrary metadata and 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, data and canonical token. A newly created invoice uses data.status: 'ready'; that is not a top-level paid status.
  • A 120-minute expiresAt is 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.