# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pivot-payment.gitbook.io/pivot-docs/api-references/api-information/idempotency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
