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
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
    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 Links

Share a payment link

Share payment links with customers on social media, in emails, or on your website.

After creating a payment link, share it with your customers to accept payments without a digital storefront. You can share a single link multiple times.

Share online

You can copy a link in the Dashboard to share online, for example, on social media, in an email, or in a text message. Select an existing link from the Payment links list view or create a new link and then click Copy.

Create a QR code

You can create a QR code for a payment link in the Dashboard. Select an existing link from the Payment Links list view or create a new link and then click QR code. Copy or download a PNG image of the QR code.

QR code modal

The QR code doesn’t expire. If you deactivate the underlying Payment Link, the QR code redirects to an expiration page.

Embed a button on your site

Turn your payment link into an embeddable buy button to sell a product or subscription from your website. Select an existing link from the Payment Links list view or create a new link and then click Buy button. Copy the code and paste it into your website.

Customize the button

By default, your buy button uses the same branding and call to action configured for your payment link. Click Buy button to customize the look and feel of your button. You can set:

  • Brand colors, shapes, and fonts to match your website
  • A language to match your website’s language
  • The option to customize your button’s call to action
Customize the Buy Button

Customize the buy button

Embed the button

Stripe provides an embed code composed of a <script> tag and a <stripe-buy-button> web component. Click Copy code to copy the code and paste it into your website.

If you’re using HTML, paste the embed code into the HTML. If you’re using React, include the script tag in your index.html page to mount the <stripe-buy-button> component.

The buy button uses your account’s publishable API key. If you revoke the API key, you need to update the embed code with your new publishable API key.

index.html
<body> <h1>Purchase your new kit</h1> <!-- Paste your embed code script here. --> <script async src="https://js.stripe.com/v3/buy-button.js"> </script> <stripe-buy-button buy-button-id="{{BUY_BUTTON_ID}}" publishable-key=
"pk_test_TYooMQauvdEDq54NiTphI7jx"
>
</stripe-buy-button> </body>

Attributes to customize checkout

ParameterDescriptionSyntax
client-reference-idUse client-reference-id to attach a unique string of your choice to the Checkout Session. The string can be a customer ID or a cart ID (or similar) that you use to reconcile the Session with your internal systems. If you pass this parameter to your <stripe-buy-button>, it’s sent in the checkout.session.completed webhook upon payment completion.client-reference-id can be composed of alphanumeric characters, dashes, or underscores, and be any value up to 200 characters. Invalid values are silently dropped, but your payment page continues to work as expected.

Content Security Policy

If you’ve deployed a Content Security Policy, the policy directives that the buy button requires are:

  • frame-src, https://js.stripe.com
  • script-src, https://js.stripe.com

Limitations

Rendering the buy button requires a website domain. To test the buy button locally, run a local HTTP server to host your website’s index.html file over the localhost domain. To run a local HTTP server, use Python’s SimpleHTTPServer or the http-server npm module.

Was this page helpful?
Need help? Contact Support.
Watch our developer tutorials.
Check out our product changelog.
Questions? Contact Sales.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Share online
Create a QR code
Embed a button on your site
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.
$