> ## Documentation Index
> Fetch the complete documentation index at: https://curlec.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Make a Request Idempotent

> Make a payout request idempotent using the X-Payout-Idempotency header.

Available in
🇲🇾 Malaysia

> [!NOTE]
>
> RazorpayX payouts in Malaysia are available on request. RazorpayX is not enabled on Razorpay Curlec accounts by default. To enquire about RazorpayX for your business, [contact our Support team](https://curlec.com/docs/payments/dashboard/support.md).

To make a request idempotent, add the header `X-Payout-Idempotency` to the request and pass an idempotency key against it. The header is mandatory on every payout create request: the [Create a Payout API](https://curlec.com/docs/api/x/payouts/create/bank-account.md) and the [Payout Composite APIs](https://curlec.com/docs/api/x/payout-composite.md).

**Points to Consider**:

* An idempotency key is a unique value that you generate. Our servers use this key to recognise later retries of the same request.
* The idempotency key has 4 to 36 characters. It can only contain letters, numbers, hyphens, underscores and spaces. For example, `53cda91c-8f81-4e77-bbb9-7388f4ac6bf4`.
* When you retry a request, the request body must be the same as in the first request. A different payload is rejected as a `BAD_REQUEST`.
* The idempotency key in a retry must be the same as in the original request.
* Use a unique idempotency key for each unique request.

We recommend that you generate the key with a **version 4 (random) UUID generator**.

```bash Curl theme={null}
curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
-X POST https://api.razorpay.com/v1/payouts \
-H "Content-Type: application/json" \
-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \
-d '{
  "account_number": "8181810000000000",
  "fund_account_id": "fa_F681qr6Bqy1Je7",
  "amount": 100000,
  "currency": "MYR",
  "mode": "IBFT",
  "purpose": "payout",
  "reference_id": "INV-1042",
  "narration": "Acme Vendor Payment"
}'
```

```json Success theme={null}
{
  "id": "pout_F681qslJ3ba70q",
  "entity": "payout",
  "fund_account_id": "fa_F681qr6Bqy1Je7",
  "amount": 100000,
  "currency": "MYR",
  "notes": {},
  "fees": 0,
  "tax": 0,
  "status": "pending",
  "purpose": "payout",
  "utr": null,
  "mode": "IBFT",
  "reference_id": "INV-1042",
  "narration": "Acme Vendor Payment",
  "batch_id": null,
  "status_details": null,
  "created_at": 1795089601
}
```

## Header Parameters

**X-Payout-Idempotency** `string` *required*

The idempotency key for the request. This header is mandatory on every payout create request. For example, `53cda91c-8f81-4e77-bbb9-7388f4ac6bf4`.

## Request Parameters

**account\_number** `string` *required*

Your RazorpayX account number. The payout amount and fees are debited from this account. It is a 16-digit number that starts with `818181` and is shown on the RazorpayX Dashboard. For example, `8181810000000000`.

> [!WARNING]
>
> **Watch Out!**
>
> This is your RazorpayX account number. It is **not** the beneficiary's bank account number.

**fund\_account\_id** `string` *required*

The unique identifier of the saved fund account to which the payout is made. For example, `fa_F681qr6Bqy1Je7`.

**amount** `integer` *required*

The payout amount, in sen. For example, pass `100000` to transfer RM 1,000.00. The amount does not include fees. Fees, if any, are debited from your RazorpayX account balance.

**currency** `string` *required*

The payout currency. Here, it is `MYR`.

**mode** `string` *required*

The mode used to create the payout. Possible values:

* `IBFT`: For a fund account of the type `bank_account`.
* `DUITNOW`: For a fund account of the type `duitnow`.

The mode is case-sensitive. Enter it in upper case.

**purpose** `string` *required*

The purpose of the payout. Possible values:

* `payout`
* `salary`
* `utility bill`
* `vendor bill`

**queue\_if\_low\_balance** `boolean`

Possible values:

* `true`: The payout is queued when your RazorpayX account does not have enough balance to process it. Top up your account to process the payout. Know more about [queued payouts](https://curlec.com/docs/x/payouts/queued.md).
* `false` (default): The payout is never queued. The payout fails if your RazorpayX account does not have enough balance to process it.

**reference\_id** `string`

Your reference for the payout. Maximum length is 40 characters. For example, `INV-1042`. You can use this field to store your own transaction ID.

**narration** `string`

The text shown on the beneficiary's bank statement. For example, `Acme Vendor Payment`.

**notes** `object`

Key-value pairs that you can use to store additional information about the payout. Maximum 15 key-value pairs. For example, `"invoice": "INV-1042"`.

## Response Parameters

**id** `string`

The unique identifier of the payout. For example, `pout_F681qslJ3ba70q`. Use it to fetch the payout.

**entity** `string`

The entity returned. Here, it is `payout`.

**fund\_account\_id** `string`

The unique identifier of the fund account to which the payout is made. For example, `fa_F681qr6Bqy1Je7`.

**amount** `integer`

The payout amount, in sen. For example, `100000` is RM 1,000.00. The amount does not include fees. Fees, if any, are debited from your RazorpayX account balance.

**currency** `string`

The payout currency. Here, it is `MYR`.

**notes** `object`

Key-value pairs that store additional information about the payout. Maximum 15 key-value pairs.

**fees** `integer`

The fees for the payout, in sen.

**tax** `integer`

The tax on the fees. No tax is charged on Malaysian payout fees, so this is always `0`.

**status** `string`

The status of the payout. Possible values:

* `pending`: Created and waiting for a checker to approve it on the Dashboard. This applies to payouts above the approval amount set for your account.
* `queued`: Waiting for balance or a processing window.
* `processing`: Sent to the bank.
* `processed`: The beneficiary is credited. This is a final status.
* `failed`: The payout failed. The reason is in `status_details`. This is a final status.
* `reversed`: The beneficiary was credited and the bank then returned the amount. This is a final status.
* `rejected`: Rejected by the checker. This is a final status.
* `cancelled`: Cancelled before processing. This is a final status.

Know more about [payout states](https://curlec.com/docs/x/payouts/states-life-cycle.md) and [payout status details](https://curlec.com/docs/x/payouts/status-details.md).

**purpose** `string`

The purpose of the payout. Possible values:

* `payout`
* `salary`
* `utility bill`
* `vendor bill`

**utr** `string`

The 30-character PayNet reference for the payout: the date (YYYYMMDD), the sending bank's BIC (8 characters), the transaction code (3), the channel (3) and an 8-digit sequence. It is `null` until the payout is processed. For example, `20261120XXXXMYKL010OBB12345678`.

**mode** `string`

The mode used to make the payout. Possible values:

* `IBFT`: A payout to a bank account at a Malaysian bank.
* `DUITNOW`: A payout to a DuitNow proxy.

Know more about [payout modes](https://curlec.com/docs/x/payouts/modes.md).

**reference\_id** `string`

Your reference for the payout. For example, `INV-1042`.

**narration** `string`

The text shown on the beneficiary's bank statement. For example, `Acme Vendor Payment`.

**batch\_id** `string`

This parameter is populated if the payout was created as part of a batch upload.

**status\_details** `object`

The reason for the current status of the payout, when there is one. Otherwise, it is `null`. Know more about [payout status details](https://curlec.com/docs/x/payouts/status-details.md).

**status\_details.description** `string`

A description of the current status. For example, `Payout is processed and the amount has been credited.`

**status\_details.reason** `string`

The reason for the current status. For example, `payout_processed`.

**status\_details.source** `string`

The source of the status. For example, `beneficiary_bank` for a processed payout.

**created\_at** `integer`

Unix timestamp at which the payout was created. For example, `1795089601`.
