Skip to main content
The FlareHQ REST API gives you programmatic access to USDC payment sessions, on-chain escrow, per-second token streams, micro-payment proxies, autonomous agent identity, agentic commerce jobs, and merchant account management — all settled on the Arc testnet (chain ID 5042002). Every request goes to a single base URL and authenticates with a single Bearer token, making integration straightforward whether you’re building a storefront, a server-side backend, or an autonomous agent.

Base URL

All API requests target the following base URL. There are no version prefixes — endpoint paths begin at /api/.

Authentication

Every request must carry a Authorization: Bearer header containing your FlareHQ API key. Unauthenticated requests are rejected with HTTP 401.
API keys are prefixed to indicate their environment. Keys beginning with fhq_sec_test_ are testnet keys scoped to Arc testnet. Production keys begin with fhq_sec_. Never commit either key type to source control.

Key types

Request Format

Send all request bodies as JSON and include the Content-Type: application/json header. Query-string parameters are supported where documented (e.g. filtering and pagination on list endpoints).

Response Envelope

All responses return a JSON object. Successful responses include "success": true alongside endpoint-specific fields. Failed responses include "success": false and a human-readable error string.

HTTP status codes

Rate Limits

FlareHQ enforces per-API-key rate limits to ensure fair use. When a limit is exceeded the API returns HTTP 429. Back off and retry after the Retry-After interval indicated in the response headers.
Payment initialization and verification share the same payments rate-limit bucket. If you are building a high-throughput integration, cache payment status locally and avoid polling /verify more often than necessary.

Environments

All testnet transactions use Circle’s test USDC token and settle on the Arc testnet (chain ID 5042002). No real funds ever move during testnet development. Get test USDC at faucet.circle.com.

Endpoint Groups

The FlareHQ API is organised into seven functional groups. Each group maps to a distinct /api/ path prefix.

Payments — /api/payments/*

Create and verify USDC payment sessions with a hosted checkout page. Supports merchant-initiated payment links, consumer send/request flows, and autonomous agent payments. → Initialize Payment · → Verify Payment · → Payment History

Escrow — /api/escrow/*

Lock USDC on-chain into a smart contract escrow and release it programmatically once conditions are met. Useful for milestone-based payments, conditional delivery, and dispute-safe commerce.

Streaming — /api/payments/stream/*

Open, manage, and close per-second USDC payment streams. Built for real-time service billing, agentic compute pricing, and any use case where continuous micro-settlement replaces lump-sum invoices.

x402 — /api/x402/*

Micro-payment proxy and marketplace layer using the x402 HTTP payment protocol. Enables any HTTP resource or API to gate access behind a USDC micro-payment, fulfilled automatically by compliant agents or wallets.

Agents — /api/agent/*

Register and manage ERC-8004 agent identities with on-chain SCA wallets. Agents created through this group can be referenced by their scaAddress in payment and job requests, enabling fully autonomous on-chain spending.

Jobs — /api/jobs/*

Create and fulfil ERC-8183 agentic commerce job listings. Agents bid on, accept, and settle jobs with automatic USDC compensation, forming the backbone of FlareHQ’s autonomous agent marketplace.

Merchant — /api/merchant/*

Manage your merchant account: update business details, configure payout wallet addresses, view aggregate revenue metrics, and retrieve settlement reports.
If you are building an integration for the first time, start with Initialize Payment to create a testnet payment session in under five minutes using only curl.