How Do I Give My AI Agent a Card With Spending Limits?
Connect your agent to a wallet that issues a one-time virtual card per purchase, within a spending mandate you set. Here's the flow, with a real request example.
The short answer: connect your agent to a wallet that issues a one-time virtual card for each purchase, within a spending mandate you set. The agent asks for a card for a specific cart, the wallet checks it against your limits, and only then releases a card that works once.
Why not just give the agent a card?
Pasting a card number into an agent's config or prompt gives it a reusable credential with your full credit limit behind it. Anything that can read the agent's context, including logs, tools and injected instructions, can read the card too. A spending limit only works if it's enforced before each payment, outside the agent.
The flow with Agent Pay Safe
- Enrol your card and set a mandate. In the APS iOS app, enrol your card (it's held by APS's tokenisation partner, not by APS or your agent) and set the rules for each agent.
- Connect your agent over MCP. Any MCP-compatible agent works, including Claude, ChatGPT, Gemini, Cursor, OpenClaw or your own.
- Your agent requests a payment session for a specific cart, with
create_payment_session. - APS checks it. In Assisted mode you approve on your phone with your passkey. In Autopilot, APS checks the cart against your mandate.
- Your agent collects a one-time card with
get_payment_session, acknowledges receipt so APS deletes the cached credential, and completes the merchant's normal checkout.
What a request looks like
The agent sends the merchant, line items and an itemised total in minor units (pence or cents), plus a plain-English description you'll see when approving:
{
"idempotency_key": "order-2026-11-10-001",
"description": "Trail running shoes for marathon training, size 10",
"merchant": {
"name": "Example Running Co",
"url": "https://www.example-running.com",
"country_code": "GB"
},
"line_items": [
{ "name": "Trail running shoes, size 10", "quantity": 1, "total_minor": 8999 }
],
"amount": {
"currency": "GBP",
"items_total_minor": 8999,
"delivery_total_minor": 499,
"tax_total_minor": 0,
"discount_total_minor": 0,
"total_minor": 9498
}
}
The idempotency_key is a unique key for each request, so APS can recognise a retry instead of treating it as a new purchase.
Handling the card safely
The card credential comes back short-lived and Base64-encoded. Base64 is encoding, not encryption, so your agent should decode it in memory, use it at checkout, and never log, store or display it.
Getting set up
Agent Pay Safe is in its Founding 100 private beta, which is free for AI agent builders. Founding Builders get setup instructions when the beta starts. You'll need an iPhone and a US-issued Visa or a Mastercard from any issuer.