question

Michael Ongaro avatar image
Michael Ongaro asked bryanvargas answered

How to create and send an order to a receipt printer through the Print API

Hello, I am a web developer that has made a site for a restaurant that has built-in custom online ordering on the website. The orders are processed through Stripe, and I was wondering if there was a more customizable way to send the order details to the kitchen's printer through the REST API.


I have had limited success creating orders with the Create Atomic Order and Create custom order endpoints in combination with the Print endpoint in achieving what I want in terms of formatting the receipt. Since I was not able to get line items to properly group together (aka two of the same item being ordered showed: "Item One" and "Item One" instead of "2 Item One"), I used "\n" linebreaks within the "note" field to add my required information on the receipt.


I was wondering if it's natively possible to group line items if they are the same, show the prices of the line items, show a section below for subtotal, tax, and total prices respectively, and also include the business name and contact information at the top of receipts printed from the REST API.


For reference: the left receipt is the close-to-default output just creating and printing an atomic order, while the right receipt is my workaround with linebreaks inside of the "note" field.

unnamed-min-1.jpg

Thank you immensely for your time and help.

Sincerely,

Michael Ongaro

OrdersREST APIPrint
unnamed-min-1.jpg (261.8 KiB)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
bryanvargas avatar image
bryanvargas answered

Hey, there is a groupLineItems boolean you can specify in your request: https://docs.clover.com/reference/ordercreateatomicorder
normally order receipts doesn't include the prices, or the business name, is there a reason why you need the order receipt to print the totals and the business name before payment?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community