Close the day
Record cash in and out, count the drawer, close the business day of a till against the count, read the difference and open the next day.
On this page
Closing the day compares the cash that should be in the drawer with the cash you counted, ends the business day of the till and records the difference. The next day opens with a new float.
Read the day
cash.expected is what the drawer should hold: float plus sales minus refunds plus cashIn minus cashOut. sales is the cash that stayed after the change was given back.
curl
curl "$RDC_BASE_URL/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "aaed5ba1-2a19-4c94-ac7f-119c9288a12c",
"tillId": "e57a3b65-d690-4e6c-8a6b-8f946c4e6610",
"number": 1,
"date": "2026-11-23",
"openedAt": "2026-11-23T06:00:00Z",
"state": "open",
"float": "500.00",
"cash": {
"float": "500.00",
"sales": "79.90",
"refunds": "0.00",
"cashIn": "0.00",
"cashOut": "100.00",
"expected": "479.90"
},
"closing": null,
"revision": 2
} Record cash in and out
Record every movement of cash when it happens: kind is in or out, with an amount above zero and a reason: float_top_up, bank_deposit, supplier_payment or other. Cash cannot go out beyond cash.expected; the answer is insufficient_cash. After the movement below, the day is at revision 3 and cash.expected is 379.90.
curl
curl -X POST "$RDC_BASE_URL/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/cash-movements" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "8b82bfbb-0239-4ba0-9e15-8e25dd745281",
"expectedRevision": 2,
"kind": "out",
"amount": "100.00",
"reason": "bank_deposit"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/cash-movements`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "8b82bfbb-0239-4ba0-9e15-8e25dd745281",
"expectedRevision": 2,
"kind": "out",
"amount": "100.00",
"reason": "bank_deposit"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/cash-movements',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '8b82bfbb-0239-4ba0-9e15-8e25dd745281',
'expectedRevision': 2,
'kind': 'out',
'amount': '100.00',
'reason': 'bank_deposit',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "8b82bfbb-0239-4ba0-9e15-8e25dd745281",
"expectedRevision": 2,
"kind": "out",
"amount": "100.00",
"reason": "bank_deposit"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/cash-movements');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/cash-movements");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "8b82bfbb-0239-4ba0-9e15-8e25dd745281",
"expectedRevision": 2,
"kind": "out",
"amount": "100.00",
"reason": "bank_deposit"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "8b82bfbb-0239-4ba0-9e15-8e25dd745281",
"status": "accepted",
"aggregateId": "aaed5ba1-2a19-4c94-ac7f-119c9288a12c",
"aggregateRevision": 3
} Count and close
Count the cash in the drawer and send the total as counted, with the revision of the day. Here 374.90 was counted against 379.90 expected.
Close the day
curl
curl -X POST "$RDC_BASE_URL/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/close" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "d9fe9a70-cde7-4ffe-98ee-1c04dc85d10a",
"expectedRevision": 3,
"counted": "374.90"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/close`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "d9fe9a70-cde7-4ffe-98ee-1c04dc85d10a",
"expectedRevision": 3,
"counted": "374.90"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/close',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'd9fe9a70-cde7-4ffe-98ee-1c04dc85d10a',
'expectedRevision': 3,
'counted': '374.90',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "d9fe9a70-cde7-4ffe-98ee-1c04dc85d10a",
"expectedRevision": 3,
"counted": "374.90"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/close');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/business-days/aaed5ba1-2a19-4c94-ac7f-119c9288a12c/close");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "d9fe9a70-cde7-4ffe-98ee-1c04dc85d10a",
"expectedRevision": 3,
"counted": "374.90"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "d9fe9a70-cde7-4ffe-98ee-1c04dc85d10a",
"status": "accepted",
"aggregateId": "aaed5ba1-2a19-4c94-ac7f-119c9288a12c",
"aggregateRevision": 4
} The till closes the day only when nothing is in progress. Each guard has its own code:
| Code | HTTP | What to do |
|---|---|---|
open_order | 422 | The current order has items. Finish or void it, then close the day. |
held_orders | 422 | An order is on hold. Resume or void it; see Hold and resume. |
reader_busy | 422 | The card reader is working on a payment. Wait for it to end, or cancel it while it waits for the card. |
queue_not_empty | 422 | Sales are queued on the till. Wait until queue.count is zero; see Work without network. |
network_lost | 422 | Closing needs the network. Repeat the request when the till reports online. |
invalid_count | 422 | Send the cash you counted, zero or more. |
Read the difference
The day is closed and closing holds what was recorded. difference is counted minus expected, a signed decimal string: negative when cash is missing, positive when there is more, zero when the count matches.
{
"state": "closed",
"cash": {
"float": "500.00",
"sales": "79.90",
"refunds": "0.00",
"cashIn": "0.00",
"cashOut": "200.00",
"expected": "379.90"
},
"closing": {
"at": "2026-11-23T07:14:00Z",
"expected": "379.90",
"counted": "374.90",
"difference": "-5.00"
},
"revision": 4
} The till sends businessday.closed with businessDayId, tillId, expected, counted and difference. See Event catalogue.
Open the next day
A till has one open day. Open the next with the cash you put in the drawer: float is zero or more (invalid_float otherwise), and a till that already has an open day answers day_open. The till gets a new empty order and sends businessday.opened. This day is number 2 of the till.
Open the next day
curl
curl -X POST "$RDC_BASE_URL/pos/v1/tills/e57a3b65-d690-4e6c-8a6b-8f946c4e6610/business-days" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "1e43f204-8f43-4d2e-97fb-e3313f0afae5",
"float": "300.00"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/tills/e57a3b65-d690-4e6c-8a6b-8f946c4e6610/business-days`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "1e43f204-8f43-4d2e-97fb-e3313f0afae5",
"float": "300.00"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/pos/v1/tills/e57a3b65-d690-4e6c-8a6b-8f946c4e6610/business-days',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '1e43f204-8f43-4d2e-97fb-e3313f0afae5',
'float': '300.00',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "1e43f204-8f43-4d2e-97fb-e3313f0afae5",
"float": "300.00"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/tills/e57a3b65-d690-4e6c-8a6b-8f946c4e6610/business-days');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/tills/e57a3b65-d690-4e6c-8a6b-8f946c4e6610/business-days");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "1e43f204-8f43-4d2e-97fb-e3313f0afae5",
"float": "300.00"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "1e43f204-8f43-4d2e-97fb-e3313f0afae5",
"status": "accepted",
"aggregateId": "6f47590c-ce99-400a-899c-fe998a4c42bc",
"aggregateRevision": 1
} Requests sent to a closed day
While no day is open, every request that changes an order, a payment, a refund or the cash is refused with day_closed, and nothing is changed. Open a new business day, then repeat the request. Reading still works.