---
page_source: https://docs.juspay.io/upi-inapp/flutter/headless-process-payloads/collect-decline
page_title: Collect Decline
---


## Collect Decline



This operation will enable customers to decline collect request


###   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: upiDeclineCollect
      - Tags: String, Mandatory
    - **CustomerVpa**:
      - Description: If collectType is null or TRANSACTION, Vpa of the customer to be used for payment and if collectType is MANDATE, umn of the mandate.
      - Tags: String, Mandatory
    - **PayeeVpa**:
      - Description: VPA of payee
      - Tags: String, Mandatory
    - **PayeeName**:
      - Description: Name of payee
      - Tags: String, Mandatory
    - **Amount**:
      - Description: Amount to be transfered. Numeric String with two decimals
      - Tags: String, Mandatory
    - **UpiRequestId**:
      - Description: Request id for upi transaction which will be same as the gatewayTransactionId received in the upiListPendingTransactions response
      - Tags: String, Mandatory
    - **Timestamp**:
      - Description: Current timestamp
      - Tags: String, Mandatory
    - **AccountReferenceId**:
      - Description: reference id for selected accountsFor MandateCollect should be the same one which was used during Approving Mandate.
      - Tags: String, Mandatory
    - **CollectType**:
      - Description: Required for Mandate Collect Request. Values :- "MANDATE" or "TRANSACTION" (default)
      - Tags: String, Optional
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated from Signature payload
      - 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
          - 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
        - **Amount**:
          - Description: Amount to be paid. Numeric String with two decimals
          - Value: eg: 2.00
          - Tags: String, Mandatory
        - **Currency**:
          - Description: Currency to use
          - Value: eg: INR
          - Tags: String, Optional
        - **Customer_phone**:
          - Description: Mobile number
          - Tags: String, Optional
        - **Customer_email**:
          - Description: Customer Email
          - Tags: String, Optional
      - 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 to be performed in the SDK.
      - Value: upiDeclineCollect
      - Tags: String, Mandatory
    - **Status**:
      - Description: If upiDeclineCollect api call was success or failure.
      - Value: SUCCESS / FAILURE
      - Tags: String, Mandatory
    - **GatewayResponseCode**:
      - Description: Response Code received from NPCI
      - Tags: String, Mandatory
    - **GatewayTransactionId**:
      - Description: upiRequestId as passed in request
      - Tags: String, Mandatory
    - **GatewayResponseMessage**:
      - Description: Response Message received from NPCI
      - Tags: String, Mandatory
    - **CustomerMobileNumber**:
      - Description: Mobile Number
      - Tags: String, Mandatory
    - **CustomerVpa**:
      - Description: VPA of customer
      - Tags: String, Mandatory
    - **Amount**:
      - Description: Amount of request. Numeric String with two decimals
      - Tags: String, Mandatory
    - **PayeeMcc**:
      - Description: Merchant Category Code of the payee merchant
      - Tags: String, Optional
    - **RefUrl**:
      - Tags: String, Optional
    - **TransactionTimestamp**:
      - Description: Timestamp of transaction
      - Tags: String, Mandatory
    - **GatewayReferenceId**:
      - Description: upiResponseId as passed in request
      - 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": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "upiRequestId": "XXXXXXXXXXXXXXXXXXXXXXXX",
    "timestamp": "1639168319187.0",
    "signaturePayload": "<signaturePayload>",
    "signature": "GF.........\n",
    "payeeVpa": "XXXXXXXXXX@XXXXXX",
    "payeeName": "ABC",
    "merchantKeyId": "1234",
    "customerVpa": "XXXXXXXXX@XXXXX",
    "amount": "5.00",
    "accountReferenceId": "XXXXXXXXXXXXXXXX",
    "action": "upiDeclineCollect"
  }
}

"signaturePayload": {
  "merchant_id": "XXXXXX",
  "customer_id": "XXXXXX",
  "timestamp": "1639167811935",
  "amount": "5.00",
  "currency": "INR",
  "customerPhone": "9876543210"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "upiRequestId": "XXXXXXXXXXXXXXXXXXXXXXXX",
    "timestamp": "1639168319187.0",
    "signaturePayload": "<signaturePayload>",
    "signature": "GF.........\n",
    "payeeVpa": "XXXXXXXXXX@XXXXXX",
    "payeeName": "ABC",
    "merchantKeyId": "1234",
    "customerVpa": "XXXXXXXXX@XXXXX",
    "amount": "5.00",
    "accountReferenceId": "XXXXXXXXXXXXXXXX",
    "action": "upiDeclineCollect"
  }
}

"signaturePayload": {
  "merchant_id": "XXXXXX",
  "customer_id": "XXXXXX",
  "timestamp": "1639167811935",
  "amount": "5.00",
  "currency": "INR",
  "customerPhone": "9876543210"
}
```


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

#### Request Code Snippet:

```request
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "upiRequestId": "XXXXXXXXXXXXXXXXXXXXXXXX",
    "timestamp": "1639168319187.0",
    "signaturePayload": "<signaturePayload>",
    "signature": "GF.........\n",
    "payeeVpa": "XXXXXXXXXX@XXXXXX",
    "payeeName": "ABC",
    "merchantKeyId": "1234",
    "customerVpa": "XXXXXXXXX@XXXXX",
    "amount": "5.00",
    "accountReferenceId": "XXXXXXXXXXXXXXXX",
    "action": "upiDeclineCollect"
  }
}

"signaturePayload": {
  "merchant_id": "XXXXXX",
  "customer_id": "XXXXXX",
  "timestamp": "1639167811935",
  "amount": "5.00",
  "currency": "INR",
  "customerPhone": "9876543210"
}
```

### Response snippets:

#### Response:
```plaintext
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "udfParameters": "{}",
    "transactionTimestamp": "2021-12-11T02:01:57+05:30",
    "status": "SUCCESS",
    "gatewayTransactionId": "XXXXXXXXXXXXXXXX",
    "gatewayResponseMessage": "Transaction declined",
    "gatewayResponseCode": "ZA",
    "gatewayReferenceId": "XXXXXXXX",
    "customerVpa": "XXXXXXXX@XXXXXXXX",
    "customerMobileNumber": "XXXXXXXX",
    "amount": "5.00",
    "refUrl": "https://www.abcxyz.com/",
    "action": "upiDeclineCollect"
  },
  "event": "process_result",
  "errorMessage": "",
  "errorCode": "",
  "error": false,
}
```

