Safe retrying of requests without accidentally performing the same operation twice
The API endpoints support idempotency for safely retrying requests without accidentally performing the same operation twice. When placing an order you must generate a unique key and send using the X-Idempotency-Key header. Then, if a connection error occurs, you can safely repeat the request without risk of creating a duplicate order.Runa’s idempotency works by storing the request body and response in a cache for a 30 day period. If the same request is made again with the same key, the response is returned or replayed from the cache instead of processing the request again. This behaviour is the same for any response regardless of whether it succeeds of fails. Subsequent requests with the same body and key return the same result including 4xx and 5xx errors.
We only retain this cache for 30 days. Orders requests using the same key
after this period will result in a new order being placed.
Choosing a key
The key can be any free-form string but we would suggest using a suitable unique and random value such as v4 UUIDs. This ensures the key is unique across all requests and reduces the risk of collisions. You should not use a string with intrinsic meaning such as an order ID or customer email address as you may need to generate a second request with a different key in case of the first returning an error.
Responses when using idempotency
When using idempotency there are a number of cases you will need to cover.
We will return the original response if a second request is made with the same key and body.
We will return an HTTP 102 Processing response with type idempotency_in_progress if the original request is still in progress. We are unable to replay the response until the original request has completed. Please wait a few seconds and try again.
We will return an HTTP 400 Bad request response with type idempotency_validation_error if an idempotency key is reused but the request body does not match the original request. You should either correct the request body or generate a new key and try again.
Endpoints using idempotency
Currently only the order creation endpoint supports idempotency. You will note the X-Idempotency-Key header is marked as required in the specification for this endpoint.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Runa Developer Hub","description":"Send instant B2C payments your recipients will love","colors":{"primary":"#62cc50","light":"#4fff7b","dark":"#3dd463"},"logo":{"light":"https://brand-assets.runa.io/logo-horizontal-black.svg","dark":"https://brand-assets.runa.io/logo-horizontal-white.svg"},"favicon":"https://mintcdn.com/runa/3fuhXTcDrFXCr5CT/favicon.svg?fit=max\u0026auto=format\u0026n=3fuhXTcDrFXCr5CT\u0026q=85\u0026s=34c8b1765044aaa9687fd1647ac25821","navbar":{"links":[],"primary":{"type":"button","label":"Back to app","href":"https://app.runa.io"}},"footer":{"socials":{"website":"https://runa.io","linkedin":"https://www.linkedin.com/company/runapayouts"}},"fonts":{"heading":{"family":"F37 Lineca","weight":600,"source":"https://brand-assets.runa.io/design-system/fonts/f37lineca/F37Lineca-Bold.woff2","format":"woff2"},"body":{"family":"Inter"}},"styling":{"eyebrows":"breadcrumbs","latex":true},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"runa","hasAudioNarration":false,"actualSubdomain":"runa","customDomains":["developer.runa.io"],"gitSource":{"type":"github","owner":"wegift","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af59cbe55654e521ba1c260","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"API Guides","count":29},{"language":"default","tag":"API Reference","count":22},{"language":"default","tag":"Features","count":14},{"language":"default","tag":"Changelogs","count":12},{"language":"default","tag":"Network","count":11},{"language":"default","tag":"Archived pages","count":8},{"language":"default","tag":"Before you go live","count":7},{"language":"default","tag":"Getting started","count":7},{"language":"default","tag":"Reference","count":7},{"language":"default","tag":"Webhooks","count":5}]},"assistantConfig":{"enableStarterQuestions":true,"deflection":{"enabled":true,"email":"support@runa.io","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"695cf0470512f37d886f09f6","deploymentId":"67e1763caf7c6a387185058a","questionText":"How should I handle errors from the API?","status":"active","generatedBy":"manual","createdAt":"2026-01-06T11:21:43.258Z","updatedAt":"2026-01-06T11:21:43.258Z","__v":0},{"_id":"695cf01e0512f37d886f0747","deploymentId":"67e1763caf7c6a387185058a","questionText":"How can I create my first order?","status":"active","generatedBy":"manual","createdAt":"2026-01-06T11:21:02.480Z","updatedAt":"2026-01-06T11:21:02.480Z","__v":0},{"_id":"695cf0140512f37d886f06a8","deploymentId":"67e1763caf7c6a387185058a","questionText":"How do I create an API key?","status":"active","generatedBy":"manual","createdAt":"2026-01-06T11:20:52.926Z","updatedAt":"2026-01-06T11:20:52.926Z","__v":0}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html{overflow-y:scroll}#navbar{background:black!important;color-scheme:dark;color:white!important}#navbar-transition{background:black!important}#navbar .text-gray-800,#navbar .text-gray-600,#navbar .text-gray-700{color:white!important}.nav-logo.hidden{display:block!important}.nav-logo.block{display:none!important}#search-bar-entry{background:black!important;color:white!important;border:1px solid rgba(255, 255, 255, 0.9)}#assistant-entry{background:white}#assistant-entry .text-gray-700,#assistant-entry .text-gray-500{color:black!important}#chat-assistant-sheet{border-left:1px solid #e5e7eb}.nav-tabs [class*=\"h-[1.5px]\"]{height:3px!important}#navbar a[href=\"https://app.runa.io\"] .bg-primary-dark{background:linear-gradient(20deg, #00ffa3, #93ff82, #eefc51) border-box}#navbar a[href=\"https://app.runa.io\"] .text-white,#navbar a[href=\"https://app.runa.io\"] svg{color:black}#navigation-items .text-primary{color:black}#navigation-items .dark\\:text-primary-light:is(.dark *){color:rgb(var(--primary-light) / var(--tw-text-opacity))}#navigation-items .bg-primary{background-color:black}#navigation-items .dark\\:bg-primary-light:is(.dark *){background-color:rgb(var(--primary-light) / var(--tw-bg-opacity))}#navigation-items .bg-primary\\/10{background-color:rgb(var(--primary) / 0.2)}#navigation-items .dark\\:bg-primary-light\\/10:is(.dark *){background-color:rgb(var(--primary-light) / 0.2)}"},{"filePath":"welcome.css","content":".hero-button{background:linear-gradient(black, black) padding-box,\n linear-gradient(to top right, #00ffa3, #93ff82, #eefc51) border-box;border-radius:50em;border:2px solid transparent;border-radius:3rem;padding:0.75rem 2rem;font-size:1rem;color:white;font-weight:bold;text-decoration:none;text-transform:uppercase;transition:all 0.3s ease-in-out}.hero-button:hover{background:linear-gradient(black, black) padding-box,\n linear-gradient(to right, white, white) border-box}"}]}
{"page":{"pagePath":"best-practices/idempotency","slug":"/best-practices/idempotency","pageMetadata":{"title":"Idempotency","description":"Safe retrying of requests without accidentally performing the same operation twice","icon":"fingerprint","href":"/best-practices/idempotency"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Safe retrying of requests without accidentally performing the same operation twice\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The API endpoints support idempotency for safely retrying requests without accidentally performing the same operation twice. When placing an order you must generate a unique key and send using the `,_jsx(_components.code,{children:`X-Idempotency-Key`}),` header. Then, if a connection error occurs, you can safely repeat the request without risk of creating a duplicate order.`]}),`\n`,_jsxs(_components.p,{children:[`Runa’s idempotency works by storing the request body and response in a cache for a 30 day period. If the same request is made again with the same key, the response is returned or replayed from the cache instead of processing the request again. This behaviour is the same for any response regardless of whether it succeeds of fails. Subsequent requests with the same body and key return the same result including `,_jsx(_components.code,{children:`4xx`}),` and `,_jsx(_components.code,{children:`5xx`}),` errors.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`We only retain this cache for `,_jsx(_components.strong,{children:`30 days`}),`. Orders requests using the same key\nafter this period will result in a new order being placed.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`choosing-a-key`,children:`Choosing a key`}),`\n`,_jsxs(_components.p,{children:[`The key can be any free-form string but we would suggest using a suitable unique and random value such as v4 UUIDs. This ensures the key is unique across all requests and reduces the risk of collisions. You `,_jsx(_components.strong,{children:`should not use a string with intrinsic meaning`}),` such as an order ID or customer email address as you may need to generate a second request with a different key in case of the first returning an error.`]}),`\n`,_jsx(Heading,{level:`2`,id:`responses-when-using-idempotency`,children:`Responses when using idempotency`}),`\n`,_jsx(_components.p,{children:`When using idempotency there are a number of cases you will need to cover.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`We will return the original response if a second request is made with the same key and body.`}),`\n`,_jsxs(_components.li,{children:[`We will return an `,_jsx(_components.code,{children:`HTTP 102 Processing`}),` response with type `,_jsx(_components.code,{children:`idempotency_in_progress`}),` if the original request is still in progress. We are unable to replay the response until the original request has completed. Please wait a few seconds and try again.`]}),`\n`,_jsxs(_components.li,{children:[`We will return an `,_jsx(_components.code,{children:`HTTP 400 Bad request`}),` response with type `,_jsx(_components.code,{children:`idempotency_validation_error`}),` if an idempotency key is reused but the request body does not match the original request. You should either correct the request body or generate a new key and try again.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`endpoints-using-idempotency`,children:`Endpoints using idempotency`}),`\n`,_jsxs(_components.p,{children:[`Currently only the order creation endpoint supports idempotency. You will note the `,_jsx(_components.code,{children:`X-Idempotency-Key`}),` header is marked as required in `,_jsx(_components.a,{href:`/reference/2024-02-05/endpoint/orders/create`,children:`the specification for this endpoint`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Idempotency","description":"Safe retrying of requests without accidentally performing the same operation twice","icon":"fingerprint","href":"/best-practices/idempotency"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Choosing a key","slug":"choosing-a-key","depth":2,"children":[]},{"title":"Responses when using idempotency","slug":"responses-when-using-idempotency","depth":2,"children":[]},{"title":"Endpoints using idempotency","slug":"endpoints-using-idempotency","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"runa","siteName":"Runa Developer Hub","title":"Idempotency - Runa Developer Hub","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-22T12:26:43.597Z","originalFileLocation":"best-practices/idempotency.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Safe retrying of requests without accidentally performing the same operation twice\">\u003cmeta data-mint-head name=\"application-name\" content=\"Runa Developer Hub\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Idempotency - Runa Developer Hub\">\u003cmeta data-mint-head property=\"og:description\" content=\"Safe retrying of requests without accidentally performing the same operation twice\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Runa Developer Hub\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.runa.io/best-practices/idempotency\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://runa.mintlify.site/_mintlify/api/og/v2?division=Before+you+go+live\u0026amp;title=Idempotency\u0026amp;description=Safe+retrying+of+requests+without+accidentally+performing+the+same+operation+twice\u0026amp;theme=a355c9f2479ec7cfbecaec9f\u0026amp;signature=c75d475617b31db2faed2e4217e14e52baefb3aeb2a9f426027a2cf472cf5d9b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Idempotency - Runa Developer Hub\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Safe retrying of requests without accidentally performing the same operation twice\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://runa.mintlify.site/_mintlify/api/og/v2?division=Before+you+go+live\u0026amp;title=Idempotency\u0026amp;description=Safe+retrying+of+requests+without+accidentally+performing+the+same+operation+twice\u0026amp;theme=a355c9f2479ec7cfbecaec9f\u0026amp;signature=c75d475617b31db2faed2e4217e14e52baefb3aeb2a9f426027a2cf472cf5d9b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/runa/w-pOszMLD-yA3smZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Runa Developer Hub\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#62cc50\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.runa.io/best-practices/idempotency\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/best-practices/idempotency.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.runa.io/#organization\",\"name\":\"Runa Developer Hub\",\"url\":\"https://developer.runa.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://brand-assets.runa.io/logo-horizontal-black.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.runa.io#website\",\"name\":\"Runa Developer Hub\",\"url\":\"https://developer.runa.io\",\"publisher\":{\"@id\":\"https://developer.runa.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.runa.io/best-practices/idempotency#webpage\",\"url\":\"https://developer.runa.io/best-practices/idempotency\",\"name\":\"Idempotency\",\"description\":\"Safe retrying of requests without accidentally performing the same operation twice\",\"dateModified\":\"2026-01-22T12:26:43.597Z\",\"isPartOf\":{\"@id\":\"https://developer.runa.io#website\"},\"breadcrumb\":{\"@id\":\"https://developer.runa.io/best-practices/idempotency#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.runa.io/best-practices/idempotency#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Before you go live\",\"item\":\"https://developer.runa.io/best-practices/before-you-go-live\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Idempotency\",\"item\":\"https://developer.runa.io/best-practices/idempotency\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developer.runa.io/best-practices/idempotency#article\",\"headline\":\"Idempotency\",\"name\":\"Idempotency\",\"description\":\"Safe retrying of requests without accidentally performing the same operation twice\",\"url\":\"https://developer.runa.io/best-practices/idempotency\",\"mainEntityOfPage\":{\"@id\":\"https://developer.runa.io/best-practices/idempotency#webpage\"},\"dateModified\":\"2026-01-22T12:26:43.597Z\",\"publisher\":{\"@id\":\"https://developer.runa.io/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.runa.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Runa Developer Hub\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Runa Developer Hub\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/best-practices/idempotency.md","siteName":"Runa Developer Hub","nav":{"global":{"anchors":[]},"tabs":[{"tab":"Welcome","pages":[{"title":"Welcome","href":"/welcome"}]},{"tab":"API Guides","groups":[{"group":"Runa Developer","pages":[{"title":"Introduction","icon":"hand-wave","mode":"wide","href":"/introduction"}]},{"group":"Getting started","pages":[{"title":"Steps","icon":"circle-check","mode":"wide","href":"/getting-started/steps"},{"title":"Environments","icon":"tree","href":"/getting-started/environments"},{"title":"Creating an API key","icon":"key","href":"/getting-started/api-key"},{"group":"Your first order","icon":"paper-plane-top","pages":[{"icon":"question","title":"Which mode to use?","mode":"wide","href":"/getting-started/first-order/which-mode"},{"title":"Sync","icon":"arrow-right-arrow-left","href":"/getting-started/first-order/sync"},{"title":"Async","icon":"rotate","href":"/getting-started/first-order/async"}]},{"title":"Moving to production","icon":"hexagon-check","href":"/getting-started/production"}]},{"group":"Features","pages":[{"title":"Product catalog","icon":"grid","href":"/features/product-catalog"},{"title":"Real-time catalog updates","icon":"webhook","href":"/features/realtime-product-updates"},{"title":"Estimate the price of an order","icon":"calculator-simple","href":"/features/estimate"},{"title":"Managing your balances","icon":"coins","href":"/features/balances"},{"title":"Limiting available products","icon":"filter","href":"/features/limiting-available-products"},{"title":"Customizing and branding the redemption experience","icon":"gift","href":"/features/user-redemption-templates"},{"title":"Save product selections between orders","icon":"grid-2","href":"/features/merchant-selection-template"},{"title":"Paying for an order using another currency","icon":"money-bill-transfer","href":"/features/embedded-fx"},{"group":"Push to Card","icon":"boxes-stacked","pages":[{"title":"Using Push to Card","icon":"credit-card","href":"/features/push-to-card/introduction"},{"title":"Testing","icon":"flask","href":"/features/push-to-card/testing"},{"title":"Support","icon":"circle-info","href":"/features/push-to-card/support"}]},{"group":"Prepaid Visa Cards","icon":"credit-card","pages":[{"title":"Using Prepaid Visa Cards","icon":"credit-card","href":"/features/prepaid-visa/introduction"},{"title":"Card spend controls","icon":"shield-check","href":"/features/prepaid-visa/spend-controls"},{"title":"Support","icon":"circle-info","href":"/features/prepaid-visa/support"}]}]},{"group":"Before you go live","pages":[{"title":"Getting ready to go live","icon":"star","href":"/best-practices/before-you-go-live"},{"title":"Authentication","icon":"key","href":"/best-practices/authentication"},{"title":"Security","description":"Best practices for securing your integration with the Runa API","icon":"shield","href":"/best-practices/security"},{"title":"Idempotency","icon":"fingerprint","href":"/best-practices/idempotency"},{"title":"Handling Errors","description":"How to handle error scenarios when using the Runa API","icon":"circle-exclamation","href":"/best-practices/handling-errors"},{"title":"Rate Limits","icon":"stopwatch","href":"/best-practices/rate-limits"},{"title":"API versioning","icon":"code-branch","href":"/best-practices/api-versioning"}]}]},{"tab":"API Reference","versions":[{"version":"2024-02-05","groups":[{"group":"Reference","pages":[{"title":"Introduction","icon":"book","href":"/reference/2024-02-05/introduction"},{"title":"Error types","icon":"circle-exclamation","mode":"wide","href":"/reference/2024-02-05/errors"},{"icon":"puzzle-piece-simple","title":null,"href":"/reference/2024-02-05/playground"},{"title":"Webhooks","icon":"webhook","href":"/reference/webhooks"},{"title":"Supported countries","icon":"flag","mode":"wide","href":"/reference/countries"},{"title":"Currencies","icon":"coins","mode":"wide","href":"/reference/currencies"},{"title":"Pagination","icon":"file","href":"/reference/pagination"}]},{"group":"Orders","pages":[{"title":"Create a new order","openapi":"reference/2024-02-05/openapi.json POST /order","href":"/reference/2024-02-05/endpoint/orders/create"},{"title":"Get order details","openapi":"reference/2024-02-05/openapi.json GET /order/{id}","href":"/reference/2024-02-05/endpoint/orders/get"},{"title":"List orders","openapi":"reference/2024-02-05/openapi.json GET /order","href":"/reference/2024-02-05/endpoint/orders/list"},{"title":"Estimate order","openapi":"reference/2024-02-05/openapi.json POST /order/estimate","href":"/reference/2024-02-05/endpoint/orders/estimate"}]},{"group":"Products","pages":[{"title":"List products","openapi":"reference/2024-02-05/openapi.json GET /product","href":"/reference/2024-02-05/endpoint/products/list"},{"title":"Get product details","openapi":"reference/2024-02-05/openapi.json GET /product/{product_code}","href":"/reference/2024-02-05/endpoint/products/get"},{"title":"List countries","openapi":"reference/2024-02-05/openapi.json GET /product/countries","href":"/reference/2024-02-05/endpoint/products/countries"},{"title":"List categories","openapi":"reference/2024-02-05/openapi.json GET /product/categories","href":"/reference/2024-02-05/endpoint/products/categories"}]},{"group":"Balance","pages":[{"title":"Get account balance","openapi":"reference/2024-02-05/openapi.json GET /balance","href":"/reference/2024-02-05/endpoint/balance/get"}]},{"group":"Utility","pages":[{"title":"Ping","openapi":"reference/2024-02-05/openapi.json GET /ping","href":"/reference/2024-02-05/endpoint/utility/ping"}]},{"group":"Webhooks","pages":[{"title":"Order completed","openapi":"reference/2024-02-05/openapi.json WEBHOOK order.completed","href":"/reference/2024-02-05/webhook/order.completed"},{"title":"Order failed","openapi":"reference/2024-02-05/openapi.json WEBHOOK order.failed","href":"/reference/2024-02-05/webhook/order.failed"},{"title":"Payout blocked","openapi":"reference/2024-02-05/openapi.json WEBHOOK payout.blocked","href":"/reference/2024-02-05/webhook/payout.blocked"},{"title":"Order completion","openapi":"reference/2024-02-05/openapi.json WEBHOOK order.completion","href":"/reference/2024-02-05/webhook/order.completion"},{"title":"Product update","openapi":"reference/2024-02-05/openapi.json WEBHOOK product.update","href":"/reference/2024-02-05/webhook/product.update"}]}]}]},{"tab":"Changelogs","pages":[{"title":"Changelogs","href":"/changelog/api"}]}]},"basePath":"","title":"Idempotency - Runa Developer Hub","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}