Getting started
ARCA Proxy is a local service that prints fiscal receipts. You send it JSON over HTTPS, it answers with JSON.
Endpoint
Everything goes to one address:
It runs on the same machine as your application. No login, no API key.
There are no separate /sale or /refund addresses. Every command is a POST to /service, and which one you want is written inside the JSON, in the command field.
Request
{
"id": "1",
"method": "send",
"data": {
"command": "Sale",
"payload": { }
}
}| Field | Description |
|---|---|
id | Any string. It is returned to you unchanged. |
method | send to run a command, ping to test the connection. |
data.command | Sale, Refund, PrintXReport, CloseZReport or PrintLastReceipt |
data.payload | The command's data. Not needed for reports. |
Response
Success:
{ "id": "1", "success": true, "data": { "saleId": 142 } }Error:
{ "id": "1", "success": false, "error": "Нет подключения с аппаратом!" }Always check success. The HTTP status is 200 even when success is false.
Test the connection
curl -X POST https://localhost:26496/service \
-H 'Content-Type: application/json' \
-d '{"id":"1","method":"ping"}'{ "id": "1", "success": true, "data": "pong" }pong means the proxy is running and the device is connected. If you get an error instead, see Errors.
Commands
| Command | What it does | Page |
|---|---|---|
Sale | Print a sale receipt | Sale |
Refund | Return an earlier sale | Refund |
PrintXReport | Print an X-report | Reports |
CloseZReport | Close the shift, print a Z-report | Reports |
PrintLastReceipt | Reprint the last receipt | Reports |
Certificate
The proxy uses HTTPS with its own certificate. Install the self_rootCA.crt file you were given into your machine's trusted certificates — otherwise every request fails with a TLS error.
Node.js and Python have their own certificate stores:
# Node.js
NODE_EXTRA_CA_CERTS=/path/to/self_rootCA.crt node app.js# Python
requests.post(url, json=body, verify='/path/to/self_rootCA.crt')# curl
curl --cacert /path/to/self_rootCA.crt ...Two things to remember
Money is in tiyin. 12500 means 125.00 UZS. Always a whole number, never 125.00.
One command at a time. Wait for a response before sending the next request, or you get Не так быстро, ожидайте окончания предыдущей команды!.