#yandos666-cloning-PMs
1 messages ยท Page 1 of 1 (latest)
Hi there ๐ that is correct, you will first attach these payment methods to a customer on you platform account.
This document walks through that process with a little more detail:
https://stripe.com/docs/connect/cloning-customers-across-accounts
Thanks! how does this work if you are just creating a payment Intent for the first time and so dont yet have a payment method attached to the customer?
Can you elaborate? If you don't have a payment method, then it's too early in the process to be able to clone said payment method.
So ATM we're creating a payment Intent and attaching a customer to the PI, thats then passed to usual stripeJS form to collect payment details yada yada - this way the payment method is automatically attached to the customer on completion
I guess instead we dont create the customer at point of creating the initial PI and do it after completion of payment?
Let's take a step back, because I'm a little confused as to whether you're trying to create the payments at the platform level or at the connected account level.
Can you give me a brief overview of what you're trying to accomplish?
so we're trying to achieve whats mentioned in the link you shared - being able to re-use payment information on multiple connected accounts.
The payment itself is a direct charge against the connected account
How we're doing that (so far) is to create a PI against the connected account:
\Stripe\PaymentIntent::create(['customer'=>''foo','amount'=>'bar'],['stripe_account' => {CONNECTED_ACCOUNT_ID});
the customer currently being passed into the above is one we've created under the connected account
Gotcha, so if you're working with direct charges, then everything is going to be happening on the Connected Accounts. In this case the Payment Method that is created would be on the Connected Account and would not be available to be shared.
Instead, you'll want to look into using a Setup Intent flow to capture payment method details on the Platform account, and then clone that Payment Method to your connected accounts later.
https://stripe.com/docs/payments/save-and-reuse
Thanks - so we'd:
- create a setup intent, use a Payment Element to get the payment method back and store this at a platform level for re-use
- clone this PM against a connected accounts customer
- Use the same direct charge method we'd using now to create the PI, passing through the customer and PM
- profit?
Any time!