Share payment methods across multiple accounts for direct charges
Save payment details on your platform and clone them to connected accounts for making direct charges.
To create direct charges on multiple connected accounts using the same saved payment information, use this approach. Otherwise, use our guide for creating direct charges.
Save payment details on your platform
When collecting payment details from your customer, set them up for future use and save them on your platform account. You only need to set up each payment method once.
Create a customer on your platform
On your platform account, use the Customers API to create a Customer object representing your customer.
Create a SetupIntent on your platform
When you collect the customer’s payment method details, use the Setup Intents API to create a SetupIntent on your platform and associate it with the customer.
If your platform is in a different country than your connected accounts, the setup performed on your platform might not be sufficient. For example, if your platform is in the US, the setup process might not trigger the authentication required for direct charges in countries subject to SCA enforcement. To make sure that your setup meets the requirements of the connected account’s country, you might need to use on_behalf_of to specify a connected account in that country.
Note
You can accept a payment on your platform (not a direct charge on the connected account) when collecting payment details to save and clone to connected accounts. To do so, instead of creating a SetupIntent, create a PaymentIntent with setup_future_usage. The funds from the PaymentIntent on your platform account go directly to your platform’s balance.
Confirm the SetupIntent
Send the SetupIntent’s client_secret to your front end and use our client-side SDKs or UI components to collect payment details and confirm the SetupIntent. For example, you can use the Payment Element to collect payment information and confirm the SetupIntent.
Confirming on the client allows the customer to go through any flows required to set up their payment details for future use, such as authentication with 3D Secure.
A successful confirmation creates a PaymentMethod and attaches it to the customer for future use.
Clone the PaymentMethod and create direct charges on connected accounts
After you have a PaymentMethod set up for future use on your platform, clone it to a connected account and create a direct charge.
Clone the PaymentMethod to the connected accounts
Use the Payment Methods API to clone the PaymentMethod saved on your platform account to each desired connected account, as shown in the following example. Specify the connected account ID as the Stripe account, and pass the IDs of the Customer and PaymentMethod saved on your platform.
Note
You can clone only certain types of PaymentMethods. Cloning supports PaymentMethods that have type
set to either card
or us_
.
The cloned PaymentMethod is an independent object with a unique ID. It isn’t linked to, or kept in sync with, the PaymentMethod on your platform. However, the cloned PaymentMethod inherits the setup performed on your platform account, so you don’t need to set it up again on the connected account.
Create and confirm a PaymentIntent on a connected account
Use the Payment Intents API to create and confirm a PaymentIntent on a connected account using the cloned PaymentMethod:
Creating a charge with the cloned PaymentMethod consumes it, because it’s not attached to a customer. However, consuming the clone doesn’t affect the original PaymentMethod saved on your platform. You can’t reuse the consumed clone, but you can clone the platform PaymentMethod again and use the new clone for another charge.
Set up recurring payments on a connected account
To use a cloned PaymentMethod for recurring direct charges on a connected account, you must create a Customer object on the connected account and attach the cloned PaymentMethod to it. Then, instead of creating PaymentIntents, create a Subscription using the cloned PaymentMethod and attached Customer.
Note
The Customer object you create on the connected account has no association with the original Customer object stored on your platform account. If you update the original customer information and want to keep them synchronized, you must also update any corresponding customers saved on connected accounts.
Handle customer and payment updates
If you don’t collect recurring payments, you only need to update the customer and PaymentMethod on your platform account. You clone the PaymentMethod for each direct charge, which ensures that you’re always using the newest version. The customer only exists on your platform account, so you don’t need to synchronize customer details across multiple accounts.
If you collect recurring payments, and you update the customer or PaymentMethod on your platform account, you’re responsible for updating the corresponding objects saved on any connected accounts. If you update the original PaymentMethod on your platform, clone it again and attach the new clone to the customer and subscription on the connected account. Repeat the process for each connected account that stores a clone for recurring payments.