---
page_source: https://docs.juspay.io/upi-inapp/android/headless-process-payloads/raise-complaint
page_title: Raise Complaint
---


## Raise Complaint



This API can be used to raise a complaint for any transaction. User will be able to raise this in case of a success, failure or a deemed transaction.


###   Process Parameters



## Request Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String, Mandatory
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String, Mandatory
- **Payload**:
  - Description: Parameters required to call Hyper SDK API
  - Value:
    - **Action**:
      - Description: Operation to be performed in the SDK
      - Value: upiComplaintRaise
      - Tags: String, Mandatory
    - **UpiRequestId**:
      - Description: Unique id passed to NPCI. 35 character alphanumeric string. Should always start with the merchant prefix provided. Should be unique.
      - Value: Eg - APL0f018ee5bc8b428fb979cb4a53ea9bde
      - Tags: Alphanumneric, String, Mandatory
    - **OriginalUpiRequestId**:
      - Description: Unique Transaction original id of the transaction on which complaint needs to raise (gatewayTransactionid). 35 character alphanumeric. Should always start with the merchant prefix provided. Should be unique.
      - Value: Eg - APL0f018ee5bc8b428fb979cb4a53ea9bde
      - Tags: Alphanumeric, String, Mandatory
    - **Remarks**:
      - Description: Remarks or reason for complaint
      - Tags: String, Mandatory
    - **AdjAmount**:
      - Description: Amount in two decimals. Decimals are mandatory.
      - Value: 0.50
      - Tags: String, Mandatory
    - **AdjFlag**:
      - Description: Reason flag for complaint
      - Value: PBRB
      - Tags: String, Mandatory
    - **AdjCode**:
      - Description: Reason code for complaint
      - Value: U010
      - Tags: String, Mandatory
    - **Type**:
      - Tags: String, Optional
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Tags: String, Mandatory
    - **SignaturePayload**:
      - Description: Signature payload is a stringified JSON of the details mentioned in the below table.
      - Value:
        - **Merchant_id**:
          - Description: Unique identifier associated with an account created by juspay. Ex: stock
          - Value: stock
          - Tags: String, Mandatory
        - **Customer_id**:
          - Description: Any unique reference associated with your customer.
          - Tags: String, Mandatory
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload.
      - Tags: String, Mandatory
    - **UdfParameters**:
      - Description: Stringified json for udf parameters
      - Tags: String, Optional
  - Tags: JSON, Mandatory


## Response Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String
- **Payload**:
  - Description: Response Parameters
  - Value:
    - **Action**:
      - Description: Operation performed in the SDK
      - Value: upiComplaintRaise
      - Tags: String, Mandatory
    - **Status**:
      - Description: Status of the API.
      - Value: SUCCESS / FAILURE
      - Tags: String, Mandatory
    - **ResponseCode**:
      - Description: PSP response code for the API
      - Tags: String, Mandatory
    - **ResponseMessage**:
      - Description: PSP response message for the API
      - Tags: String, Mandatory
    - **ComplaintRaisePayload**:
      - Value:
        - **PayerVpa**:
          - Description: Payer Vpa
          - Tags: String, Mandatory
        - **PayeeVpa**:
          - Description: Payee Vpa
          - Tags: String, Mandatory
        - **MerchantId**:
          - Description: Unique id for the merchant as passed in request
          - Tags: String, Mandatory
        - **MerchantChannelId**:
          - Description: Unique id for the merchant channel as passed in request
          - Tags: String, Mandatory
        - **MerchantCustomerId**:
          - Description: Merchant generated unique profile id for customer as passed in the request
          - Tags: String, Mandatory
        - **CustomerMobileNumber**:
          - Description: masked phone number of the customer
          - Value: <customer mobile number>
          - Tags: String, Mandatory
        - **MerchantRequestId**:
          - Tags: String, Mandatory
        - **TransactionAmount**:
          - Description: Amount of the transaction
          - Value: eg. 1.00
          - Tags: String, Mandatory
        - **ReqAdjAmount**:
          - Description: Amount of transaction sent in request
          - Value: 100.00
          - Tags: String, Mandatory
        - **ReqAdjFlag**:
          - Description: Reason flag for complaint sent in request
          - Value: eg. PBRB
          - Tags: String, Mandatory
        - **ReqAdjCode**:
          - Description: Reason code for complaint sent in request
          - Value: 1082
          - Tags: String, Mandatory
        - **Crn**:
          - Description: Complaint reference number returned by NPCI
          - Value: eg. 302570532
          - Tags: String, Optional
        - **GatewayReferenceId**:
          - Description: Complaint reference id
          - Value: eg. 465738
          - Tags: String, Mandatory
        - **GatewayComplaintId**:
          - Description: UPI request id passed in the request.
          - Value: APL123be148c7ba3b14f6db5cde57c65ccf
          - Tags: String, Mandatory
        - **GatewayResponseCode**:
          - Description: Response code returned by NPCI for the transaction
          - Value: Any valid NPCI error code
          - Tags: String, Mandatory
        - **GatewayResponseStatus**:
          - Description: Response status returned by NPCI
          - Value: OPEN | PENDING | CLOSED | FAILURE
          - Tags: String, Mandatory
        - **GatewayResponseMessage**:
          - Description: Response message returned by gateway for the transaction.
          - Value: Your Complaint is Raised successfully
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: String, Optional
  - Tags: JSON
- **Error**:
  - Description: Possible values :- true/false
  - Tags: Boolean
- **ErrorMessage**:
  - Description: Error Message
  - Tags: String
- **ErrorCode**:
  - Description: Error Code
  - Tags: String
- **Event**:
  - Description: Value: process_result
  - Tags: String





#### Code Snippets: -

#### Java Code Snippet:

```java
{
  "service": "in.juspay.hyperapi",
  "requestId": "095fa47e-b528-457d-8310-faece4c37814",
  "payload": {
    "action": "upiComplaintRaise",
    "upiRequestId": "AUT699393106f865d1a9467c59725e6891f",
    "originalUpiRequestId": "AUT75533106f865d1a9wegrhjw9725e6891f"
    "remarks": "Amount not credited",
    "adjAmount": "0.50",
    "adjFlag": "PBRB",
    "adjCode": "U010",
    "signature": "<signature>",
    "signaturePayload": "<signaturePayload>",
    "merchantKeyId": "1234"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "XXXXXXXX",
  "timestamp": "1641533238616"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "service": "in.juspay.hyperapi",
  "requestId": "095fa47e-b528-457d-8310-faece4c37814",
  "payload": {
    "action": "upiComplaintRaise",
    "upiRequestId": "AUT699393106f865d1a9467c59725e6891f",
    "originalUpiRequestId": "AUT75533106f865d1a9wegrhjw9725e6891f"
    "remarks": "Amount not credited",
    "adjAmount": "0.50",
    "adjFlag": "PBRB",
    "adjCode": "U010",
    "signature": "<signature>",
    "signaturePayload": "<signaturePayload>",
    "merchantKeyId": "1234"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "XXXXXXXX",
  "timestamp": "1641533238616"
}
```



###   Adjustment Code Table


> **Note**
> [Click here for Adjustment Codes](../miscellaneous/adjustment-code-table)





## Sample Code Snippets:
### Request snippets:

#### Request Code Snippet:

```request
{
  "service": "in.juspay.hyperapi",
  "requestId": "095fa47e-b528-457d-8310-faece4c37814",
  "payload": {
    "action": "upiComplaintRaise",
    "upiRequestId": "AUT699393106f865d1a9467c59725e6891f",
    "originalUpiRequestId": "AUT75533106f865d1a9wegrhjw9725e6891f"
    "remarks": "Amount not credited",
    "adjAmount": "0.50",
    "adjFlag": "PBRB",
    "adjCode": "U010",
    "signature": "<signature>",
    "signaturePayload": "<signaturePayload>",
    "merchantKeyId": "1234"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "XXXXXXXX",
  "timestamp": "1641533238616"
}
```

### Response snippets:

#### Response:
```plaintext
{
  "service": "in.juspay.hyperapi",
  "requestId": "f3d954b4-e9e2-4703-8758-c8b9a488d677",
  "payload": {
    "action": "upiComplaintRaise",
    "status": "SUCCESS",
    "responseCode": "SUCCESS",
    "responseMessage": "SUCCESS",
    "complaintRaisePayload": {
      "payerVpa": "123454306@1234",
      "payeeVpa": "83746598743@2312",
      "merchantId": "TEST",
      "merchantChannelId": "TESTAPP",
      "merchantCustomerId": "test-merchantcustomer-1",
      "customerMobileNumber": "919988776655",
      "merchantRequestId": "3764723469",
      "transactionAmount": "1.00",
      "reqAdjAmount": "0.50",
      "reqAdjFlag": "PBRB",
      "reqAdjCode": "U010",
      "crn": "941451534851394",
      "gatewayReferenceId": "123456",
      "gatewayComplaintId": "AUT699393106f865d1a9467c59725e6891f",
      "gatewayResponseCode": "00",
      "gatewayResponseStatus": "SUCCESS",
      "gatewayResponseMessage": "Your Complaint is Raised"
    }
  },
  "event": "process_result",
  "errorMessage": "",
  "errorCode": "",
  "error": false
}
```

