Sign in
An image of the Stripe logo
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
No-code
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Support
Overview
Overview
How cards work
Quickstart
Accept a payment
Add funds to your balance
Share payment links
Create a payment link with the API
Faster checkout with Link
More payment scenarios
U.S. and Canadian cards
Testing
Payments
·
HomePaymentsOnline paymentsShare payment links

Create a payment link with the API

Create a custom payment page with the API and share a link to it.

With Payment Links, you can create a payment page and share a link to it with your customers. You can share the link as many times as you want on social media, in emails, or through any other channel.

Payment Links supports over 20 payment methods—including credit and debit cards, Apple Pay, and Google Pay. The payment page is translated into over 30 languages and automatically matches your customer’s preferred browser language.

Set up your product catalog

Payment Links uses Products and Prices to model what your business is selling.

To get started with Payment Links, you first need to create a product, and then use that product to create a price.

Read our guide on managing products and prices for more information.

Payment Links only supports Standard pricing (charging the same price for each unit—either one time or recurring) and Customer chooses price (letting your customer specify the price). It doesn’t support advanced options like package pricing, graduated pricing, or volume pricing.

Command Line
curl https://api.stripe.com/v1/prices \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d currency=usd \ -d unit_amount=1000 \ -d product=
{{PRODUCT_ID}}

Create a payment link

To create a payment link, pass in line_items.

Each line item contains a price and quantity.

Payment links can contain up to 20 line items when using standard pricing and 1 line item when using Customer chooses price.

Command Line
curl https://api.stripe.com/v1/payment_links \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1

Share your payment link

Each payment link contains a url that you can share with your customers through email, on social media, with a website link, in an app, or through other channels.

Tracking payments

When customers use a payment link to complete a payment, Stripe sends a checkout.session.completed webhook that you can use for fulfillment and reconciliation.

Make sure to listen to additional webhooks in case you’ve enabled payment methods like bank debits or vouchers, which can take 2-14 days to confirm the payment. For more information, see the guide for fulfilling orders after a customer pays.

After a customer completes a purchase, you can redirect them to a URL or display a custom message by setting after_completion on the payment link.

Command Line
curl https://api.stripe.com/v1/payment_links \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "after_completion[type]"=redirect \ -d "after_completion[redirect][url]"="https://example.com"

Deactivate a payment link

After creating a payment link, you can’t delete it. Instead, you can deactivate a payment link by setting the active parameter to false.

After you deactivate a payment link, customers can no longer complete purchases using the link and are redirected to an expiration page instead.

To reuse a deactivated payment link, reactivate it by setting the active parameter to true.

OptionalAllow coupons and promotion codes

OptionalCollect taxes on your payment link

OptionalCollect billing and shipping addresses

OptionalAllow adjustable quantities

OptionalCreate subscriptions

OptionalSpecify the payment methods you want to accept

OptionalCollect a terms of service agreement

OptionalCollect application fees using Connect

Was this page helpful?
Questions? Contact us.
Watch our developer tutorials.
Check out our product changelog.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Set up your product catalog
Create a payment link
Share your payment link
Tracking payments
Deactivate a payment link
Allow coupons and promotion codes
Collect taxes on your payment link
Collect billing and shipping addresses
Allow adjustable quantities
Create subscriptions
Specify the payment methods you want to accept
Collect a terms of service agreement
Collect application fees using Connect
Stripe Shell
Test mode
▗▄ ▄▟█ █▀▀ ▗▟████▙▖ ██████ ███▗▟█ ███ ███▗▟██▙▖ ▗▟█████▙▖ ███▖ ▀▀ ███ ███▀▀▀ ███ ███▀ ███ ███ ███ ▝▜████▙▖ ███ ███ ███ ███ ███ █████████ ▄▄ ▝███ ███ ▄ ███ ███ ███▄ ███ ███ ▄▄ ▝▜████▛▘ ▝▜███▛ ███ ███ ███▝▜██▛▘ ▝▜█████▛▘ ███ ▀▘
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Login to Stripe docs and press Control + Backtick on your keyboard to start managing your Stripe resources in test mode. - View supported commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g. )
The Stripe Shell is best experienced on desktop.
$