#sow - Default Payment Method
1 messages ยท Page 1 of 1 (latest)
Can you share a request ID where this isn't working? Would help me to look into this further
thanks for your quick response, where can I see the request id ?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Or alternatively, this: https://stripe.com/docs/api/request_ids?lang=python
thanks let me check and respond here
{<Stripe.StripeResponse status=200 Request-Id=req_PIF83FhgXmmpVi Date=2022-01-04T20:15:42>}
req_PIF83FhgXmmpVi
Ok, so it looks like your request body is just updating the metadata on the customer object. You don't want to be doing that. You want to update the default_payment_method within the invoice settings object: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
So your request body looked like this:
{
metadata: {
invoice_settings.default_payment_method: "pm_1KEJPECHSKMd2K1k5xbK3wLu"
}
}
It needs to be this:
{
invoice_settings: {
default_payment_method: "<the payment method>"
}
}
oops my bad ๐ thank you so much let me test it and confirm it works ๐
Sure, np
do u have any ref or sample code snippet for doing the same in c# ? var options = new CustomerUpdateOptions
{
// how to set it up?
};
for invoicesetting
never mind
got it ,
var options = new CustomerUpdateOptions
{
InvoiceSettings = new CustomerInvoiceSettingsOptions
{
DefaultPaymentMethod = setupIntent.PaymentMethodId
}
};
let me test it to confirm
verified and it worked. thanks again for your prompt assistance. Apreciate it!
No problem! Glad I could help