Cloning saved payment methods

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

    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

    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 connected user’s.

    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 change this 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 change this 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 change this 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 change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> params = new HashMap<>();
    params.put("email", "paying.user@example.com");
    params.put("source", "tok_mastercard");
    Customer customer = Customer.create(params);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    const customer =  stripe.customers.create({
      email: 'paying.user@example.com',
      source: 'tok_mastercard',
    });
    
    // Set your secret key: remember to change this 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 change this 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",
        SourceToken = "tok_mastercard",
    };
    var service = new CustomerService();
    Customer 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_6IBn28iPa6uUTvgS—of the connected account for whom you’re making the charge
    • The customer ID—something like cus_E10b5KHTBREfY1—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 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 change this 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 change this 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 change this 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 change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("customer", "cus_BvU4kBCyZIzwJi");
    
    RequestOptions requestOptions = RequestOptions.builder().setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}").build();
    
    Token token = Token.create(params, requestOptions);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    stripe.tokens.create({
      customer: "cus_YGGG4Kcl9D5BJ3",
    }, {
      stripe_account: "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
    }).then(function(token) {
      // asynchronously called
    });
    
    // Set your secret key: remember to change this 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, err := token.New(params)
    
    // Set your secret key: remember to change this 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();
    Token token = service.Create(options, requestOptions);
    

    Step 3: Creating charges

    Like a regular token or source created by Stripe.js or Checkout, the one generated in the previous step acts as a credit card number. You can use the source or token to create a one-time payment as shown below.

    curl https://api.stripe.com/v1/charges \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d amount=1000 \
      -d currency=usd \
      -d source="{{TOKEN_ID}}" \
      -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc'
    
    charge = Stripe::Charge.create({
        amount: 1000,
        currency: 'usd',
        source: token.id,
    }, stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}')
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc'
    
    charge = stripe.Charge.create(
        amount=1000,
        currency='usd',
        source=token.id,
        stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}',)
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    $charge = \Stripe\Charge::create([
        'amount' => 1000,
        'currency' => 'usd',
        'source' => $token->id,
    ], ['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}']);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> params = new HashMap<>();
    params.put("amount", 1000);
    params.put("currency", "usd");
    params.put("source", token.getId());
    RequestOptions requestOptions = RequestOptions.builder().setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}").build();
    Charge charge = Charge.create(params, requestOptions);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    stripe.charges.create({
      amount: 1000,
      currency: 'usd',
      source: token.id,
    }, {
      stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
    }).then(function(charge) {
      // asynchronously called
    });
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    params := &stripe.ChargeParams{
        Amount: stripe.Int64(1000),
        Currency: stripe.String(string(stripe.CurrencyUSD)),
        StripeAccount: "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
    }
    params.SetSource(token.id)ch, _ := charge.New(params)
    
    // Set your secret key: remember to change this 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 ChargeCreateOptions {
        Amount = 1000,
        Currency = "usd",
        Source = token.Id,
    };
    var requestOptions = new RequestOptions
    {
        StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}"
    };
    var service = new ChargeService();
    Charge charge = service.Create(options, requestOptions);
    
    curl https://api.stripe.com/v1/payment_intents \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d amount=1099 \
      -d currency=usd \
      -d payment_method="{{PAYMENT_METHOD_ID}}" \
      -d "payment_method_types[]"=card \
      -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
    
    # Set your secret key: remember to change this 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: 1099,
      currency: 'usd',
      payment_method: {{PAYMENT_METHOD_ID}},
      payment_method_types: ['card'],
    }, stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}')
    
    # Set your secret key: remember to change this 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=1099,
      currency='usd',
      payment_method={{PAYMENT_METHOD_ID}}
      payment_method_types=['card'],
      stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}'
    )
    
    // Set your secret key: remember to change this 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' => 1099,
      'currency' => 'usd',
      'payment_method' => '{{PAYMENT_METHOD_ID}}',
      'payment_method_types' => ['card'],
    ], ['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}']);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> paymentintentParams = new HashMap<String, Object>();
    paymentintentParams.put("amount", 1099);
    paymentintentParams.put("currency", "usd");
    paymentintentParams.put("payment_method", {{PAYMENT_METHOD_ID}});
    ArrayList payment_method_types = new ArrayList();
    payment_method_types.add("card");
    paymentintentParams.put("payment_method_types", payment_method_types);
    
    RequestOptions requestOptions = RequestOptions.builder().setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}").build();
    
    PaymentIntent.create(paymentintentParams, requestOptions);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    (async () => {
      const paymentIntent = await stripe.paymentIntents.create({
        amount: 1099,
        currency: 'usd',
        payment_method: '{{PAYMENT_METHOD_ID}}',
        payment_method_types: ['card']
      }, {
        stripe_account: "{{CONNECTED_STRIPE_ACCOUNT_ID}}"
      });
    })();
    
    // Set your secret key: remember to change this 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)),
      PaymentMethod: "{{PAYMENT_METHOD_ID}}",
      PaymentMethodTypes: stripe.StringSlice([]string{
        "card",
      }),
    }
    params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}")
    paymentintent.New(params)
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    var paymentIntents = new PaymentIntentService();
    var createOptions = new PaymentIntentCreateOptions {
      Amount = 1099,
      Currency = "usd",
      PaymentMethod = "{{PAYMENT_METHOD_ID}}",
      PaymentMethodTypes = new List<string> { "card" }
    };
    var requestOptions = new RequestOptions {
      StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}"
    }
    paymentIntents.Create(createOptions, requestOptions);
    

    You can also save the customer to the connected account. This lets you charge customers, and create subscriptions for them (to a plan defined on the connected account). To create a charge, save the customer to the connected account.

    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 change this 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 change this 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 change this 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 change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> params = new HashMap<>();
    params.put("source", token.getId());
    RequestOptions requestOptions = RequestOptions.builder().setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}").build();Customer customer = Customer.create(params, requestOptions);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    stripe.customers.create({
      source: token.id
    }, {
      stripe_account: "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
    }).then(function(customer) {
      // asynchronously called
    });
    
    // Set your secret key: remember to change this 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.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}")
    params.SetSource(token.id)cus, _ := customer.New(params)
    
    // Set your secret key: remember to change this 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 {
        SourceToken = token.Id,
    };
    var requestOptions = new RequestOptions
    {
        StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}"
    };
    var service = new CustomerService();
    Customer customer = service.Create(options, requestOptions);
    

    Then, use the customer ID (e.g., cus_CfIFAzuw337Ug8) returned by the customers.create call to charge the customer.

    curl https://api.stripe.com/v1/charges \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d customer="{{CUSTOMER_ID}}" \
      -d amount=999 \
      -d currency=usd \
      -H "Stripe-Account: {{CONNECTED_STRIPE_ACCOUNT_ID}}"
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc'
    
    charge = Stripe::Charge.create({
        customer: customer.id,
        amount: 999,
        currency: 'usd',
    }, stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}')
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc'
    
    charge = stripe.Charge.create(
        customer=customer.id,
        amount=999,
        currency='usd',
        stripe_account='{{CONNECTED_STRIPE_ACCOUNT_ID}}',)
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    $charge = \Stripe\Charge::create([
        'customer' => $customer->id,
        'amount' => 999,
        'currency' => 'usd',
    ], ['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}']);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> params = new HashMap<>();
    params.put("customer", customer.getId());
    params.put("amount", 999);
    params.put("currency", "usd");
    RequestOptions requestOptions = RequestOptions.builder().setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}").build();
    Charge charge = Charge.create(params, requestOptions);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    stripe.charges.create({
      customer: customer.id,
      amount: 999,
      currency: 'usd',
    }, {
      stripe_account: "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
    }).then(function(charge) {
      // asynchronously called
    });
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    params := &stripe.ChargeParams{
        Customer: customer.ID,
        Amount: stripe.Int64(999),
        Currency: stripe.String(string(stripe.CurrencyUSD)),
    }
    params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}")
    ch, _ := charge.New(params)
    
    // Set your secret key: remember to change this 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 ChargeCreateOptions {
        Customer = customer.Id,
        Amount = 999,
        Currency = "usd",
    };
    var requestOptions = new RequestOptions
    {
        StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}"
    };
    var service = new ChargeService();
    Charge charge = service.Create(options, requestOptions);
    
    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 change this 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 change this 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 change this 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 change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> paymentintentParams = new HashMap<String, Object>();
    paymentintentParams.put("amount", 1099);
    paymentintentParams.put("currency", "usd");
    ArrayList payment_method_types = new ArrayList();
    payment_method_types.add("card");
    paymentintentParams.put("payment_method_types", payment_method_types);
    paymentintentsParams.put("payment_method", "{{PAYMENT_METHOD_ID}}");
    paymentintentsParams.put("customer", "{{CUSTOMER_ID}}");
    RequestOptions requestOptions = RequestOptions.builder().setStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}").build();
    PaymentIntent.create(paymentintentParams, requestOptions);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    (async () => {
      const paymentIntent = await stripe.paymentIntents.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 change this 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("cus_DyA7gideDWXNOX"),
    }
    params.SetStripeAccount("{{CONNECTED_STRIPE_ACCOUNT_ID}}")
    paymentintent.New(params)
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    var paymentIntents = new PaymentIntentService();
    var createOptions = 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}}"
    };
    
    paymentIntents.Create(createOptions, requestOptions);
    

    Further reading

    Discover what other Connect functionality is available!

    Was this page helpful?

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.

    On this page