Overview
The print command allows you to create a custom receipt that can be printed on terminals that have a built-in printer. The printData within the request body contains the data to be printed. The printData must be ISO-8895-1 encoded.
The printData can be formatted using control characters. Control characters must be in front of the data strings. They are in effect until another control character or “new line” (\n) is encountered.
Below is a list of the supported control characters:
- \1 - Small font
- \3 - Large font, to be used for section headers, like “Daily Summary”, “Details by Card Type” and card titles like “Visa”, “Debit”, etc
- \B - Bold
- \I - Inverse
- \L - Left alignment
- \C - Center alignment
- \R - Right alignment
- \n - New line
Sample String:
"\3\CCard Details\n" //centered large font
"----------------------------------\n" //full width separator line
"\LTransaction\RCount\RVolume\n" + //three columns
"----------------------------------\n"
"\LPurchase\R150\R$123.45\n" +
"\LRefund\R1\R$ 1.23\n" +
"\LCorrections\R30\R$1.23\n" List of coding scenarios that use this endpoint:
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 | Destination Terminal ID | F8 | Optional |
| action | String | "print" | V50 | Required |
| printData | String | Print data that needs to be printed by the terminal. Note: Data must be ISO-8895-1 encoded. | V10000 | Required |
| progressStatus | String | If value is set to "True", terminal will return progress to POS. Note: This feature is only available on Direct Integration. | V5 | Optional |
| addHeader | String | "true" or "false" (Default: false) | V5 | Optional |
| addFooter | String | "true" or "false" (Default: false) | V5 | Optional |
Request example
{
"apiVersion": "3.0",
"istConfigCode": "example_istConfigCode",
"dataId": "example_dataId",
"dataTimestamp": "1969-12-31 23:59:59",
"data": {
"request": [
{
"idempotencyKey": "example_idempotencyKey",
"action": "print",
"printData": "example_printData"
}
]
}
}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 | 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 | — | — |
| response | Array | Contains data applicable to transaction request | — | — |
| idempotencyKey | String | Unique transaction identifier to avoid duplicate request | V50 | Required |
| action | String | "print" | 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 |
Response example
{
"receipt": {
"apiVersion": "3.0",
"statusCode": "example_statusCode",
"status": "example_status",
"dataId": "example_dataId",
"dataTimestamp": "1969-12-31 23:59:59",
"data": {
"response": [
{
"terminalId": "example_terminalId",
"cloudTicket": "example_cloudTicket",
"idempotencyKey": "example_idempotencyKey",
"statusCode": "example_statusCode",
"status": "example_status",
"completed": "true",
"action": "print"
}
]
}
}
}Errors
If your response contains errors, visit the Errors page for a detailed description of each one.

