#glenlivette-defaultpaymentmethod

1 messages · Page 1 of 1 (latest)

ornate spoke
crimson sonnet
#

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 } } ); }

ornate spoke
#

i'd suggest just running your code to see if it works

#

it's difficult to tell if everything will work fine just from the snippet alone

crimson sonnet
#

Yeah trying that now

#

seem to be getting errors. give me a moment. a try catch should tell me whats up

#

😍