---
page_source: https://docs.juspay.io/upi-inapp/android/headless-process-payloads/delete-account
page_title: Delete Account
---


## Delete Account



This api deletes a customer account and its mapping to corresponding vpas.

> **Warning**
> Device binding will be retained. This api should not be called on a primary account / last account.




###   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: upiDeleteAccount
      - Tags: String, Mandatory
    - **AccountReferenceId**:
      - Description: Unique id for the bank account to be deleted
      - 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: upiDeleteAccount
      - Tags: String, Mandatory
    - **Status**:
      - Description: If upiDeleteAccount call was success or failure
      - Value: SUCCESS/FAILURE
      - Tags: String, Mandatory
    - **CustomerMobileNumber**:
      - Description: masked phone number of the customer
      - Value: <customer mobile number>
      - Tags: String, Mandatory
    - **VpaAccounts**:
      - Description: List of remaining vpa accounts. It's an array of Vpa Accounts
      - Value:
        - **Vpa**:
          - Description: Vpa
          - Tags: String, Mandatory
        - **Account**:
          - Description: Account linked to this vpa
          - Value:
            - **BankCode**:
              - Description: IIN Code for the bank
              - Tags: String, Mandatory
            - **BankName**:
              - Description: Name of bank
              - Tags: String, Mandatory
            - **MaskedAccountNumber**:
              - Description: Account Number with last few digits visible
              - Tags: String, Mandatory
            - **AccountNumber**:
              - Tags: String, Optional
            - **MpinLength**:
              - Description: Length of mpin
              - Tags: String, Mandatory
            - **MpinSet**:
              - Description: Is mpin set
              - Value: true / false
              - Tags: String, Mandatory
            - **ReferenceId**:
              - Tags: String, Mandatory
            - **Type**:
              - Description: Type of account
              - Tags: String, Optional
            - **BranchName**:
              - Description: Name of branch in which account is registered
              - Tags: String, Optional
            - **BankAccountUniqueId**:
              - Description: Unique Identifier for bank account across banks
              - Tags: String, Optional
            - **Ifsc**:
              - Description: Account IFSC
              - Tags: String, Optional
            - **IsPrimary**:
              - Description: Is this account the primary account
              - Value: true / false
              - Tags: String, Optional
            - **Name**:
              - Description: Name of account holder
              - Tags: String, Optional
            - **OtpLength**:
              - Description: Length of OTP
              - Tags: String, Mandatory
            - **AtmPinLength**:
              - Description: Length of atm pin
              - Tags: String, Mandatory
          - Tags: Array of JSON, Mandatory
      - Tags: Array of JSON, 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": "8da4c755-0c82-4efb-a1b3-5ba8c84c659b",
  "payload": {
    "action": "upiDeleteAccount",
    "accountReferenceId": "Ac3a09bcc26149b7bdd009e57911fbb",
  }
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "service": "in.juspay.hyperapi",
  "requestId": "8da4c755-0c82-4efb-a1b3-5ba8c84c659b",
  "payload": {
    "action": "upiDeleteAccount",
    "accountReferenceId": "Ac3a09bcc26149b7bdd009e57911fbb",
  }
}
```


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

#### Request Code Snippet:

```request
{
  "service": "in.juspay.hyperapi",
  "requestId": "8da4c755-0c82-4efb-a1b3-5ba8c84c659b",
  "payload": {
    "action": "upiDeleteAccount",
    "accountReferenceId": "Ac3a09bcc26149b7bdd009e57911fbb",
  }
}
```

### Response snippets:

#### Response:
```plaintext
{
  "service": "in.juspay.hyperapi",
  "requestId": "8da4c755-0c82-4efb-a1b3-5ba8c84c659b",
  "payload": {
    "vpaAccounts": "vpaAccounts": [{
      "account": {
        "bankCode": "11111",
        "bankName": "ABCD",
        "maskedAccountNumber": "XXXX203891",
        "mpinLength": "6",
        "mpinSet": "true",
        "referenceId": "A0760cb548bb4dda9d32e3030863dd5",
        "isPrimary": "true",
        "otpLength": "6",
        "atmPinLength": "6"
      },
      "vpa": "something@handle",
      "isDefault": "true"
    }],
    "status": "SUCCESS",
    "otherInfo": "{}",
    "customerMobileNumber": "911234567891",
    "action": "upiDeleteAccount"
  },
  "event": "process_result",
  "errorMessage": "",
  "errorCode": "",
  "error": false
}
```

