---
page_source: https://docs.juspay.io/upi-inapp/flutter/headless-process-payloads/block-spam-vpa
page_title: Block/Spam Vpa
---


## Block/Spam Vpa



The merchant can call this API to block a vpa or to mark it as spam.


###   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: upiBlockSpam
      - 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
    - **PayeeVpa**:
      - Description: Vpa to be blocked or marked as spam
      - Tags: String, Mandatory
    - **ShouldBlock**:
      - Description: Should be true for block request
      - Value: true/false
      - Tags: String, Madnatory
    - **ShouldSpam**:
      - Description: Should be true for spam request
      - Value: true/false
      - Tags: String, Mandatory
    - **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
          - 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
    - **RequestType**:
      - Description: Required for Mandate Collect Request. Values :- "MANDATE" or "TRANSACTION" (default)
      - Tags: String, Optional
    - **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: upiBlockSpam
      - Tags: String, Mandatory
    - **Status**:
      - Description: If upiBlockSpam call was success or failure
      - Value: SUCCESS / FAILURE
      - Tags: String, Mandatory
    - **Bn**:
      - Description: Array of block and spam
      - Tags: Array, Mandatory
    - **GatewayResponseCode**:
      - Description: Response code returned by NPCI
      - Tags: String, Mandatory
    - **GatewayResponseMessage**:
      - Description: Response message for code returned by NPCI
      - 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
  - 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": "AXB50298319391657664494011",
    "signaturePayload": "<signature Payload>",
    "signature": "<signature>",
    "shouldSpam": "false",
    "shouldBlock": "true",
    "payeeVpa": "8809800980@stockaxis",
    "action": "upiBlockSpam"
  }
}

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

#### Kotlin Code Snippet:

```kotlin
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "upiRequestId": "AXB50298319391657664494011",
    "signaturePayload": "<signature Payload>",
    "signature": "<signature>",
    "shouldSpam": "false",
    "shouldBlock": "true",
    "payeeVpa": "8809800980@stockaxis",
    "action": "upiBlockSpam"
  }
}

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


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

#### Request Code Snippet:

```request
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "upiRequestId": "AXB50298319391657664494011",
    "signaturePayload": "<signature Payload>",
    "signature": "<signature>",
    "shouldSpam": "false",
    "shouldBlock": "true",
    "payeeVpa": "8809800980@stockaxis",
    "action": "upiBlockSpam"
  }
}

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

### Response snippets:

#### Response:
```plaintext
{
  "service": "in.juspay.hyperapi",
  "requestId": "93571360-f4bf-406e-9cae-75a21aaf1370",
  "payload": {
    "action": "upiBlockSpam",
    "bn": [...],
    "status": "SUCCESS",
    "gatewayResponseMessage": "<gatewayResponseMessage>",
    "gatewayResponseCode": "00",
    "responseMessage": "SUCCESS",
    "responseCode": "SUCCESS "
  },
  "event": "process_result",
  "errorMessage": "",
  "errorCode": "",
  "error": false
}
```

