#mecha-chocobo_savedpms-checkout
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1277723820089806992
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, there isn't a way to do this automatically in Checkout as far as I am aware but you can update the default payment method on your customer when you get that event.
https://docs.stripe.com/api/subscriptions/update#update_subscription-default_payment_method
https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method
I'm using the update customer route, but I'm getting the error I described, The customer does not have a payment method with the ID [x]
if I try again, with an attempt to attach it first, I get two errors, first saying it's already attached, then the attempt to set the default still tells me they don't have it
Interesting, that checkout session is in setup mode so it should be attached to the customer. So that part makes sense to me but the "does not have a payment method" error is unexpected. Can you send me the request ID of a time that you got that error? (req_1234)
req_93u8wxSuXZMpVI
It looks like that payment method actually does belong to another customer (cus_LpiiQeVLdqjK0o), looking at the checkout.session.completed event it looks like we did pass that Customer ID. It looks like your event handler may be mixing up the customer IDs somewhere
https://dashboard.stripe.com/test/events/evt_1Ps9AbHTHZMmFuxlzd9jnDCZ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
oh, I see, somehow I'm getting a different customerID. cus_Lpii is the expected value, so now I have to figure out where this other ID is coming from. Thanks!