Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
Get started with Connect
Integration fundamentals
Example integrations
Onboard accounts
Configure account Dashboards
Accept payments
    Create a charge
    Set statement descriptors
    Set MCCs
    Handle multiple currencies
    Create payment links with Connect
    Use Radar with Connect
    Disputes on Connect
    Create subscriptions
    Create invoices
    Multiple payment method configurations
    Embed the payment method settings component
    Account balance
Pay out to accounts
Manage your Connect platform
Tax forms for your Connect platform
Work with connected account types
HomePlatforms and marketplacesAccept payments

Create payment links with Connect

With Connect, you can create payment links for connected accounts, optionally taking fees in the process.

Copy page

Learn more about Connect

Don’t know much about Connect? Check out our Overview article.

You can create payment links for connected accounts, which support several approaches for collecting payments. You can use direct charges to create them directly on the connected account. Alternatively, you can create payment links on the platform with transfers to the connected account by using destination charges. You can also take an application fee on these payment links.

Create a payment link using direct charges

To create an payment link that directly charges on a connected account, create a payment link while authenticated as the connected account. For this to work, you must also create the product and the price on the connected account.

Command Line
cURL
curl https://api.stripe.com/v1/payment_links \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1

When you use direct charges, the connected account is responsible for the cost of the Stripe fees, refunds, and chargebacks.

Create a payment link using destination charges

To create a payment link that charges on the platform and creates automatic transfers to a connected account, create a payment link while providing the connected account ID as the transfer_data[destination] value.

Command Line
cURL
curl https://api.stripe.com/v1/payment_links \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "transfer_data[destination]"=
{{CONNECTED_ACCOUNT_ID}}

For this to work, you must also create the product and the price on the platform account. When using automatic transfers, the platform is the business of record.

When performing destination charges, Payment Links uses the brand settings of your platform account for the payment page. See the Customize branding section for more information.

Create a payment link using destination charges and on_behalf_of

You can also create a destination charge with the on_behalf_of parameter set to the connected account ID (by default, it is the platform). The on_behalf_of parameter determines the settlement merchant, which affects:

  • Whose statement descriptor the end user sees
  • Whose address and phone number the end user sees
  • The settlement currency of the charge
  • The payment page branding the customer sees
Command Line
cURL
curl https://api.stripe.com/v1/payment_links \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d on_behalf_of=
{{CONNECTED_ACCOUNT_ID}}
\ -d "transfer_data[destination]"=
{{CONNECTED_ACCOUNT_ID}}

Fulfill orders placed through payment links

After an end user pays through a payment link you need to enable your connected accounts to handle any fulfillment necessary.

Configure a webhook endpoint in the Dashboard.

Webhooks page in the Stripe Dashboard

Then create an HTTP endpoint on your server to monitor for completed payments. Make sure to replace the endpoint secret key (whsec_...) in the example with your key.

server.rb
Ruby
# Using Sinatra. require 'sinatra' require 'stripe' set :port, 4242 # 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'
# If you are testing your webhook locally with the Stripe CLI you # can find the endpoint's secret by running `stripe listen` # Otherwise, find your endpoint's secret in your webhook settings in # the Developer Dashboard endpoint_secret = 'whsec_...' post '/webhook' do payload = request.body.read sig_header = request.env['HTTP_STRIPE_SIGNATURE'] event = nil # Verify webhook signature and extract the event. # See https://stripe.com/docs/webhooks#verify-events for more information. begin event = Stripe::Webhook.construct_event( payload, sig_header, endpoint_secret ) rescue JSON::ParserError => e # Invalid payload. status 400 return rescue Stripe::SignatureVerificationError => e # Invalid Signature. status 400 return end if event['type'] == 'checkout.session.completed' session = event['data']['object'] connected_account_id = event['account'] handle_completed_checkout_session(connected_account_id, session) end status 200 end def handle_completed_checkout_session(connected_account_id, session) # Fulfill the purchase puts 'Connected account ID: ' + connected_account_id puts session.to_s end

Learn more in our fulfillment guide.

OptionalCollect application fees

OptionalCustomize branding

OptionalIntegrate tax calculation and collection

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