{ "success": true, ... } with a 2xx status, and failed calls return a JSON error body with an HTTP status code that signals what went wrong. This page documents every error code, shows you how to parse the error shape, and walks through the most common integration issues with step-by-step fixes.
Error Response Format
All error responses share the same JSON envelope:boolean
required
Always
false for error responses.string
required
A human-readable description of what went wrong. Safe to surface in logs; do not display this string verbatim to end users in production.
string
An optional string with a concrete suggestion for resolving the error. Present when FlareHQ can identify a likely fix.
HTTP Status Code Reference
Rate Limits
FlareHQ enforces per-API-key rate limits to ensure fair access and platform stability:
When you exceed a limit the API returns
429 Too Many Requests with a Retry-After header indicating how many seconds to wait before retrying. If your integration requires higher limits, contact the FlareHQ team at flarehq.xyz to request an increase.
Implement exponential backoff for all retryable errors (
408, 429, 500, 502). Start with a 1-second delay and double it on each subsequent attempt, up to a maximum of 60 seconds.Handling Errors in Code
Troubleshooting Common Issues
My payment is stuck as PENDING
My payment is stuck as PENDING
Checkout sessions expire after 120 minutes from creation. If a payer does not complete payment within that window, the session moves to
EXPIRED and can no longer be paid.Fix: Initialize a new checkout session and direct the user to the new URL. If you are building an automated retry flow, check session.status before re-using a session URL.On-chain transaction failed (502 Bad Gateway)
On-chain transaction failed (502 Bad Gateway)
A
502 error means the transaction reached Arc but the smart contract reverted it. The most common cause on testnet is an unfunded Smart Contract Account (SCA) wallet.Fix: Fund your SCA wallet with testnet USDC using the Circle faucet at faucet.circle.com. After funding, verify your balance on ArcScan before retrying.Invalid payment proof (403 Forbidden)
Invalid payment proof (403 Forbidden)
x402 payment proofs include a timestamp and become invalid after 5 minutes. If your client caches a proof and replays it on a later request, FlareHQ will reject it with
403.Fix: Generate a fresh Circle Nanopayment authorization immediately before attaching it to your X-402-Payment-Proof header. Do not cache or reuse proofs across requests.Agent not found in registry (404 Not Found)
Agent not found in registry (404 Not Found)
If a call to an agent endpoint returns
404 with a message like "Agent not found in registry", your agent has not been deployed yet — or was deployed to a different environment.Fix: Deploy your agent first by calling POST /api/agent/deploy with your agent manifest, then retry the operation. Make sure the environment in your deployment matches the environment you are calling (testnet vs production).Webhook signature verification fails (400 Bad Request)
Webhook signature verification fails (400 Bad Request)
Signature mismatches almost always happen because the raw request body was parsed as JSON before being passed to
constructEvent. Re-serializing JSON can change whitespace and field order, invalidating the HMAC.Fix: Read the body as raw bytes or a string — use express.raw() in Express or req.text() in Next.js — and pass that directly to flarehq.webhooks.constructEvent(). See the Webhooks page for verified examples.Status Page and Support
Status Page
Check real-time Arc testnet and FlareHQ API uptime, and subscribe to incident notifications.
Contact Support
Reach the FlareHQ team for rate limit increases, persistent errors, or production onboarding help.
Related Pages
SDKs
Install the FlareHQ SDK and configure it for testnet or production.
Webhooks
Receive real-time delivery notifications and verify webhook signatures.
Quickstart
Build your first payment integration end-to-end in under five minutes.
x402 Access Control
Gate API endpoints with sub-cent micropayments using the HTTP 402 protocol.

