# Idempotency Request

Idempotency is a concept where a request can be send multiple times with the same result as the first request, that means the system only performs one process for identical requests.

A request is identical if it is sent with the same request-id. However, the implementation may different in other systems, for example for processing transactions additional parameters such as "order-no, amount" may be required to compliment when decide a request is identical or not.

### How Idempotency Works

<figure><img src="/files/O6DNr5kjv2UpbMZiXn0y" alt=""><figcaption></figcaption></figure>

### Guidance for Idempotency Key <a href="#guide-for-idempotency-key" id="guide-for-idempotency-key"></a>

> **IDEMPOTENCY KEY IN DOKU**
>
> We make `idempotency key` in our system is `Request ID`

To implement this, you must do below :

1. Every API Request must send unique `request ID`.
2. If something happen in Merchant Side and merchant can't get response, then merchant send request again with same request ID and same Request Body, DOKU system will send the same Response body with HTTP Status Code 409 Conflict.


---

# 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://developers.doku.com/get-started-with-doku-api/idempotency-request.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.
