---
page_source: https://docs.juspay.io/upi-inapp/android/headless-process-payloads/change-mpin
page_title: Change MPIN
---


## Change MPIN



The merchant can call this API to allow a customer to change their UPI Account MPIN


###   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: upiChangeMpin
      - Tags: String, Mandatory
    - **UpiRequestId**:
      - Description: Unique identifier (uuid) for the request sent to NPCI
      - Tags: String, Mandatory
    - **AccountReferenceId**:
      - Description: Unique Identifier for the account for which mpin is to be changed
      - 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: upiChangeMpin
      - Tags: String, Mandatory
    - **BankAccountUniqueId**:
      - Description: Unique Identifier for bank account across banks
      - Tags: String, Mandatory
    - **AccountReferenceId**:
      - Description: Unique Identifier for the account for which mpin is to be changed
      - Tags: String, Mandatory
    - **BankCode**:
      - Description: IIN Code for the bank
      - Tags: String, Mandatory
    - **CustomerMobileNumber**:
      - Description: masked phone number of the customer
      - Value: <Customer mobile number>
      - Tags: String, Mandatory
    - **CustomerVpa**:
      - Description: VPA of the customer linked to account
      - Tags: String, Mandatory
    - **MaskedAccountNumber**:
      - Description: Account Number with last few digits visible
      - Tags: String, Mandatory
    - **Status**:
      - Description: Status of the API
      - Value: SUCCESS/FAILURE
      - Tags: String, Mandatory
    - **GatewayResponseCode**:
      - Description: Response Code received from NPCI
      - Tags: String, Mandatory
    - **GatewayResponseMessage**:
      - Description: Response Message received from NPCI
      - 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
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiChangeMpin",
    "upiRequestId": "<UPI Request Id>",
    "accountReferenceId": "<Account Reference Id>",
    "udfParameters": "{}",
  }
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiChangeMpin",
    "upiRequestId": "<UPI Request Id>",
    "accountReferenceId": "<Account Reference Id>",
    "udfParameters": "{}",
  }
}
```


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

#### Request Code Snippet:

```request
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiChangeMpin",
    "upiRequestId": "<UPI Request Id>",
    "accountReferenceId": "<Account Reference Id>",
    "udfParameters": "{}",
  }
}
```

### Response snippets:

#### Response:
```plaintext
{
  "requestId": "<request id passed>",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiChangeMpin",
    "status": "SUCCESS",
    "accountReferenceId": "<accountReferenceId>",
    "bankAccountUniqueId": "<bankAccountUniqueId>",
    "customerVpa": "something@handle",
    "maskedAccountNumber": "XXXX1234",
    "gatewayResponseCode": "<gatewayResponseCode>",
    "gatewayResponseMessage": "<gatewayResponseMessage>",
    "otherInfo": "{}"

  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}
```

