Letting an agent pay
How to let an AI agent make payments
Give an agent a payment tool, not a key: limits enforced outside the model, a human for larger amounts, and a record of every decision.
Give the agent a payment tool instead of a credential. The tool should take an amount, a recipient and a reason, check them against limits the model cannot change, ask a person when the amount is above an auto-approve threshold, and log every decision.
Why is this harder than it sounds?
The obvious shortcuts all hand the model something it can misuse. A private key or a card number in the prompt means every instruction the agent reads, including ones hidden in a web page or a tool result, is one step from spending. Limits written into the system prompt are requests, not controls: the model can be talked out of them or simply get them wrong. And approving every payment by hand works but defeats the point of an agent. The workable middle is a separate service that holds the policy and the money path, and exposes only a narrow tool to the model.
How do you do it?
- Decide what the agent is paying for. Write down the recipients and typical amounts: API credits, a dataset, hosting, another agent's work. This decides your limits and whether you can use a recipient allowlist, which is the single strongest control.
- Keep the money behind a tool. Expose a tool such as create_payment over MCP or your agent framework's tool interface. The tool takes amount, asset, recipient and a reason. It never returns a key, card number or seed phrase, and the model never sees one.
- Enforce limits on the server. Set a per-payment cap and a daily cap, then two bands inside them: below an auto-approve limit the payment can go through on its own, between that and an ask limit a person approves it, above it the payment is refused. Check these where the model cannot reach them.
- Put a person on the larger amounts. Send approvals somewhere you will see them (email, a push notification) and let them expire if nobody acts. The person should confirm the amount and recipient, not just a description the agent wrote.
- Make retries safe. Require an idempotency key on every payment so a retried call does not pay twice, and teach the agent to check a payment's status before trying again.
- Test on a simulated rail first. Wire everything up against a source that moves no money, watch which payments are approved, held and blocked, then switch to real funds with the same limits.
What it does not mean
- It does not mean giving the agent your wallet's private key or seed phrase. Anything the model can read, a prompt injection can try to use.
- A spending limit in the system prompt is not a spending limit. It has to be enforced by code the model cannot edit.
- Letting an agent pay does not mean letting it pay anyone. Restricting recipients matters as much as restricting amounts.
Common questions
Does the agent need its own wallet?
Not necessarily. A common pattern is for the agent to request payments from a wallet you control, through a service that applies your policy. A separate wallet with only a small float is another way to limit exposure.
Which agents can use a payment tool like this?
Any agent that can call tools. MCP is the common route for hosts like Claude, Cursor and Codex; frameworks that call tools directly can use the same endpoint over JSON-RPC.
Is this financial advice?
No. This page explains how agent payments can be set up and controlled. It does not tell you what to buy, hold or spend.
Where does Veyra fit?
This is what Veyra is built to do. You connect a wallet you already own (MetaMask, Base / Coinbase passkey or WalletConnect), create an MCP endpoint with per-payment, daily, auto-approve and ask limits plus an optional recipient allowlist, and paste the endpoint into Claude, Cursor, Codex or another MCP client. The agent gets tools like create_payment and get_budget, never a key. Payments are USDC on Base only. On the Free plan you approve every payment in your own wallet; Pro (£19/month) and Team (£79/month) add auto-pay for small payments from a capped on-chain allowance.
Sources
Terms on this page
- MCP serverAn MCP server is a service that offers tools, resources or prompts to AI applications using the Model Context Protocol, an open protocol built on JSON-RPC 2.0.
- Auto-approve limitAn auto-approve limit is the largest single payment an agent may make without a person approving it, within any other caps that apply.
- Idempotency keyAn idempotency key is a unique value a client attaches to a request so that, if the same request is sent again with the same key, the server returns the original result instead of performing the action a second time.
This page explains how agent payments and the related technology work. It is not financial, investment, legal or tax advice. Protocols and provider features change; check the linked official sources before relying on a detail.