payment-rails-lab

Every agent payment rail,
one ledger.

askReceipts records what autonomous agents buy — over anypayment rail — and what people upload by hand, all in one receipt ledger. The rail changes; the receipt doesn't. The two stores below settle on different rails to prove it.

x402 · MPP live nowAP2 · ACP · XRPL/RLUSD · L402 on the roadmap
How receipts reach the ledger
Agentautonomous
buy_resource
StoreAgentEats · AgentBrew
save_receipt
Personmanual
scanphotoemail-in
askReceiptsone ledger — every rail, every upload

Two sources, one book: an agent's buy_resource call pays a store and files the receipt; a person scans or forwards theirs. Both land in the same ledger — get_spending_summary and ask_receipts answer across every source.

AgentEats

Diner · Base Sepolia testnet
x402
What it can do
get_menubuy_resource

Both tools come from one MCP server you run yourself — the same server talks to both stores. buy_resourcedetects the rail from the 402, so the agent's code is identical here and at the other store.

What it tests

Exercises the x402 rail — an open, HTTP-native payment standard. The agent hits a paid order, gets a 402 quoting the price, signs a payment authorization, and a facilitator settles it on Base Sepolia. The payer never spends gas. askReceipts files the purchase tagged paymentRail: x402.

HTTP/1.1 402 Payment Required
Payment-Required: <base64url>

{ "x402Version": 2, "accepts": [{
    "scheme": "exact",
    "network": "eip155:84532",
    "amount": "3490000"
}] }
402 · terms carried in a Payment-Required header
Visit AgentEats

AgentBrew

Café · Tempo Moderato testnet
MPP
What it can do
get_menubuy_resource

Both tools come from one MCP server you run yourself — the same server talks to both stores. buy_resourcedetects the rail from the 402, so the agent's code is identical here and at the other store.

What it tests

Exercises MPP — Stripe and Tempo's Machine Payments Protocol. The agent gets a 402 carrying a WWW-Authenticate: Payment challenge, then settles a stablecoin transfer directly on Tempo's Moderato testnet. Same buy_resource, same receipt shape — askReceipts files it tagged paymentRail: tempo.

HTTP/1.1 402 Payment Required
WWW-Authenticate: Payment
  method="tempo",
  intent="charge",
  request="…chainId:42431, pathUSD…"
402 · challenge carried in a WWW-Authenticate header
Visit AgentBrew
Not just agents

People write to the same ledger

askReceipts isn't only a machine-payment ledger. People add their own receipts directly — snap a photo or PDF, or forward an email receipt to a personal inbox address. Those land in the same ledgerthe agents write to, so a person's coffee receipt and an agent's on-chain purchase sit side by side — get_spending_summary and ask_receipts answer across both.

Photo / PDF uploadEmail-in — forward a receipt
Open askReceipts
More rails, same ledgeron the roadmap
Google AP2Agent Payments Protocol
ACPAgentic Commerce Protocol · OpenAI + Stripe
XRPL · RLUSDRLUSD on the XRP Ledger
L402HTTP 402 over Lightning · Bitcoin

Each new rail is one adapter behind the same buy_resource and save_receipt— the receipt askReceipts files is identical. The store and the protocol change; the ledger doesn't.

Get set up to pay

Four steps to a working ledger, a funded test wallet, and an agent that can spend from it. Both rails run on EVM testnets, so one wallet address works on Base Sepolia and Tempo alike — a receiving wallet needs nothing; only the buyer needs funds.

  1. 1
    Sign up for askReceipts

    Create your ledger account — it's where receipts land, and where you mint an agent key so an agent can file on your behalf.

  2. 2
    Create a test wallet

    Any EVM wallet works — the same 0x… address is a valid recipient on both chains.

  3. 3
    Add faucet funds

    Fund the buyer wallet on each testnet. On Base Sepolia the x402 payer spends no gas, so testnet USDC alone is enough.

  4. 4
    Request the buyer, then buy something

    The sample buyer is a small MCP server you run locally. It holds your keys on your machine — nothing is hosted, and it refuses to start against anything but a testnet.

    The repository is private for nowwhile it's being finished. Ask for access and we'll add you — tell us briefly what you want to try, it helps us prioritise.

    Once you're in:

    git clone https://github.com/abodero/payment-rails-buyer
    cd payment-rails-buyer && npm ci
    needs Node ≥ 20.19.2 and npm ≥ 11.10.0 · npm ci also builds dist/buyer.mjs

    Point your MCP client at it — .mcp.json for Claude Code, claude_desktop_config.json for Claude Desktop — then start a new session, since MCP servers load at session start.

    { "mcpServers": { "commerce": {
        "command": "node",
        "args": ["/absolute/path/to/payment-rails-buyer/dist/buyer.mjs"],
        "env": {
          "ASKRECEIPTS_AGENT_KEY": "ar_agent_live_...",
          "EVM_PRIVATE_KEY": "0x...",
          "MPP_BUYER_KEY": "0x...",
          "EVM_RPC_URL": "https://sepolia.base.org"
        }
    }}}
    all four are required · keys live here, never in a chat

    Then ask your agent: “show me the AgentBrew menu, buy a flat white, then tell me what I've spent.” Buy from AgentEats too — that settles over the other rail — and ask again. Both receipts come back in one shape. That is the whole point.