#antonio-giano_best-practices

1 messages ¡ Page 1 of 1 (latest)

patent ermineBOT
#

👋 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/1225509153217314889

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

outer irisBOT
#

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.

pale breach
#

Hello

#

So you are already collecting a PaymentMethod using the PaymentIntent or SetupIntent from the Subscription and then you would also like to collect another PaymentMethod?

snow crater
#

Yes, initially the paymentMethod is implemented through subenrollment. After that, I want to give the possibility to store an additional credit card (so another paymentMethod).

pale breach
#

Gotcha

#

And you are using Card Element here?

#

Not Payment Element?

snow crater
#

Sorry, i confuse. I mean the payment element. What I want to understand is how to implement the logic mentioned earlier.

pale breach
#

Basically you create a SetupIntent on your server and pass its client secret to your client and use confirmSetup() client side

snow crater
#

Got it.

Following this guide, how would it then work with payment method management. I give an example for better understanding: a customer enters a new credit card. And he will use this to pay the next month's invoice of the subenrollment.

In order to handle this logic, do I need to do any manual steps? For example, retrieving the paymentMethod id created and then updating the default_payment_method field within the invoice_setting field of the customer object?

pale breach
#

Yep that's exactly right

snow crater
#

Perfect, thank you a lot!