#bayorwor
1 messages · Page 1 of 1 (latest)
Ok, thanks
After the checkout process is complete, I can retreive the payment method and use it for future transactions, right?
It depends. If you created the Checkout Session in "setup" mode or set payment_method_options.us_bank_account.setup_future_usage, then yes.
Ok, the reason is that, we want to be able to retrieve the payment method and assignment it to a customer created on stripe, create a subscription and attach the customer to it.
Hope this approach will help us ?
What's your end goal? Chage the customer now, and later create a subscription? Or save the payment method now, and later create a subscription? Or directly create a subscription?
flow;
- create a customer
- make a checkout for one-time charges
- retrieve the payment method and make a default method for the customer created
- create a subscription for customer
Got it. Then make sure that you set payment_intent_data.setup_future_usage when creating the Checkout Session to be able to reuse the Payment Method: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage
And it should work
Well noted with thanks
Happy to help 🙂