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.or higher.basil
Create products and prices
You can accept subscriptions and one-time payments:
Build your checkoutClient-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.
Set up your serverServer-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 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.
Test your endpoint
Confirm your endpoint is accessible by starting your web server (for example, localhost:4242) and running the following command:
curl -X POST -is "http://localhost:4242/create-checkout-session" -d ""
The response in your terminal looks like:
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 Fulfil orders for Checkout.
Handle the following events when collecting payments with Checkout:
| Event | Description |
|---|---|
| checkout.session.completed | Sent when a customer successfully completes a Checkout Session. |
| checkout.session.async_payment_succeeded | Sent when a payment made with a delayed payment method, such as ACH direct debt, succeeds. |
| checkout.session.async_payment_failed | Sent 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
- Start your server and go to your checkout page (for example, http://localhost:4242/checkout.html from Build your checkout).
- Click the checkout button to be redirected to the Managed Payments checkout page.
- On the checkout page, enter different billing addresses to see how Managed Payments calculates tax for customers in different locations.
- To process the payment, enter your email address, phone number, and the test card number
4242 4242 4242 4242with any CVC and an expiry date in the future.
For additional information, see Testing.
Payment details
Preview the receipt
- Under Checkout summary, click Invoice.
- 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:
Open your checkout page
Click the checkout button.
Enter the same email address you used to test your checkout page.
In the pop-up modal, use the test passcode
000000to authenticate.If you selected the Save my information for faster checkout tickbox during the first checkout, you also see the
4242test card saved to your Link account.
OptionalConfigure the tax behaviour of your prices
The tax_behavior of a price specifies whether tax is added on top of the price you set (tax_) or included already in the price (tax_).
Managed Payments uses the tax behaviour specified on your price. If you don’t specify the price’s tax behaviour, 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.