---
page_source: https://juspay.io/in/docs/upi-merchant-stack/docs/transactions/refund-360
page_title: Refund 360
---

## API Version: V3


# Merchant Refund 360



This api can be used to trigger a refund against a successful complaint resolve and if the transaction is successful. There are two types of refunds supported - **UDIR**  and **OFFLINE** .

Refund360 will be used for initiating a new refund or getting the status of an existing refund. If the "refundRequestId" is present with the PSP, then the latest status of the existing refund will be returned. If not present, then a new refund will be triggered.**OFFLINE**  refunds take around 2-3 working days to get processed.

**UDIR**  refunds get credited to remitter account instantly. Merchant is required to pass the adjCode and adjFlag in the request. Below are mentioned the adjCode and adjFlag for merchant’s reference.

> **Note**
> adjCode and adjFlag from NPCI not mentioned below shall be treated as Pending
> 
> **UDIR**  refund to be initiated **5 minutes post successful transaction**  only, prior initiations can lead to errors.



**Gateway Response codes wrt Online Refunds:** 


| gatewayResponseCode | gatewayResponseStatus | Description |
|---|---|---|
| 00   | SUCCESS | Refund accepted successfully |
| 01 | PENDING | Refund is in pending state |
| RB | DEEMED | Refund is in deemed state |
| BT | DEEMED | Refund is in deemed state |
| Else | FAILURE | Refund failed |


**Gateway Response codes wrt UDIR Refunds:** 


| gatewayResponseCode | gatewayResponseStatus | Description |
|---|---|---|
| 00  | SUCCESS | Refund accepted successfully |
| 01 | PENDING | Refund is in pending state |
| JPREFD | DEEMED | Refund is in deemed state |
| Else | FAILURE | Refund failed |


**Reason codes and flag for Refund From Beneficiary:** 


| AdjFlag | AdjCode | Description |
|---|---|---|
| REF | 1064 | Goods or Services Not Provided |
| REF | 1084 | Duplicate /Multiple Transaction |
| REF | 1063 | Customer paid by alternate means |
| REF | 1061 | Credit not processed for cancelled or returned goods and services. |


**Reason codes and flags for Refund From NPCI:** 


| AdjFlag | AdjCode | Description |
|---|---|---|
| RRC | 501 | Success |
| RRC | 502 | Deemed |
| RUU | UT1, UT2, UT3, UT4, UT5, UT6, UT7 | Deemed |
## Endpoints:
- Production: {{host}}/api/{{uri}}/merchants/transactions/refund360

## Request Type: 
POST

## Sample Code Snippets:
### Code Snippets:

#### Shell Code Snippet:

```shell
{"success":false,"message":"No Data found for the given path"}
```

### Sample Request and Response:

#### Request:
```json
{"success":false,"message":"No Data found for the given path"}
```

#### Response:
```json
{"success":false,"message":"No Data found for the given path"}
```

## Body Parameters:
### Basic Params:

#### originalMerchantRequestId:
- Description: merchantRequestId of the original transaction against which refund is being initiated.
- Tags: String, Mandatory

#### refundRequestId:
- Description: Merchant generated unique id for the refund.

**Constraints:** Max**** 35 characters alphanumeric, can also contain hyphen(-), dot(.) & underscore(_)
- Tags: String, Mandatory

#### refundType:
- Description: Type of refund being initiated. 

**Value:** UDIR, ONLINE, OFFLINE
- Tags: String, mandatory

#### refundAmount:
- Description: The amount to be refunded.

**Constraints:** String with mandatory two decimals and should be less than or equal to original txn amount.
- Tags: String, Mandatory

#### merchantRefundVpa:
- Description: Merchant refund vpa that is to be used for online refund.
- Tags: String, Conditional

#### remarks:
- Description: Remarks or reason for the refund.**Constraints:** The transaction note must be alphanumeric, with a **minimum length of 1 character and a maximum length of 50**  characters.
- Tags: String, Mandatory

#### refundUpiRequestId:
- Description: Upi request Id used for refund transaction.**Constraints:** Max**** 35 characters alphanumeric.
- Tags: String, Optional

#### originalTransactionTimestamp:
- Description: Timestamp of the original transaction. Passing this parameter will help PSP to optimize the refund request to reduce the latency of this api.

**Format** : YYYY-MM-DDTHH:MM:SS+05:30
- Tags: String, Optional

#### iat:
- Description: Current Epoch Unix timestamp string. Has to be of 13 digit in Milliseconds.

**Example** : 1496918882000.
- Tags: String, Mandatory

#### udfParamters:
- Description: Merchant Defined Parameters

**Example** : "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"**Note** : Few special characters are not allowed. Regex for the characters which are not allowed : **^[^/#-()*!%~`]+$** 
- Tags: Stringified JSON, Optional

#### adjCode:
- Description: To be passed in case of **UDIR refunds** .Value: {1064, 1084, 1063, 1061}Description for the same are mentioned above in the **Reason codes and flag for Udir Refund From Beneficiary** Table.
- Tags: String, Conditional

#### adjFlag:
- Description: To be passed in case of **UDIR refunds** .Value: REFDescription for the same are mentioned above in the **Reason codes and flag for Udir Refund From Beneficiary** Table.
- Tags: String, Conditional
## API Responses:
### 200:

#### status:
- Description: PSP status of the API.

**Values:** SUCCESS | FAILURE.
- Tags: String, Mandatory

#### responseCode:
- Description: PSP response code for the API. 

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### responseMessage:
- Description: PSP response message for the API. 

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### payload:
- Value:
  - **MerchantId**:
    - Description: Unique id for the merchant.
      
      **Values:** As passed in request headers.
    - Tags: String, Mandatory
  - **MerchantChannelId**:
    - Description: Unique id for the merchant channel.
      
      **Values:** As passed in request headers.
    - Tags: String, Mandatory
  - **GatewayResponseCode**:
    - Description: Response code returned by gateway for the refund.
    - Tags: String, Mandatory
  - **GatewayResponseStatus**:
    - Description: Response status returned by gateway for the refund.
      
      **Values:** String (SUCCESS, PENDING, DEEMED, FAILURE).
    - Tags: String, Mandatory
  - **GatewayResponseMessage**:
    - Description: Response message for code returned by gateway for the refund.
    - Tags: String, Mandatory
  - **GatewayTransactionId**:
    - Description: UPI request id returned by gateway for the transaction.
      
      **Values:** Same as **originalUpiRequestId**  passed in request.
    - Tags: String, Mandatory
  - **GatewayRefundReferenceId**:
    - Description: Reference ID returned by the gateway for the refund (RRN).
    - Tags: String, Mandatory
  - **RefundAmount**:
    - Description: The amount to be refunded.
      
      **Values:** As passed in the request body.
    - Tags: String, Mandatory
  - **RefundRequestId**:
    - Description: Merchant generated unique id for the refund.
      
      **Values:** As passed in the request body.
    - Tags: String, Mandatory
  - **OriginalMerchantRequestId**:
    - Description: merchant request id of original transaction.
    - Tags: String, Optional
  - **GatewayRefundTransactionId**:
    - Description: UpiRequestId for the refund.
    - Tags: String, Mandatory
  - **RefundTimestamp**:
    - Description: Timestamp of when refund request was initiated.
      
      **Format:** String (YYYY-MM-DDTHH:MM:SS+05:30).
    - Tags: String, Mandatory
  - **RefundType**:
    - Description: Type of refund being initiated.
      
      **Value:** UDIR, ONLINE, OFFLINE
    - Tags: String, Mandatory
  - **RiskScore**:
    - Description: RiskScore shared by NPCI or Bank.
    - Tags: String, Optional
  - **Remarks**:
    - Description: Remarks or reason as sent in the request.
    - Tags: String, Optional
  - **SubMerchantId**:
    - Description: Unique id for subMerchant. Only if present as a subMerchant.
    - Tags: String, Optional
  - **SubMerchantChannelId**:
    - Description: Unique id for the channel via which request is made. Only if present as a subMerchant.
    - Tags: String, Optional
  - **AdjFlag**:
    - Description: Reason Flag received in response from NPCI.
    - Tags: String, Conditional
  - **AdjCode**:
    - Description: Reason Code received in response from NPCI.
    - Tags: String, Conditional
  - **ReqAdjFlag**:
    - Description: Reason flag for refund raised to NPCI.
    - Tags: String, Conditional
  - **ReqAdjCode**:
    - Description: Reason Code received from Merchant and sent to NPCI for refund.
    - Tags: String, Conditional
  - **Crn**:
    - Description: Complaint reference number returned by NPCI.**Values** :14 to 16 characters alphanumeric.
    - Tags: String, Conditional
  - **MerchantRefundVpa**:
    - Description: RefundVPA used for refund
    - Tags: String, Optional
- Tags: Json, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters

Example: "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"
- Tags: stringified JSON, optional


---

## API Version: v1


# Merchant Refund 360



This api can be used to trigger a refund against a successful merchant transaction. There are two types of refunds supported - **ONLINE**  and **OFFLINE** .

Refund360 will be used for initiating a new refund or getting the status of an existing refund. If the "refundRequestId" is present with the PSP, then the latest status of the existing refund will be returned. If not present, then a new refund will be triggered.

**ONLINE**  refunds get credited to remitter account instantly, whereas **OFFLINE**  refunds take around 2-3 working days.

> **Note**
> This is an idempotent api.



Endpoint and Parameters:## Endpoints:
- Production: {{host}}/api/{{uri}}/merchants/transactions/refund360

## Request Type: 
POST

## Sample Code Snippets:
### Code Snippets:

#### Shell Code Snippet:

```shell
{"success":false,"message":"No Data found for the given path"}
```

### Sample Request and Response:

#### Request:
```json
{"success":false,"message":"No Data found for the given path"}
```

#### Response:
```json
{"success":false,"message":"No Data found for the given path"}
```

## Body Parameters:
### Basic Params:

#### originalMerchantRequestId:
- Description: merchantRequestId of the original transaction against which refund is being initiated.
- Tags: String, Conditional

#### refundRequestId:
- Description: Merchant generated unique id for the refund.

**Constraints:** Max**** 35 characters alphanumeric, can also contain hyphen(-), dot(.) & underscore(_)
- Tags: String, Mandatory

#### refundType:
- Description: Type of refund being initiated. 

**Value:** ONLINE/OFFLINE
- Tags: String, mandatory

#### refundAmount:
- Description: The amount to be refunded.

**Constraints:** String with mandatory two decimals
- Tags: String, Mandatory

#### remarks:
- Description: Remarks or reason for the refund.**Constraints:** The transaction note must be alphanumeric, with a **minimum length of 1 character and a maximum length of 50**  characters.
- Tags: String, Mandatory

#### merchantRefundVpa:
- Description: Merchant refund vpa that is to be used for online refund.
- Tags: String, Conditional

#### originalTransactionTimestamp:
- Description: Timestamp of the original transaction. Passing this parameter will help PSP to optimize the refund request to reduce the latency of this api.

**Format** : YYYY-MM-DDTHH:MM:SS+05:30
- Tags: String, optional

#### udfParamters:
- Description: Merchant Defined Parameters

**Example** : "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"**Note** : Few special characters are not allowed. Regex for the characters which are not allowed : **^[^/#-()*!%~`]+$** 
- Tags: Stringified JSON, Optional

#### iat:
- Description: Current Epoch Unix timestamp string. Has to be of 13 digit in Milliseconds.

Example: 1496918882000.
- Tags: String, Mandatory
### Split Settlement Params:

#### splitSettlementDetails:
- Description: Split Settlement details of merchant and partners for this transactions
- Value:
  - **SplitType**:
    - Description: The type of split for this transaction. Can be AMOUNT, PERCENTAGE, DEFAULT, LATER.
    - Tags: String, Mandatory
  - **MerchantSplit**:
    - Description: Split share for merchant pool account.
    - Tags: String, Optional
  - **PartnerSplit**:
    - Description: List of partners for which the split needs to be divided with the value.
    - Value:
      - **PartnerId**:
        - Description: The LSP id provided by the bank.
        - Tags: String, Mandatory
      - **Value**:
        - Description: Split share for LSP account. Decimal Value
        - Tags: String, Mandatory
    - Tags: String, Conditional
- Tags: JSON String, Optional
## API Responses:
### 200:

#### status:
- Description: PSP status of the API.

**Values:** SUCCESS | FAILURE.
- Tags: String, Mandatory

#### responseCode:
- Description: PSP response code for the API. 

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### responseMessage:
- Description: PSP response message for the API. 

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### payload:
- Value:
  - **MerchantId**:
    - Description: Unique id for the merchant.
      
      **Values:** As passed in request headers.
    - Tags: String, Mandatory
  - **MerchantChannelId**:
    - Description: Unique id for the merchant channel.
      
      **Values:** As passed in request headers.
    - Tags: String, Mandatory
  - **GatewayResponseCode**:
    - Description: Response code returned by gateway for the refund.
    - Tags: String, Mandatory
  - **GatewayResponseStatus**:
    - Description: Response status returned by gateway for the refund.
      
      **Values:** String (SUCCESS, PENDING, DEEMED, FAILURE).
    - Tags: String, Mandatory
  - **GatewayResponseMessage**:
    - Description: Response message for code returned by gateway for the refund.
    - Tags: String, Mandatory
  - **GatewayTransactionId**:
    - Description: UPI request id returned by gateway for the transaction.
      
      **Values:** Same as **originalUpiRequestId**  passed in request.
    - Tags: String, Mandatory
  - **GatewayRefundReferenceId**:
    - Description: Reference id returned by the gateway for the refund.
    - Tags: String, Mandatory
  - **RefundAmount**:
    - Description: The amount to be refunded.
      
      **Values:** As passed in the request body.
    - Tags: String, Mandatory
  - **RefundRequestId**:
    - Description: Merchant generated unique id for the refund.
      
      **Values:** As passed in the request body.
    - Tags: String, Mandatory
  - **OriginalMerchantRequestId**:
    - Description: merchant request id of original transaction.
    - Tags: String, Optional
  - **GatewayRefundTransactionId**:
    - Description: UpiRequestId for the refund.
    - Tags: String, Mandatory
  - **RefundTimestamp**:
    - Description: Timestamp of when refund request was initiated.
      
      **Format:** String (YYYY-MM-DDTHH:MM:SS+05:30).
    - Tags: String, Mandatory
  - **RefundType**:
    - Description: Type of refund being initiated.
      
      **Value:** UDIR
    - Tags: String, Mandatory
  - **RiskScore**:
    - Description: RiskScore shared by NPCI or Bank.
    - Tags: String, Optional
  - **Remarks**:
    - Description: Remarks or reason as sent in the request.
    - Tags: String, Optional
  - **SubMerchantId**:
    - Description: Unique id for subMerchant. Only if present as a subMerchant.
    - Tags: String, Optional
  - **SubMerchantChannelId**:
    - Description: Unique id for the channel via which request is made. Only if present as a subMerchant.
    - Tags: String, Optional
  - **AdjFlag**:
    - Description: Reason Flag sent in response from NPCI.
    - Tags: String, Optional
  - **AdjCode**:
    - Description: Reason Code sent in response from NPCI.
    - Tags: String, Optional
  - **ReqAdjFlag**:
    - Description: Reason flag for refund raised to NPCI.
    - Tags: String, Mandatory
  - **ReqAdjCode**:
    - Description: Reason Code received from Merchant and sent to NPCI for refund.
    - Tags: String, Mandatory
  - **Crn**:
    - Description: Complaint reference number returned by NPCI.**Values** :14 to 16 characters alphanumeric.
    - Tags: String, Optional
  - **MerchantRefundVpa**:
    - Description: RefundVPA used for refund
    - Tags: String, Optional
- Tags: Json, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters

Example: "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"
- Tags: stringified JSON, optional
