#glenlivette-defaultpaymentmethod
1 messages · Page 1 of 1 (latest)
Hi there, you can set the default payment method on a customer on invoice_settings.default_payment_method[0]
[0] https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Alright i am going to paste some code to confirm correct syntax
Does this look reasonable?
const setDefaultPaymentMethod = async (cus, paymentId) => { console.log(cus, paymentId); return await stripe.customers.update( cus, { invoice_settings: { default_payment_method: paymentId } } ); }