Modules

Cash

Cash registers, register sessions and the cash ins and outs of each session.

Overview

The Cash module tracks physical cash. A cash register (creg_...) is opened by a cashier as a session (cses_...) with an opening amount; every cash payment (invoices, bills, work orders) and every manual cash in or out becomes a movement (cmov_...) of that session. When the session is closed, the counted cash is compared with the expected amount.

Requires the Cash module. An owner or admin turns it on in Settings > Modules. While it is off, every endpoint on this page returns 403 with type permission_error and code module_disabled.

Opening and closing sessions requires counting the cash, so it is done by the cashier in the dashboard or the POS screen. Registers and movement concepts are configured in Settings > Cash. The API reads registers and sessions and records manual movements.

The Cash Session Object

JSON
1{
2 "id": "cses_a1b2c3d4e5f6",
3 "object": "cash_session",
4 "session_number": "CS-000012",
5 "status": "open",
6 "register_id": "creg_a1b2c3d4e5f6",
7 "register": { "id": "creg_a1b2c3d4e5f6", "name": "Front desk", "code": "C1" },
8 "currency": "USD",
9 "cashier": { "id": "usr_a1b2c3d4e5f6", "name": "Jane Doe" },
10 "opening_amount": 100,
11 "cash_in": 350.5,
12 "cash_out": 40,
13 "balance": 410.5,
14 "movements_count": 7,
15 "opened_at": "2026-10-11T13:00:00.000Z",
16 "closed_at": null,
17 "expected_amount": null,
18 "counted_amount": null,
19 "difference_amount": null,
20 "difference_reason": null,
21 "notes": null,
22 "created_at": "2026-10-11T13:00:00.000Z",
23 "updated_at": "2026-10-11T13:00:00.000Z"
24}

balance = opening_amount + cash_in - cash_out: the cash that should be in the drawer right now. expected_amount, counted_amount and difference_amount (counted - expected) are filled when the session is closed.

Endpoints

MethodPathPermissionDescription
GET/v1/cash-registersreadList registers and who has each one open (is_active)
GET/v1/cash-sessionsreadList sessions with totals (register_id, status)
GET/v1/cash-sessions/{id}readRetrieve a session
GET/v1/cash-movementsreadList movements (session_id, register_id, direction, source)
POST/v1/cash-movementswriteRecord a manual cash in or cash out in an open session

Find the Open Sessions

1curl "https://api.corebill.io/v1/cash-sessions?status=open" \
2 -H "Authorization: Bearer sk_live_your_api_key"

Record a Cash Movement

1curl -X POST "https://api.corebill.io/v1/cash-movements" \
2 -H "Authorization: Bearer sk_live_your_api_key" \
3 -H "Content-Type: application/json" \
4 -H "Idempotency-Key: deposit-2026-10-11" \
5 -d '{
6 "session_id": "cses_a1b2c3d4e5f6",
7 "direction": "out",
8 "amount": 40,
9 "concept_id": "ccon_a1b2c3d4e5f6",
10 "description": "Deposit to bank"
11 }'
  • session_id, direction (in or out) and amount (greater than 0) are required, plus a concept_id or a description
  • The concept must match the direction. Automatic concepts (customer and vendor payments) cannot be used manually
  • A cash out above the session balance fails with "There is not enough cash in this session." unless negative cash is allowed
  • Movements recorded automatically have source = invoice_payment, bill_payment or work_order_payment and a reference to the document
  • Emits cash_movement.created. Opening and closing a session emit cash_session.opened and cash_session.closed