#jfcalvo

1 messages · Page 1 of 1 (latest)

brittle chasmBOT
small vale
wide patrol
#

Ok, thank you very much

wide patrol
#

I see that in setup mode once the first card is added is not set as the default payment method

#

There is any way to do this automatically?

sage crown
#

Hi! I'm taking over this thread.

#

You are using Checkout Session in setup mode, and want to make the new payment method the default one for the customer?

wide patrol
#

I need that when a card is added if there is not default payment method set it as default

sage crown
#

Then you need to update the customer invoice_settings.default_payment_method as mentioned above.

wide patrol
#

Ok

#

Perfect

#

thanks

#

What is the type of event when a payment method is created?

sage crown
#

Depends. If you are using Checkout Session in setup mode I would recommend listening to checkout.session.completed. Otherwise payment_method.attached can also work.

wide patrol
#

Understood, thanks!