Skip to main content
Every FlareHQ merchant gets a dedicated x402 buyer EOA (externally owned account) on Arc Mainnet, auto-provisioned the first time it is needed. This wallet holds your USDC and pays x402 invoices through the Circle Gateway — you need it funded before calling POST /api/x402/pay. The private key is encrypted at rest and is never returned by any endpoint; these routes only ever expose the public address and balances.

EOA Wallet Info

Returns the calling merchant’s x402 buyer wallet address and Gateway balances, creating the wallet on first call if it does not exist yet.

Endpoint

Request

Headers

Alternatively, an authenticated dashboard session (merchant_token cookie) is accepted.

Response

boolean
true when wallet info was returned.
string
The merchant’s x402 EOA wallet address on Arc Mainnet (e.g. 0xAbCd...1234). Auto-provisioned on first call if it does not exist.
string
Available USDC balance in the Circle Gateway, as a formatted decimal string (e.g. "10.500000"). This is the balance used to pay x402 invoices.
string
On-chain USDC balance of the EOA wallet itself, as a formatted decimal string (e.g. "0.000000").

Examples

Success Response

Error Responses

Notes

If a balance cannot be fetched (for example the Gateway API is temporarily unavailable), the endpoint still returns success: true with "0" balances rather than failing the request. The wallet itself is still created and reported.
The wallet’s private key is encrypted at rest with AES-256-GCM and is never included in any API response. Only the public address is ever returned.

Deposit to Gateway

Funds the calling merchant’s own x402 Gateway by moving USDC from the EOA wallet into the Circle Gateway. After depositing, the balance is spendable via POST /api/x402/pay.

Endpoint

Request

Headers

Alternatively, an authenticated dashboard session (merchant_token cookie) is accepted.

Body Parameters

string
required
Amount of USDC to deposit, as a decimal string (e.g. "10.5", "1.000000"). Up to 6 decimal places of precision are supported. Do not pass raw atomic units.

Response

boolean
true when the deposit settled on-chain.
string
On-chain transaction hash of the deposit to the Gateway contract. Verify on Arc Explorer.
string | null
Transaction hash of the ERC-20 USDC approval transaction, or null if the existing allowance already covered the deposit.
string
Amount deposited, as a formatted USDC decimal string (e.g. "10.500000").
string
Ready-to-open Arc Explorer URL for the deposit transaction: https://explorer.arc.io/tx/{depositTxHash}.
string
Human-readable confirmation — "Deposited 10.500000 USDC into Gateway for 0xAbCd...1234."

Examples

Success Response

Error Responses

Notes

For Arc Testnet development only: deposits require the EOA wallet to hold test USDC first. Get test USDC at faucet.circle.com and select ARC-TESTNET, then send it to your wallet address from GET /api/x402/eoa-wallet/me. Production deposits use real USDC on Arc Mainnet.
The EOA wallet’s USDC is tracked separately from its Gateway balance. The Gateway deposit moves USDC from the wallet into the Gateway’s batching contract, where it becomes immediately spendable for x402 payments.
A deposit performs two on-chain transactions — an ERC-20 approve (only when the allowance is insufficient, reported in approvalTxHash) and the deposit itself. Both must be included in the wallet’s transaction history; check approvalTxHash if a deposit appears to fail partway.