#Emerson Garrido-checkout-session
1 messages · Page 1 of 1 (latest)
I want to charge 1 time, but I want to save the card data to charge the customer later
error mode setup
I can only use it with mode payment but it doesn't save the card data
I see.
Let me quickly check few things
Found it.
So you'd need to set setup_future_usage property to 'off_session' since you intend to use the payment method later for other charges.
ok i will test
I'll be back if it's going to work
Error: Mode cannot be setup when using prices.
Ah you can change it to 'payment'
How can I set it as the default payment method?
How can I set it as the default payment method?
do you mean for a customer?
yes
as far as I can remember, you'd have to update the customer later with the payment_method ID
I'm checking to see if there are any arguments you can include with the checkout session that can take care of it
okay
any arguments you can include with the checkout session that can take care of it
Have not found anything on this yet but updating the customer with the payment method once the checkout session is complete, should work.
As hanzo said, unfortunately there is not a parameter to automatically do this. It is common to use the API to set the Payment Method as the default for the Customer after the Checkout Session has completed