#Rahim Dobani

1 messages · Page 1 of 1 (latest)

rain daggerBOT
ashen sonnet
#

Any one can help on this?

rain daggerBOT
blissful tide
#

Hi! Let me help you with this.

#

What's your use case?

#

SetupIntetnt is designed to collect a new Payment Method.

ashen sonnet
#

yess so how i can make this new card default one?

#

because when i am creating subscription

#

its giving me this error This customer has no attached payment source or default payment method.

#

so i want to make new card default one

#

i have added a card but can't make it default one

blissful tide
ashen sonnet
#

const customer = await stripe.customers.update(
'cus_O4eGaxiPZArPrs',
"pm_1NIUyNAOo6YEPSo0JRTFfQPP"
);

#

like this?

blissful tide
#

const customer = await stripe.customers.update(
'cus_O4eGaxiPZArPrs',
{
'invoice_settings': {
'default_payment_method': "pm_1NIUyNAOo6YEPSo0JRTFfQPP"
}
});

ashen sonnet
#

thanks working now

blissful tide
#

Happy to help!