#bwestwood
1 messages · Page 1 of 1 (latest)
Here is my current API endpoints. First one is creating the user after they pick a date and fill out the form and the second screenshot is when they click purchase on the prebuilt stripe checkout page.
Hi, it depends on what you are exactly doing. You have a couple of options here. You can either create the Payment Intent, and save the payment method details for future use: https://stripe.com/docs/payments/save-during-payment by passing setup_future_usage. Or, you can use SetupIntent, https://stripe.com/docs/payments/setup-intents to collect payment details for future use.
Ah, you're using Checkout Sessions
You do not need to, we document this here: https://stripe.com/docs/payments/checkout/how-checkout-works#save and you'd want to pass: payment_intent_data.setup_future_usage parameter for one time payments.
okay just to confirm, I would use the stripe.paymentIntents.create() instead od the checkout.sessions?
No, you can use what you shared on the screenshot. When you create the Checkout Session, you pass in this paramater: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage.
oh okay thank you I got it