---
ref: tool:stripe/create-payment-link
name: Create a payment link
company: company:stripe
workflows: []
access: [mcp, cli, api]
tags: [capability:collect-payments, category:payments, has:api, has:cli, has:mcp]
docs: https://docs.stripe.com/api/payment-link/create
updated: 2026-09-27
---

# Create a payment link

Creates a Stripe-hosted checkout link for the prices you pass and returns it with its shareable URL.

Each entry in `line_items` takes a price ID and a quantity, up to 20 per link; the link to send is the `url` in the response. On the MCP server this method runs through the generic `stripe_api_write` tool.

## Set up

Use the first option your agent supports.

### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "stripe": { "url": "https://mcp.stripe.com" } } }
```

Call the MCP tool `stripe_api_write`.

Server URL: https://mcp.stripe.com

### CLI (official)

Install the command, then confirm it runs.

```sh
npm install -g @stripe/cli
stripe --version
```

Run `stripe payment_links create`.

### API (official)

- Base URL: https://api.stripe.com
- Endpoint: `POST /v1/payment_links`
- Auth: send the header `Authorization: Bearer $STRIPE_API_KEY`
- Get a key: https://dashboard.stripe.com/apikeys
- Docs: https://docs.stripe.com/api

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
