#leonardo89-payment methods

1 messages · Page 1 of 1 (latest)

dusky bison
#

👋 happy to help

zenith crater
#

?

dusky bison
#

if the customer doesn't have a payment method then yes

#

just a quick question though, when you say default are you talking about recurring payments?

zenith crater
#

yes, I'm working with a metered billing subscription

#

the test case is when the customer update his payment method

#

for example change the card

#

Im always create a new setup intent, I capture the new card, but Im not sure if the confirmSetup

#

is setting the new payment method as customer's default

dusky bison
#

no you should then update the invoice_settings.default_payment_method of the customer

zenith crater
#

and what happen with the old payment method

#

need to be detached

#

???

dusky bison
#

you can detach it

#

or leave it

#

it's up to you

#

but what I would suggest instead of having to implement all of this is to use Customer Portal

zenith crater
#

can I integrate the customer portal inside my application???

dusky bison
#

you could integrate the way the user gets redirected to our hosted portal

#

same way as Checkout

zenith crater
#

ok, it's good to know for the future, thanks

#

hey, another doubt

#

How can I know if can I detach a payment method

#

???

#

there is any attr

#

??

dusky bison
#

no, you would have to try and detach it, if something went wrong you will know because an error will be thrown

zenith crater
#

perfect thanks

dusky bison
#

let me know if you need any more help