#Gerald - Redfluencer

1 messages · Page 1 of 1 (latest)

errant bronzeBOT
feral mulch
#

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?

ripe elbow
#

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

feral mulch
ripe elbow
#

I would like to achieve smeht on the right

ripe elbow
#

during the checkout of the connected account?

feral mulch
#

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.

ripe elbow
#

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?

feral mulch
feral mulch
#

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.

ripe elbow
feral mulch
#

which fields and what does auto-populate mean?

ripe elbow
#

the card number, mm/yy etc

#

if I cloned it, shouldnt the fields be auto populated?

feral mulch
#

in what integration exactly?

ripe elbow
#

direct charge.

feral mulch
#

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

ripe elbow
#

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?

feral mulch
#

you wouldn't use Elements since you're not having the customer enter card details directly

feral mulch
ripe elbow
# ripe elbow

right. on the front end im using this payment sheet. If i pass the pm_id into it, how would it look like?
?

feral mulch
#

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.

ripe elbow
#

ah i see