Give your agent a budget, not your keys.
Satchel lets an AI agent pay for APIs on its own, while Bitcoin Cash consensus enforces a spending cap and a recipient allowlist. Even if the agent is hacked or prompt-injected, it cannot spend more than you allowed.
Agents with ordinary wallets are one bad prompt away from draining them. Software spending limits live in the same place as the bug. Satchel moves the limit into the coin itself: the network refuses any transaction that breaks it.
A cap in any window
The agent can spend at most X sats in any N-block window, fees included; a new period starts only N blocks after the last payment. The counter lives on-chain in a CashTokens NFT.
Allowlisted payees only
Payments can only go to the API providers you approved. Any other address is rejected by every node.
You can always pull out
Your wallet key can withdraw everything at any time. The agent key never can.
How it works
- Connect your BCH wallet with WizardConnect.
- Create a vault: set a deposit, a cap per period and which paid APIs the agent may pay.
- Let the agent work. When an API answers 402 Payment Required, the agent pays from the vault and retries.
- Stay in control. Overspending fails at consensus level, and you withdraw whenever you want.
// pay-per-call on Bitcoin Cash (HTTP 402) POST /api/tools/crypto-price ← 402 { payTo, amount: 1000, nonce } // agent pays from the vault, memo = SC402 + nonce POST /api/tools/crypto-price X-Payment: <txid> ← 200 { price, change24h, marketCap }
Verified on BCH mainnet
One end-to-end run with real coins: a developer's own agent, through the Satchel MCP server, paying Satchel and an independent seller from one vault. Every step is a public transaction.
- 1. Vault created
Covenant funded with a v2 recovery memo (seller and custom payee stored as hashes).
tx 78959aadfb…22d6ae ↗ - 2. Direct payment
satchel_send: 1,000 sats to an allowlisted custom payee, with an on-chain memo.
tx d01a66a13f…6013ac ↗ - 3. Paid API call
HTTP 402 → the agent pays 600 sats from the vault → Satchel's bch-tx tool answers.
tx cffcedab08…76388d ↗ - 4. Third-party seller
600 sats to an independent API built on satchel-pay-server (the example seller).
tx f03a01ec70…f372b8 ↗ - 5. Over the cap: rejected
The next payment would pass the 5,000-sat cap. Every node refuses it at require(newSpent <= cap); nothing is spent.
rejected by consensus, no tx - 6. New period too early: rejected
A new period needs the vault coin to be N blocks old. Before that, the node refuses it (non-BIP68-final).
rejected by consensus, no tx - 7. New period after the cooldown
Once the cooldown has passed, a new period is accepted and the spent counter restarts (separate run, N = 1 block).
tx 31fcd40443…f5ecc6 ↗ - 8. Owner withdraws
The owner key empties the vault and burns its state NFT. The agent key never could.
tx e684898a8d…98dd71 ↗
For developers
Give your own agent a Satchel
An MCP server for Claude, Cursor, VS Code and other MCP clients. The agent key stays on your machine; the covenant enforces the cap and the allowlist.
claude mcp add satchel -- npx -y satchel-pay-mcp@0.2.0satchel-pay-mcp on npm ↗Sell your API to agents
Put any Fetch API endpoint behind a BCH paywall: signed 402 challenges, payment checks, no database and no wallet software. Payments go straight to your address.
npm install satchel-pay-server