#numericity_reactnative-paymentmethod

1 messages ยท Page 1 of 1 (latest)

solar raftBOT
#

๐Ÿ‘‹ 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/1219767842203766936

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

slender snowBOT
peak dirge
#

Hey ๐Ÿ‘‹

compact lark
#

Hi there! After confirmation, you can retrieve the SetupIntent to get the payment_method ID. If you need to retrieve details about the PaymentMethod (not just its ID), you can expand payment_method when retrieving the SetupIntent: https://docs.stripe.com/api/expanding_objects

peak dirge
#

Ah ok, so I basically just return the setup intent id to the client-side, and on success use it in a separate request to the my backend to retrieve and set the payment method?

compact lark
#

Can you clarify what you mean by "set the payment method"?

slender snowBOT
torn garnet
#

numericity_reactnative-paymentmethod

peak dirge
#

Attach it to a subscription

torn garnet
#

Yeah so on your server you retrieve the SetupIntent, check the PaymentMethod id in payment_method and then you can make it the default for the Subscription using default_payment_method on the Update Subscription API https://docs.stripe.com/api/subscriptions/update
Does that make sense?

peak dirge
#

Yeah, perfect