Skip to main content
Every verification costs one credit. Credits cost $0.05 each, paid in USDC on Base.

Free credits

New accounts start with 50 free credits — enough to wire Chance into your agent and see it working end to end. No card required. You can watch your balance in the dashboard; each response also returns creditsRemaining, and GET /api/v1/credits returns the balance plus top-up terms.

Running out

When your balance hits zero, the API returns 402 Payment Required:
Your agent should treat a 402 on a verification call as “verifier unavailable” and fail closed — don’t execute an unverified action. It can then top up and retry.
The out-of-credits 402 on verification endpoints (/api/v1/intent, wallet propose, MCP) is not itself x402-payable — it carries no PAYMENT-REQUIRED header, only the JSON topup pointer above. If you wrap those calls with an x402 client (e.g. wrapFetchWithPayment), it will throw trying to parse payment terms; catch it, read the topup pointer from the body, and pay at the dedicated /api/v1/credits/topup endpoint. Only /api/v1/credits/topup speaks the full x402 payment handshake.

Top-ups (x402)

The top-up endpoint speaks x402 v2 — the HTTP-native payment protocol — so agents can refill their own balance autonomously, with no card and no human in the loop:
  1. The first call returns 402 with a PAYMENT-REQUIRED header: exact scheme, USDC on Base mainnet (eip155:8453), amount = credits × $0.05.
  2. Your x402 client signs an EIP-3009 transferWithAuthorizationgasless: the wallet only needs USDC, never ETH — and retries with a PAYMENT-SIGNATURE header.
  3. The payment settles on-chain (typically ~1s) and the credits land on the account that owns the API key, no matter which wallet paid. The response carries the new balance and the settlement tx hash in the PAYMENT-RESPONSE header.
With @x402/fetch the whole dance is one wrapper:
Retries are safe: crediting is idempotent per payment authorization (the EIP-3009 nonce), so resubmitting the same signed payment can never double-credit — you’ll get the original result back with "replayed": true.

Naming the account: API key or public code

Two ways to say which account a payment credits:
  • x-api-key: chance_sk_… — the owner’s secret key, for your own agent. The 200 response includes the running creditsRemaining.
  • ?account=chance_topup_… — a public account code (find it under Top up in the dashboard). It can only add credits, so it’s safe to paste into any third-party agent to have it pay on your behalf. No API key needed; the balance is not revealed in the response.
Every account has a top-up page in the dashboard that generates the code and a ready-to-paste instruction for an agent, linking a machine-readable guide at GET /api/v1/credits/topup/guide.

Payer wallet requirements

  • A plain EOA holding USDC on Base mainnet. Works with viem local accounts, CDP server wallets, and Privy server wallets.
  • On the legacy v1 x402-fetch package, payments above 0.1 USDC are blocked by a default maxValue — pass a higher maxValue or (better) use the v2 @x402/* packages shown above.

Limits