#nauman
1 messages · Page 1 of 1 (latest)
The Checkout Session needs to be paid to have an associated PaymentIntent
There are 2 steps: Creating Checkout Session and Paying it
yes after paying it creates customer and I want the payment method save for future use
with that customer
Ah. Then setupFutureUsage doesn't do that automatically. I would recommend listening to checkout.session.completed webhook, take the PaymentMethod and setup as Customer default paymentmethod yourself
Hmm wait, can you provide a sample Checkout Session Id?
This didn't create a Customer
So you can get the PaymentMethodId from the PaymentIntentId from the Checkout, by using Retrieve Checkout Session API and expand
ok . For any checkout session is it necessary to create PaymentIntent first or we just create Customer and the redirect to checkout ?
No just create Customer and supply its Id to Checkout
ok I will try and then update you
cs_test_b1sInDt0OkT1vswdbxcpPSDmX9pGd45BuprSu4xRX2GZCTr8soqNH7QV0I
I hqve tried but no luck
screen
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This customer does have a PaymentMethod attached
yes but not default
It won't set as default. You would need to set as default by yourself
It only to attach to the Customer
ok but how we get this PaymentMethodId from CustomerId or PaymentIntendId