{
  "id": 22022409,
  "title": "Making a payment request safe to retry",
  "url": "https://urgent.news/2026/11/26/making-a-payment-request-safe-to-retry",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-26T18:41:03.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mokshupadhyay/making-a-payment-request-safe-to-retry-4jli"
  },
  "original_language": "en",
  "account": "In the event of a network error, an application cannot determine whether a payment was successfully processed. Attempting to retry the payment blindly could result in double charges. To prevent this, an idempotency key is utilized, allowing the server to recognize repeat requests and return the outcome of the initial request. The client is responsible for generating a unique key, storing it before sending the payment request, and ensuring that only one sender uses it. The idempotent-queue library facilitates this process across various platforms, including web and mobile applications, with extensive testing conducted using random crashes and lost responses.",
  "summary": "In short After a network error, an app cannot know whether the payment went through, so retrying blindly can charge twice. An idempotency key lets the server recognise a retry and return the first result instead of charging again. The client has to create the key once, save it before sending, and let only one sender use it. idempotent-queue does this in the browser, Node and React Native, and is…",
  "key_points": [
    "Application cannot determine if payment processed due to network error",
    "Idempotency key prevents double charges by recognizing repeat requests",
    "Idempotency-queue library helps generate unique keys across platforms"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}