← cartapi.io blog

Virtual card vs checkout link for AI agents: which should you build?

Published 2026-11-23 · Last updated 2026-11-23 · 7 min read · agent commerce
TL;DR

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 contextVirtual cardNetwork agent tokenCheckout link
Agent can spend aloneYesYes, within limitsYes, within approved instructionsNo
What a tricked agent can leakThe full cardA capped cardDepends on implementationA link someone must still pay
Where the limit is enforcedNowhereIssuer authorizationNetwork and issuerThe human at payment
Works at any card merchantYesGenerally, subject to controlsOnly where supportedOnly the seller who made the link
SetupNoneIssuing programNetwork onboardingA payments account
Best forNothingUnattended purchasesConsumer agent products at scaleHuman-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:

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:

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 situationUse
A person is in the chat when the purchase happensCheckout link
You sell the goods yourselfCheckout link
Unattended purchases from known merchantsVirtual card locked to those merchants or categories
Unattended purchases from any merchantReconsider the design, or use a very low-cap card
Consumer agent product with network partnershipsNetwork agent token
A quick demoTest mode, never a real card

Whichever you pick, test the failure and not only the happy path:

  1. Attempt a purchase just above the limit and confirm the payment layer refuses it.
  2. Put an injected instruction in a tool result and confirm the agent can't complete the purchase it asks for.
  3. Search your logs and transcripts for card numbers.
  4. Retry a purchase after a timeout and confirm you aren't charged twice. See MCP tool idempotency.
  5. 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.

About the author

Roc Chow

Roc Chow builds cartapi, the commerce layer for AI agents, and runs . Statements about cartapi come from its MCP tool definitions. Statements about other products come from their public documentation, linked above, as read on the day of writing. We haven't run production tests of Stripe Issuing or Visa Intelligent Commerce.

LinkedIn · · cartapi.io