Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
OverviewAccept a paymentUpgrade your integration
Online payments
OverviewFind your use case
Use Payment Links
Use a prebuilt checkout page
Build a custom integration with Elements
Build an in-app integration
Use Managed Payments
    Overview
    How Managed Payments works
    Changelog
    Get started
    Set up Managed Payments
    Update a Checkout integration
    Mobile app payments
Recurring payments
In-person payments
Terminal
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment operations
Analytics
Balances and settlement time
Compliance and security
Currencies
Declines
Disputes
Fraud prevention
Radar fraud protection
Payouts
ReceiptsRefunds and cancellations
Advanced integrations
Custom payment flows
Flexible acquiring
Off-Session Payments
Multiprocessor orchestration
Beyond payments
Incorporate your company
Crypto
Agentic commerce
Machine payments
Financial Connections
Climate
Verify identities
United States
English (United States)
HomePaymentsUse Managed Payments

Set up Managed PaymentsPublic preview

Learn how to accept a payment using Managed Payments.

Terms of service required

You must accept the Managed Payments terms of service in the Dashboard before you can use Managed Payments.

Use Managed Payments to accept global payments for digital products. Managed Payments enables Stripe to act as the merchant of record on your behalf. To learn more, see How Managed Payments works.

Before you begin

  • Ensure your products meet the eligibility requirements for Managed Payments. To process a payment with Managed Payments, all of the products the customer is purchasing must be eligible.
  • Activate Managed Payments in your Dashboard.
  • Set up your development environment.
  • Make sure you’re using API version 2025-03-31.basil or higher.

Create products and prices

You can accept subscriptions and one-time payments:

Stripe uses Products to represent the different goods or services you’re selling. For example, if you have multiple subscription tiers, such as Basic and Premium, create a separate product for each tier.

Prices represent the amount you charge your customer for a product, and how frequently you charge them. A product can have multiple prices. For example, your Basic subscription could have two prices: 10 USD per month or 100 USD per year. You can also define different currency options for each price, such as 10 USD per month and 15 CAD per month.

Use either the Dashboard or the API to create products and prices for each of the products you sell:

Create a new product and price

To create a new product and assign a price:

  1. Navigate to the Dashboard > Product catalog.
  2. Click Create product.
  3. Enter the Product name, Description, and select a Product tax code.
    • The tax code you select must be eligible for Managed Payments. Eligible tax codes will be labelled “Eligible for Managed Payments”.
  4. For the price, enter the Amount and the Currency.
  5. Set the Billing period based on how frequently you’d like to charge your customer for this subscription.
  6. Use the preview pane on the right to see how much tax customers will pay based on their location.
  7. Click Add product.
  8. Repeat these steps for every product you sell.

Add a price to an existing product

To add another price to an existing product:

  1. Open the Product catalog.
  2. Click the product you want to add a price to.
  3. Click the + button in the Pricing section.
  4. Configure the price as described above.
  5. Click Create price.

Build your checkout
Client-side

Stripe Checkout allows you to accept payments from your customers through a Stripe-hosted payment page. You are responsible for redirecting your customer to the payment page, and Stripe redirects your customer back to your site once the payment is complete. To learn more, see How Checkout works.

To build your checkout, you must add a checkout button and a success page to your site.

Add a checkout button

Add a checkout button to your website that calls an endpoint on your server. For example:

checkout.html
<html> <head> <title>Subscribe to our cool new service</title> </head> <body> <!-- Use action="/create-checkout-session.php" if your server is PHP based. --> <form action="/create-checkout-session" method="POST"> <button type="submit">Subscribe</button> </form> </body> </html>

When your customer clicks this button, they’ll be redirected to the Stripe-hosted payment page.

Add a success page

Next, create a success page for your customer to see after they successfully check out. Host this success page on your site. For example:

success.html
<html> <head><title>Thanks for subscribing!</title></head> <body> <h1>Thanks for subscribing!</h1> <p> We appreciate your business! If you have any questions, please email us at <a href="mailto:orders@example.com">orders@example.com</a>. </p> </body> </html>

Stripe redirects your customer to this page after they complete an authorized payment.

Add a cancel page (optional)

You can also create a cancel page for your customer to see if they terminate the checkout process. For example:

cancel.html
<html> <head> <title>Checkout canceled</title> </head> <body> <p>Not ready to subscribe yet? No problem, we'll be here when you are!</p> </body> </html>

Stripe redirects your customer to this page if they click the back button on the payment page.

Set up your server
Server-side

Stripe uses Checkout Sessions to represent what your customer sees when they’re redirected to the payment form. You can configure Checkout Sessions with options such as line items to charge or currencies to accept.

Create a Checkout Session

Create a Checkout Session using one of the prices you created as a line item. Set the mode to subscription, and set the success_url to the URL of your success page. To enable Managed Payments, set managed_payments[enabled] to true and include ;managed_payments_preview=v1 in your version header.

Command Line
cURL
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Version: 2026-01-28.clover; managed_payments_preview=v1" \ -d "line_items[0][price]"=
"{{PRICE_ID}}"
\ -d "line_items[0][quantity]"=1 \ -d "managed_payments[enabled]"=true \ -d mode=subscription \ --data-urlencode success_url="https://localhost:4242/success"

Create an endpoint

Add an endpoint to your server that creates a Checkout Session. The endpoint path must match the action attribute of your checkout button.

After you create a Checkout Session, redirect your customer to the URL returned in the response.

Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
# This example sets up an endpoint using the Sinatra framework. require 'json' require 'sinatra' require 'stripe' # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys Stripe.api_key =
'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
Stripe.api_version = '2026-01-28.clover; managed_payments_preview=v1;' post '/create-checkout-session' do session = Stripe::Checkout::Session.create({ line_items: [{ price: '{{PRICE_ID}}', quantity: 1 }], mode: 'subscription', managed_payments: {enabled: true}, success_url: 'http://localhost:4242/success' }) redirect session.url, 303 end

Test your endpoint

Confirm your endpoint is accessible by starting your web server (for example, localhost:4242) and running the following command:

Command Line
curl -X POST -is "http://localhost:4242/create-checkout-session" -d ""

The response in your terminal looks like:

Command Line
HTTP/1.1 303 See Other Location: https://checkout.stripe.com/c/pay/cs_test_... ...

Handle post-payment events

Stripe sends a checkout.session.completed event when a customer completes a Checkout Session payment. Use the Dashboard webhook tool or follow the webhook guide to receive and handle these events.

Listen for these events instead of waiting for Stripe to redirect your customer to your success page. Avoid only using your success page to trigger post-checkout actions.

Set up your integration to listen for asynchronous events to properly handle different types of payment methods that might be delayed. To learn more, see Fulfill orders for Checkout.

Handle the following events when collecting payments with Checkout:

EventDescription
checkout.session.completedSent when a customer successfully completes a Checkout Session.
checkout.session.async_payment_succeededSent when a payment made with a delayed payment method, such as ACH direct debt, succeeds.
checkout.session.async_payment_failedSent when a payment made with a delayed payment method, such as ACH direct debt, fails.

Testing

Test that your integration works correctly for your customers.

Checkout

  1. Start your server and go to your checkout page (for example, http://localhost:4242/checkout.html from Build your checkout).
  2. Click the checkout button to be redirected to the Managed Payments checkout page.
  3. On the checkout page, enter different billing addresses to see how Managed Payments calculates tax for customers in different locations.
  4. To process the payment, enter your email, phone number, and the test card number 4242 4242 4242 4242 with any CVC and an expiration date in the future.

For additional information, see Testing.

Payment details

  1. After you confirm the test payment, go to the Dashboard > Payments list
  2. Click your test payment to view the payment details. This page shows the:
    • Product that was purchased
    • Subscription that was created
    • Invoice that was created
    • Amount of tax calculated and withheld through Managed Payments
    • Statement descriptor that displays on your customer’s statements

Customer authorization

The payment method attached to the subscription is only authorized to be charged by Managed Payments. To use it for non-Managed-Payments transactions, you must obtain customer authorization.

Preview the receipt

  1. Under Checkout summary, click Invoice.
  2. Click Send receipt to preview the receipt email sent to your customer. You can also download the receipt.

Note

In sandbox you will not receive receipt emails automatically after purchase but can manually send them using the instructions above.

Link

Link acts as the merchant of record at checkout and provides subscription management and transaction support at Link.com.

To test Link:

  1. Open your checkout page

  2. Click the checkout button.

  3. Enter the same email address you used to test your checkout page.

  4. In the pop-up modal, use the test passcode 000000 to authenticate.

    If you selected the Save my information for faster checkout checkbox during the first checkout, you also see the 4242 test card saved to your Link account.

OptionalConfigure the tax behavior of your prices

The tax_behavior of a price specifies whether tax is added on top of the price you set (tax_behavior: exclusive) or included already in the price (tax_behavior: inclusive).

Managed Payments uses the tax behavior specified on your price. If you don’t specify the price’s tax behavior, by default, Managed Payments adds tax on top of the price you set.

To change the default, go to the Dashboard > Tax settings and update the Include tax in prices setting.

See also

  • How Managed Payments works
  • Update a Checkout integration
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc