Skip to main content

The safe

Every store that keeps cash has a safe in Cash Management: a repository of type Safe that holds one balance per currency. All of the store's cash movements are booked into it: the counted cash from the tills, the floats, the bank deposits and withdrawals, and the safe audit's corrections.

One safe per store​

A store has one active safe. Cash Management books every event from Reconciliation into it, so it never has to ask which safe the cash went to. Creating a second safe for the same store is refused.

🛑 Create the safe before the store's tills start trading. Cash Management does not create one by itself. For a store without a safe, it ignores the events from Reconciliation, and they are not kept for later: floats, counted cash and recounts from that period never reach any balance.

Two stores send the same completed till audit from Reconciliation. Store 12 has a safe in Cash Management, so 1 620 NOK is booked into it and published. Store 14 has no safe, so the till audit is ignored: nothing is booked, nothing is published, and the cash is not added later when a safe is created.

A store's safe cannot be deleted while it is the store's only safe. If the store moves to a new physical safe, keep the repository and rename it, so that its balance and history stay in one place.

Setting up a store​

  1. Create the safe: POST /api/v1/business-units/{businessUnitId}/repositories with { "name": "Main safe", "type": "Safe" }. The response holds the repositoryId that every other call uses.
  2. Enter the opening balance. Count the safe in Hii InStore's Count Safe, which books the counted amount in each currency as a correction. Without it, the balance starts at zero and the first safe audit shows the whole content as a deviation.
  3. Check the tenders. Only tenders whose type is cash or foreign currency reach the safe. See What Cash Management receives.
  4. Set the limits for the safe audit, if the store has them: the most cash the safe may hold and the smallest bank drop. See Configuration.

GET …/repositories lists the store's active repositories with their id and name. PATCH …/repositories/{repositoryId}/name renames one.

The balance​

The safe has a separate balance for each currency. It is the sum of every movement booked into and out of it, published with each movement as repositoryToBalance or repositoryFromBalance. See What moves the safe.

To readCall
the safe's balance per currencyGET …/repositories/{repositoryId}/contents
the store's total across its repositories, per currencyGET …/repositories/contents
the currencies the store handles: those of its cash tenders, and any currency with a balanceGET …/currencies

⚠ A balance reflects the movements booked so far. A bank deposit sent to the API is booked a moment later, after the event has been processed, so a balance read straight after the call may not include it yet. See The Cash Management API.

Cash changers​

A cash changer, such as a cash recycler, is counted by Reconciliation in its own till audit. Its counted cash goes into the store's safe, booked as CashChangerTransfer and CashChangerRecount rather than Reconciliation, so that it can be told apart from the drawers' cash. The safe audit shows it on its own line, Cash from cash changer.

A store can also create a repository of type CashChanger beside its safe, and record bank deposits, withdrawals and corrections against it. Reconciliation's events never go there: they always go into the safe.