Rightshold™ Sign up

Answers · agent payments

How do I give an AI agent a virtual card with a spending limit?

Last updated

TL;DR: Issue the agent its own virtual card (for example with Stripe Issuing), not a shared company card, and put the limits on the card: spending_controls with a per_authorization cap plus a daily, weekly or monthly total, allowed_categories so it can only pay the kinds of businesses its task needs, and allowed_card_presences set to not_present for an online-only agent. Then add a real-time authorization webhook that approves or declines each purchase against the task, because card limits are totals, not judgment. For one-off purchases use a single-use card that cancels itself after one payment. To stop the agent, set the card's status to inactive (reversible) or canceled (permanent).

What should I check, step by step?

1. One card per agent (or per task), never a card a human also uses. Put the agent's id and task id in the card's metadata so every authorization and transaction can be traced back to it.

  1. Set a per_authorization limit and a period limit together. Stripe's intervals are per_authorization, daily, weekly, monthly, yearly and all_time; amounts are in the card currency's smallest unit (10000 is 100.00 USD), and date-based intervals start at midnight UTC.
  2. Don't rely on defaults. If you set no spending_limits, Stripe applies a default of 500 USD per day to a new card, and an unconfigurable 10,000 USD cap applies to each authorization. Those are ceilings, not a budget for an agent.
  3. Restrict where it can pay with allowed_categories (Stripe's merchant category names, such as computer_software_stores or airlines_air_carriers) and, if it should only buy domestically, allowed_merchant_countries. A spending limit on its own doesn't block any category.
  4. An online-only agent should not work at a terminal: set allowed_card_presences to ["not_present"].
  5. For one purchase, issue a single-use card: lifecycle_controls[cancel_after][payment_count]=1 cancels the card automatically after one payment.
  6. Add the issuing_authorization.request webhook and check each purchase against what the agent was asked to do: merchant name and category, amount against the task's budget, and how many attempts it has made recently. You have 2 seconds to answer.
  7. Keep the card number out of the agent's prompt, logs and memory where you can. Prefer a payment path that doesn't hand over the raw card (Stripe documents Shared Payment Tokens created from an Issuing card for programmatic checkout), and if the agent must type card details into a browser, use a single-use card.

What the card's limits do and don't cover (Stripe Issuing, checked Oct 30, 2026)

Spending controls run before real-time authorizations. A purchase that breaks one is declined before your webhook ever sees it.

The real-time webhook is where the judgment goes

Each issuing_authorization.request carries the amount in pending_request, the merchant_data and the card's metadata. Answer with HTTP 200 and a JSON body {"approved": true} or {"approved": false}, plus the Stripe-Version header.

Freezing and ending the card

status: inactive declines every authorization with the card_inactive reason and can be switched back to active. status: canceled declines with card_canceled and is permanent.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Set a spending policy on my purchasing agent's credential: at most 50.00 USD per purchase and 200.00 USD per day, only at supplier.example.com, only in software stores.”

One-click setup

{
  "tool": "set_spend_policy",
  "arguments": {
    "credential_id": "YOUR_AGENT_CREDENTIAL_ID",
    "currency": "USD",
    "per_tx_max_minor": 5000,
    "daily_max_minor": 20000,
    "allowed_domains": [
      "supplier.example.com"
    ],
    "allowed_categories": [
      "computer_software_stores"
    ]
  }
}

Rightshold doesn't issue cards, hold funds, see card numbers or approve card authorizations. It records spending policies and returns signed allow or deny decisions that your webhook can act on. Not financial advice.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'