#rena7ssance_docs
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/1458593358715945084
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rena7ssance_error-codes, 1 day ago, 7 messages
Hi there. Detached payment methods are unusable. Payment Methods can't be deleted in Stripe, but detachment is the nearest that you can get.
i understand the detached payment method is unusable. my question is that why stripe throws the invalid_request_error when trying to charge a detached payment method, instead of invalid_payment_method_attachment (as previously stripe engineer answered)
i think invalid_request_error is extremely brittle and hard for clients/upstream to normalize into their desired error?
Okay so the example request you provided is out of our retention for logging so some of the error handling is lost to me
https://dashboard.stripe.com/acct_1MhFVJFXfYQzZWMa/test/workbench/logs?success=false&filtered=true&selected=req_z0c8mkvPAHXpg8 does this work for you?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'm looking at the error handling in our source code to see when we throw or don't throw this error
okay. We throw the invalid request error when the Payment Method is detached or has been used without attachment
we throw invalid_payment_method_attachment when the Payment Method passes the first check where the invalid request error would be thrown, but then fails a validation on being able to be attached to the PaymentIntent
gotcha! thanks for the explanation. so to summarize for my use case: if client passes a already detached payment method for payment intent, then Stripe throws invalid_request_error expectedly. is that right?
correct - first we check if the Payment Method is completely "dead" and if that is the case we throw an invalid request error with the message you see in the examples you've shared
thanks for the confirmation