Skip to main content
Mainnet x402 is disabled. Resource routes return 503 x402_unavailable without PAYMENT-REQUIRED; buyer Gateway routes use gateway_mainnet_unavailable. A missing credential may still return 401 on authenticated routes.

What exists in FlareHQ

The application has an internal Next.js wrapper, withGateway(handler, price, endpoint, listingId?, merchantId?), in src/lib/x402.ts. It verifies and settles before invoking the handler. It is not a published Express middleware API or a general-purpose SDK proof-verification method. Do not modify that settlement boundary when adding callers. A server must check resource safety and ownership before handing a paid request to the wrapper. Once settlement has occurred, an upstream error is a delivery failure, not an automatic refund.

Inspect a configured testnet challenge

Use only an explicitly configured testnet deployment. An unpaid request should return 402 with a base64 JSON PAYMENT-REQUIRED header and {} body. The accepted requirement supplies the actual network, amount, USDC asset, seller recipient and EIP-712 verifier.
A compatible Circle x402 client signs with an EOA, not a Circle SCA, and submits the authorization in base64 JSON payment-signature. Do not copy a registry address as payTo or invent a proof from transaction text.

Buyer convenience route

On configured testnet, authenticated merchants can use POST /api/x402/pay with { resourceUrl, body }. The server resolves the merchant’s buyer EOA; the caller does not provide its private key or a payment proof. The current implementation pays with a POST request, so verify the resource supports that method. Mainnet calls remain disabled. Do not fund a Gateway wallet on the assumption that setting a verifier enables this route.