x402 is a payment rail, not a marketplace balance. When an agent pays for an API call, the USDC moves directly from the agent's wallet to the provider's wallet. APIStead never holds the funds.
This guide covers the practical side: where the money lands, how to set up a wallet, what the facilitator charges, and why APIStead keeps the rail x402-only.
The short version
- The agent calls your paid endpoint without payment.
- Your server returns
402 Payment Requiredwith aPAYMENT-REQUIREDheader. - The header states the price, network, token and
payTowallet. - The agent signs a USDC payment authorization and retries.
- A facilitator verifies the payment and submits the USDC transfer onchain.
- The USDC lands in the
payTowallet you control. - Your server returns the data with a
PAYMENT-RESPONSEreceipt.
There is no APIStead balance, no monthly payout and no custody. The money is in your wallet.
Where you receive the money
You receive USDC on Base at the wallet address in your 402 challenge.
- The default production network is Base mainnet, CAIP-2
eip155:8453. - The canonical USDC contract on Base is
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. - The buyer needs USDC, not ETH. With EIP-3009, the payment authorization is gasless for the buyer and the facilitator pays the settlement gas.
- You can use a wallet you already control: Coinbase Wallet, MetaMask, Rabby, a hardware wallet, or a multisig.
The wallet address is the payTo value in the challenge. Set it once per route, or per provider if your platform supports multiple payout wallets.
Testnet first, then mainnet
Use Base Sepolia (eip155:84532) while developing:
- Get test USDC from the Circle faucet.
- Use the public
https://x402.org/facilitatorfor testnet. - Run one end-to-end payment and check the transaction on Base Sepolia.
For production:
- Use Base mainnet (
eip155:8453). - Use a production facilitator. Coinbase CDP is the default APIStead integration.
- Run one small real payment before opening the route publicly.
The public x402.org facilitator is for development and testnet. Do not use it as the default mainnet facilitator.
Facilitator fees
x402 itself has no protocol fee. The facilitator may charge for settlement.
Coinbase's CDP Facilitator currently offers:
- 1,000 onchain transactions per month free
- $0.001 per onchain transaction after that
- Payment verification is free
For most early-stage APIs, facilitator costs are negligible. At high volume, batch settlement can spread one onchain transaction across many calls.
Enabling a paid route in APIStead
Set these environment variables:
X402_ENABLED=true
X402_PAY_TO=0xYourBaseWallet
X402_NETWORK=eip155:8453
X402_FACILITATOR_PROVIDER=cdp
CDP_API_KEY_ID=your_cdp_key_id
CDP_API_KEY_SECRET=your_cdp_key_secret
Then test the challenge:
curl -i "https://apistead.qd.je/api/v1/us-zip/10001"
You should see 402 Payment Required and a PAYMENT-REQUIRED header. With a funded x402 client, the same request returns 200 plus a PAYMENT-RESPONSE receipt.
The receipt contains the transaction hash. Open it on BaseScan and confirm:
- the USDC amount matches the price;
- the recipient is your
payTowallet; - the transaction succeeded.
What to do with the USDC
You have several options:
- Hold it in the business wallet as working capital.
- Off-ramp through Coinbase, an exchange or a bank on-ramp that supports USDC on Base.
- Convert to another asset or fiat through your treasury process.
- Pay suppliers or contributors in USDC if that fits your operations.
Keep a record of every settlement: date, amount, route, tx hash and payer wallet. You will need it for accounting, tax and disputes.
Wallet security
Treat the payout wallet like a business bank account:
- Use a dedicated wallet, not a personal wallet.
- Use a hardware wallet or multisig for treasury.
- Keep the private key out of the repository and out of environment files on shared machines.
- Use a separate verification wallet with a small balance for verification.
- Monitor the wallet and the 402 challenges for unexpected
payTochanges. - Rotate the wallet only with a public announcement and a listing update.
Why APIStead uses only x402
Agent API calls should not depend on a card checkout. A card form does not fit an autonomous call, chargebacks are a poor match for delivered data, and a fixed card fee is larger than most per-call prices.
APIStead uses x402 with USDC on Base for every payment:
- per-call API payments;
- paid route verification;
- featured placement;
- enterprise and private-catalogue work.
There is no card checkout, no subscription billing and no separate payment processor. A provider is paid at the payTo wallet in the challenge. APIStead is not in the payment path.
For add-on services such as verification or featured placement, the price is quoted in USDC and paid on Base. During the preview, those services are arranged directly; a fixed-price x402 checkout is the next step.
Facilitator, not processor
The facilitator is infrastructure, not a merchant account. It verifies the payment authorization and submits the USDC transfer. It does not hold funds, extend credit or provide chargeback protection.
Use a production facilitator for mainnet. Test on Base Sepolia first. Keep the facilitator URL and the payTo wallet under your control.
What APIStead charges
APIStead is deliberately simple: free listing, 100% kept, direct USDC settlement. Revenue comes from first-party APIs, optional verification and featured placement, not from taking a cut of the call.
Recommended prices
| Tier | Price | Examples |
|---|---|---|
| Commodity lookup | $0.001 | US ZIP, IP, geocoding, distance, current weather |
| Validation / enrichment | $0.002-$0.005 | Forecast, email verification, batch checks |
| Compliance / evidence | $0.01-$0.05 | Sanctions screening, permits, source-linked evidence |
| Custom / bulk | $0.05+ | High-value datasets, batch jobs, enterprise |
Do not price a $0.001 call with a card rail. The fixed fee will consume it.
The practical checklist
- Create a dedicated Base wallet.
- Test on Base Sepolia with test USDC.
- Set
X402_PAY_TOto the production wallet. - Use a production facilitator for mainnet.
- Run one real verification payment and verify the receipt on BaseScan.
- Record every settlement for accounting.
- Keep the payment rail x402-only; do not add card checkout.
- Publish the payout wallet and the receipt policy.
The core rule: the agent pays the provider directly, and the provider controls the wallet. APIStead is the discovery and verification layer, not the custodian.