idempotency_key_in_use API Origin: Application & API OSI layer 7 · Application Last updated 13 Oct 2026

API Error: Idempotency key reused with different parameters (idempotency_key_in_use)

An Idempotency-Key header was sent again with a different request body, or while the first request with that key was still running.

Exact message you may see Keys for idempotent requests can only be used with the same parametersidempotency key reused
Seen on: REST API

Meaning

Idempotency keys let you safely retry a POST (charge, order, transfer) — the server stores the first result and replays it for the same key. To be safe, the server also checks that the retry is the same request. Stripe returns “Keys for idempotent requests can only be used with the same parameters they were first used with”, and idempotency_key_in_use (409) when the original request hasn’t finished yet.

Common causes

  • The same key reused for a genuinely new operation (key not unique per operation)
  • Retry changed the body (new timestamp, different amount, reordered fields)
  • Two concurrent retries with the same key
  • Key derived from something non-unique (user ID, date)

⚡ Quick fix

  1. Generate a new UUID per logical operation and store it with the pending operation
  2. Reuse the key only for exact retries of the same body
  3. Wait and retry after a short delay if the original is still in progress

Detailed fix by platform

Node.js

  1. javascript
    import { randomUUID } from 'node:crypto';
    const key = order.idempotencyKey ??= randomUUID();   // persist with the order
    await stripe.paymentIntents.create(params, { idempotencyKey: key });

Python

  1. stripe.PaymentIntent.create(**params, idempotency_key=order.idempotency_key) # same key ONLY for identical retries

How to diagnose

  1. Key — Where is it generated and how unique is it?
  2. Body — Diff the first and the retried request
  3. Timing — Was the first request still running?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

40001 — ERROR: could not serialize access due to concurrent update (PostgreSQL)40001409 — HTTP 409 Conflict (HTTP)409412 — HTTP 412 Precondition Failed (HTTP)412428 — HTTP 428 Precondition Required (HTTP)428A second operation was started on this context — EF Core: A second operation was started on this context instance before a previous operation completed (.NET)A second operation wa…all goroutines are asleep - deadlock — Go: fatal error: all goroutines are asleep - deadlock! (Go)all goroutines are as…ALREADY_EXISTS — API Error: Resource already exists (ALREADY_EXISTS / resource_already_exists / 409) (API)ALREADY_EXISTSAnotherOperationInProgress — Conflict: AnotherOperationInProgress — Another operation is in progress on the resource (Azure)AnotherOperationInPro…idempoten…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.