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
Overview
Get started with Connect
Design your integration
    SaaS platform
      Quickstart
      Essential tasks
        Create a connected account
        Set up Dashboard access
        Onboard a connected account
        Accept a payment
        Collect platform fees
        Charge service fees
        Pay out to connected accounts
        Handle refunds and disputes
    Marketplace
Integration fundamentals
Example integrations
Account management
Onboard accounts
Configure account Dashboards
Work with connected account types
Payment processing
Accept payments
Pay out to accounts
Platform administration
Manage your Connect platform
Tax forms for your Connect platform
United States
English (United Kingdom)
HomePlatforms and marketplacesDesign your integrationSaaS platformEssential tasks

Enable merchants on your platform to accept payments directlyPublic preview

Facilitate direct payments to businesses on your SaaS platform from their own customers.

Allow your merchant-configured connected account to accept direct charge payments using a Stripe-hosted Checkout page that reflects their branding.

Create a Checkout Session
Client-side
Server-side

Add a checkout button to your website that calls a server-side endpoint to create a Checkout Session.

checkout.html
<html> <head> <title>Checkout</title> </head> <body> <form action="/create-checkout-session" method="POST"> <button type="submit">Checkout</button> </form> </body> </html>

On your server, create a Checkout Session that renders the payment form to your customer, including purchase details such as line items, the order amount and currency. Redirect your customer to the URL returned in the response.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ -d "line_items[0][price_data][currency]"=usd \ -d "line_items[0][price_data][product_data][name]"=T-shirt \ -d "line_items[0][price_data][unit_amount]"=1000 \ -d "line_items[0][quantity]"=1 \ -d "payment_intent_data[application_fee_amount]"=123 \ -d mode=payment \ --data-urlencode success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}"
ParameterDescription
line_itemsRenders up to 100 purchase items in the Stripe-hosted checkout page.
payment_intent_data[application_fee_amount]Specifies the amount your platform deducts from the transaction as an application fee. This amount transfers to your platform balance after the payment completes. See collect fees for more information.
success_urlWhere Stripe redirects the customer following payment completion. Stripe updates the URL with the {CHECKOUT_SESSION_ID} generated from this request. You can customise redirect behaviour with a Stripe-hosted page to:
  • Retrieve the Checkout Session and inspect its status to decide what to show your customer.
  • Append your own query parameters, which persist through the redirect process.
Stripe-AccountA header that identifies your connected account as the transaction merchant of record. Checkout uses the connected account’s branding instead of your platform’s.

Charges that you create directly on the connected account are reported only on that account. These charges aren’t shown in your platform’s Dashboard or exports. Direct charges are included in reports and Sigma for connected accounts that your platform controls. You can always retrieve this information using the Stripe API.

Handle post-payment events
Server-side

Stripe sends a checkout.session.completed event when the payment completes. Use a webhook to receive these events and run actions, such as sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.

Listen for these events rather than waiting on a callback from the client. On the client, the customer could close the browser window or quit the app before the callback executes. Some payment methods also take 2-14 days for payment confirmation. Setting up your integration to listen for asynchronous events enables you to accept multiple payment methods with a single integration.

Stripe recommends handling all the following events when collecting payments with Checkout:

EventDescriptionNext steps
checkout.session.completedThe customer has successfully authorised the payment by submitting the Checkout form.Wait for the payment to succeed or fail.
checkout.session.async_payment_succeededThe customer’s payment succeeded.Fulfil the purchased goods or services.
checkout.session.async_payment_failedThe payment was declined, or failed for some other reason.Contact the customer through email and ask them to place a new order.

These events all include the Checkout Session object. After the payment succeeds, the underlying PaymentIntent status changes from processing to succeeded or a failure status.

Test the integration

Card numberScenarioHow to test
The card payment succeeds and doesn’t require authentication.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.
The card payment requires authentication.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.
The card is declined with a decline code like insufficient_funds.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.
The UnionPay card has a variable length of 13-19 digits.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.

See Testing for additional information to test your integration.

OptionalEnable additional payment methods

Navigate to Manage payment methods for your connected accounts in the Dashboard to configure which payment methods your connected accounts accept. Changes to default settings apply to all new and existing connected accounts.

Consult the following resources for payment method information:

  • A guide to payment methods to help you choose the correct payment methods for your platform.
  • Account capabilities to make sure your chosen payment methods work for your connected accounts.
  • Payment method and product support tables to make sure your chosen payment methods work for your Stripe products and payments flows.

For each payment method, you can select one of the following dropdown options:

On by defaultYour connected accounts accept this payment method during checkout. Some payment methods can only be off or blocked. This is because your connected accounts with access to the Stripe Dashboard must activate them in their settings page.
Off by defaultYour connected accounts don’t accept this payment method during checkout. If you allow your connected accounts with access to the Stripe Dashboard to manage their own payment methods, they have the ability to turn it on.
BlockedYour connected accounts don’t accept this payment method during checkout. If you allow your connected accounts with access to the Stripe Dashboard to manage their own payment methods, they don’t have the option to turn it on.
Dropdown options for payment methods, each showing an available option (blocked, on by default, off by default)

Payment method options

If you make a change to a payment method, you must click Review changes in the bottom bar of your screen and Save and apply to update your connected accounts.

Window that shows after clicking Save button with a list of what the user changed

Save window

Allow connected accounts to manage payment methods

Stripe recommends allowing your connected accounts to customise their own payment methods. This option allows each connected account with access to the Stripe Dashboard to view and update their Payment methods page. Only owners of the connected accounts can customise their payment methods. The Stripe Dashboard displays the set of payment method defaults you applied to all new and existing connected accounts. Your connected accounts can override these defaults, excluding payment methods you have blocked.

Tick the Account customisation tickbox to enable this option. You must click Review changes in the bottom bar of your screen and then select Save and apply to update this setting.

Screenshot of the tickbox to select when allowing connected owners to customise payment methods

Account customisation tickbox

Payment method capabilities

To allow your connected accounts to accept additional payment methods, you must make sure their connected accounts have active capabilities for each payment method. Most payment methods have the same verification requirements as the card_payments capability, with some restrictions and exceptions. The payment method capabilities table lists the payment methods that require additional verification over cards.

Navigate to the Connected account payment settings in the Dashboard to request capabilities on your new and existing connected accounts for each payment method and country combination.

Next steps

  • If your monetisation strategy includes charging a per-transaction fee, learn how to collect application fees from each payment.
  • If you plan to charge a subscription fee for using your platform, learn how to use Billing to charge a service fee.
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc