#dongwan_best-practices

1 messages ¡ Page 1 of 1 (latest)

rapid iglooBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1267354123188305941

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

minor tartanBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

junior owl
#

Hi there, so you want to use the platform's payment method to pay on connected accounts?

steady sable
#

yeah so basically that's what i figured to share the payment methods between multiple connected accounts under my platform

#

based on my understanding, i need to create a payment method under the platform account and attach it to a customer. and then, i need to clone it under connected account which eventually creates completely new payment method(differnet payment method id).

junior owl
steady sable
#

and then, use the cloned payment method to the recurring billing.

junior owl
#

If the subscription is created on a connected account, then yes.

steady sable
#

in this scenario, when users need to update the payment method, i assume firstly it should be done under the platform account

#

afterwards, is the best practice to clone the updated payment method again and then update the subscription with the new payment method and detach the old one?

#

in this scenario, i should keep the payment method id from the platform account and also the payment method ids from the connected accounts in my DB?

#

or is there a way to know the cloned payment method is from which payment method in the platform account?

junior owl
#

Yes you can always save a new payment method in platform, and then clone it to a connected account, if that's the flow you prefer.

#

However, you can't clone a payment method from a connected account back to platform.

#

You can use metadata to save the platform payment method ID

steady sable
#

would you recommend updating the PM in the platform account and then clone it to the connected account? or updating both together?

#

also one more question regarding implementation, for ^, we are 1. creating a setupintent(BE) 2. confirm the setupintent(FE) and clone it to a connected account(BE) 3. create a subscription to get payment intent(BE) 4. confirm the payment intent with the cloned payment method(BE). Do you think this step would make sense to you?

junior owl
#

That's entirely up to your business. Also in step 3 you can set the payment method as the default_payment_method of the subscription and Stripe will use this payment method to pay invoices generated by the subscription.