Sign in
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
Security
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Support
Overview
Overview
Get started
Collect payments then pay out
Enable other businesses to accept payments directly
Pay out money
Explore Connect
Onboard your accounts
Choose your account type
Standard
Express
Custom
Service agreement types
Account capabilities
Accept payments
Create a charge
Create a payments page
Add payment methods
Set statement descriptors
Clone customers across accounts
Create a subscription
Debit connected accounts
Pay out
Set bank and debit card payouts
Bank accounts
Manage payout schedule
Manual payouts
Payout reversals
Instant Payouts
Cross-border payouts
Manage funds
Add money to your platform balance
Account balance
Handle other currencies
Manage accounts
Best practices
Listen for updates
Dashboard account management
Platform controls for Standard accounts
Make API calls for connected accounts
Set MCCs
Testing
Manage tax forms
Overview
Get started with tax reporting
Tax form settings
Calculation methods
File tax forms
File tax forms with states
Modify tax forms
Deliver tax forms
Tax reporting for Payable users
Testing
Multiparty payments
Clone customers across accounts
connect
·
HomePaymentsMultiparty payments

Clone customers across accounts

With Connect, you can clone your customers' payment information across multiple connected accounts for reuse.

Learn more about Connect

Don't know much about Connect yet? Check out the overview.

For some business models, it’s helpful to reuse your customers’ payment information across connected accounts. For example, a customer who makes a purchase from one of your connected sellers shouldn’t need to re-enter their credit card or bank account details to purchase from another seller.

With Connect, you can accomplish this by following three steps:

  1. Storing customers, with a payment method, on the platform account
  2. Making tokens to clone the payment method when it’s time to charge the customer on behalf of a connected account
  3. Creating charges using the new tokens

Step 1: Storing customers

Note

Cloning saved payment methods is only relevant when creating direct charges on connected accounts. It's not necessary when making charges on your platform account.

When not cloning payment methods, you save the Stripe Customer objects on each individual connected Stripe account. When cloning payment methods, you instead save them on the platform Stripe account.

This is an API call but be sure to use your own secret and publishable keys instead of the connect account’s.

curl Ruby Python PHP Java Node Go .NET
curl https://api.stripe.com/v1/customers \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d email="paying.user@example.com" \ -d source=tok_mastercard
curl https://api.stripe.com/v1/customers \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d email="paying.user@example.com" \ -d source=tok_mastercard
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = Stripe::Customer.create({ email: 'paying.user@example.com', source: 'tok_mastercard', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = Stripe::Customer.create({ email: 'paying.user@example.com', source: 'tok_mastercard', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = stripe.Customer.create( email='paying.user@example.com', source='tok_mastercard', )
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = stripe.Customer.create( email='paying.user@example.com', source='tok_mastercard', )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); $customer = \Stripe\Customer::create([ 'email' => 'paying.user@example.com', 'source' => 'tok_mastercard', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); $customer = \Stripe\Customer::create([ 'email' => 'paying.user@example.com', 'source' => 'tok_mastercard', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; CustomerCreateParams params = CustomerCreateParams.builder() .setEmail("paying.user@example.com") .setSource("tok_mastercard") .build(); Customer customer = Customer.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; CustomerCreateParams params = CustomerCreateParams.builder() .setEmail("paying.user@example.com") .setSource("tok_mastercard") .build(); Customer customer = Customer.create(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const customer = await stripe.customers.create({ email: 'paying.user@example.com', source: 'tok_mastercard', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const customer = await stripe.customers.create({ email: 'paying.user@example.com', source: 'tok_mastercard', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.CustomerParams{ Email: "paying.user@example.com", } params.SetSource("tok_mastercard") cus, _ := customer.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.CustomerParams{ Email: "paying.user@example.com", } params.SetSource("tok_mastercard") cus, _ := customer.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new CustomerCreateOptions { Email = "paying.user@example.com", Source = "tok_mastercard", }; var service = new CustomerService(); var customer = service.Create(options);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new CustomerCreateOptions { Email = "paying.user@example.com", Source = "tok_mastercard", }; var service = new CustomerService(); var customer = service.Create(options);

Step 2: Making tokens

When you’re ready to create a charge on a connected account using a customer saved on your platform account, create a new token for that purpose. You’ll need:

  • The Stripe account ID—something like acct_sasL7gYWBeyLeZbc—of the connected account for whom you’re making the charge
  • The customer ID—something like cus_iS3fhH3wH8D27w—of the customer (in your platform account) being charged
  • The card or bank account ID for that customer, if you want to charge a specific card or bank account rather than the default
curl Ruby Python PHP Java Node Go .NET
curl https://api.stripe.com/v1/tokens \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer="{{CUSTOMER_ID}}" \ -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
curl https://api.stripe.com/v1/tokens \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d customer="{{CUSTOMER_ID}}" \ -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' token = Stripe::Token.create({ customer: 'cus_fNeRsaPVMSc8s0', }, { stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' token = Stripe::Token.create({ customer: 'cus_fNeRsaPVMSc8s0', }, { stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' token = stripe.Token.create( customer='cus_sttjweJ5dRc8aS', stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}', )
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' token = stripe.Token.create( customer='cus_sttjweJ5dRc8aS', stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}', )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); $token = \Stripe\Token::create([ 'customer' => 'cus_HXu6eF8ITwgvmD' ], [ 'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); $token = \Stripe\Token::create([ 'customer' => 'cus_HXu6eF8ITwgvmD' ], [ 'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; TokenCreateParams params = TokenCreateParams.builder() .setCustomer("cus_BvU4kBCyZIzwJi") .build(); RequestOptions requestOptions = RequestOptions.builder() .setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") .build(); Token token = Token.create(params, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; TokenCreateParams params = TokenCreateParams.builder() .setCustomer("cus_BvU4kBCyZIzwJi") .build(); RequestOptions requestOptions = RequestOptions.builder() .setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") .build(); Token token = Token.create(params, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const token = await stripe.tokens.create({ customer: 'cus_YGGG4Kcl9D5BJ3', }, { stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const token = await stripe.tokens.create({ customer: 'cus_YGGG4Kcl9D5BJ3', }, { stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.TokenParams{ Customer: stripe.String("cus_fp9PkBltsPMC0P"), } params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") t, _ := token.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.TokenParams{ Customer: stripe.String("cus_fp9PkBltsPMC0P"), } params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") t, _ := token.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new TokenCreateOptions { Customer = "cus_fp9PkBltsPMC0P", }; var requestOptions = new RequestOptions { StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}", }; var service = new TokenService(); var token = service.Create(options, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new TokenCreateOptions { Customer = "cus_fp9PkBltsPMC0P", }; var requestOptions = new RequestOptions { StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}", }; var service = new TokenService(); var token = service.Create(options, requestOptions);

If your platform uses the Sources API, then rather than creating a token, you must create a Source off that customer. If your platform uses the Payment Methods API, you must create a PaymentMethod from that customer.

Step 3: Creating charges

With the token generated in the previous step, attach this token to a customer on the connected account.

Charges that are made on the cloned customer will not be reflected on the original customer. This feature is intended for multiple connected accounts that need to charge the same user.

curl Ruby Python PHP Java Node Go .NET
curl https://api.stripe.com/v1/customers \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d source=tok_mastercard \ -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
curl https://api.stripe.com/v1/customers \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d source=tok_mastercard \ -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = Stripe::Customer.create({ source: token.id, }, { stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = Stripe::Customer.create({ source: token.id, }, { stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = stripe.Customer.create( source=token.id, stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}', )
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' customer = stripe.Customer.create( source=token.id, stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}', )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); $customer = \Stripe\Customer::create([ 'source' => $token->id, ], [ 'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); $customer = \Stripe\Customer::create([ 'source' => $token->id, ], [ 'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; CustomerCreateParams params = CustomerCreateParams.builder() .setSource(token.getId()) .build(); RequestOptions requestOptions = RequestOptions.builder() .setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") .build(); Customer customer = Customer.create(params, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; CustomerCreateParams params = CustomerCreateParams.builder() .setSource(token.getId()) .build(); RequestOptions requestOptions = RequestOptions.builder() .setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") .build(); Customer customer = Customer.create(params, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const customer = await stripe.customers.create({ source: token.id, }, { stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const customer = await stripe.customers.create({ source: token.id, }, { stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.CustomerParams{} params.SetSource(token.id) params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") cus, _ := customer.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.CustomerParams{} params.SetSource(token.id) params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") cus, _ := customer.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new CustomerCreateOptions { Source = token.Id, }; var requestOptions = new RequestOptions { StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}", }; var service = new CustomerService(); var customer = service.Create(options, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new CustomerCreateOptions { Source = token.Id, }; var requestOptions = new RequestOptions { StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}", }; var service = new CustomerService(); var customer = service.Create(options, requestOptions);

Then, use the customer ID (e.g., cus_9z9uj4iUcZX1fa) and the payment method ID (e.g., card_hgp9gtU7hsifY5) returned by the customers.create call to charge the customer.

curl Ruby Python PHP Java Node Go .NET
curl https://api.stripe.com/v1/payment_intents \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d amount=999 \ -d currency=usd \ -d "payment_method_types[]"=card \ -d payment_method="{{PAYMENT_METHOD_ID}}" \ -d customer="{{CUSTOMER_ID}}" \ -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
curl https://api.stripe.com/v1/payment_intents \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d amount=999 \ -d currency=usd \ -d "payment_method_types[]"=card \ -d payment_method="{{PAYMENT_METHOD_ID}}" \ -d customer="{{CUSTOMER_ID}}" \ -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' intent = Stripe::PaymentIntent.create({ amount: 999, currency: 'usd', payment_method_types: ['card'], payment_method: '{{PAYMENT_METHOD_ID}}', customer: '{{CUSTOMER_ID}}', }, { stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' intent = Stripe::PaymentIntent.create({ amount: 999, currency: 'usd', payment_method_types: ['card'], payment_method: '{{PAYMENT_METHOD_ID}}', customer: '{{CUSTOMER_ID}}', }, { stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', })
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.PaymentIntent.create( amount=999, currency='usd', payment_method_types=['card'], payment_method='{{PAYMENT_METHOD_ID}}', customer='{{CUSTOMER_ID}}', stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}', )
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.PaymentIntent.create( amount=999, currency='usd', payment_method_types=['card'], payment_method='{{PAYMENT_METHOD_ID}}', customer='{{CUSTOMER_ID}}', stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}', )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\PaymentIntent::create([ 'amount' => 999, 'currency' => 'usd', 'payment_method_types' => ['card'], 'payment_method' => '{{PAYMENT_METHOD_ID}}', 'customer' => '{{CUSTOMER_ID}}', ], [ 'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\PaymentIntent::create([ 'amount' => 999, 'currency' => 'usd', 'payment_method_types' => ['card'], 'payment_method' => '{{PAYMENT_METHOD_ID}}', 'customer' => '{{CUSTOMER_ID}}', ], [ 'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}', ]);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PaymentIntentCreateParams params = PaymentIntentCreateParams.builder() .setAmount(1099L) .setCurrency("usd") .addPaymentMethodType("card") .setPaymentMethod("{{PAYMENT_METHOD_ID}}") .setCustomer("{{CUSTOMER_ID}}") .build(); RequestOptions requestOptions = RequestOptions.builder() .setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") .build(); PaymentIntent paymentIntent = PaymentIntent.create(params, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; PaymentIntentCreateParams params = PaymentIntentCreateParams.builder() .setAmount(1099L) .setCurrency("usd") .addPaymentMethodType("card") .setPaymentMethod("{{PAYMENT_METHOD_ID}}") .setCustomer("{{CUSTOMER_ID}}") .build(); RequestOptions requestOptions = RequestOptions.builder() .setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") .build(); PaymentIntent paymentIntent = PaymentIntent.create(params, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const paymentIntent = await stripe.paymentIntents.create({ amount: 999, currency: 'usd', payment_method_types: ['card'], payment_method: '{{PAYMENT_METHOD_ID}}', customer: '{{CUSTOMER_ID}}', }, { stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const Stripe = require('stripe'); const stripe = Stripe('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const paymentIntent = await stripe.paymentIntents.create({ amount: 999, currency: 'usd', payment_method_types: ['card'], payment_method: '{{PAYMENT_METHOD_ID}}', customer: '{{CUSTOMER_ID}}', }, { stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', });
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PaymentIntentParams{ Amount: stripe.Int64(1099), Currency: stripe.String(string(stripe.CurrencyUSD)), PaymentMethodTypes: stripe.StringSlice([]string{ "card", }), PaymentMethod: stripe.String("{{PAYMENT_METHOD_ID}}"), Customer: stripe.String("{{CUSTOMER_ID}}"), } params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") pi, _ := paymentintent.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.PaymentIntentParams{ Amount: stripe.Int64(1099), Currency: stripe.String(string(stripe.CurrencyUSD)), PaymentMethodTypes: stripe.StringSlice([]string{ "card", }), PaymentMethod: stripe.String("{{PAYMENT_METHOD_ID}}"), Customer: stripe.String("{{CUSTOMER_ID}}"), } params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}") pi, _ := paymentintent.New(params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PaymentIntentCreateOptions { Amount = 1099, Currency = "usd", PaymentMethodTypes = new List<string> { "card" }, PaymentMethod = "{{PAYMENT_METHOD_ID}}", Customer = "{{CUSTOMER_ID}}", }; var requestOptions = new RequestOptions { StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}", }; var service = new PaymentIntentService(); var paymentIntent = service.Create(options, requestOptions);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new PaymentIntentCreateOptions { Amount = 1099, Currency = "usd", PaymentMethodTypes = new List<string> { "card" }, PaymentMethod = "{{PAYMENT_METHOD_ID}}", Customer = "{{CUSTOMER_ID}}", }; var requestOptions = new RequestOptions { StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}", }; var service = new PaymentIntentService(); var paymentIntent = service.Create(options, requestOptions);

Further reading

Discover what other Connect functionality is available!

  • Creating Charges
  • Creating Direct Charges
Was this page helpful?
Questions? Contact us.
Developer tutorials on YouTube.
You can unsubscribe at any time. Read our privacy policy.
On this page
Storing customers
Making tokens
Creating charges
Further reading