English
Payment Elf: Overview and Chain
Payment Elf is a sidecar payment assistant that runs on the Windows POS computer. It does not modify the POS software: a barcode scanner reads the customer's payment code to complete a barcode-initiated payment, OCR recognizes the amount on the POS software screen and brings it into the payment, and on success the amount is announced by voice and a receipt is printed as needed. It suits offline stores with a fixed POS computer and supports multiple stores and multiple terminals.
Positioning and How It Works
The original POS software and Payment Elf run side by side on the POS computer. Payment Elf handles three things:
- Read the payment code the customer presents through the barcode scanner, or recognize the amount due shown by the POS software;
- Call the DaxPay merchant cashier API to start a barcode-initiated payment and wait for the result;
- On success, announce the amount by voice, print a receipt as configured, and record the transaction in the local ledger.
Payment Elf only owns the "take the money" step. The platform is always the source of truth for payment results; the local ledger is only a mirror for history lookups.
Core Capabilities
| Capability | Description |
|---|---|
| Barcode-initiated payment | The barcode scanner supports both HID keyboard emulation and HID POS (0x8C); the payment code is read in the background and goes straight into the cashier. The cashier also offers a calculator-style panel for entering amounts by hand |
| OCR amount recognition | Box-select the amount area of the POS software; a local model recognizes it and shows it on the floating bar once stable. On failure it silently falls back to manual input and never guesses the amount |
| Voice broadcast | The amount is announced on success; when the system Chinese voice pack is unavailable it falls back to concatenating the built-in WAV word list |
| Receipt printing | 58 / 80mm ESC/POS thermal receipt printers, with driver-free USB, network RAW TCP (default 9100) and file dump; 1 to 4 copies, QR codes and barcodes rendered as bitmaps |
| Refund / order query | Issue a full or partial refund against a collection row in the trade records, and actively query the platform to sync status; unpaid orders are closed by the platform on expiry |
| Multiple stores / terminals | After sign-in, enabled stores, apps and terminals are pulled; a single store is selected automatically, several stores prompt a dialog, and the store follows the machine; the terminal number is configured locally |
| Reprint last | A global hotkey reprints the receipt of the latest successful collection today, still available after a restart |
| Local ledger | Collections and refunds are stored locally, so history is viewable offline; the platform is the source of truth |
| Floating amount bar and tray | The floating bar can be dragged, resized and its opacity adjusted, and it remembers its position; the tray is always resident and supports start at login, update checks and quick entries |
This version only handles barcode-initiated payments, not merchant-presented QR (the merchant shows a collection code and the customer scans it); receipt layouts use the built-in local template, and server-side template management is not supported.
Runtime Environment
| Item | Requirement |
|---|---|
| Operating system | Windows 10 1607 or later (64-bit), or Windows 11 |
| Runtime | The standard edition bundles .NET 10; the slim edition requires the .NET 10 Desktop Runtime preinstalled |
| Barcode scanner | HID keyboard emulation or HID POS (0x8C), USB |
| Printer | 58 / 80mm ESC/POS thermal receipt printer, USB or network (RAW 9100) |
| Server | DaxPay 4.0.0-beta10 or later, including the daxpay-payment-elf module |
| Account | A cashier account created on the merchant panel, with the "merchant cashier" role (merchant_cashier) |
The desktop program is currently at 0.1.x and uses its own version line; it does not follow the platform's 4.0 version numbers.
Accounts and Security
- Sign-in uses the merchant identity domain; only merchant-panel accounts work, and admin-panel accounts cannot be used;
- The password is encrypted with an RSA public key before transmission, with a nonce to prevent replay; repeated failures require a graphic captcha;
- TOTP two-step verification is supported; when enabled, sign-in requires the one-time password;
- Sign-in credentials are kept in memory only; with "Remember password" checked, the account and password are encrypted with Windows DPAPI (current user) and stored locally;
- The local credential file is
credential.binin the data directory; the token is never written to disk.
How to Obtain
Payment Elf and the Voice Broadcast APP are both delivered as part of the DaxPay Ecosystem Extension Pack tiers, provided as source code (source-code license included). How to obtain them and the license terms follow the official pricing page.
Continue Reading
- Design Architecture: component chain, the amount and payment chains, and how the local ledger relates to the platform;
- Installation and Sign-In: server preparation, installation and upgrade, server address, accounts and stores;
- Collection, Broadcast and Accounting: OCR, barcode-initiated payment, desktop form, receipts, refunds and order queries;
- Gateway Management - External Endpoints: allowance rules for
/elfand the sign-in endpoint group.