User Manual & Basic Instructions

This tool is a local testing console for the fiscalization integration. It does not replace a real POS/till system — it exists so developers can build, sign, and (optionally) submit Citizen and POS coupons while integrating with the fiscalization service.

What each page does
Test Console
Paste raw Citizen or POS coupon JSON directly and build/sign it (and optionally send it to ATK). Best for testing specific, hand-crafted payloads or edge cases.
POS Manual Sale
A guided "cash register" form: add items with a tax rate per line, take payment, and it automatically computes totals and tax groups, then builds/signs the POS Coupon and the matching Citizen Coupon, rendering the resulting QR code. Best for quickly trying realistic sales without hand-writing JSON.
Step-by-step: recording a manual sale
  1. Open POS Manual Sale and check the Business / POS settings panel. These identify your business, till (POS), branch and operator to ATK. Defaults are provided for testing; a real integration would fill these in automatically from the till's configuration.
  2. For each product sold, fill in the Items form: name, unit, unit price, quantity, and the applicable tax rate (A/C/D/E — see the tax rate reference below), then click Add item. Repeat for every line on the receipt.
  3. The cart table updates automatically, showing the net subtotal, total tax, and gross total, split correctly across tax rates.
  4. Under Payments, add one or more payments (cash, card, voucher, etc.) that add up to the total. Use Fill remaining as cash to auto-fill the outstanding balance. The balance indicator turns green once fully paid.
  5. Click Build & Sign (no send) to build and sign the coupon locally without contacting ATK — useful for checking the generated data and QR code safely. Click Build, Sign & Send to ATK to additionally submit both the POS Coupon and Citizen Coupon to the real fiscalization endpoints (a confirmation prompt is shown first).
  6. The Citizen QR Code string and its scannable QR image are what would be printed on the physical receipt. Use Copy to copy the raw string, or scan the QR image with the ATK Citizen Mobile App-style scanner for testing.
  7. Click Start new sale to clear the cart and payments and begin the next transaction. The Coupon ID automatically increments after each successful build/send so every receipt gets a unique number.
Step-by-step: using the Test Console
  1. Choose a Coupon type (Citizen or POS) and click Load sample JSON to see a valid example, or paste/edit your own JSON in the text area.
  2. Click Build & Sign (no send) to validate, serialize and sign the payload without submitting it anywhere.
  3. Click Build, Sign & Send to ATK to also submit it to the real fiscalization endpoint. Only do this with a valid, onboarded private key — this is a live request.
  4. The Result panel shows the raw JSON response (including the base64 details, the signature, and the combined qrCode string) and the QR Code string is also copyable at the top.
Tax rates reference (taxRate field)
Code VAT % Description
A 0% Exempt from VAT
C 0% Zero-rated VAT
D 8% Reduced VAT rate
E 18% Standard VAT rate
Troubleshooting
"No private key configured"
The API could not find a signing key. Set the PRIVATE_KEY environment variable, or place a dummy-private-key.pem file in the project root for local testing.
"Invalid JSON"
The pasted text in the Test Console isn't valid JSON. Check for trailing commas, unquoted keys, or mismatched brackets.
The Build/Send buttons are disabled on POS Manual Sale
The sum of payments must exactly equal the cart's gross total, and there must be at least one item in the cart.
"Request failed" when sending to ATK
This usually means the local server couldn't reach the real fiscalization endpoint, or the business/POS isn't onboarded yet. Use Build & Sign (no send) to keep testing locally without a network round-trip.