#Gerald - Redfluencer
1 messages · Page 1 of 1 (latest)
hi! can you say more about the overall configuration? which account was the SetupIntent created on and the payment method saved on, your own platform account or a connected account?
Hi @feral mulch, the setupIntent was created and saved on the platform account
how can I use this payment method on connected accounts without having to refill the payment details
one option would be to use https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods to clone the PaymentMethod down to a connected account, and then you can create a PaymentIntent with Stripe-Account set to do a Direct Charge there.
I would like to achieve smeht on the right
where should I do this?
during the checkout of the connected account?
Yes. Generally the way I'd do it is that you have a "master" customer on the Platform account that has all the saved payment methods and you list/manage those. When a payment is needed on a connected account, you clone the selected method to the connected account and do a one-off PaymentIntent with it there.
if you're specifically using our iOS PaymentSheet component like in those screenshots though, this is pretty impossible to do since the design doesn't allow for it. You'd have to save all the payment methods directly on the connected account, or use a much more custom implementation.
by cloning, do you mean to create a token?
but would that mean that everytime i checkout I would have to create a new payment method?
No, I mean using the specific guide I linked to clone a PaymentMethod pm_xxx. Ignore Tokens, they're deprecated (I know there's another page that talks about them, it shouldn't).
you'd clone a new PaymentMethod each time yes, and then just use it for a one off payment. You don't have to do it that way, it's just what I think is easiest.
other options are any time the customer updates/adds a PaymentMethod on the platform, you clone it to the connected account and save to a separate Customer there, and try to keep everything in sync.
I see, i tried to do that but the fields does not get auto populated
which fields and what does auto-populate mean?
in what integration exactly?
direct charge.
no, which frontend integration, what code did you write to display those number/expiry fields exactly
but no , we don't populate any of those
the way it works is you handle it in your own code
oh I see, but I thought cloned it, so it would mean the same thing. so what does cloning actually do? Just createa customer in the connected account?
you would list PaymentMethods and build a UI on your site that shows information(e.g. https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-brand) from them like
- Visa 4242 exp 4/26 []
- Mastercard 0001 exp 6/29 [x]
and then when the user picks one, you pass the pm_xxx of the corresponding card to the PaymentIntent API
you wouldn't use Elements since you're not having the customer enter card details directly
it just creates a PaymentMethod pm_xxx object on the connected account that has the same details as the PaymentMethod pm_xxx on the platform account, nothing else really.
right. on the front end im using this payment sheet. If i pass the pm_id into it, how would it look like?
?
this can't work with the iOS PaymentSheet as I mentioned earlier, its design doesn't allow for this Connect set up unfortunately
the PaymentSheet requires you to pass a Customer and PaymentIntent ID, and those need to be on the same account, which wouldn't really be the case here since you want to list PaymentMethods from the Customer on the platform account but confirm the PaymentIntent on the connected account.
the easiest option would be to not do any of this cloning stuff and just create all your Customers and PaymentMethods on the individual connected accounts directly. It does mean the customer has to re enter payment details for each connected account, which might be a problem for you.
If it is then the only real option is to build a more custom integration(like using STPPaymentOptionsViewController to list and select a PaymentMethod from the platform customer, contacting your backend server to clone the PM + create a PaymentIntent, and then using STPPaymentHandler.confirmPayment to confirm that PaymentIntent). Not really any docs for that specific flow, it's an advanced usage of the SDK.
ah i see