The Change Wallet Status API allows you to change the operational status of a wallet. This includes temporarily blocking, marking as dormant, or permanently closing a wallet. This API is essential for wallet lifecycle management and compliance requirements.
Environment
Environment | URL |
---|---|
Test | https://apitest.payu.in/loyalty-points/v1/wallet/onboarding/walletStatus |
Production | https://api.payu.in/loyalty-points/v1/wallet/onboarding/walletStatus |
HTTP Method: POST
Request Headers
This API uses HMAC-SHA512 authentication on the header.
Parameter | Description |
---|---|
walletIdentifier mandatory |
String Program Type (e.g., CLW)
|
date mandatory |
String GMT formatted date (e.g., Thu, 17 Feb 2022 08:17:59 GMT)
|
Authorization mandatory |
String HMAC-SHA512-based authentication token
|
Content-Type mandatory |
String application/json
|
If you do not post the authentication, you will get error in response. For the list of error codes, refer to Status Codes
hmac authentication logic
hmac username="smsplus", algorithm="sha512", headers="date", signature="7ff938849aa79265a3de63fe241dfecb1c680f58c6d11e9f9ca08512afea374705eb9f8995ef6c4584e16eca2e1dc688262bb0937a36cc0f75ec22a9eea33523"
Where, the fields in this example are:
- username: The merchant key of the merchant.
- algorithm: This must have the value as hmac-sha512 that is used for this API.
- headers: This must have the value as date digest.
- signature: This must contain the hmacsha512 of (signing_string, merchant_secret), where:
- signing_string: It must be in the "date: {dateValue}"format. Here, the dateValue is the same values in the fields listed in this table For example, "date: Thu, 17 Feb 2022 08:17:59 GMT"
- merchant_secret: The merchant Salt of the merchant. For more information on getting the merchant Salt, refer to Generate Merchant Key and Salt.
Request Parameters
Parameter | Description | Example |
---|---|---|
messageCodemandatory |
Numeric(4) Unique API ID for wallet status change |
3530 |
clientTxnIdmandatory |
String(100) Unique transaction ID for each request |
CBL-458 |
requestDateTimemandatory |
Numeric(14) Local timestamp when request was initiated (YYYYMMDDHHMMSS) |
20220514181818 |
accountNumbermandatory |
String(15) Unique account number for the sub-wallet |
2000123hh |
statusTypemandatory |
String(10) Status type to set |
CreditDebit |
reasonoptional |
String(100) Reason for status change |
Customer request |
remarksoptional |
String(255) Additional remarks |
Temporary block due to suspicious activity |
Response Parameters
Parameter | Description | Example |
---|---|---|
messageCode | API Unique IDentifier | 1073 |
clientTxnId | Value echoed from the request | statementinqtes22 |
accountNumber | Value echoed from the request | 1234567890123456 |
accosaTransactionId | Unique ID for a particular transaction generated in Prepaid | 3591893 |
description | Reserved field to send information to client | Statement inquiry completed |
accosaRefNo | Auto-generated sequence number | 20240522001234 |
Sample Request
curl --location --request PATCH 'https://apitest.payu.in/loyalty-points/v1/wallet/onboarding/walletStatus \
--header 'walletIdentifier: CLW' \
--header 'date: Wed, 12 Jun 2024 08:53:43 GMT' \
--header 'authorization: hmac username="smsplus", algorithm="sha512", headers="date", signature="v15rnvh1InSEWRq6EW9BCfXlxO0QI/4Sxxmdxd2f4Q0="' \
--header 'Content-Type: application/json' \
--data-raw '{
"messageCode": “3530”,
"clientTxnId": "CBL-458",
"requestDateTime": "20161011221416",
"accountNumber": "2000123hh”,
“statusType”: “Credit”,
}
Sample Response
"accountNumber": "30003958135_1",
"description": "[Reserve_1]",
"responseCode": "00”,
"messageCode": “3531”,
"clientTxnId": "BLOCK_JM_aax11LrjoCV-f34",
"clientId": "2000",
"responseDateTime": "20230615234800",
"responseMessage": "SUCCESS",
"bankId": 7000,
"accosaRefNo": “52”
}