Create a payment link with the API
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.
Create a payment link
To create a payment link, pass in line_items
.
Each line item contains a price
and quantity
.
Note
Payment links can contain up to 20 line items when using standard pricing and 1 line item when using Customer chooses price.
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.
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
.