{
  "id": 1266349,
  "title": "Build a POS receipt printer in Node.js",
  "url": "https://urgent.news/2026/08/16/build-a-pos-receipt-printer-in-node-js",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-16T12:27:34.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sepcy/build-a-pos-receipt-printer-in-nodejs-31li"
  },
  "original_language": "en",
  "account": "In this tutorial, a Node.js service is created to print orders on a thermal printer at a point of sale. The printer is identified by a printer ID, and an API key is required to authenticate requests. The service uses TypeScript but can also be written in plain JavaScript.\n\nTo begin, the shape of an order must be defined, which includes the item name, quantity, unit price in cents, and the order ID, placed date, and list of line items. Using cents for monetary values helps avoid floating-point rounding issues.\n\nNext, the order is rendered as HTML. Receiptful converts this HTML into ESC/POS commands specific to the printer, allowing for a custom layout using familiar HTML tags. Helper functions are provided to format monetary values.\n\nFinally, the rendered HTML is sent to the printer using a POST request to the printer's job endpoint. The request includes headers for authentication and content type. Upon successful completion, the job ID is returned, indicating that the receipt is being printed.",
  "summary": "Disclosure: I build Receiptful, the printing API used in this tutorial. The Node and Express parts apply whatever you print with. You have orders coming into your point of sale, and you want each one to print on the thermal printer at the counter. This is a complete walkthrough of a small Node service that does exactly that. By the end you will have an endpoint you can POST an order to and watch…",
  "key_points": [
    "Node.js service created for POS receipt printing",
    "Printer identified by printer ID and API key",
    "Order data rendered as HTML for custom layout"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}