When a transaction is completed via the PG Load API, the result is communicated back to the merchant through a callback mechanism. The response parameters are sent to the surl (success URL) or furl (failure URL) that was provided in the original PG Load API request.
Callback Flow
- Merchant initiates the load request using the PG Load API with mandatory fields like
clientTxnId,surl, andfurl - Customer completes the payment on the payment gateway page
- Upon completion:
- PayU redirects the customer to the
surlin case of success - If the transaction fails, the customer is redirected to the
furl
- PayU redirects the customer to the
- Callback parameters are sent to these URLs for final status tracking and reconciliation
Callback parameters
| Parameter | Description | Example |
|---|---|---|
merchantCodemandatory | Numeric (10) Merchant's unique ID provided by PayU for the load-money use case | 180012 |
accosaTransactionIdmandatory | Numeric (10) Unique Prepaid System transaction ID | 3591893 |
responseCodemandatory | Numeric (10) Response code for transaction outcome (00 indicates success) | 00 |
responseMessagemandatory | Numeric (10) Description of the response code | SUCCESS |
clientTxnIdmandatory | Numeric (10) Unique ID generated by the calling application | 56894 |
txnAmountoptional | Numeric (10) Original order amount in implied decimals | 4100 |
loadAmountmandatory | Numeric (10) The actual amount loaded into the wallet | 4100 |
accosaRefNomandatory | Numeric (10) Auto-generated sequence number | 424 |
statusmandatory | String Transaction status (SUCCESS, FAILED) | SUCCESS |
checksummandatory | String Used for data integrity verification. You have to implement the following logic to calculate checksum to cross evaluate with one shared in surl/furl | 900a98e04b4abc61 0bd0cb5623a470a4b0 d821d85551ae3baa410 11536cfe6b9 |
Sample callback response
When the transaction is completed, PayU sends the following parameters to your success or failure URL:
status=SUCCESS&AccosaRefNo=12321234&accosaTransactionId=1487&responseCode=00&responseMessage=Success&merchantCode=Vb007&clientTxnId=2023LOAD10000000003&txnAmount=1000&checksum=900a98e04b4abc610bd0cb5623a470a4b0d821d85551ae3baa41011536cfe6b9&loadAmount=4100
Checksum verification
To ensure the integrity of the callback data, a checksum is included in the callback parameters. The merchant should validate this checksum to confirm the authenticity of the response.
Checksum logic: The checksum is calculated using the same algorithm and salt as used in the request hash calculation. You have to implement the following checksum logic:
ChecksumString: merchantCode|clientTxnId|loadAmount|accosaRefNo|accosaTransactionId|responseCode|responseMessage|merchantSalt Checksum: sha512(ChecksumString)
Success and Failure Handling
Success scenario
When a transaction is successful:
- The customer is redirected to the
surlprovided in the original request - The
responseCodewill be "00" - The
statuswill be "SUCCESS" - The wallet will be credited with the amount specified in
loadAmount
Failure scenario
When a transaction fails:
- The customer is redirected to the
furlprovided in the original request - The
responseCodewill not be "00" - The
statuswill be "FAILED" - An appropriate error message will be included in the
responseMessageparameter
