Skip to main content

Checkbox

Checkbox is a Ukrainian software cash register (PRRO). It can call an address for every receipt of a cash register — a sale or a return — with the fiscal code and a link to the receipt on the site of the tax service. But the webhook does not carry the phone or the email of the buyer, so today these events are visible in the journal and start no flow. Read the limits below before you connect it.

Written from Checkbox documentation

This page is written from the public documentation of Checkbox and has not been checked on a live account yet.

What you need​

  • A Checkbox cash register with API access: its License key and a cashier with a PIN code (or a login and a password).
  • Three commands in a terminal — no developer. There is no field for the address in the cabinet: it is set by an API call with the token of the cashier, separately for every cash register.
  • One address per cash register. A new address replaces the old one. If a CRM or a shop module already gets the receipts of this cash register, it stops getting them — check first, as in step 2.
  • No buyer contact. Checkbox uses the phone and the email of the buyer for its own delivery of the receipt and does not pass them in the webhook. Every event is refused with no_contact.

Step 1. Create a connection​

  1. Open Flows → Connections, press Connect a system and choose Checkbox.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Set the address of the cash register​

  1. In the Checkbox cabinet find the License key of the cash register and the PIN code of the cashier.

  2. Get the token of the cashier — put the key in place of LICENSE_KEY and the PIN in place of CASHIER_PIN:

    curl -X POST https://api.checkbox.ua/api/v1/cashier/signinPinCode -H "accept: application/json" -H "Content-Type: application/json" -H "X-Client-Name: Flow" -H "X-Client-Version: 1.0" -H "X-License-Key: LICENSE_KEY" -d '{"pin_code":"CASHIER_PIN"}'

    Take access_token from the answer. With a login instead of a PIN, the request is POST /api/v1/cashier/signin with login and password in the body.

  3. Check whether the address is taken — put the token in place of ACCESS_TOKEN:

    curl https://api.checkbox.ua/api/v1/webhook -H "accept: application/json" -H "X-Client-Name: Flow" -H "X-Client-Version: 1.0" -H "X-License-Key: LICENSE_KEY" -H "Authorization: Bearer ACCESS_TOKEN"

    If the answer shows the address of a CRM or a shop, the next command replaces it.

  4. Set the address — the address from the cabinet in place of FLOW_ADDRESS:

    curl -X POST https://api.checkbox.ua/api/v1/webhook -H "accept: application/json" -H "Content-Type: application/json" -H "X-Client-Name: Flow" -H "X-Client-Version: 1.0" -H "X-License-Key: LICENSE_KEY" -H "Authorization: Bearer ACCESS_TOKEN" -d '{"url":"FLOW_ADDRESS"}'

    The key field of the answer is the signing secret, shown once. It is optional: the secret in the address is enough.

  5. Repeat for every cash register.

Step 3. Send a test​

Make a test receipt. The event appears in Flows → Connections → Event journal within seconds — refused with no_contact, as described above — and the connection shows Recognised: Checkbox. If nothing comes, the command of step 2.3 shows last_error_date and last_error_message.

Events​

Receipt typeAlphaFlow eventProperties
SELLpayment_succeededorder_id, receipt_id, fiscal_code, receipt_url, total, status, cash_register
RETURNrefund_issuedorder_id, receipt_id, fiscal_code, receipt_url, total, status, cash_register
  • total is in kopecks.
  • order_id comes if the shop passed it when the receipt was created.
  • receipt_url is the link to the receipt on the site of the tax service — what is worth sending to a buyer.
  • cash_register is the fiscal number of the cash register.
  • SERVICE_IN, SERVICE_OUT, CASH_WITHDRAWAL, CURRENCY_EXCHANGE and PAWNSHOP start nothing. The same address also gets service receipts, shifts and orders; the connection reads receipts only.

There is no contact in the webhook: no phone, no email, no id of the buyer. Every event is refused with no_contact.

Good to know​

  • Checkbox repeats a delivery if the answer is 400 or above or takes longer than 10 seconds, with a pause growing from 1 second to 30 minutes — for 24 hours by its wiki, for 4 hours by its API description. The address answers 200 at once.
  • A repeat of the same receipt in the same status is not recorded twice.
  • The address always answers 200. Above the daily event limit the event is refused in AlphaFlow with quota_exceeded and shown in the journal; the webhook of the cash register stays on.

Checkbox documentation​