#zzking1653_api

1 messages · Page 1 of 1 (latest)

vestal magnetBOT
#

👋 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/1227989067203874866

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

arctic steppeBOT
#

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.

void quiver
#
  1. You need to pass one yourself if you need requests to be idempotent: https://docs.stripe.com/api/idempotent_requests
  2. Could this error also happen when “sending different requests with exactly the same params, but with different idempotency keys” ? No you can make the same request with different idempotency keys.
light nymph
#

Thanks. I just use Stripe cli to send below request without an idempotency key , but in the logs a key has been generated for me.

stripe customers create \
    --description="My Second Test Customer (created for API docs at https://www.stripe.com/docs/api)" \
void quiver
#

Oh yeah we do automatically attach them to requests

#

But if you need to ensure requests you issue are idempotent, you need to control passing this yourself

#

Because we don't automatically pass the same idempotency key across requests

light nymph
#

yeah, so I guess if I want to control the keys myself, i will need to generate my own idempotency key. However, if I don't pass any idempotency key in the request myself, Stripe will generate one for me (I might not be able to use it conveniently , though)

void quiver
#

yep

light nymph
#

thank you. Another thing to confirm: I am aware that if I send multiple requests with the same idempotency key and the same params, then I would get the same response. Am I correct by saying : among those multiple (same) requests, only the first one really gets executed by Stripe ?

Just want to make sure it's NOT like "first request came and succeeded , now second request comes, let's execute it again, and return the response from the first request no matter what happens to the second request"

void quiver
#

among those multiple (same) requests, only the first one really gets executed by Stripe ?
Yep that's the entire point of idempotency keys

light nymph
#

nice, thank you.