#mrx_docs
1 messages ¡ Page 1 of 1 (latest)
đ 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/1266033326481739796
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
hello
You want to use setup_future_usage: 'off_session on the frontend and backend to save the PaymentMethod to be able to charge it in the future.
You also pass a Customer ID to your PaymentIntent on your backend
After the initial payment the PaymentMethod will then be attached to the Customer and you can create/confirm a new PaymentIntent in the future (like we show here: https://docs.stripe.com/payments/save-during-payment?platform=web&ui=elements#charge-saved-payment-method) to charge later
Sorry for asking again, I am a bit confused. Should I create Payment Method on Front End. Send it on Back End and then Create Customer and Payment Intent?
If you want to confirm server-side then yes, you create a ConfirmationToken on your frontend, which represents the PaymentMethod, and then you create a Customer and PaymentIntent on your backend to charge it.
However, to set up future payments the key is that you also pass setupFutureUsage: 'off_session' on your frontend when creating your Elements object (see: https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment#additional-options where that is listed as an additional option) and then similarly pass setup_future_usage: 'off_session' on your backend when you create the PaymentIntent: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-setup_future_usage
After I create the first Payment Intent on the back end, that is supposed to be charged right away. I need to capture it with Web Hooks right?
If you are using a synchronous payment method type (like a Card) then no, it will respond synchronously in your backend. However, if 3DS is then required to be completed you will want Webhooks for that
To know that 3DS was successfully completed and the PaymentIntent moved to succeeded
Thanks for you help and your time!