Go-live checklist
The behaviours of your code to confirm on the test company before it works for a live company.
On this page
Moving to a live company is a setup step that we do with you (see Sandbox and live). Go through this list on the test company first; every item is a behaviour of your code, not a setting.
Credentials
- The client secret lives on a server you control and is read from a secret store, not from the code. Test and live credentials are kept apart.
- Your code asks for a new token before the old one ends (
expires_in) and after a401. - Your code takes the till and its current order from
listTillsandgetTill; it does not build an order id.
Changes
- Every change carries an
operationIdthat you stored before you sent the request, and a request that timed out is repeated with the same one. See Idempotency and concurrency. expectedRevisionis the revision you read, of the order for an order and of the business day for cash in and out and for the close.- A
409withrevision_conflictmakes your code read the order again, not repeat the request.
Statuses and payments
- Your code handles every status of Order and payment states, and treats a status it does not know as not final.
- A sale is paid when
statusispaid, not when a card payment starts and not when one payment isapproved: a smaller payment leaves the orderpartially_paidwithdueabove zero. - A
202fromstartCardPaymentmeans the reader has the amount. The result comes from the reader: your code reads the order or the till, or listens forpayment.declinedandorder.paid. - A declined card stays on the order as a payment with
statusdeclined. Your code showscard.declineReason, leavesdueas it is and offersretryCardPayment,takeCashPaymentorcancelCardPayment. - Your code reads
sync:queuedis a sale the till stored and has not posted,postedis a sale that stock, the books and reporting have, andnullis an order that is not paid, a voided one included.
Network and queue
- Before it offers a card, your code reads
networkon the till. While it isoffline, a card payment, a refund and the close of the day are refused withnetwork_lost; your code takes cash and repeats the rest when the till isonline. - A cash sale taken offline is stored by the till and posted first in, first out. Your code does not send it again; it reads
queue.countandqueue.ageSecondsand shows a sale in the queue as not yet posted.
Refunds
- Your code refunds a
paidorder whosesyncisposted; a sale in the queue is refused withorder_not_posted. - A refund names the units, a
methodthe customer paid by, areasonfrom the list andrestock. Your code does not send an amount: the amount is worked out from the lines and read from the refund. - A refund in cash needs the cash in the drawer, so your code handles
insufficient_cashby refunding by card or adding cash first.
Business day
- When a change is refused with
day_closed, your code opens the day withopenBusinessDayand then repeats the request. - To close, your code sends the cash counted in the drawer as
countedand readsclosing.differenceas a signed amount: negative when cash is missing. - A close can be refused with
open_order,held_orders,reader_busy,queue_not_emptyornetwork_lost; your code tells the cashier which one and what to do. See Close the day.
Events and replay
- Your endpoint answers with a
2xxstatus before it does any work and checks the bearer token. See Subscriptions. - The endpoint skips an
idit has already handled and anaggregateRevisionolder than the state it holds. See Delivery and retries and the Event catalogue. - Someone watches for deliveries in the state
parkedand knows how to replay them. See Replay.