Overview #
The Transactions Summary API allows merchants to retrieve a summary of transactions for a specified date range.
The response provides key transaction and balance information, including the total sales amount, number of transactions, available balance, and currency identifier.
Environment #
| Environment | Base URL |
|---|---|
| UAT / Stage | https://test.amwalpg.com:14443 |
| Production | https://webhook.amwalpg.com |
Endpoint #
POST
/Transaction/GetTransactionSummary
Content Type #
application/json
Request #
Request Headers #
| Header | Required | Value |
|---|---|---|
Content-Type | Yes | application/json |
Request Method #
POST
Sample Request #
{
"merchantId": 74417,
"dateFrom": "08/05/2024",
"dateTo": "09/10/2024",
"secureHashValue": "651697ABFFAAA4A5FC99695E07C4BE695D5AA269E65C28702409715F873AA3C3"
}
Request Parameters #
| Field | Required | Type | Constraints | Description | Example |
|---|---|---|---|---|---|
merchantId | Yes | Numeric | Maximum 19 characters | Unique identifier of the merchant. | 74417 |
dateFrom | Yes | String | Valid date in dd/MM/yyyy format | Start date used to filter transactions. | 08/05/2024 |
dateTo | Yes | String | Valid date in dd/MM/yyyy format | End date used to filter transactions. | 09/10/2024 |
secureHashValue | Yes | String | — | Secure hash value used to validate the integrity and authenticity of the request. | 651697ABFFAAA4A5FC99695E07C4BE695D5AA269E65C28702409715F873AA3C3 |
Date Format: Both
dateFromanddateTomust be provided indd/MM/yyyyformat.
Response #
Successful Response #
When the request is processed successfully, the API returns success: true and response code 00.
Sample Success Response #
{
"success": true,
"responseCode": "00",
"message": "Success",
"data": {
"totalSale": 4,
"totalSaleFormatted": "4.000",
"numberOfTransactions": 2,
"availableBalance": 1.69,
"availableBalanceFormatted": "1.690",
"currencyId": 512
},
"errorList": []
}
Success Response Parameters #
| Field | Type | Description | Example |
|---|---|---|---|
success | Boolean | Indicates whether the request was processed successfully. | true |
responseCode | String | Response code returned by the API. | 00 |
message | String | Response message describing the result. | Success |
data | Object | Contains the transaction summary and balance information. | Object |
data.totalSale | Numeric | Total amount of executed sale transactions for the requested date range. | 1000 |
data.totalSaleFormatted | String | Formatted total amount of executed sale transactions. | 1000.000 |
data.numberOfTransactions | Numeric | Total number of executed transactions for the requested date range. | 4 |
data.availableBalance | Numeric | Available merchant balance. | 1994 |
data.availableBalanceFormatted | String | Formatted available merchant balance. | 1994.000 |
data.currencyId | Numeric | Currency identifier associated with the transaction summary. | 512 |
errorList | String Array | List of errors. This should be empty for a successful response. | [] |
Failure Response #
If the request cannot be processed, the API returns success: false along with a response code and an errorList describing the failure.
Sample Failure Response #
{
"success": false,
"responseCode": "02",
"message": "Merchant Not Found",
"data": null,
"errorList": [
"Merchant Not Found"
]
}
Failure Response Parameters #
| Field | Type | Description | Example |
|---|---|---|---|
success | Boolean | Indicates whether the request was processed successfully. | false |
responseCode | String | Response code returned by the API. | 02 |
message | String | Response or error message describing the failure. | Merchant Not Found |
data | Object | Transaction summary data. This is typically null when the request fails. | null |
errorList | String Array | List containing one or more errors describing the failure. | ["Merchant Not Found"] |
Common Failure Example #
Merchant Not Found #
{
"success": false,
"responseCode": "02",
"message": "Merchant Not Found",
"data": null,
"errorList": [
"Merchant Not Found"
]
}
The Merchant Not Found error indicates that the supplied merchantId could not be identified or is not valid for the requested operation.
Transaction Summary Flow #
The Transactions Summary process follows these steps:
- The merchant provides the
merchantId. - The merchant specifies the required transaction date range using
dateFromanddateTo. - The merchant generates the required
secureHashValue. - The request is submitted to the
Transaction/GetTransactionSummaryendpoint. - The API validates the merchant and request parameters.
- If successful, the API returns the transaction summary for the specified date range.
- The response includes the total sales amount, transaction count, available balance, and currency identifier.
- If the request fails, the API returns the relevant response code and error details.
