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
Online payments
Products and prices
Invoicing
Subscriptions
Quotes
In-person payments
Multiparty payments
After the payment
Add payment methods
Payment Links
    Overview
    Create a payment link
      Create a payment link with the API
    Share a payment link
    Customize checkout for Payment Links
    Payment Links Promotions
    Track Payment Links
    After the payment
Stripe Checkout
Stripe Elements
About the APIs
Regulation support
Implementation guides
Testing
HomePaymentsPayment LinksCreate a payment link

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

OptionalAdd custom fields

OptionalCollect application fees using Connect

OptionalSend post-payment invoices

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
Add custom fields
Collect application fees using Connect
Send post-payment invoices
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Login to your Stripe account and press Control + Backtick on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe 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.
$