#kc-dh-ff_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!
๐ 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/1212422502060658750
๐ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
โฒ๏ธ 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. Thank you for your patience!
Hi ๐ not a Token (those are more of a legacy object at this point) but I believe you'd be able to use the beginning of this flow (through step 4) to create a Payment Method:
https://docs.stripe.com/payments/build-a-two-step-confirmation
Ok I see that @maiden sparrow
That might work - 1 question, after this line: "const {error, paymentMethod} = await stripe.createPaymentMethod({"
how do I get the payment method id?
I see a case if there is an error, but not one for success
or is "paymentMethod" the id in this case?
I believe result.paymentMethod there is a Payment Method object, though it may be a slimmed down version due to a publishable key being used. There should be an id property within it containing the ID of the Payment Method object, which should have a pm_ prefix.
Thank you!
Any time!