#spanila
1 messages · Page 1 of 1 (latest)
hi! the first three points are just how Standard + Direct Charges work by default so that's totally possible.
https://stripe.com/docs/connect/enable-payment-acceptance-guide
the last point is quite complicated to implement but is possible using
https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
https://stripe.com/docs/connect/cloning-customers-across-accounts
i found conflicting information about being able to do it, vs not being able to use paymentmethod user adds onto connected account
the flow of things im trying to do is:
- create customer
- if customer has paymentmethods, add it to paymentIntent, otherwise not.
- create directcharge paymentintend
- confirm on ui
- get paymentmethod from paymentintent on server
- attach paymentmethod to platform customer
- update paymentintent with customer id
- capture paymentintent
see, this guide you posted is almost what i need, but i need to have the paymentmethod already there. https://stripe.com/docs/connect/cloning-customers-across-accounts
it's bit hard to describe without more specific reference(for example you're not saying if those Customers/PaymentIntents/PaymentMethods etc are created on the platform or the connected account) so it's hard for me to comment on the flow.
but i need to have the paymentmethod already there
yes, you do.
generally it works something like
- create Customer + SetupIntent on the platform
- confirm SetupIntent to attach a PaymentMethod to the Customer on the platform
- when you need to make a payment for that customer on a connected account, you clone their saved PaymentMethod
- on the connected account you create a PaymentIntent to charge the cloned PaymentMethod, and confirm + capture that.
in that way you have a "master" Customer on the platform that stores the PaymentMethod and you clone it "on-demand" when a payment is needed. Alternatively you can create a Customer on the connected account and attach the cloned PaymentMethod to that, but then you have to replicate that across all accounts and keep it in sync etc and it's a lot more complex.
totally want to avoid that sync option 🙂