Skip to content

Hardware: receipts, cash drawer, scanner, customer display, card readers ​

Receipt printers, cash drawers, scanners, customer displays and card readers are part of the Kuvex terminal and are addressed by the same terminal_id as payments. The integration sends structured data; Kuvex Runtime on the terminal drives the hardware and reports the result. No printer drivers, printer command streams, scanner listeners, reader integrations or model-specific code are required.

CapabilityEndpointResultSandbox behavior
Print a receiptPOST /v1/terminals/{id}/printWebhook print.succeeded / print.failed / print.delivery_unknownThe virtual terminal renders a paper strip
Open the cash drawerPOST /v1/terminals/{id}/cash-drawer/opencash_drawer on Retrieve a terminalThe virtual terminal reports the pulse as sent
Scan a barcode or QR codePOST /v1/terminals/{id}/scanSynchronous response, up to 30 secondsReturns a generated code immediately
Show the cart to the customerPUT /v1/terminals/{id}/display/cartGET on the same pathThe virtual terminal draws the cart
Take a card paymentPOST /v1/paymentsWebhook or Retrieve a paymentTap, Insert and Decline buttons

All capabilities on this page can be tested in the sandbox without hardware.

Prerequisites ​

  1. Create a sandbox session with POST /v1/sandbox/session or the button on the sandbox page. The response contains a test secret key (sk_test_…) and a terminal_id.
  2. Keep the virtual terminal tab open while testing.

The same operations are available in the SDKs:

OperationBrowser SDK (@kuvex/web)Server SDK (Node)
Printkuvex.print(receipt, paymentId)kuvex.terminals.print(id, params)
Scankuvex.scan()kuvex.terminals.scan(id)
Open the cash drawerkuvex.openCashDrawer()kuvex.terminals.openCashDrawer(id)
Push the cartkuvex.setCartDisplay(snapshot)kuvex.terminals.setCart(id, snapshot)
Retrieve the cartkuvex.getCartDisplay()kuvex.terminals.getCart(id)

Credentials:

CredentialPrint, scan, cash drawerCart, retrieve terminal
Secret keyYesYes
Browser session tokenYes, for the terminal it was issued forYes, for the terminal it was issued for
Host token (companion mode)No, 403 scope_forbidden; route these calls through the backendYes

Terminal connectivity:

  • Print, scan and cash drawer require the terminal to be online; otherwise the call returns 409 terminal_offline.
  • A cart is stored even while the terminal is offline and is delivered on reconnect if it has not expired. 202 on a cart push means stored, not displayed. A cart expires 5 minutes after it was stored; push the next revision to keep it.

Receipt printing ​

Print content is a structured receipt (lines and amounts), not an image or a printer command stream. The terminal lays it out for the printer available to it: the built-in printer, or an external network printer assigned to that terminal. The caller does not select the printer.

  1. Call Print with the receipt and, optionally, the related payment_id.
  2. The response is 202 with a print job in status dispatched: accepted and sent to the terminal, not yet printed.
  3. Read the final result from the print.* webhook (see Print result).
bash
curl https://api.kuvex.com/v1/terminals/$TERMINAL_ID/print \
  -H "Authorization: Bearer $KUVEX_KEY" -H "Content-Type: application/json" \
  -d '{
    "payment_id": "pay_…",
    "receipt": {
      "header": "DEMO CAFE",
      "order_number": "A-102",
      "lines": [
        { "name": "Latte", "qty": 2, "amount_cents": 900 },
        { "name": "Croissant", "qty": 1, "amount_cents": 425, "detail": "warmed" }
      ],
      "subtotal_cents": 1325,
      "tax_cents": 118,
      "total_cents": 1443,
      "footer": "Thank you"
    }
  }'
json
{ "id": "prt_…", "object": "print_job", "terminal_id": "…", "status": "dispatched" }

Receipt content ​

Common fields (header, store block, order block, lines, totals, tax_rate_label, qr_data / qr_hint) are listed under Print. kind selects the document layout; each layout accepts additional fields:

kindDocumentAdditional fields
omittedSales receipt—
orderOrder ticketserve_type, table_or_pickup_no, remark, delivery{…}
kitchenKitchen ticketserve_type, table_or_pickup_no, remark, delivery{…}
call_numberCall-number ticketnumber, number_label, guest_name, party_size, queue_tip
refundRefund ticketoriginal_total_cents, refund_type, refund_time

Content rules:

  • Amounts are integers in cents.
  • Most text fields are truncated at 300 characters; line names at 200. header and footer are printed as sent; keep them short.
  • Card details and the paid amount are not accepted from the caller. When payment_id is given, the terminal adds the card lines from its own record of that payment; such fields in receipt are dropped.

Print result ​

The final state of a print job is delivered by webhook only; there is no endpoint to poll a print job. data is { id, object: "print_job", terminal_id, payment_id, status, reason }; reason is null on success.

EventMeaningRecommended handling
print.succeededThe printer completed the jobNone
print.failedNot printed; cause in reasonShow the cause to staff; print again after it is resolved
print.delivery_unknownThe terminal lost power or crashed after printing started; output unknownConfirm with staff before printing again; a blind retry can produce a duplicate
reasonMeaning
printer_unreachableThe terminal cannot reach its printer (network printer: powered off, unplugged or on another network)
printer_not_configuredNo printer is configured for this terminal
printer_needs_attentionOut of paper or cover open, not resolved in time
print_rejectedThe printer rejected the job
delivery_unknownSee print.delivery_unknown
print_failedAny other failure

No event is sent in two cases:

  • Paper out or cover open: the terminal holds the job and alerts the staff at the terminal. Only the final state produces an event.
  • The terminal has no printer: the job ends without printing. This is not a failure.

Automatic card receipt ​

After a successful payment, the terminal that took it prints the card receipt automatically if it has a working printer and automatic receipts are enabled for it; no print call is needed. Use print for documents Kuvex has no data for: order tickets, kitchen tickets, call numbers, merchant-branded receipts.

Sandbox behavior ​

  • The virtual terminal renders a paper strip with header, lines, total_cents and footer; other fields are accepted but not drawn.
  • The virtual printer always succeeds; the event is print.succeeded.
  • To receive the event without a webhook endpoint, pass the payment_id of a test payment created with POST /v1/payments; the event then appears in the Dashboard webhook test inbox. Print jobs without a payment are not captured by the inbox; register a webhook endpoint for those.

Cash drawer ​

The cash drawer connects to the drawer port of the receipt printer and opens when the printer sends it a pulse. Kuvex sends the pulse through the external network receipt printer assigned to the terminal; a terminal without one reports failed.

  1. Call Open the cash drawer. The response is 202 with a request_id and status pending.
  2. Retrieve the terminal and read cash_drawer.
  3. Use the result only when cash_drawer.last_result.request_id equals the request_id from step 1; otherwise it belongs to an earlier request.
bash
curl -X POST https://api.kuvex.com/v1/terminals/$TERMINAL_ID/cash-drawer/open \
  -H "Authorization: Bearer $KUVEX_KEY"
json
{ "request_id": "drw_…", "terminal_id": "…", "status": "pending" }
bash
curl https://api.kuvex.com/v1/terminals/$TERMINAL_ID -H "Authorization: Bearer $KUVEX_KEY"
json
"cash_drawer": {
  "status": "dispatched",
  "request_id": "drw_…",
  "last_result": { "request_id": "drw_…", "ok": true, "reason": null, "device_at": "2026-11-13T21:58:02Z" }
}
cash_drawer.statusMeaning
unknownNo drawer request has been made on this terminal
pendingAccepted; the terminal has not reported
dispatchedThe pulse was sent to the printer
failedThe pulse was not sent; cause in last_result.reason, usually no printer with a drawer port configured for the terminal, or the printer is unreachable

Notes:

  • The pulse is one-way. A printer cannot report whether a drawer is attached or whether it opened. dispatched confirms only that the pulse left the terminal for the printer; it does not confirm that the drawer opened and must not be used for cash accounting.
  • There is no webhook for the cash drawer.
  • With Kuvex-Version: 2026-09-10 the dispatched state is named opened, with the same meaning.

Sandbox behavior ​

The virtual terminal answers the drawer request: the status moves from pending to dispatched and the virtual terminal panel shows that a pulse was sent. No drawer is attached to a virtual terminal; this matches what dispatched means on a physical terminal.

Barcode and QR scanning ​

Scan activates the terminal scanner and holds the request open until one code is read, for up to 30 seconds.

bash
curl -X POST https://api.kuvex.com/v1/terminals/$TERMINAL_ID/scan \
  -H "Authorization: Bearer $KUVEX_KEY"
json
{ "id": "scn_…", "object": "scan", "status": "completed", "data": "0123456789012" }

If nothing is read in time, the response is still 200:

json
{ "id": "scn_…", "object": "scan", "status": "timeout", "data": null }
  • Accept a code only when status is completed and data is not empty. timeout is not an error; call again when the customer is ready.
  • One call reads one code. There is no continuous mode and no webhook.
  • Set the HTTP client timeout above 30 seconds.
  • data is the code text exactly as read; its meaning (loyalty ID, coupon, order) is defined by the integration.
  • Scanning requires a terminal with a scanner. See Device capabilities by model.

Sandbox behavior ​

The virtual terminal answers immediately with a generated code (eleven fixed digits and one random digit), so the flow that follows a scan can be built and tested.

Customer display ​

The terminal can serve as the customer-facing screen while the cashier enters items: the integration pushes the cart, the terminal displays it, and the same terminal then takes the payment for that order.

bash
curl -X PUT https://api.kuvex.com/v1/terminals/$TERMINAL_ID/display/cart \
  -H "Authorization: Bearer $KUVEX_KEY" -H "Content-Type: application/json" \
  -d '{
    "revision": 1,
    "session_id": "register-1",
    "order_id": "A-102",
    "currency": "usd",
    "lines": [ { "id": "l1", "name": "Latte", "quantity": 2, "amount_cents": 900 } ],
    "subtotal_cents": 900,
    "tax_cents": 80,
    "total_cents": 980
  }'
  • A cart is not a receipt: cart lines carry id and quantity (receipt lines use qty).
  • Each push carries the next revision for the terminal. Read the current revision with Retrieve the cart before the first push.
  • The default renderer is native: the terminal draws the cart itself, with no development and on every terminal.
  • Two web renderers exist: a Kuvex-hosted page with the merchant logo and colors, and an ISV web page. They apply only to terminals in companion mode, require a recent Kuvex Runtime and are enabled per device; contact Kuvex before planning one.
  • Whichever renderer draws the cart, the payment, result and receipt screens are always rendered by Kuvex Runtime; an ISV page never receives card data.

Cart rules, the three renderers, branding and fallback: Customer display. Endpoints: Customer display reference.

Sandbox behavior ​

Push a cart with the test key; the virtual terminal draws it. Create a payment with the same order_id; the virtual terminal switches from the cart to the payment screen.

Card readers ​

There is no reader API. The reader is part of the terminal, and the terminal is selected by terminal_id; the payment call is identical on every device:

bash
curl https://api.kuvex.com/v1/payments \
  -H "Authorization: Bearer $KUVEX_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-A-102" \
  -d '{ "terminal_id": "'$TERMINAL_ID'", "amount_cents": 980, "order_id": "A-102" }'
Device formReader
Terminal with a built-in certified readerTap, insert and swipe built in
Tablet or PC with KReaderExternal certified reader over USB or Bluetooth. Kuvex pairs the reader and reconnects it when it is plugged back in; the integration is not involved

In both forms, card data travels from the reader to the acquirer inside certified hardware and Kuvex Runtime; the ISV page and server never receive it.

To check whether a terminal can take a payment now, read payment_ready on Retrieve a terminal: true when the terminal is connected, idle and has reported that it is ready to take a payment. There is no separate reader status.

Sandbox behavior ​

Create a payment on the virtual terminal and press Tap, Insert or Decline. The buttons stand in for a card; the payment object and webhooks are the same as with a physical reader.

Device capabilities by model ​

The API is identical on every Kuvex device; the hardware differs: the printer may be built in or external, not every terminal has a scanner, and a cash drawer requires a printer with a drawer port.

A device is listed for a capability only after that capability has passed acceptance on the physical device, not on the basis of a specification sheet. The list is not yet published. Until it is, send the counter requirements (receipts, cash drawer, scanning, customer-facing screen, countertop or handheld) to hello@kuvex.com for a device recommendation.

Errors and limits ​

HTTPCodeDescriptionRetriable
409terminal_offlineThe terminal is not connectedYes, after it reconnects
404terminal_not_foundNo such terminal on this account in this modeNo
403scope_forbiddenThe credential is not allowed to make this call (for example, a host token calling print, scan or cash drawer)No
429rate_limitedToo many writes to this terminalYes, after Retry-After seconds

Writes to one terminal (print, scan, cash drawer, cart, settings) share a limit of about 60 per minute per terminal. Each terminal has its own limit.

Every response carries Kuvex-Request-Id. To investigate a call, look it up by that ID in the Dashboard under Developers → Request log.