Virtual card vs checkout link for AI agents: which should you build?
Use a checkout link when a person can approve each purchase, because the agent never holds anything it can spend. Use a capped, merchant-locked virtual card when the agent must pay unattended at merchants you don't control. Network agent tokens such as Visa Intelligent Commerce aim to combine the two, but they require onboarding. Never put a real card number in an agent's context.
Most advice on agent payments comes from a company selling one of these options, and we're no exception: cartapi uses checkout links. So this comparison includes the cases where a link is the wrong choice.
The short comparison
| Real card in context | Virtual card | Network agent token | Checkout link | |
|---|---|---|---|---|
| Agent can spend alone | Yes | Yes, within limits | Yes, within approved instructions | No |
| What a tricked agent can leak | The full card | A capped card | Depends on implementation | A link someone must still pay |
| Where the limit is enforced | Nowhere | Issuer authorization | Network and issuer | The human at payment |
| Works at any card merchant | Yes | Generally, subject to controls | Only where supported | Only the seller who made the link |
| Setup | None | Issuing program | Network onboarding | A payments account |
| Best for | Nothing | Unattended purchases | Consumer agent products at scale | Human-in-the-loop purchases |
Start with the threat: what can a tricked agent spend?
An agent reads tool results, web pages and documents, and any of them can contain instructions from an attacker. That's prompt injection, and the useful question about a payment design is what the attacker gets if it works. Zeta's write-up on card-based agent payments makes a related point: the signals card payments usually rely on, such as a logged-in session and a visible "Pay" action, disappear when an agent transacts on its own.
So compare the options by their worst day. A real card can be spent anywhere until you cancel it. A virtual card can lose up to its cap. A checkout link can only show a person the wrong item or price, and that person can close the tab. Our consent-first checkout post walks through that threat model in more detail.
Option 1: a virtual card
A virtual card gives the agent a real card number with rules attached at the issuer. With Stripe Issuing, spending controls can block merchant categories, countries and card presence, and set limits per authorization or per month. A card for one job might look like this:
curl https://api.stripe.com/v1/issuing/cards/CARD_ID \
-u "sk_test_...:" \
-d "spending_controls[allowed_categories][0]=car_rental_agencies" \
-d "spending_controls[spending_limits][0][amount]=8000" \
-d "spending_controls[spending_limits][0][interval]=per_authorization"
That's the strength of this approach: the decline happens at authorization, outside the model. A prompt can't talk the issuer into a higher limit. Two details are easy to miss:
- Aggregate limits can lag. Stripe says spend aggregation is best-effort, with up to a 30-second delay. An agent firing rapid purchases could get past a rolling limit in that window, so set a per-authorization limit as well.
- The agent still sees a card number if you pass it one. Stripe notes that not all methods of retrieving card details are PCI-DSS compliant. Prefer a tool that fills the payment outside the model's context, so the number never appears in a transcript.
Pick a virtual card when the agent has to buy from merchants you don't control and nobody is available to approve each order, such as a procurement bot renewing a known list of subscriptions. Lock it to the category or merchant, set the lowest cap that works, and give it a short life.
Option 2: a network agent token
Card networks are building credentials made for agents. Visa Intelligent Commerce describes network-level controls, consumer-approved purchase instructions, agent validation and tokenized credentials. Its companion Trusted Agent Protocol has an agent sign its requests using RFC 9421 message signatures, so a merchant can tell a Visa-approved agent from an unknown bot.
The appeal is that the approval travels with the payment. The cost is access. Visa's docs say production requires onboarding to Visa Intelligent Commerce, plus its token, passkey, agent-registry and certification programs. Visa's product page also says the product is still being deployed and that the final version may not contain every feature described. Treat this as a path for teams building a consumer agent product, and confirm current availability with the network before you plan around it.
Mastercard runs a similar program called Agent Pay. Its site blocked our fetch during research, so we aren't comparing its details here.
Option 3: a hosted checkout link
Here the agent picks the item and your server creates a payment page. The person opens it, sees the merchant and amount, and pays. The agent gets back a status and nothing it could spend. Stripe Checkout Sessions carry an expiry, so a link that leaks into a log doesn't stay payable forever.
The limits are real:
- It needs a person. An overnight agent can prepare the purchase but can't finish it.
- It only works for the seller creating the link. You can't use it to buy from a random website.
- Every purchase costs a click. For frequent tiny purchases, that gets tedious.
For most consumer purchases, that click is the feature. Someone spending $30 on a gift card wants to see the total anyway. This is how cartapi's MCP server works today: its tools search the catalog, create a Stripe-hosted checkout and read order status, and none of them accepts a card number. The implementation is covered in how to build a Stripe Checkout MCP server.
How to choose
| Your situation | Use |
|---|---|
| A person is in the chat when the purchase happens | Checkout link |
| You sell the goods yourself | Checkout link |
| Unattended purchases from known merchants | Virtual card locked to those merchants or categories |
| Unattended purchases from any merchant | Reconsider the design, or use a very low-cap card |
| Consumer agent product with network partnerships | Network agent token |
| A quick demo | Test mode, never a real card |
Whichever you pick, test the failure and not only the happy path:
- Attempt a purchase just above the limit and confirm the payment layer refuses it.
- Put an injected instruction in a tool result and confirm the agent can't complete the purchase it asks for.
- Search your logs and transcripts for card numbers.
- Retry a purchase after a timeout and confirm you aren't charged twice. See MCP tool idempotency.
- Revoke the credential and confirm the next attempt fails.
For the limits themselves, use our AI agent spending limit checklist. If you're deciding between protocols rather than payment instruments, see AP2 vs ACP.
FAQ
What is a virtual card for an AI agent?
It's a card number issued for the agent to use, with limits set at the issuer, such as a spending cap, allowed merchant categories and blocked countries. If the agent misbehaves, the issuer declines anything outside those rules.
Is a virtual card safer than a checkout link?
Usually not, when a person is available. A virtual card can still be spent up to its cap without anyone approving it. A checkout link gives the agent nothing it can spend. A virtual card is the better tool when nobody is there to click.
Can an AI agent use a checkout link without a human?
It shouldn't. The point of the pattern is that a person opens the page and approves the payment. An agent that needs to pay unattended needs a scoped credential instead.
Do spending limits stop rapid purchases?
Not always on their own. Stripe says spend aggregation is best-effort with a delay of up to 30 seconds, so combine rolling limits with a per-authorization limit.
Is Visa Intelligent Commerce available to developers?
Visa offers developer documentation and a sandbox path, but production requires onboarding to its programs. Its product page also says the product is still being deployed, so confirm availability with Visa.
Which method does cartapi use?
A Stripe-hosted checkout link. The agent finds the product and hands you the link, you pay on Stripe's page, and the MCP tools never accept a card number.
Try it
Want to see the checkout-link pattern working? Add cartapi from the install page and ask your assistant to price an eSIM or top-up. Building your own agent? Start with the docs.