Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Get started with Connect
Integration fundamentals
Example integrations
Account management
Onboard accounts
Configure account Dashboards
Work with connected account types
Payment processing
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
Platform administration
Manage your Connect platform
Tax forms for your Connect platform
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.

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
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
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
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
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
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
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
Python
PHP
Java
Node.js
Go
.NET
No results
# 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

You can optionally collect an application fee for every payment made with the payment link. For a payment link containing only line items with one-time prices, you can define an application_fee_amount.

If the payment link contains a recurring price, you can define an application_fee_percent instead. This must be a non-negative decimal between 0-100 with at most two decimal places. Application fees on subscriptions must be a percentage because the amount billed for subscriptions can vary. You can’t set a flat amount as the application fee for subscriptions.

The following example shows an application_fee_amount for a payment link with a direct charge on the connected account:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
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 \ -d application_fee_amount=10

This example shows an application_fee_amount for a payment link with a destination charge:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
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 application_fee_amount=10 \ -d "transfer_data[destination]"=
{{CONNECTED_ACCOUNT_ID}}

OptionalCustomize branding

Your platform and connected accounts with access to the full Stripe Dashboard can customize branding on the payments page using the Branding settings. For destination charges with on_behalf_of and direct charges, payment links use the branding settings of the connected account. For destination charges without on_behalf_of, payment links use the branding settings of the platform account.

Platforms can configure the branding settings of connected accounts that don’t have access to the full Stripe Dashboard by calling the update Account API endpoint.

The account update API accepts the following parameters for branding:

  • icon - Displayed next to the business name in the header of the Checkout page.
  • logo- If specified, displayed instead of the icon and business name in the header of the Checkout page.
  • primary_color - Used as the background color on the Checkout page.
  • secondary_color - Used as the button color on the Checkout page.
Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/accounts/{{CONNECTED_STRIPE_ACCOUNT_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "settings[branding][icon]"=file_123 \ -d "settings[branding][logo]"=file_456 \ --data-urlencode "settings[branding][primary_color]"="#663399" \ --data-urlencode "settings[branding][secondary_color]"="#4BB543"

OptionalIntegrate tax calculation and collection

You need to first determine which entity is liable for tax. The entity that’s liable for tax might be your connected account or the platform, depending on your business model. To learn more, see Stripe Tax with Connect.

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