Sample Success Response
{
"success": true,
responseCode": null,
"message": "Order created successfully. Notification is being sent.",
"data": "https://test.amwalpg.com:19443/705DYDY7RL",
"errorList": null
}
Success Parameters description
Field Name | Field Type | Description | Sample Value |
---|---|---|---|
success | Boolean | Indicates whether the request was successful. | True |
Response Code | Numeric | This is the response code from API. | 02 |
message | String | Message describing the result of the request. | Order created successfully. Notification is being sent. |
data | String | Payment link URL. | https://test.amwalpg.com:19443/705DYDYRL |
Secure Hash Generation #
3.1 Step 1: Prepare the Data
• Gather all the necessary parameters for the payment request.
• Validate and sanitize the data to prevent potential security risks.
3.2 Step 2: Generate the Secure Hash
• Sort the data parameters alphabetically by key.
• Concatenate the sorted key-value pairs into a string in the format key=value. • Obtain your Merchant Secure Key provided by Amwal Payment Gateway.
• Concatenate the string from step 2 with the Merchant Secure Key.
• Use the SHA-256 algorithm to hash the concatenated string.
• The resulting hash is the secure hash for the transaction.
• Your string to generate the secure hash will look something like this: amount=0.111&billerRefNumber=¤cy=512&emailNotificationValue=test@amwalpay.com&expireDateTime=&maxNumberOfPayment=100&merchantId=7921¬ificationMethod=1&payerName=Amr&paymentMethod=9&paymentViewType=1&red irectUrl=&terminalId=221143
NOTE: Make sure you create the string based on the data you will send to the API Request. Whatever data is there in the API request should also be there to generate secure hash.
3.3 Step 3: Send the Payment Request
• Include both the original data and the calculated SHA-256 hash in your payment request to Amwal Payment Gateway.