The Load Enquiry API allows you to check the status of a wallet load transaction that was initiated using the PG Load API. This is essential for transaction reconciliation and status verification.
Environment
Environment | URL |
---|---|
Test | https://apitest.payu.in/loyalty-points/ppi/payment/pg-load/enquiry/v1 |
Production | https://api.payu.in/loyalty-points/ppi/payment/pg-load/enquiry/v1 |
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
|
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
Body Parameters
The request body contains both encrypted and decrypted parameters.
Encrypted
Parameter | Description |
---|---|
tokenmandatory | String AES-192-CBC encrypted request body containing all the decrypted parameters |
Decrypted
Parameter | Description | Example |
---|---|---|
clientTxnIdmandatory | Alphanumeric(100) Unique transaction ID from the PG Load request | PGLOAD123456 |
Response Parameters
Parameter | Description | Example |
---|---|---|
merchantCode | Merchant's unique ID provided by PayU | 180012 |
clientTxnId | Echoes the client's transaction ID | PGLOAD123456 |
txnAmount | The amount intended to be loaded into the wallet | 4100 |
accosaRefNo | Auto-generated sequence number | ACC123456789 |
status | Transaction status | SUCCESS/FAILED/PENDING |
responseCode | Numeric response code | 00 |
refundTxnExist | Indicates if the transaction was refunded | false |
VerifyPaymentResponse.msg | Message related to the status | Transaction successful |
VerifyPaymentResponse.result | Status result from payment gateway | 1 |
Sample Request
Encrypted Packet
curl --location --request POST 'https://apitest.payu.in/loyalty-points/ppi/payment/pg-load/enquiry/v1' \
--header 'walletIdentifier: CLW' \
--header 'date: Wed, 12 Jun 2024 08:53:43 GMT' \
--header 'authorization: hmac username="smsplus", algorithm="sha512", headers="date", signature="hmac_generated_signature"' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "h/0YSUd9jKOQ8+2Dc3Phr4s7vxyz123..."
}'
Decrypted Packet
{
"clientTxnId": "PGLOAD123456"
}
Sample Response
Encrypted Response
{
"result": "h/0YSUd9jKOQ8+2Dc3Phr4s7vxyz789..."
}
Decrypted Response
Successful Transaction
{
"merchantCode": "180012",
"clientTxnId": "PGLOAD123456",
"txnAmount": "4100",
"accosaRefNo": "ACC123456789",
"status": "SUCCESS",
"responseCode": "00",
"refundTxnExist": false,
"VerifyPaymentResponse": {
"msg": "Transaction successful",
"result": "1"
}
}
Failed Transaction
{
"merchantCode": "180012",
"clientTxnId": "PGLOAD56894",
"txnAmount": "4100",
"status": "FAILED",
"responseCode": "1303",
"refundTxnExist": false,
"refundEnquiryResponse": null
}
HTTP Status Codes
Status Code | Description |
---|---|
200 | OK - Request processed successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Authentication failed |
404 | Not Found - Transaction not found |
500 | Internal Server Error |
Error Codes
Error Code | Description |
---|---|
00 | Success |
1054 | Transaction not found |
1303 | Transaction failed |
1010 | Invalid message code |
1020 | Missing required parameters |