Configuration #
This section describes the parameters you need to configure before submitting the payment request. Below is a table of all the required parameters:
| Field Name | Mandatory | Field Type | Constraints | Description | Sample Value |
|---|---|---|---|---|---|
| customerId | Yes | String | Length: 1–36 | Unique identifier for the customer. Received when the customer checks “save card” option. The completeCallBack will hold the customerId value. | 7267684c-3600-403e-81c7-87d778496e28 |
| merchantId | Yes | Numeric | Length: 1–30 | AMWAL Payment Gateway MerchantID | 189903 |
| requestDateTime | Yes | String | DateTime | Request Date Time | “2023-11-12T10:38:39.92000Z” |
| secureHashValue | Yes | String | See section “Generate The Secure Hash” | Secure Hash Value | “84EB3BF62F25717D1E9E13C3CFB719A890980BF2631AFB8965182ADE1754” |
NOTE: Ensure that the requestDateTime matches the server time closely to avoid security validation errors.
Acquiring Session Token #
The Customer/GetSmartboxDirectCallSessionToken API provides a session token that merchants can use to access a customer’s saved cards for recurring payments. Merchants should acquire and store the customerId when the customer first chooses to save their card during payment.
URLs:
- Production: https://webhook.amwalpg.com/Customer/GetSmartboxDirectCallSessionToken
- SIT: https://test.amwalpg.com:24443/Customer/GetSmartboxDirectCallSessionToken
- UAT: https://test.amwalpg.com:14443/Customer/GetSmartboxDirectCallSessionToken
Sample Request
Method: POST
Content Type: application/json
Authentication: Secure Hash (secureHashValue)
POST /Customer/GetSmartboxDirectCallSessionToken
Content-Type: application/json
{
/*customer id is the value that merchant received with the response of
the first transaction execution and with request to enable save card
checkbox at the Payment Page, the complete call back will hold the
customer Id value.
The unique CustomerId should be received in the response so that
merchant can save and use it here to generate a private session token
for the next payment.
This session token should allow the customer to see his saved cards in
order to choose from them and proceed with payment*/
"customerId":"7267684c-3600-403e-81c7-87d778496e28",
"merchantId": 7921,
"requestDateTime": "2023-11-12T10:38:39.92000Z",
"secureHashValue":"84EB3BF8F62EF25717D1E9E13C3CFB719A890980BBF2631AFD
8965182ADE1754"
}
Sample Response #
If the request is successful, the response will include a sessionToken, allowing the customer to view and select from their saved cards
{
"success": true,
"responseCode": "00",
"message": "Success",
"data": {
"sessionToken":
"eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0..w__uUsJEv6GYqWSAbSHl4
w.g44u9CS3hFSYe3DWaixF3rITecIognMFIAgg7eQUBLl7EUR76acc2km4xwfKKLJuFtZbR4A4I7JgJX3jFE
qxgfERYEvbS-
},
"errorList": []
}
