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
    Marketplace
      Quickstart
      Essential tasks
        Create a connected account
        Set up Dashboard access
        Onboard a connected account
        Enable payment methods
        Accept a payment
          Use destination charges
          Use separate charges and transfers
        Collect application fees
        Pay out to connected accounts
        Handle refunds and disputes
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 States)
HomePlatforms and marketplacesDesign your integrationMarketplaceEssential tasksAccept a payment

Accept a payment using destination charges

Use destination charges to accept payments.

Create destination charges when customers transact with your platform for products or services provided by your connected accounts and you immediately transfer funds to your connected accounts. With this charge type:

  • You create a charge on your platform’s account.
  • You determine whether some or all of those funds are transferred to the connected account.
  • You’re the merchant of record, and your account balance gets debited for the cost of the Stripe fees, refunds, and chargebacks.

With certain exceptions, if your platform and a connected account aren’t in the same region, you must specify the connected account as the settlement merchant using the on_behalf_of parameter on the Payment Intent.

This guide shows you how to create a Stripe-hosted Checkout Session. Alternatively, you can use Stripe Elements or the API.

Create a Checkout Session
Server-side

A Checkout Session controls what your customer sees in the payment form such as line items, the order amount and currency, and acceptable payment methods. Add a checkout button to your website that calls a server-side endpoint to create a Checkout Session.

On your server, create a Checkout Session and 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
:"
\ -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 "payment_intent_data[transfer_data][destination]"=
"{{CONNECTED_ACCOUNT_ID}}"
\ -d mode=payment \ --data-urlencode success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}"
ParameterValueRequired?Description
payment_intent_data[transfer_data]destinationYesIndicates that this is a destination charge. A destination charge means the charge is processed on the platform and then the funds are immediately and automatically transferred to the connected account’s pending balance.
line_itemsA list of up to 100 itemsYesThe items the customer is purchasing. The items are displayed in the embedded payment form.
success_urlA valid URLYesThe URL where the customer is redirected after they complete a payment. Use the value of {CHECKOUT_SESSION_ID} to retrieve the Checkout Session and inspect its status to decide what to show your customer. You can also append custom query parameters, which persist through the redirect process.
payment_intent_data[application_fee_amount]An amount of moneyRequired for ConnectThe amount your platform plans to take from the transaction. The full charge amount is immediately transferred from the platform to the connected account that’s specified by transfer_data[destination] after the charge is captured. The application_fee_amount is then transferred back to the platform, and the Stripe fee is deducted from the platform’s amount.

Handle post-payment events for destination charges
Server-side

Stripe sends a checkout.session.completed event when the payment completes. Use a webhook to receive these events and run actions, like 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.

Handle the following events when collecting payments with Checkout:

EventDescriptionNext steps
checkout.session.completedThe customer has successfully authorized the payment by submitting the Checkout form.Wait for the payment to succeed or fail.
checkout.session.async_payment_succeededThe customer’s payment succeeded.Fulfill 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 request that they 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.

Next steps

Next, learn how to collect application fees from your connected accounts.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc