Skip to main content

2.7.4. Response

FieldDescriptionType
statussuccess | error
codeError codeInteger
messageError text (optional)String
printErrorPrint error code (when using the cash register in case of a problem with receipt printing)Integer
documentIDID of the document in the smartone Cashbox system (when using a cash register)Integer
fiscalIDFiscal document code (use for return)String
fiscalNumDocument numberString
docTimeDocument creation date and time, format: yyyy-MM-dd hh:mm:ssString
printTimeDocument closing date and time, format: yyyy-MM-dd hh:mm:ssString
docStatus0 - invoice not closed, 1 - invoice closedInteger
rrnTransaction number of payment via bank terminalString
authAuthorization codeString
cardNumCard numberString
checkNumCheck numberString
totalPayments: {…}Array of document paymentsArray

totalPayments {...} Array

FieldDescriptionType
typePayment type codeString
amountPayment amount in kopecksInteger

Error codes

FieldDescription
0No error
1Authorization error
2Invalid JSON format
3Required parameters not passed
4The amount on the document does not correspond to the amount on the positions
5Internal error
6Shift not open
7Payment type is not supported
8The document is not fully paid (with automatic fiscalization)
9Document not found
11Change can only be issued in cash
12Unacceptable tax percentage
13Loan repayment can only be accepted by one type of payment at a time
16Incorrect tax percentage
18Returned item not found in the sale receipt.
19Quantity of returned item exceeds the sale quantity considering previous returns.
20Advance payment document number is not specified when required.
21Item not found in the advance payment receipt.
22Shift has been open longer than the allowed time limit.
23Bank terminal for card payments is not connected.
25Payment application for specialized payments is not connected.
27There is cash remaining in the register that needs to be collected
28Number of marking codes does not match the quantity of goods
29,42Matrix code validation error
30Product code validation error
31Packaging code validation error
32Missing mandatory parameter for bank transaction
33Deposit balance insufficient for use
34Item not available for sale

Responce example:

{
    "auth": "796660",
    "card_num": "537541******5609",
    "checkNum": "",
    "documentID": 15,
    "extraParams": {},
    "fiscalID": "25",
    "fiscalNum": "25",
    "docTime": "",
    "printTime": "",
    "docStatus": "",
    "message": "",
    "rrn": "410910000017",
    "shiftOrdersCnt": 0,
    "status": "success"
}

Response structure:

{
"status": "success",
"code": "integer, error code",
// 0 – no error
// 1 – authorization error
// 2 – incorrect JSON format
// 3 – mandatory parameters are missing
// 4 – document total does not match item totals
// 5 – internal error
// 6 – shift is not open
// 7 – payment type is not supported
// 8 – document is not fully paid (during automatic fiscalization)
// 9 – document not found
// 11 – change can only be given for cash payment
// 12 – document time is before shift start time
// 13 – loan repayment can only be accepted with one payment type at a time
// 16 – incorrect tax percentage
// 18 – returned item not found in the sale receipt
// 19 – quantity of returned item exceeds sold quantity considering previous returns
// 20 – advance payment document number not specified when required
// 21 – item not found in the advance payment receipt
// 22 – shift has been open longer than the allowed time limit
// 23 – bank terminal for card payments is not connected
// 25 – payment application for specialized payment types is not connected
// 27 – there is cash remaining in the register that needs to be collected
// 28 – number of marking codes does not match the quantity of goods
// 29, 42 – matrix code validation error
// 30 – product code validation error
// 31 – packaging code validation error
// 32 – missing mandatory parameter for bank transaction
// 33 – deposit balance insufficient for use
// 34 – item not available for sale
"message": "string, error text (optional)",
"printError": 0,
"documentID": 0,
"fiscalID": "string, fiscal document code (use for returns)",
"fiscalNum": "string, document number",
"docTime": "string, document creation date and time, format: yyyy-MM-dd hh:mm:ss",
"printTime": "string, document closing date and time, format: yyyy-MM-dd hh:mm:ss",
"docStatus": 0,
"rrn": "string, transaction number for bank terminal payment",
"auth": "string, authorization code",
"cardNum": "string, card number",
"checkNum": "string, check number",
"totalPayments": [
{
"code": "string, payment type code",
"amount": "integer, payment amount in kopecks"
}
]
}