Cash API
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/cash |
Cash deposit/withdraw |
Cash deposit/withdraw
POST /api/cash
Create cash deposit or withdraw. Cash documents are mandatory to print and must be sent to the SFS in time.
Request Body
Cash deposit or withdraw request
Schema: CashRequest
Examples
Cash deposit
Deposit the money into the cash register.
{
"amount": 100
}
Cash deposit into drawer
Deposit the money into the cash drawer connected to the receipt printer (if printer allows it).
{
"amount": 100,
"openDrawer": true
}
Cash withdraw
Withdraw the money from the cash register.
{
"amount": -100
}
Cash withdraw from drawer
Withdraw the money from the cash drawer connected to the receipt printer (if printer allows it).
{
"amount": -100,
"openDrawer": true
}
Responses
200 — Response when the cash request is registered
Schema: CashResponse
Cash response offline example
The offline response lacks the UUID and process date, has longer QR code (generated from offline data instead of the UUID) and has a eKasa status attached.
{
"resultCode": 0,
"cash": {
"internalDocumentId": 100,
"sequenceId": 101,
"merchant": {
"id": 12,
"corporateFullName": "Company s.r.o.",
"ico": "123456789",
"dic": "SK123456789",
"physicalAddress": {
"country": "Slovenská Republika",
"municipality": "Bratislava",
"street": "Heydukova",
"buildingNumber": "2155",
"propertyRegistrationNumber": "6",
"postalCode": "81108"
},
"organizationUnit": {
"name": "Optional organization unit name",
"cashRegisterCode": "88812345678900001",
"cashRegisterType": "STANDARD",
"location": {
"physicalAddress": {
"country": "Slovenská Republika",
"municipality": "Bratislava",
"street": "Heydukova",
"buildingNumber": "2155",
"propertyRegistrationNumber": "6",
"postalCode": "81108"
}
}
}
},
"cashRegisterCode": "88812345678900001",
"amount": 10,
"issueDate": "03.09.2025 16:56:01",
"createDate": "03.09.2025 16:56:01",
"pkp": "EjRWeJASNFra0KvN7xI0VniQq83vEjRWetrTRWeJEjRWeJEjRWetrQAGeJEjRWeJEjRWeAAARWSJcSNFZ4kSNFZ4kSNFZ4kVNFl4EjRWSJeqqqu7vMzN3d7v//EjRWeJEjRWeJEjRWeYC62u387yLtVfTvXvQV/q9Rrxpe8SxVAAVFRK2tpUQUFRUVUQgIgI4UUVEV8V8YVaVVtLVLQbW1RbFbFbuxvu8V7xXhX+FQUFUUUQVRBQWXl0kEAAAAAABUFFFRUSUhAAAAEjRWeJEjRWeJEjRWeJEjRlqJEjRWeJEjRdrYkSNFZ4kSNFZ4kSNK2trSNFZ5gSNFatraNFZw==",
"okp": "ABCDEFAB-12345678-12345678-12345678-ABCDEFAB",
"exception": false,
"electronic": false,
"documentNumber": "202509/1",
"sendingCount": 1,
"qrCode": "ABCDEFAB-12345678-12345678-12345678-ABCDEFAB:88812345678900001:250903165601:101:10.00",
"status": {
"warning": {
"warningType": "EKASA",
"message": "Offline document",
"detail": "Document was printed as offline document and will be sent later"
}
}
}
}
Cash response online example
Online response contains UUID and process date. The QR code is shorter (contains only the UUID).
{
"resultCode": 0,
"cash": {
"internalDocumentId": 100,
"sequenceId": 101,
"merchant": {
"id": 12,
"corporateFullName": "Company s.r.o.",
"ico": "123456789",
"dic": "SK123456789",
"physicalAddress": {
"country": "Slovenská Republika",
"municipality": "Bratislava",
"street": "Heydukova",
"buildingNumber": "2155",
"propertyRegistrationNumber": "6",
"postalCode": "81108"
},
"organizationUnit": {
"name": "Optional organization unit name",
"cashRegisterCode": "88812345678900001",
"cashRegisterType": "STANDARD",
"location": {
"physicalAddress": {
"country": "Slovenská Republika",
"municipality": "Bratislava",
"street": "Heydukova",
"buildingNumber": "2155",
"propertyRegistrationNumber": "6",
"postalCode": "81108"
}
}
}
},
"cashRegisterCode": "88812345678900001",
"amount": 10,
"issueDate": "03.09.2025 16:56:01",
"createDate": "03.09.2025 16:56:01",
"processDate": "03.09.2025 16:56:01",
"uuid": "O-A1B2C3D4E5F6000000123456789-TEST",
"pkp": "EjRWeJASNFra0KvN7xI0VniQq83vEjRWetrTRWeJEjRWeJEjRWetrQAGeJEjRWeJEjRWeAAARWSJcSNFZ4kSNFZ4kSNFZ4kVNFl4EjRWSJeqqqu7vMzN3d7v//EjRWeJEjRWeJEjRWeYC62u387yLtVfTvXvQV/q9Rrxpe8SxVAAVFRK2tpUQUFRUVUQgIgI4UUVEV8V8YVaVVtLVLQbW1RbFbFbuxvu8V7xXhX+FQUFUUUQVRBQWXl0kEAAAAAABUFFFRUSUhAAAAEjRWeJEjRWeJEjRWeJEjRlqJEjRWeJEjRdrYkSNFZ4kSNFZ4kSNK2trSNFZ5gSNFatraNFZw==",
"okp": "ABCDEFAB-12345678-12345678-12345678-ABCDEFAB",
"exception": false,
"electronic": false,
"documentNumber": "202509/1",
"sendingCount": 1,
"qrCode": "O-A1B2C3D4E5F6000000123456789-TEST",
"status": {}
}
}
500 — When an error occurs or a prerequisite fails
Schema: ErrorResponse
Previous document isn't printed
If the previous document was not electronic and hasn't been printed yet, this error will be thrown before storing any data.
{
"resultCode": 508,
"error": "Last document must be printed first."
}
Printer not ready
This response is returned if a printer isn't ready to print. The exact reason may vary, since it's tied to the printer connection type. It could be caused by the printer being turned off, not connected or generally not being able to communicate. The error message has no specific format defined and it should be used just for logging purposes.
{
"resultCode": 100,
"error": "Bad request: print.PrintException: Printer not ready"
}
Disconnected CHDÚ
This response is returned if the CHDÚ doesn't communicate, e.g. isn't connected. The error message has no specific format defined and it should be used just for logging purposes.
{
"resultCode": 201,
"error": "Bad request: persistence.PersistenceControllerException: CHDU IO Error"
}