This document describes the process of creating a payment link using the Amwal Pay API. Amwal Pay utilizes Secure Hash Generation to ensure the integrity and authenticity of payment requests.
1.1 Purpose: This document serves as a guide for merchants integrating with Amwal Pay to generate payment links securely. It provides step-by-step instructions on how to create the payment link and how to calculate the secure hash and send it along with the payment request.
2 Usage
Stage: Base URL: https://test.amwalpg.com:14443
Endpoint: /MerchantOrder/CreatePaymentLink
Prod:
Base URL: https://webhook.amwalpg.com
Endpoint: /MerchantOrder/CreatePaymentLink
2.1 Description
This endpoint is to get the transaction summary.
2.2 Headers
Mandatory Content- Type application/json
2.3 Request
Request Type: POST
{
"billerRefNumber": "123456",
"payerName": "john doe",
"amount": 1.000,
"currency": 512,
"paymentMethod": 1,
"notificationMethod": 1,
"emailNotificationValue": "test@gmail.com",
"smsNotificationValue": "",
"terminalId": 1234,
"merchantId": 5678,
"expireDateTime": "",
"maxNumberOfPayment": 1,
"paymentViewType": 2,
"redirectUrl": "",
"secureHashValue": "604A45C8CD21EF1F0A4C6ADEBDEA03289C4399762FB7F7DF5F99CD6952791D59"
}
Parameters description
| Field Name | Mandatory | Field Type | Constraints | Description | Sample Value |
|---|---|---|---|---|---|
| billerRefNumber | No | Integer | – | Merchant’s reference number for the payment link. | 123 |
| payerName | Yes | String | – | Name of the payer. | John Doe |
| amount | Yes | Decimal | Minimum supported value is 0.100 | Amount to be paid. | 0.111 |
| currency | Yes | Integer | – | Currency code (e.g., 512 for OMR). | 512 |
| paymentMethod | Yes | Integer | – | Payment method ID. | 1 |
| notificationMethod | No | Integer | – | Notification method ID. | 1 = Email |
| emailNotificationValue | Yes | String | Valid email format | Email address for notifications. | maha@amwal-pay.com |
| SmsNotificationValue | No | String | Valid Mobile Number | Mobile Number of Payer | +96812341234 |
| terminalId | Yes | Integer | – | Terminal ID provided by Amwal Pay. | 221111 |
| merchantId | Yes | Integer | – | Merchant ID provided by Amwal Pay. | 711111 |
| expireDateTime | No | String | ISO 8601 date/time format | Date and time when the payment link expires (default = 1 month). | 2025-03-05T12:00:00Z |
| maxNumberOfPayment | No | Integer | Max: 999 (null for unlimited) | Maximum number of payments allowed. | 100 |
| paymentViewType | No | Integer | 1 = Pop-up, 0 = Full-Page | Payment view type ID. | 1 |
| redirectUrl | No | String | Valid URL format | URL to redirect to after payment. | https://www.example.com/success |
| secureHashValue | Yes | String | Length: 64 | Secure hash calculated as described in docs. | E3B2266EFED85DEF60CA881CB34FD94D… |
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 |
