> For the complete documentation index, see [llms.txt](https://payu-docs.gitbook.io/payouts-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://payu-docs.gitbook.io/payouts-integration/core-payouts-api/get-transfer-status.md).

# Cancel Transfer API

merchant can cancel queued transfer by calling this api.

{% tabs %}
{% tab title="Production" %}
<https://payout.payumoney.com/payout/payment/cancel>
{% endtab %}

{% tab title="Testing" %}
[https://test.payumoney.com/payout/payment/cancel](https://www.payumoney.com/payout/payment)
{% endtab %}
{% endtabs %}

## &#x20;**Request Header Params**

| **Key**          | **Description**                                   | **Data type** | **Mandatory** | **possible Values**    |
| ---------------- | ------------------------------------------------- | ------------- | ------------- | ---------------------- |
| Authorization    | Access token generated earlier.                   | String        | Yes           | Bearer {access\_token} |
| payoutMerchantId | This is the merchant id provided while onboarding | String        | Yes           |                        |

{% hint style="info" %}
**payountMerchantId is different from payumoney merchant id, please check payouts dashboard or call customer support if you don’t know your payoutsMerchantID**
{% endhint %}

## &#x20;**Request Params**

| **Key**       | **Description**                                                                                                                                                            | **Data type** | **Mandatory** | **possible Values** |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------- | ------------------- |
| merchantRefId | Unique reference id generated at merchant side to distinguish between multiple transfers. Same value will be used by merchant to check status of transfer or to cancel it. | String        | Yes           |                     |

## **Example**

**Sample Request :**

```
curl -X POST \
 https://test.payumoney.com/payout/payment/cancel \
 -H 'authorization: bearer 45f87fed35bdafe9f47698ed03e202e282f873b79a57eb53a9d30247b376f01d' \
 -H 'content-type: application/x-www-form-urlencoded' \
 -H 'payoutmerchantid: 1111122' \
 -d merchantRefId=1584856958885
```

**Response :**

{% tabs %}
{% tab title="Success" %}

```
{
 "status": 0,
 "msg": "Payout transaction cancelled",
 "code": null,
 "data": null
 }
```

{% endtab %}

{% tab title="Failure" %}

```
{
 "status": 1,
 "msg": "Merchant reference Id is incorrect",
 "code": null,
 "data": null
 }
```

{% endtab %}
{% endtabs %}

&#x20;
