#Jeffrey-checkout-subscription

1 messages ยท Page 1 of 1 (latest)

haughty shuttle
#

Hi there ๐Ÿ‘‹ when their mode is set to subscription the Checkout Session will attach the provided payment method as the default_payment_method for the Subscription that is created, but will not set it as the default payment method for the Customer.
https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method

pallid condor
#

Is there a way to make it the default payment methode for the customer?
We are needing this because we have a process where a cancel a usage subscription and create a new sub "normal" subscription but are getting the error that the user don't have a default payment method

haughty shuttle
pallid condor
#

I just checked the output but I cannot find default_payment_method in there, in the checkout.session.completed hook I can see the default_payment_method I will try this format should be "pm_" correct?

daring prairie
#

Hello ๐Ÿ‘‹
Taking over as toby needs to step away

#

Yes the payment method object ID would start with pm_xxxx

pallid condor
#

Hey, thank you
I just read the docu from update a customer I dont really understand what is the different between default_source and default_payment_method?

daring prairie
pallid condor
#

OK so the new good way is using default_payment_method and not longer default_source if I understand that correct?

daring prairie
#

That's correct.

pallid condor
#

that worked thank you

we can close this thread ๐Ÿ™‚