#rena7ssance_docs

1 messages ¡ Page 1 of 1 (latest)

languid pantherBOT
#

👋 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.

unborn fern
#

Hi there. Detached payment methods are unusable. Payment Methods can't be deleted in Stripe, but detachment is the nearest that you can get.

native zinc
#

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?

unborn fern
#

Okay so the example request you provided is out of our retention for logging so some of the error handling is lost to me

native zinc
unborn fern
#

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

native zinc
#

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?

unborn fern
#

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

native zinc
#

thanks for the confirmation