#zzking1653_api
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/1227916945488220170
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
yes you are correct
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
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
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 ?
yes because the error won't be 500
oh wait let me rethink about this
give me a second
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.
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
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 ?
that's what I was answering
in all cases you need a new key
otherwise you will get the same response
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 ?
same idempotency key = same response
cool, thank you very much !
let me know if you need any more help