Reconciliation
Use the Reconciliation API to reconcile terminal transactions and retrieve detailed reconciliation reports.
GET
{{url}}/api/v1.1/transactions/terminal-reconciliation/by-mada-id/{terminalId}Headers
Authorization: Bearer {{accessToken}}(Include the token obtained from the Authentication API)
- Parameters
- Response
This endpoint takes a single path parameter — no request body is required.
| Parameter | Type | Required | Description |
|---|---|---|---|
terminalId | string | Yes | The 16 digit unique TID of the terminal to reconcile, in the URL path. |
A successful request returns a JSON object containing reconciliation details:
Key Attributes
| Field | Type | Description |
|---|---|---|
success | Boolean | Indicates if the reconciliation process was successful. |
message | String | Human-readable status message of the reconciliation. |
data.id | Integer | Unique identifier for the reconciliation attempt. |
data.bankId | String | Code of the acquiring bank (e.g., RAJB). |
data.merchantId | String | Unique merchant identifier assigned by the bank. |
data.madaTerminalId | String | Terminal ID used for the Mada network. |
data.mcc | String | Merchant Category Code (MCC). |
data.stan | String | System Trace Audit Number — a unique identifier for the reconciliation request. |
data.version | String | Version of the reconciliation protocol or application used. |
data.rrn | String | Retrieval Reference Number associated with the reconciliation session. |
data.transactionTypeEn | String | Transaction type in English (e.g., "Reconciliation"). |
data.transactionTypeAr | String | Transaction type in Arabic (e.g., "موازنة"). |
data.status | String | Describes reconciliation status (e.g., "COMPLETED IN BALANCE"). |
data.startDateTime | String (timestamp) | Start time of the reconciliation session (UNIX epoch in milliseconds). |
data.endDateTime | String (timestamp) | End time of the reconciliation session. |
data.scheduledTime | String / null | If reconciliation was scheduled, this shows the scheduled time. |
data.executionTime | String / null | Actual time of execution if scheduled. |
data.reconTotals | Array | List of scheme-wise totals from both host and terminal for reconciliation. |
Example Response
{
"success": true,
"message": "Reconciliation success",
"data": {
"id": 29987,
"uuid": "47c1225c-3f3e-42a6-8203-f8d304361da0",
"date": null,
"bankId": "RAJB",
"merchantId": "800800587981",
"madaTerminalId": "1580462801642226",
"mcc": "4816",
"stan": "000165",
"version": "1.2.57",
"rrn": null,
"transactionTypeEn": "Reconciliation",
"transactionTypeAr": "موازنة",
"status": "00:500",
"startDateTime": "11/07/2026 03:18:23",
"endDateTime": "11/07/2026 03:18:23",
"scheduledTime": "2026-07-11T03:18:23.758536",
"executionTime": null,
"reconTotals": [
{
"id": 31,
"channel": {
"id": 1,
"nameAr": "مدى",
"nameEn": "mada HOST"
},
"cardScheme": null,
"countCr": 0,
"countDb": 1,
"totalAmountCr": null,
"totalAmountDb": 0.50
},
{
"id": 32,
"channel": {
"id": 1,
"nameAr": "مدى",
"nameEn": "mada HOST"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": 0.00,
"totalAmountDb": null
},
{
"id": 33,
"channel": {
"id": 1,
"nameAr": "مدى",
"nameEn": "mada HOST"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 34,
"channel": {
"id": 1,
"nameAr": "مدى",
"nameEn": "mada HOST"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 35,
"channel": {
"id": 1,
"nameAr": "مدى",
"nameEn": "mada HOST"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 36,
"channel": {
"id": 1,
"nameAr": "مدى",
"nameEn": "mada HOST"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 37,
"channel": {
"id": 2,
"nameAr": "الجهاز",
"nameEn": "POS TERMINAL"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": 0.00
},
{
"id": 38,
"channel": {
"id": 2,
"nameAr": "الجهاز",
"nameEn": "POS TERMINAL"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": 0.00,
"totalAmountDb": null
},
{
"id": 39,
"channel": {
"id": 2,
"nameAr": "الجهاز",
"nameEn": "POS TERMINAL"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 40,
"channel": {
"id": 2,
"nameAr": "الجهاز",
"nameEn": "POS TERMINAL"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 41,
"channel": {
"id": 2,
"nameAr": "الجهاز",
"nameEn": "POS TERMINAL"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 42,
"channel": {
"id": 2,
"nameAr": "الجهاز",
"nameEn": "POS TERMINAL"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 43,
"channel": {
"id": 3,
"nameAr": "",
"nameEn": "POS TERMINAL DETAILS"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 44,
"channel": {
"id": 3,
"nameAr": "",
"nameEn": "POS TERMINAL DETAILS"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 45,
"channel": {
"id": 3,
"nameAr": "",
"nameEn": "POS TERMINAL DETAILS"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 46,
"channel": {
"id": 3,
"nameAr": "",
"nameEn": "POS TERMINAL DETAILS"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
},
{
"id": 47,
"channel": {
"id": 3,
"nameAr": "",
"nameEn": "POS TERMINAL DETAILS"
},
"cardScheme": null,
"countCr": 0,
"countDb": 0,
"totalAmountCr": null,
"totalAmountDb": null
}
]
}
}
Usage Tips
- Terminal ID: Ensure the
terminalIdin the path is valid and matches an active terminal. - Reconciliation Status: Monitor the
statusfield to confirm if reconciliation is successfully completed and whether it resulted in a balance or unbalanced status. - Scheme Balancing: Check
reconTotalsfor payment scheme-specific balancing insights.
Error Handling
If the reconciliation request fails, an error response may be returned:
| Error Scenario | Possible Message | Action Required |
|---|---|---|
| Invalid Token | Unauthorized | Re-authenticate to obtain a valid token. |
| Missing Terminal ID | Bad Request | Include the terminalId in the URL path. |
| Invalid Terminal ID | Terminal Not Found | Verify the terminalId is correct. |