> For the complete documentation index, see [llms.txt](https://pivot-payment.gitbook.io/pivot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pivot-payment.gitbook.io/pivot-docs/api-references/api-information/idempotency.md).

# Idempotency

Attach this Parameter to the Header Request whenever you create a Payment or Payout

<table><thead><tr><th>Parameter</th><th width="115">Data Type</th><th width="135">Requirement</th><th>Description</th></tr></thead><tbody><tr><td>X-REQUEST-ID</td><td>String</td><td>M</td><td>Unique Idempotency Key to make sure no double transaction created from Merchant</td></tr></tbody></table>

#### Scenario

1. First-time request to create Payment / Payout using the <mark style="color:orange;">`X-REQUEST-ID`</mark>  : **`123`**, a successful process will return a Response HTTP Status 200
2. Second-time request to create Payment / Payout using the same <mark style="color:orange;">`X-REQUEST-ID`</mark> : **`123`** With a different Payload, then Pivot will return HTTP Response 409&#x20;
3. Second-time request to create Payment / Payout using the same <mark style="color:orange;">`X-REQUEST-ID`</mark> : **`123`** With the same request Payload, then Pivot will return a HTTP Response Status 200, with the same initial response&#x20;

#### Requirements

The requirement for <mark style="color:orange;">`X-REQUEST-ID`</mark> are:

1. Allow only alphanumeric characters
2. Minimum length is 16 digits
3. Maximum length is 36 digits
4. Expired in 24 hours, which means after 24 hours, you can reuse the same <mark style="color:orange;">`X-REQUEST-ID`</mark> for another transaction request
