#Nelsonct7
1 messages · Page 1 of 1 (latest)
hi! you would set https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method after the SetupIntent succeeds.
so I need to make one more api call to back end and update the customer
const { error } = await stripe.confirmSetup({
return_url: 'http://localhost:3000',
payment_method_data: {
billing_details: {
name: cardHolder
}
}
}
});
is it possible to add any extra parameter so the customer get updated
nope
back end is the only option ?
yep
const setupIntent = await stripe.setupIntents.create({
// payment_method_types: ['bancontact', 'card', 'ideal','sofort'],
payment_method_types: ["card"],
customer: customerId,
});
ok, can I update the customer right after I create the setupIntent
will it take effect if the front end user didnt submit the payment details
no that won't work
you have to update the customer after the SetupIntent succeeds.
ok, thanks man