📤 Process Response
🔍 Understanding Payment Response
📤
Response Processing
The response returned from the Payment Gateway contains encrypted data in a field called data
. This data is encrypted using the same AES encryption with your IV & Secret Keys and must be decrypted using the HesabeCrypt library's decrypt function.
📄 Sample Response Structure
Here's an example of a successful payment response after decryption:
{
"status": true,
"code": 1,
"message": "Transaction Success",
"response": {
"data": {
"resultCode": "CAPTURED",
"amount": 10,
"paymentToken": "1569830677725743478",
"paymentId": "100201927384634224",
"paidOn": "2019-09-30 11:05:16",
"orderReferenceNumber": null,
"variable1": null,
"variable2": null,
"variable3": null,
"variable4": null,
"variable5": null,
"method": 1,
"administrativeCharge": "5"
}
}
}
📊 Response Parameters Reference
🌐 Common REST API Status Codes
These widely used HTTP status codes are relevant to REST API operations and represent standard responses from the server regarding the outcome of HTTP requests.
⚠️ Custom Application Error Codes
Application-specific error codes used to identify and describe issues related to merchant transactions, authentication, authorization, and payment processing. Each code corresponds to a unique system error or validation failure.