FILTER BY TAG

Custom Printing

Use this information to send a custom print request in Cloud mode. This feature enables you to print custom content directly to the integrated printer of a PAX terminal, including text, label-value pairs, images, barcodes, and QR codes.
IMPORTANT
The Custom Printing feature does not affect your configuration for printing standard customer or merchant receipts.
Generate a bearer token before sending each request. For more information, see Generating a Bearer Token for Authentication.

Endpoints

Test:
POST https://terminalstest.visaacceptance.com/v1/cloud/transactions
Production:
POST https://terminals.visaacceptance..com/v1/cloud/transactions

Required Fields for Custom Printing

serialNumber
Set this field to the serial number of the terminal.
request.type
Set this field to
CustomPrintRequest
.
request.printLayout.sections
Set this field to a list of one or more print sections. Each section must include a
sectionType
field to identify the type of custom content to print.

Required Fields for Custom Printing by Section Type

Use these fields to define the required content for each custom print section in the
request.printLayout.sections
field. Each section in this field must include a
sectionType
field that identifies the type of content to print. The
request.printLayout.sections
field supports these
sectionType
values:
TEXT
,
BARCODE
,
IMAGE
, and
SPACER
. These values are case sensitive.

TEXT
Section

request.printLayout.sections[n].sectionType
Set this field to
TEXT
.
request.printLayout.sections[n].textContent.textType
Set this field to identify the type of text content. Supported values are
PARAGRAPH
,
LABEL_VALUE
, and
NO_LINE
.

TEXT
Section:
PARAGRAPH
Text Content Required Fields

request.printLayout.sections[n].textContent.lines
Set this field to a list of one or more strings to print as paragraph lines.

TEXT
Section:
LABEL_VALUE
Text Content Required Fields

request.printLayout.sections[n].textContent.content
Set this field to a list of one or more label-value pairs.
request.printLayout.sections[n].textContent.content[n].label.labelText
Set this field to the label text string.
request.printLayout.sections[n].textContent.content[n].value.valueText
Set this field to the value text string.

BARCODE
Section

request.printLayout.sections[n].sectionType
Set this field to
BARCODE
.
request.printLayout.sections[n].content
Set this field to the data to encode in the barcode.
request.printLayout.sections[n].barcodeType
Set this field to the barcode format. Supported values are
CODE39
,
CODE128
,
EAN13
,
EAN128
,
PDF417
, and
QRCODE
.

IMAGE
Section

request.printLayout.sections[n].sectionType
Set this field to
IMAGE
.
request.printLayout.sections[n].imageData
Set this field to a Base64-encoded image. Supported formats are
PNG
,
JPEG
, and
BMP
. The maximum image width and height is 384 pixels.

SPACER
Section

request.printLayout.sections[n].sectionType
Set this field to
SPACER
.

Optional Fields for Custom Printing

Use these fields to define optional content and formatting for custom print sections in the
request.printLayout.sections
field. Optional fields are supported for
TEXT
and
SPACER
sections.
IMPORTANT
If you do not specify the value for an optional field, the default value is used.

TEXT
Section:
PARAGRAPH
Optional Fields

request.printLayout.sections[n].textContent.align
Set this field to
LEFT
,
CENTER
, or
RIGHT
. The default value is
LEFT
.
request.printLayout.sections[n].textContent.textStyle.size
Set this field to
SMALL
,
MEDIUM
, or
LARGE
. The default value is
MEDIUM
.
request.printLayout.sections[n].textContent.textStyle.style
Set this field to
NORMAL
or
EMPHASIZE
. The default value is
NORMAL
.

TEXT
Section:
LABEL_VALUE
Optional Fields

request.printLayout.sections[n].textContent.content[n].label.textStyle.size
Set this field to
SMALL
,
MEDIUM
, or
LARGE
. The default value is
MEDIUM
.
request.printLayout.sections[n].textContent.content[n].label.textStyle.style
Set this field to
NORMAL
or
EMPHASIZE
. The default value is
NORMAL
.
request.printLayout.sections[n].textContent.content[n].value.textStyle.size
Set this field to
SMALL
,
MEDIUM
, or
LARGE
. The default value is
MEDIUM
.
request.printLayout.sections[n].textContent.content[n].value.textStyle.style
Set this field to
NORMAL
or
EMPHASIZE
. The default value is
NORMAL
.

SPACER
Section Optional Fields

request.printLayout.sections[n].lines
Set this field to the number of blank lines to insert. The default value is
1
.

REST Example: Custom Printing

Request
{ "serialNumber": "1850000000", "request": { "type": "CustomPrintRequest", "printLayout": { "sections": [ { "sectionType": "TEXT", "textContent": { "textType": "PARAGRAPH", "lines": ["ACME STORE", "123 Main St"], "align": "CENTER", "textStyle": { "size": "LARGE", "style": "NORMAL" } } }, { "sectionType": "IMAGE", "imageData": "iVBORw0KGgoAAAANS..." }, { "sectionType": "SPACER", "lines": 1 }, { "sectionType": "TEXT", "textContent": { "textType": "LABEL_VALUE", "content": [ { "label": { "labelText": "Subtotal", "textStyle": { "size": "MEDIUM", "style": "NORMAL" } }, "value": { "valueText": "$23.45", "textStyle": { "size": "MEDIUM", "style": "NORMAL" } } }, { "label": { "labelText": "Total", "textStyle": { "size": "LARGE", "style": "NORMAL" } }, "value": { "valueText": "$25.99", "textStyle": { "size": "LARGE", "style": "NORMAL" } } } ] } }, { "sectionType": "BARCODE", "content": "TXN123456789", "barcodeType": "CODE128" } ] } } }
Response to a Successful Request
{ "type": "CustomPrintResponse", "message": "Custom Print successfully" }
Response to an Unsuccessful Request
When the request is unsuccessful, you receive an error response with details.
{ "type": "ErrorResponse", "message": "Error message to display.", "developerDescription": "Detailed description of error." }