Skip to main content
Live on Base mainnet

Get paid by AI agents.In USDC and Pix.

Agents do not fill forms and they do not wait. Your API, your MCP server, or a simple link answers 402; they pay in USDC, or Pix on links; every settlement seals a receipt you can prove.

the card on the right is live: curl gw.codespar.dev/e2e-live answers 402 and settles a real cent on Base

gw.codespar.dev · live paywalls
GET /agent-ready$0.04live
GET /agent-ready-metered$0.04 capbeta
GET /e2e-live$0.01pay it yourself
pay link · Pix · BRLearly access

every payment seals a hash-chained receipt · rcpt_ILLNDmWV

Sell to agents

Three ways to get paid by an agent.

All three pay you in USDC over x402, Pix on links, into the same wallet, with the same verifiable receipt. Pick the one that fits how you sell.

No checkout page, no invoice run, no card acquirer. The 402 is the invoice; the receipt is your ledger.

Gate

Live

x402 paywalls for what you already serve. Your API charges per call and your MCP server charges per tool, before the request ever reaches your backend. You publish a price; agents pay it.

agent → gw.codespar.dev/you → your API

agent → gw.codespar.dev/mcp/you → tools/call

live on Base mainnet

Meter

Beta

For work you can only price after it runs. The agent signs a cap up front, you meter what it actually used, the difference goes back on-chain, and the receipt is re-sealed with the real number.

signed cap → meter → refund → re-seal

beta, behind a flag

Collect

Early access

One link any agent can pay in USDC, and any Brazilian can pay in Pix. You fulfill only after it is verified.

agent → gw.codespar.dev/pay/you → USDC

human → same link → Pix

early access

gw.codespar.dev
402verifysettleseal receipt
settles onUSDC · BaselivePix · BRLearly access
agentic receiptrcpt_ILLNDmWVhash-chained, verifiable offline
How you price itStatus
flat rate

A fixed price per call. Set it once, publish, done.

Live
tiered

Price by paid-call volume. The price per call drops as an agent keeps buying.

Live
dynamic

Price set at request time by your own endpoint, so cost can follow the payload.

Live
token-based

Price by tokens processed, metered against the signed cap.

Beta
time-based

Price by compute time, metered against the signed cap.

Beta
per-unit

Price per unit returned, metered against the signed cap.

Beta
per-tool

Each MCP tool carries its own price, charged before that tool runs.

Live
link

One link. USDC from any agent today, Pix when the Brazilian rail lands.

Early access

Five minutes, no card acquirer.

Five-minute setup
01create a paywall02set the price03get paid

Point the gateway at a URL you already serve, choose flat, tiered, dynamic or per-tool, and publish. No merchant account, no underwriting, no settlement window: the first agent that pays settles straight into your wallet.

Gate is proven on Base mainnet with real USDC, per call and per tool. Meter is in beta behind a flag while we settle the refund math in public. Collect is in early access; the Pix leg lands with our Brazilian production rail.

Meter · beta

Usage-based, without trusting anyone's meter.

Fair prices are easy; fair caps are hard. The agent pre-authorizes a signed ceiling, you charge what was measured, the difference goes back on chain.

the metered loop
01 signed cap02 metered usage03 on-chain refund04 re-sealed receipt
status, honestlybuilt end to end, merged, behind a flag while the final runs complete
gaafter the final mainnet runs complete
Proof, on-chain

Settlements, not screenshots.

Every row below is real and live on Base mainnet right now, including our own Agent-Ready Check, which is itself a paywalled x402 endpoint. Curl any of them and a 402 comes back; open the hash and check the settlement yourself, with no API key and no call to us.

gw.codespar.dev · live paywalls, verified settlements

Deliberately small day-one amounts, hard-capped at $1 per payment while the lane is young. The point is the loop, not the volume.

What gets bought

Six things agents are paying for today.

A stranger's API

$0.001 · proven on mainnet

An agent finds a paid endpoint through discovery, pays it, and gets the data. No account, no key, no prior relationship. We proved this one on mainnet.

Reports that render

from $0.01 per render

A report, an image, a video: charge only when the artifact renders, at the price of that render.

Tools by the call

each tool, its own price

An MCP server where each tool carries its own price, charged before the tool runs.

A cart that closes in Pix

USDC or Pix · one link

A checkout link that takes USDC from a global agent or Pix from a Brazilian one. Same link, verified before fulfillment.

Also settles in Pix.

Subagent payroll

$0.10 · proven wallet to wallet

A parent agent settles its helpers wallet to wallet when the task lands: three subagents, three receipts, and the orchestrator can prove where every fraction went.

Also settles in Pix.

Credit packs

one-time · closes after first payment

Sell a bundle of calls once; the one-time link closes after the first payment.

Also settles in Pix.

Your agents buy · Intent-Pay

Sign the purpose. The agent runs.

The scariest demo in agent payments is a retry loop with a wallet. Every payment on this page ran under a signed mandate, not a blank check, and the cap is cryptographic: it lives in the signature, not in a proxy setting someone can edit.

  1. The agent drafts the intent

    Budget and purpose, in plain terms: what it wants to spend, on what, and up to how much.

  2. The owner signs once

    A single signature authorizes the mandate: scope, cap, expiry. No re-approval per transaction.

  3. Every spend is checked

    Off-mission spend is refused at the wallet, before anything touches the chain.

Do not make your agent stop and wait for you. Let it run inside the intent you signed.

The negative check, for real
$ codespar spend --mandate cm_xxx --amount 2 --agent bot
422 x402_mainnet_cap_exceeded

We tried paying $2 against a $1 cap. Refused before anything touched the chain (422 x402_mainnet_cap_exceeded).

Every settlement closes with a hash-chained receipt, the same audit primitive that backs every payment CodeSpar routes. Selling is the top half of this page; this is how you send your own agents out to buy, with an allowance instead of an API key.

Wallet

One wallet per agent. One mandate over it.

An agent that can earn and an agent that can spend need somewhere to keep the money. Each one gets its own wallet, non-custodial, with a slot per rail: dollars stay dollars and reais stay reais, no synthetic FX in between.

The same signed mandate governs both slots. What the agent may spend, and where, is decided before the money moves, not after.

wallet · agent: checkout-botnon-custodial · keys never ours
USDC · Base$12.47Live
+ $0.04 · gate settle · /agent-ready2m ago · receipt sealed
BRL · PixR$ 184,20Early access
− R$ 96,40 · pix out · supplier invoice1h ago · receipt sealed
ReceiveTransferAdd fundsPix outBridge
mandate cm_7f3a · cap $50/day · governs both slots · every move sealed

Illustrative balances from a sandbox agent. What matters: the wallet belongs to the agent, the mandate belongs to you, and neither one is us holding your money.

Pay

One governed call, any rail.

Your agent calls pay once. The runtime checks the mandate, picks USDC over x402 or Pix in Brazil, and seals the receipt. USDC/x402 is one slot of that wallet; the Pix lane is the same runtime, already proven in production in Brazil.

See the Pix lane
Quickstart

From zero to a settled payment in five minutes.

Checkout was designed for humans; agents get a status code. Curl the live demo and read the 402 with your own eyes, then create a mandate and let your agent pay it.

what a checkout asks a human for
✗ form✗ 3DS challenge✗ captcha✗ wait for approval

Every step assumes a person is watching a screen. An agent has no screen, no phone and no patience, so it gives up or it hardcodes your card.

what the gateway asks an agent for
✓ 402✓ sign inside the mandate✓ 200 · receipt sealed

One round trip over plain HTTP. The cap was signed before the call, and the receipt is sealed the moment it settles.

quickstart.sh
$ npx @codespar/cli mandate create --consumer you --agent bot \
--payee https://gw.codespar.dev/agent-ready --cap 1 --per-tx-cap 1
mandate created
$ codespar spend --mandate cm_xxx \
--payee https://gw.codespar.dev/agent-ready \
--amount 0.04 --agent bot
spent 0.04 USDC via x402 · sealed
The 402 challenge
HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "x402Version": 2,
  "error": "payment required",
  "resource": {
    "url": "https://gw.codespar.dev/agent-ready",
    "mimeType": "application/json",
    "description": "Agent-Ready Check"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "40000",
      "payTo": "0x158E0638D971adB1f814A7F9f7ae891d4e1eF792",
      "maxTimeoutSeconds": 120
    }
  ]
}

What gw.codespar.dev/agent-ready returns before payment: our own check, priced at $0.04 a call. A real HTTP 402 shaped by the x402 spec, not a screenshot. Amounts are USDC minor units, so 40000 is $0.04.

try it nowcurl gw.codespar.dev/e2e-liveclaude mcp add codespar
Read the CLI docs
FAQ

Short answers to the obvious questions

Day one of production called for a short cap. The pipeline (mandate, hold, settlement, receipt) is the same for $100. The ceiling is an env var, not architecture.

It is machine payment. USDC over x402 is the global micropayment rail between agents. The same wallet also carries BRL/Pix slots. No synthetic FX; each currency stays on its own rail.

You can. Every transaction links to Basescan, the public block explorer for Base. No API key and no call to CodeSpar required to check it.

The URL leg is gasless for the payer; the facilitator's relayer covers gas. A direct wallet-to-wallet transfer costs about $0.001 in gas on Base.

A signed authorization: cap, scope (which payees), and expiry. The agent can only spend inside it. Spend outside the mandate is refused at the wallet, before anything settles.

Gate is live on Base mainnet. Meter is merged and in final validation behind a flag. Collect links are in early access; the Pix leg lands with our Brazilian production rail.

Take your first $0.01 from an agent.

The permanent $0.01 demo is live right now, and the Monetize hub creates yours in minutes. Your backend keeps speaking plain REST; the gateway does the money.

gate: live · meter: beta · collect: early access

Get paid by AI agents, in USDC and Pix | CodeSpar | CodeSpar