# Stripe API for AI agents: request a payment with a link or an invoice

> How an agent creates Stripe payment links and invoices, reads payouts, and what Stripe charges per payment, with Stripe's own MCP server compared.

- Published: 2026-11-01
- Author: AMXP
- Topic: Commerce and pricing
- Tags: #stripe #ai-agents #payments #payment-links #invoicing
- Canonical: https://amxp.ai/blog/stripe-api-for-ai-agents

An agent that closes a sale, books a job or bills a client eventually has to ask for money. The
simplest way to do that with Stripe is to create a payment link and send the URL, or create and
finalize an invoice. The agent never touches card details: the customer pays on a page Stripe hosts.

## What Stripe returns

The [payment link endpoint](https://docs.stripe.com/api/payment-link/create) takes `line_items`
(required, each with a `price` and `quantity`, up to 20 items) and returns a `payment_link` object.
The fields an agent cares about:

| Field | What it is |
| --- | --- |
| `id` | Starts with `plink_` |
| `url` | The page to send the customer, for example on `buy.stripe.com` |
| `active` | Whether the link still accepts payments |
| `currency` | Three-letter ISO code, lowercase |
| `metadata` | Your key-value pairs, copied to the Checkout Sessions the link creates |
| `after_completion` | What happens after payment, such as a hosted confirmation |

Optional parameters include `allow_promotion_codes`, `customer_creation`, `invoice_creation` (a
post-purchase invoice for one-time payments) and `submit_type`, which changes the button label and
can switch the hostname to `donate.stripe.com` or `book.stripe.com`.

For invoices and payouts, the methods Stripe's own [MCP server](https://docs.stripe.com/mcp) exposes
are a good map of what an agent needs: create an invoice, add invoice items, finalize it, void it or
mark it uncollectible, and list or retrieve payouts and balance transactions.

## How to call it from your agent

Once AMXP opens, the flow is the same three steps as any other tool: find the Stripe operation,
read its schema and price, then run it with your parameters.

```ts
const [tool] = await amxp.discover({ query: "create a payment link", provider: "stripe" })
const spec = await amxp.inspect(tool.id)
const run = await amxp.execute(tool.id, {
  line_items: [{ price: "price_1MoBy5LkdIwHu7ixZhnattbh", quantity: 1 }],
  after_completion: { type: "hosted_confirmation" },
  metadata: { order_id: "ord_1042" },
})
// run.output.url -> "https://buy.stripe.com/..."
```

The direct call to Stripe for comparison:

```bash
curl https://api.stripe.com/v1/payment_links \
  -u "$STRIPE_SECRET_KEY:" \
  -d "line_items[0][price]=price_1MoBy5LkdIwHu7ixZhnattbh" \
  -d "line_items[0][quantity]=1"
```

Stripe also ships its own agent tooling. Its [agents page](https://docs.stripe.com/agents) describes
an agent plugin, agent skills and a remote MCP server at `https://mcp.stripe.com`, set up with
`npm install -g @stripe/cli` and `stripe agent setup`. The MCP server has generic tools such as
`stripe_api_read` and `stripe_api_write`, and some actions, like creating a refund, need a person to
approve them in the Dashboard. Stripe recommends OAuth, or an agent API key for autonomous clients,
and says that from December 2026 the MCP server stops accepting full-access secret keys and
restricted keys without the Agent tag ([Stripe MCP docs](https://docs.stripe.com/mcp)).

If your agent is the one being paid per call, Stripe's
[machine payments](https://docs.stripe.com/payments/machine) accept agent payments over MPP and
x402, with stablecoin payments settling to your Stripe balance.

## What it costs

Stripe's fees depend on your country. On Stripe's
[UK pricing page](https://stripe.com/gb/pricing), as of October 2026:

- Domestic cards: "1.5% + 20p for standard UK cards" and "2.8% + 20p for premium UK cards".
- International cards: "3.15% + 20p", plus "2% if currency conversion is required".
- Invoicing Starter: "0.4% per paid invoice".
- Instant Payouts: "1% of Instant Payouts volume", "Minimum fee of 40p". Payouts on the standard
  schedule are free.

Worked example: a £100 payment link paid with a standard UK card costs £1.50 + 20p = £1.70 in
Stripe fees. These are Stripe's processing fees. Through AMXP, `inspect` shows what the API call
itself costs before the agent runs it; Stripe's fees on the money collected still apply.

## When to use something else

- **Your own Stripe account and keys.** If you already run on Stripe, connect your agent to it
  directly or through Stripe's MCP server. Payments, payouts and customers live in your account
  either way, so AMXP adds little for an agent that only ever talks to Stripe. AMXP is for the
  other tools around it.
- **[Crossmint](/tools/crossmint)** for wallets and stablecoin payments when the agent needs to hold
  or move funds onchain rather than collect a card payment.
- **[QuickNode (x402)](/tools/quicknode-x402)** as an example of the other direction: a service
  your agent pays per call over x402.

## Common questions

### Can an AI agent take a card payment with Stripe?

It can create the request, as a payment link, Checkout Session or invoice, and the customer
completes payment on Stripe's page. That keeps card data away from the agent and the model.

### Does Stripe have an MCP server?

Yes. Stripe documents a remote server at `https://mcp.stripe.com` that works with OAuth or agent API
keys, plus a plugin that installs it with Stripe's agent skills ([Stripe](https://docs.stripe.com/mcp)).

### Can I call Stripe through AMXP today?

Not yet. AMXP is in private preview, and its API, CLI and MCP server are not public. The flow above
is how it works through AMXP once it opens.

## References

1. [Create a payment link (API reference)](https://docs.stripe.com/api/payment-link/create), Stripe
2. [Model Context Protocol (MCP)](https://docs.stripe.com/mcp), Stripe
3. [Agents and AI on Stripe](https://docs.stripe.com/agents), Stripe
4. [Machine payments](https://docs.stripe.com/payments/machine), Stripe
5. [Stripe pricing (United Kingdom)](https://stripe.com/gb/pricing), Stripe
