Cancel Transaction
Overview
A transaction can be cancelled from the Point of Sale (POS) before the cardholder presents the card. Once the transaction has been processed, it cannot be cancelled.
List of coding scenarios that use this endpoint:
NOTE:
This is only available for the Direct Integration method and not for Cloud or App-to-app.
Request Structure
| Element | Type | Description | Size | Required |
|---|---|---|---|---|
| apiVersion | String | API version number | V20 | Required |
| istConfigCode | String | Moneris provided integration configuration code | V50 | Required |
| dataId | String | Merchant defined unique identifier for the data object | V50 | Required |
| dataTimestamp | String | Date and time of the request (YYYY-MM-DD HH:MM:SS) | F19 | Required |
| data | Object | Object that contains all transaction requests | — | — |
| request | Array | Contains data applicable to transaction request | — | — |
| idempotencyKey | String | Unique transaction identifier to avoid duplicate request | V50 | Required |
| terminalId | String | The ECR number of the particular Terminal you are addressing | F8 | Optional |
| action | String | "cancel" | V50 | Required |
{
"apiVersion": "3.0",
"istConfigCode": "example_istConfigCode",
"dataId": "example_dataId",
"dataTimestamp": "1969-12-31 23:59:59",
"data": {
"request": [
{
"idempotencyKey": "example_idempotencyKey",
"terminalId": "example_terminalId",
"action": "cancel"
}
]
}
}
Response Structure
| Element | Type | Description | Size | Required |
|---|---|---|---|---|
| apiVersion | String | API version number | V20 | Required |
| statusCode | String | Status code for the overall transaction request | V4 | Required |
| status | String | Description of the statusCode | V4 | Required |
| dataId | String | Merchant defined unique identifier for the data object | V50 | Required |
| dataTimestamp | String | Date and time of the request (YYYY-MM-DD HH:MM:SS) | F19 | Required |
| data | Object | Object that contains all transaction requests | — | — |
| response | Array | Contains data applicable to transaction request | — | — |
| idempotencyKey | String | Unique transaction identifier to avoid duplicate request | V50 | Required |
| action | String | "cancel" | V50 | Required |
| statusCode | String | Status code for individual request | V4 | Required |
| status | String | Description of the individual statusCode | V50 | Required |
| completed | String | "true" or "false" | V5 | Required |
{
"apiVersion": "3.0",
"statusCode": "example_statusCode",
"status": "example_status",
"dataId": "example_dataId",
"dataTimestamp": "1969-12-31 23:59:59",
"data": {
"response": [
{
"idempotencyKey": "example_idempotencyKey",
"statusCode": "example_statusCode",
"status": "example_status",
"completed": "true",
"action": "cancel"
}
]
}
}
Errors
If your response contains errors, visit the Errors page for a detailed description of each one.

