Pay as an agent
This page is for autonomous agents and the people who operate them. It is the practical companion to the x402 protocol reference: not how the payment works, but how to get from zero to a paying agent with the least friction.
One recommendation up front: at volume, buy in packs. Every pack is cheaper per call than retail: $0.004 from the first pack, $0.0032 at 25,000, against $0.005 for a single validation. And every pay-per-call settlement is its own on-chain transaction: the CDP facilitator these payments go through is free up to 1,000 on-chain transactions a month and charges $0.001 per transaction beyond that (CDP x402 pricing, read 2026-09-09), which is 20% of a $0.005 validation and 0.025% of a $4 pack. A single payment to POST /v1/credits/buy/1k returns an API key pre-loaded with 1,000 credits, no expiry, no subscription; made while presenting a key you already hold, it recharges that key instead. Pay-per-call works and needs no key at all; it is simply the expensive shape once your volume is real.
Step 1 — Give your agent a wallet with a budget
Any EVM wallet able to sign on Base works. If you are starting from nothing, Coinbase CDP Agentic Wallets bundle an MPC-secured wallet, an x402 payment client and programmable spend limits (for example "$1.00, expires in 5 minutes") in one install — private keys never reach the model's context.
npm install @coinbase/cdp-sdk @x402/core @x402/evm @x402/fetchSet a budget policy before the first real payment. An agent with an unbounded wallet is a bug, not a feature.
Step 2 — Fund it with USDC on Base
This is the one step that still needs a human today: put USDC on the wallet (exchange withdrawal, onramp, or your platform's wallet funding flow). $4 covers 1,000 validations with one pack (POST /v1/credits/buy/1k); paid call by call, a validation is $0.005. Gas is not your problem — x402 uses gasless USDC authorizations, the facilitator settles the transfer.
To rehearse the flow without real money first, CDP's faucet funds a base-sepolia test wallet — but note that IBANforge settles on Base mainnet (eip155:8453), so the rehearsal target must be your own test server, not our API.
Step 3 — Pay
Best value — one payment, then a key:
# via your x402-enabled client (this endpoint costs $4.00, paid inline):
POST https://api.ibanforge.com/v1/credits/buy/1k
# → { "api_key": "ifk_…", "credits": 1000, … }
# then call any endpoint with: Authorization: Bearer ifk_…Bundles: 1k = $4 · 5k = $20 · 25k = $80. Credits never expire; batch validation bills 1 credit per IBAN.
Already hold a key? Present it on the same call (Authorization: Bearer ifk_…): the credits land on that key, the answer carries same_key: true, and nothing changes in your integration. Presenting the key costs no request.
Pay-per-call — no key, no state (TypeScript, packages from Step 1):
import { CdpX402Client } from "@coinbase/cdp-sdk/x402";
import { wrapFetchWithPayment } from "@x402/fetch";
const client = new CdpX402Client(); // your funded CDP account
const payingFetch = wrapFetchWithPayment(globalThis.fetch, client);
const res = await payingFetch("https://api.ibanforge.com/v1/iban/validate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ iban: "DE89370400440532013000" }),
});
// first response is a 402 with payment terms; the wrapper signs, pays ($0.005) and retriesPython: pip install cdp-sdk "x402[evm,httpx]" and use x402HttpxClient the same way — see CDP's buyer quickstart for the exact signer setup.
Try before you spend
GET /pingandGET /.well-known/x402are free — the manifest lists every payable route with its exact price.- No key at all: up to 25 IBAN validations a week per source address, on
POST /v1/iban/validateonly, to try it out (reset on Monday at 00:00 UTC). - The MCP server gives 25 free tool calls a week per source address, with no key — enough to check the data quality on your own IBANs.
- An API key needs no e-mail and no card, and reaches 200 requests a month once claimed: enough to evaluate the other endpoints before paying.
If something blocks you from paying
Tell us — that is exactly what the feedback channel is for: the send_feedback MCP tool or POST /v1/feedback (free, no auth, works even after a quota refusal). Missing network, unclear pricing, a wallet flow that fails: a human reads every report.
What the fee pays for
The public registers behind this API are available free of charge from their official publishers — the full list, with each licence, is on the data sources page. What you pay for is the validation logic, the aggregation of a dozen registers into one response, the freshness, and the API itself.