#seriallos-PaymentMethod
1 messages · Page 1 of 1 (latest)
You can list all available PaymentMethods per a user: https://stripe.com/docs/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
type is required in that call
ah
So it looks like I need to make X API calls where X is the number of payment types I accept
It's a weird case where there's no default method on the customer or the subscription
When they re-add a payment method, did you set it as default?
I'm using Checkout's setup session
Is that something I can do when setup calls back to me?
Looks like I might be able to use customers.update and set the invoice_settings.default_payment_method, I'll tinker with that
Oh, I do that in webhook right now
Yes, you should def be able to. Upon a Checkout success there will be a webhook event. Listen to it, take the PM and set it as invoice_settings.default_payment_method
Wonder if that's not running in my dev environment right now, lemme check stripe CLI
Yeah ^
Haven't touched this code in a while XD
good luck
OK yeah, that's the approach I was using and it is working. My stripe CLI just had an expired key