Reputation: 22956
I create a payment intent using stripe.paymentIntents.create
for a connected account, the customer may not exist yet.
The customer then signs up for the platform to pay for the payment intent, at which point I'd also like the customer to be on the platform account as well.
If the customer is not yet created I can't create a platform customer and clone them as I get an error about not being able to clone customers with no payment method attached.
The end goal is to allow a connected account to create a payment intent then haev a customer sign up for the platform and pay for that payment intent. But I'm not seeing how I coudl do this with the stripe api - unless I create the payment intent for the platform account but then it somehow has to move across to the connected account.
Is there a way to accomplish this?
Upvotes: 0
Views: 797
Reputation: 2799
It's not possible to clone a card on the connected account back to the platform account.
You should create a customer and collect the payment method details on the Platform account first. Then clone the PaymentMethod to the connected account. Subsequently, create and confirm the PaymentIntent off-session on the connected account with the cloned PaymentMethod.
See https://stripe.com/docs/payments/save-and-reuse for how to save the payment method for future use.
Upvotes: 2