#Bartosz-clone-PM
1 messages ยท Page 1 of 1 (latest)
Bartosz-clone-PM
Hello ๐
I think this is the canonical way with PaymentMethods API
https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
yes, that's right, but there's this comment right below the code: "If you want to reuse PaymentMethods on a connected account, attach them to Customers before using them with PaymentIntents to create charges"
I want to reuse it so it needs to be attached, but the attaching can be done in those two ways
I think both of them work. I don't think there's much difference in the flows. The token flow was designed to be used w/ sources API but should also work with PaymentMethods
https://stripe.com/docs/connect/cloning-customers-across-accounts#creating-tokens
ok, that's what I needed. Didn't want to limit the options for the future
NP! ๐ Happy to help
I've also been wondering if there's a way to clone the customer with all of the details right away. For now, I'm doing it manually. My end goal is for customer to receive the receipt really
when I was trying to clone it using tokens I was seeing only "empty" customer records in connected's dashboard
Gotcha. Hmm, I think in that case, option 2 from the list you provided would be the best approach I guess.
It creates a customer on the connected acc with the details you have on the platform
You can use metadata on the customer object to store platform customer ID and then update the root customer object when an update is made on the connected account accordingly
oh, I think I still need to "copy" the details manually
Yup
oh yeah, that's right, metadata can be used for that
on the other hand I will still need to keep the mapping in my system, outside the Stripe
and probably listen to the webhooks for customer changes
Yup, webhooks should make it easier to listen to changes and trigger other API calls to update information
NP! ๐ happy to help