flarehq.xyz/checkout/{reference}, and redirects your customer there to complete payment on Arc Mainnet. Consumer checkout settles USDC directly. When the payment settles — or the customer cancels — FlareHQ bounces them back to whichever URLs you supply.
How It Works
Request Parameters
string
required
Payment amount as a decimal string, e.g.
"15.00". USDC has 6 decimal places; values are validated to two decimal places by the API.string
required
Must be
"USDC". Production checkout settlement is USDC on Arc Mainnet.string
required
The 0x wallet address that will receive the USDC on Arc Mainnet (chain ID 5042).
string
Short description shown to the customer on the checkout page, e.g.
"Pro Subscription".string
required
Full URL to redirect the customer to after a successful payment.
string
required
Full URL to redirect the customer to if they abandon or cancel checkout.
object
Arbitrary key-value pairs stored alongside the payment record. Use this to attach your internal identifiers — order IDs, customer IDs, plan names — so you can reconcile webhooks without a separate lookup.
string
URL that FlareHQ will POST payment lifecycle events to. See Webhook Events below.
Response Fields
boolean
true when the session was created successfully.string
Unique session identifier in the format
arc_ref_.... Use this to poll status or correlate webhook events.string
The full hosted checkout URL —
https://flarehq.xyz/checkout/{reference}. Redirect your customer here immediately after creation. Returned as session.checkoutUrl by the SDK.string
Initial status of the session. Always
"ready" on creation.string
ISO 8601 timestamp 120 minutes from creation. The session is invalid after this time and the checkout page will show an expiry error.
Example Response
Webhook Events
FlareHQ delivers aPOST request to your webhookUrl when payment status changes. Verify requests by checking the x-flarehq-signature header against your webhook secret.
FlareHQ does not emit a
payment.failed webhook. If a session expires or its on-chain transfer fails, poll GET /api/payments/verify/ — the status returns FAILED or EXPIRED.
Example Payload — payment.settled
Full Next.js Example
The following API route creates a checkout session and returns the redirect URL to your front-end in a single request.src/app/api/checkout/route.ts
Use the
metadata field to attach your own order or customer IDs to every session. When the payment.settled webhook fires, that metadata comes back in the payload — so you can fulfil the order without an extra database lookup.
