Skip to main content

Printable Bills

info

The capabilities mentioned on this page must be registered with the EPOS Capabilities API prior to initiating a Pay At Table flow, learn more here.

Capability

GetOrderBill

Pay at Table

GET REST /v1/orders/{orderId/bill}

REQUEST
RESPONSE
WS GetOrderByIdV1

This capability allows the terminal to request a Bill - a printable version of the Order. The EPOS can customise the fields and layout of the Bill on a per request basis.

Overview

If the GetOrderBill capability has been set for an account, at anytime during the Pay at Table flow, the payment device can request a "printable bill" - a nicely formatted view of an Order, designed to be shown to the merchant, physcially or digitally.

Implementing this feature will improve the payment flow for merchants and customers, allowing them to give out itemised bills, with logos, websites, QR codes etc without needing to walk back to the EPOS each time.

Full Example

Bill Sections

There are several pre-defined bill sections defined in this API, simplifying the design and layout of bills. However if more control is desired, there are more flexible sections that give complete freedom to the EPOS to dictate the design and layout.

The Header and Footer elements in bill wrap the Order, which is the same object returned in the Get Order by ID request. The Header and Footer are both arrays of Lines. In a line ensure you specify the lineType and populate the corresponding field in that object. Some examples are below.

Predefined Sections

Logo and Image

The Logo and Image line types are similar, both taking an SVG. However a Logo will always appear at the top of the bill, whereas an Image will be in the order it is defined in, and allows for Left, Right or Center alignment. In the example below the Logo would be placed at the top, and the Image would be left aligned.

{
"logo": {
"svgImage": "<svg viewBox='0 0 389 100' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M146.7 100C119.754 100 97.8318 77.5807 97.8318 50.0245C97.8318 22.4682 119.754 0.0489248 146.7 0.0489248C173.645 0.0489248 195.568 22.4682 195.568 50.0245C195.568 77.5807 173.645 100 146.7 100ZM146.616 17.6737C129.155 17.6737 114.946 32.204 114.946 50.0612C114.946 67.9183 129.155 82.4486 146.616 82.4486C164.078 82.4486 178.286 67.9183 178.286 50.0612C178.286 32.204 164.078 17.6737 146.616 17.6737ZM339.182 100C312.237 100 290.314 77.5807 290.314 50.0245C290.314 22.4682 312.237 0.0489248 339.182 0.0489248C366.128 0.0489248 388.05 22.4682 388.05 50.0245C388.05 77.5807 366.128 100 339.182 100ZM339.098 17.6737C321.637 17.6737 307.429 32.204 307.429 50.0612C307.429 67.9183 321.637 82.4486 339.098 82.4486C356.56 82.4486 370.768 67.9183 370.768 50.0612C370.768 32.204 356.56 17.6737 339.098 17.6737ZM17.5212 100C7.85764 100 0 91.9643 0 82.0817V17.9795C0 8.09687 7.85764 0.0489248 17.5212 0.0489248H38.2716C65.2172 0.0489248 87.1397 22.4682 87.1397 50.0245C87.1397 77.5807 65.2172 100 38.2716 100H17.5212ZM17.4136 17.6676C17.4136 17.6709 17.4108 17.6737 17.4075 17.6738C17.2907 17.677 17.1983 17.7736 17.1983 17.8938V82.2285C17.1983 82.3508 17.294 82.4486 17.4136 82.4486H37.853C55.3742 82.4486 69.7739 68.0651 69.9414 50.3792C70.0251 41.683 66.7601 33.476 60.7682 27.275C54.7643 21.0739 46.7751 17.6615 38.2716 17.6615H17.4197C17.4163 17.6615 17.4136 17.6642 17.4136 17.6676V17.6676ZM242.917 100C252.688 100 261.885 96.0983 268.822 89.0166C275.747 81.9349 279.562 72.5171 279.562 62.5245L279.61 2.66634C279.61 1.19863 278.438 0 277.003 0H264.995C263.56 0 262.388 1.19863 262.388 2.66634L262.34 62.5245C262.34 73.4711 253.621 82.3875 242.917 82.3875H242.618C232.081 82.2285 223.494 73.1654 223.494 62.2065V51.4432C223.494 49.9755 222.322 48.7769 220.887 48.7769H208.879C207.444 48.7769 206.272 49.9755 206.272 51.4432V62.1208C206.272 82.8889 222.621 99.8777 242.702 100H242.917Z' fill='#180F06'></path></svg>"
},
"lineType": "Logo"
}
{
"image": {
"svgImage": "<svg viewBox='0 0 389 100' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M146.7 100C119.754 100 97.8318 77.5807 97.8318 50.0245C97.8318 22.4682 119.754 0.0489248 146.7 0.0489248C173.645 0.0489248 195.568 22.4682 195.568 50.0245C195.568 77.5807 173.645 100 146.7 100ZM146.616 17.6737C129.155 17.6737 114.946 32.204 114.946 50.0612C114.946 67.9183 129.155 82.4486 146.616 82.4486C164.078 82.4486 178.286 67.9183 178.286 50.0612C178.286 32.204 164.078 17.6737 146.616 17.6737ZM339.182 100C312.237 100 290.314 77.5807 290.314 50.0245C290.314 22.4682 312.237 0.0489248 339.182 0.0489248C366.128 0.0489248 388.05 22.4682 388.05 50.0245C388.05 77.5807 366.128 100 339.182 100ZM339.098 17.6737C321.637 17.6737 307.429 32.204 307.429 50.0612C307.429 67.9183 321.637 82.4486 339.098 82.4486C356.56 82.4486 370.768 67.9183 370.768 50.0612C370.768 32.204 356.56 17.6737 339.098 17.6737ZM17.5212 100C7.85764 100 0 91.9643 0 82.0817V17.9795C0 8.09687 7.85764 0.0489248 17.5212 0.0489248H38.2716C65.2172 0.0489248 87.1397 22.4682 87.1397 50.0245C87.1397 77.5807 65.2172 100 38.2716 100H17.5212ZM17.4136 17.6676C17.4136 17.6709 17.4108 17.6737 17.4075 17.6738C17.2907 17.677 17.1983 17.7736 17.1983 17.8938V82.2285C17.1983 82.3508 17.294 82.4486 17.4136 82.4486H37.853C55.3742 82.4486 69.7739 68.0651 69.9414 50.3792C70.0251 41.683 66.7601 33.476 60.7682 27.275C54.7643 21.0739 46.7751 17.6615 38.2716 17.6615H17.4197C17.4163 17.6615 17.4136 17.6642 17.4136 17.6676V17.6676ZM242.917 100C252.688 100 261.885 96.0983 268.822 89.0166C275.747 81.9349 279.562 72.5171 279.562 62.5245L279.61 2.66634C279.61 1.19863 278.438 0 277.003 0H264.995C263.56 0 262.388 1.19863 262.388 2.66634L262.34 62.5245C262.34 73.4711 253.621 82.3875 242.917 82.3875H242.618C232.081 82.2285 223.494 73.1654 223.494 62.2065V51.4432C223.494 49.9755 222.322 48.7769 220.887 48.7769H208.879C207.444 48.7769 206.272 49.9755 206.272 51.4432V62.1208C206.272 82.8889 222.621 99.8777 242.702 100H242.917Z' fill='#180F06'></path></svg>"
"align": "AlignLeft"
},
"lineType": "Image"
}

Merchant information

We provide predefined fields for merchant information:

  • MerchantEmailAddress
  • MerchantName
  • MerchantPhoneNumber
  • MerchantAddress

These will all be preformatted and simply require the fields to be populated.

URL

The URL object allows a website to be displayed in multiple forms. Set the URL and optionally a description for extra text and then decide if it should be displayed as a QR code (which we will generate) or printed URL. This allows you to link out to surveys, loyalty schemes or a website.

For example, this would display this website as a QR code and a description.

{
"url": {
"url": "https://docs.dojo.tech/",
"description": "Visit our website!",
"showQR": true,
"showURL": false
},
"lineType": "URL"
}

Tax

We allow a tax number to be displayed, however you must set the name of the tax too. It is your responsibility to ensure the bill is a valid tax receipt for the market you're operating in.

{
"taxNumber": {
"name": "VAT",
"number": "12345678"
},
"lineType": "TaxNumber"
}

Horizontal Lines

A horizonal line can be used to create a divider across the width of the bill. There are Single and Double lines.

Custom Sections

Free Text

This field allows text to be input, customising the size, weight and alignment. For example, this will be displayed as the largest text size, and aligned in the center.

{
"text": {
"value": "Thank you for your business!",
"size": "Header1",
"align": "Center"
},
"lineType": "Text"
}