The PG Load API allows you to create a credit transaction entry through a payment gateway.
Environment
| Environment | URL |
|---|---|
| Test | https://apitest.payu.in/loyalty-points/ppi/payment/pg-load/v1 |
| Production | https://api.payu.in/loyalty-points/ppi/payment/pg-load/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
|
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.
Sign every request with HMAC-SHA256 over the
dateanddigestheaders:
date: Current time in GMT (RFC 1123 format), for example,Tue, 13 Oct 2026 07:05:59 GMT.digest:Base64(SHA-256(raw JSON request body))authorization:hmac username="<merchant_key>", algorithm="hmac-sha256", headers="date digest", signature="<signature>", wheresignature = Base64(HMAC-SHA256("date: <date>\ndigest: <digest>", <merchant_secret>))
Request Parameters
| Parameter | Description | Example |
|---|---|---|
clientTxnIdmandatory | Alphanumeric(14) Unique transaction ID for this request | Reload_V3_1234 |
requestDateTimemandatory | Numeric(14) Timestamp of the transaction (YYYYMMDDHHMMSS format) | 20230822183015 |
customerIdoptional | Numeric(20) A unique customer ID from the calling application. If the value is not passed in the request, the platform will auto-generate a unique value for this field. | 89342546 |
customer.firstNamemandatory | String(50) Customer first name. The following validations are done for this field:
| Ashish |
customer.lastNamemandatory | String(50) Customer last name. The following validations are done for this field:
| Mishra |
customer.mobileNumbermandatory | Numeric(13) Customer's mobile number with country code | 919988776655 |
customer.emailoptional | String(50) Valid email address in a valid email format | [email protected] |
surlmandatory | String The URL to which the customer is redirected if the PG transaction is a success | <redacted URL> |
furlmandatory | String The URL to which the customer is redirected if the PG transaction is a failure | <redacted URL> |
currencymandatory | String Currency code of the currency used. | INR |
loadAmountmandatory | Numeric(12) Amount to load (expressed in implied decimals) | 1500 |
seamlessTxnmandatory | Boolean Identifies whether it is a seamless or non-seamless transaction. This must be either true or false, where:
| false |
Response Parameters
| Parameter | Description | Example |
|---|---|---|
| referenceId | Reference ID of the transaction | 590bb71a22c54d0db685cdd752da1d2f |
| data.redirectUrl | Redirection link | https://apitest.payu.in/public/#/590bb71a22c54d0db685cdd752da1d2f |
| seamlessTxn | Identifies whether it is a seamless or non-seamless transaction | true/false |
Sample Request
curl --location --request POST 'https://apitest.payu.in/loyalty-points/ppi/payment/pg-load/v1' \
--header 'walletIdentifier: CLW' \
--header 'date: Tue, 13 Oct 2026 07:05:59 GMT' \
--header 'digest: BASE64_SHA256_OF_REQUEST_BODY' \
--header 'authorization: hmac username="YOUR_MERCHANT_KEY", algorithm="hmac-sha256", headers="date digest", signature="YOUR_HMAC_SIGNATURE"' \
--header 'Content-Type: application/json' \
--data-raw '{
"clientTxnId": "testRe9871",
"requestDateTime": "20250121182438",
"customer": {
"firstName": "Ashish",
"lastName": "Mishra",
"mobileNumber": "919999999999"
},
"surl": "<redacted URL>",
"furl": "<redacted URL>",
"currency": "INR",
"loadAmount": 99999,
"seamlessTxn": false
}'Sample Response
{
"referenceId": "590bb71a22c54d0db685cdd752da1d2f",
"data": {
"redirectUrl": "https://apitest.payu.in/public/#/590bb71a22c54d0db685cdd752da1d2f"
},
"seamlessTxn": false
}HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | OK - Request processed successfully |
| 400 | Bad Request - Invalid request parameters |
| 401 | Unauthorized - Authentication failed |
| 404 | Not Found - Wallet not found |
| 500 | Internal Server Error |
Error Codes
| Error Code | Description |
|---|---|
| 1081 | Load transaction successful |
| 1010 | Invalid message code |
| 1020 | Missing required parameters |
| 1040 | Wallet not found |
| 1050 | Transaction limit exceeded |
