> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Make a Request Idempotent

> Make a Request Idempotent using API.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇺🇸 United States</span>
</div>

To make a request idempotent, add the header `X-Payout-Idempotency` to the request and pass an idempotency key against it. Currently, idempotency is supported only on the Create Payout API and the Composite APIs.

<Warning>
  **Watch Out!**

  Idempotency key has been made mandatory for all payout requests since March 15, 2025
</Warning>

**Points to Consider**:

* An idempotency key is a unique value generated by you. Our servers use this key to recognise subsequent retries of the same request.
* The idempotency key (4-36 characters) can only contain alphabets, numbers, hyphens, underscores and space. For example, `53cda91c-8f81-4e77-bbb9-7388f4ac6bf4` is an idempotency key.
* When retrying a request, the request body must be the same as the first request for idempotency to work. A different payload will be rejected as a `BAD_REQUEST`.
* The idempotency key in retries must be the same as the original request.
* Use unique idempotency keys for each unique request.

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

<RequestExample>
  ```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": "7878780080316316",
    "fund_account_id": "fa_00000000000001",
    "amount": 1000000,
    "currency": "INR",
    "mode": "IMPS",
    "purpose": "refund",
    "queue_if_low_balance": true,
    "reference_id": "Acme Transaction ID 12345",
    "narration": "Acme Corp Fund Transfer",
    "notes": {
      "notes_key_1":"Tea, Earl Grey, Hot",
      "notes_key_2":"Tea, Earl Grey… decaf."
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "id": "pout_00000000000001",
    "entity": "payout",
    "fund_account_id": "fa_00000000000001",
    "amount": 1000000,
    "currency": "INR",
    "notes": {
      "notes_key_1":"Tea, Earl Grey, Hot",
      "notes_key_2":"Tea, Earl Grey… decaf."
    },
    "fees": 0,
    "tax": 0,
    "status": "queued",
    "utr": null,
    "mode": "IMPS",
    "purpose": "refund",
    "reference_id": "Acme Transaction ID 12345",
    "narration": "Acme Corp Fund Transfer",
    "batch_id": null,
    "status_details": null,
    "created_at": 1545383037
  }
  ```

  ```json Failure theme={null}
  {
    "error": {
        "code": "BAD_REQUEST_ERROR",
        "description": "Idempotency key is missing. Include idempotency header and key in the request.",
        "source": "business",
        "step": null,
        "reason": "null",
        "metadata": {},
        "field": "X-Payout-Idempotency"
    }
  }
  ```
</ResponseExample>

## Request Parameters

<ParamField body="account_number" type="string" required>
  The account from which you want to make the payout. For example, `7878780080316316`.

  * Pass your customer identifier if you want money to be deducted from RazorpayX Lite.
  * Pass your Current Account number if you want money to be deducted from your Current Account.

  <Warning>
    **Watch Out!**

    * This is **not** your Contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**.
    * This value is different for Test Mode and Live Mode.
  </Warning>
</ParamField>

<ParamField body="fund_account_id" type="string" required>
  The unique identifier linked to a fund account. For example, `fa_00000000000001`.
</ParamField>

<ParamField body="amount" type="integer" required>
  The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100`. <br /> The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance.
</ParamField>

<ParamField body="currency" type="string" required>
  The payout currency. Here, it is `INR`.
</ParamField>

<ParamField body="mode" type="string" required>
  The mode to be used to create the payout. Available modes:

  * `NEFT`
  * `RTGS`
  * `IMPS`
  * `card` <br />

  The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case.
</ParamField>

<ParamField body="purpose" type="string" required>
  The purpose of the payout that is being created. The following classifications are available in the system by default:

  * `refund`
  * `cashback`
  * `payout`
  * `salary`
  * `utility bill`
  * `vendor bill` <br />

  Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API.
</ParamField>

<ParamField body="queue_if_low_balance" type="boolean">
  Possible values:

  * `true`: The payout is queued when your business account does not have sufficient balance to process the payout.
  * `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout.
</ParamField>

<ParamField body="reference_id" type="string">
  A user-generated reference given to the payout. Maximum length is 40 characters. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any.
</ParamField>

<ParamField body="narration" type="string">
  Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. <br /> If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards.
</ParamField>

<ParamField body="notes" type="array of objects">
  Multiple key-value pairs that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`.
</ParamField>

## Response Parameters

<ResponseField name="id" type="string">
  The unique identifier of the order. For example, `pout_00000000000001`.
</ResponseField>

<ResponseField name="entity" type="string">
  The entity being created. Here, it will be `payout`.
</ResponseField>

<ResponseField name="fund_account_id" type="string">
  The unique identifier linked to the fund account. For example, `fa_00000000000001`.
</ResponseField>

<ResponseField name="amount" type="integer">
  The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance.
</ResponseField>

<ResponseField name="currency" type="string">
  The payout's currency. Here, it is `INR`.
</ResponseField>

<ResponseField name="notes" type="array of objects">
  Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`.
</ResponseField>

<ResponseField name="fees" type="integer">
  The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`.
</ResponseField>

<ResponseField name="tax" type="integer">
  The tax applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`.
</ResponseField>

<ResponseField name="status" type="string">
  The status of the payout. Possible payout states:

  * `queued`
  * `pending` (if you have [Approval Workflow](/docs/us/x/manage-teams/approval-workflow) enabled)
  * `rejected` (if you have [Approval Workflow](/docs/us/x/manage-teams/approval-workflow) enabled)
  * `processing`
  * `processed`
  * `cancelled`
  * `reversed`
  * `failed`

  Know more about [Payout statuses](/docs/us/x/payouts/states-life-cycle) and [Payout Status Details](/docs/us/errors/x/payout-status-details).
</ResponseField>

<ResponseField name="utr" type="string">
  The unique transaction number linked to a payout. For example, `HDFCN00000000001`.
</ResponseField>

<ResponseField name="mode" type="string">
  The mode used to make the payout. Available modes:

  * `NEFT`
  * `RTGS`
  * `IMPS`
  * `card` <br />

  The payout modes are case-sensitive.
</ResponseField>

<ResponseField name="purpose" type="string">
  The purpose of the payout that is being created. The following classifications are available in the system by default:

  * `refund`
  * `cashback`
  * `payout`
  * `salary`
  * `utility bill`
  * `vendor bill`
</ResponseField>

<ResponseField name="reference_id" type="string">
  A user-generated reference given to the payout. Maximum length is 40 characters. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any.
</ResponseField>

<ResponseField name="narration" type="string">
  This is a custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. <br /> If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the **most important text** forms the first 9 characters as banks may truncate the rest as per their standards.
</ResponseField>

<ResponseField name="batch_id" type="string">
  This value is returned if the Contact was created as part of a bulk upload. For example, `batch_00000000000001`.
</ResponseField>

<ResponseField name="status_details" type="object">
  This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode`.
</ResponseField>

<ResponseField name="description" type="string">
  A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`.
</ResponseField>

<ResponseField name="source" type="string">
  Possible values:

  * `gateway`: Technical error at Razorpay Partner bank.
  * `beneficiary_bank`: Technical error at beneficiary bank.
  * `business`: Merchant action required.
  * `internal`: Technical error at Razorpay's server.
</ResponseField>

<ResponseField name="reason" type="string">
  The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](/docs/us/errors/x/payout-status-details).
</ResponseField>

<ResponseField name="created_at" type="integer">
  Indicates the Unix timestamp when this order was created.
</ResponseField>

<ResponseField name="fee_type" type="string">
  Indicates the fee type charged for the payout. Possible values is `free_payout`.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion title="Idempotency key is missing. Include idempotency header and key in the request.">
    **Code:** `400`

    Idempotency key is mandatory.

    **Solution:** Include the X-Payout-Idempotency header and the idempotency key in your request to make a successful payout. Generate a key using the version 4 (random) UUID generator.
  </Accordion>
</AccordionGroup>
