Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
    Overview
    Create a payment link
    Share a payment link
    Track a payment link
    Create a buy button
    Customize checkout for payment links
    Collect addresses
    Charge for shipping
    Promotion codes, optional items, and upsells
    After you receive payment from a payment link
    Use the API to create and manage a payment link
Build a checkout page
Build an advanced integration
Build an in-app integration
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsUse Payment Links

Use the API to create and manage payment links

Create and manage payment links with the API.

Copy page

You can use the Payment Links API to create a payment link that you can share with your customers. Stripe redirects customers who open this link to a Stripe-hosted payment page.

Set up your product catalog

Payment Links use Products and Prices to model what your business is selling. To get started with Payment Links, create a product, then use that product to create a price.

Payment Links supports flat rate, tiered, package and Customer chooses (letting your customer specify the price) prices. Customer choose prices currently doesn’t support recurring payments or donations.

Use Standard pricing to create a product or subscription with a fixed amount.

Command Line
cURL
curl https://api.stripe.com/v1/prices \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -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
curl https://api.stripe.com/v1/payment_links \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -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.

Track 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 our guide on 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
curl https://api.stripe.com/v1/payment_links \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "after_completion[type]"=redirect \ --data-urlencode "after_completion[redirect][url]"="https://example.com"

Deactivate a payment link

After you’ve created a payment link, you can’t delete it. What you can do is deactivate a payment link by setting the active attribute to false.

After you deactivate a link, customers can’t finalize purchases using the link anymore and are redirected to an expiration page. If you want to reuse a deactivated payment link, turn it back on by setting the active attribute to true.

Configure payment methods

By default, Stripe selects the relevant payment methods that you enabled in your Dashboard. To add supported payment methods, enable them in your Payment methods settings.

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?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc