#zzking1653_api

1 messages ยท Page 1 of 1 (latest)

vast mauveBOT
#

๐Ÿ‘‹ 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/1227916945488220170

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

chilly cargoBOT
rare berry
#

Thanks. Also it is correct to say that as long as the same idempotency key is used, then the response will always be the same as the first sent request , no matter how many times the same request is being sent ?

e.g: is it possible that the first request failed (stripe returns an error), and then I use the same idempotency key to send same request again, then the request succeeded

hearty flame
#

Thanks. Also it is correct to say that as long as the same idempotency key is used, then the response will always be the same as the first sent request , no matter how many times the same request is being sent ?
that's correct

#

e.g: is it possible that the first request failed (stripe returns an error), and then I use the same idempotency key to send same request again, then the request succeeded
no

rare berry
#

Thanks for confirming. Another question ๐Ÿ™‚ : suppose a charge request failed because of insufficient fund (NSF error), then am I allowed to use the SAME idempotency key to send the same charge request with a NEW card ?

hearty flame
#

yes because the error won't be 500

#

oh wait let me rethink about this

#

give me a second

rare berry
#

sure. I haven't tested it myself. I was thinking if the request payload doesn't have the "card info" then I should be able to use the same idempotence key, but if the request payload has the 'card infor" then probably I'm not gonna be able to use the same idempotence key coz the request body would have changed.

hearty flame
#

in that case you need to use a new idempotency key

#

otherwise you would get the same result

#

we don't retry requests with the same idempotency key

rare berry
#

Thanks. Would you happen to have any insight on this previous question:

Thanks for confirming. Another question :slight_smile: : suppose a charge request failed because of insufficient fund (NSF error), then am I allowed to use the SAME idempotency key to send the same charge request with a NEW card ?

hearty flame
#

that's what I was answering

#

in all cases you need a new key

#

otherwise you will get the same response

rare berry
#

kk, do you mean if I use the same idempotency key with a new card, the request would still fail because the first request with the old card already failed with NSF error ?

hearty flame
#

same idempotency key = same response

rare berry
#

cool, thank you very much !

hearty flame
#

let me know if you need any more help