Physical POS
End of Day, Void and Refund

End of Day, Void and Refund

There are two ways to undo an approved sale: a void and a refund. Which one applies depends on whether the payment has entered an end of day.

End of day and voids

When a device runs end-of-day, the payments included in it count as settled. A settled payment cannot be voided: the reversal request gets 409 physical_pos.payment.void_after_settlement with details.allowedOperation REFUND. Return the amount with a refund (REFUND) on the same payment. The rule does not depend on the device model.

  • You see that a payment is in an end-of-day from the settledAt field of the payment object: when it is filled, start a refund instead of a void. The end-of-day number is in settlementBatchNo. → Payments › Payment object
  • If your void request gets this error, start a refund for the same payment; the refund is a new operation, so use a new Idempotency-Key.
  • You read the devices' end-of-day results and their difference from the Lunixi records from the End-of-Day Records endpoint.

Who takes end of day?

PathHowPage
By hand on the deviceThe cashier takes end of day on the device.—
From the server, on demandYour server calls POST /devices/{deviceId}/settlement.Start End of Day
From the server, scheduledLunixi starts end of day at the time in the policy and retries within the window if needed.End-of-Day Policy
The device's own automatic end of dayThe device takes it itself; Lunixi records the result and watches for delays.End-of-Day Policy

Whichever path is used, the result reaches End-of-Day Records and the physical_pos.settlement.completed webhook. While end of day is running, the device does not take new payments.

Which one do I use?

Void or refund?If an approved sale is undone in full before end of day, void it; otherwise refund the whole amount, or make an itemized refund by product lines or a partial refund by amount; a payment that has not reached the device is cancelled before start.YESYESYESNONONOUndo an approved saleBefore end of dayand in full?In full?By productlines?Voidoperation: VOIDRefundREFUND · full amountItemized refundREFUND + itemsPartial refundREFUND + amountMinorNot on device yetCancel before startLEGENDQUESTIONVOIDREFUNDNOT STARTED
Once end of day is taken (settledAt set), a void is not possible. Partial and itemized refunds need the device model's support.
OperationWhenPage
VoidBefore end of day, the whole amount, no reversal on the root yetVoid
RefundAfter end of day, or when a void is not possible; the whole amountRefund
Partial refundPart of the amount; several timesPartial Refund
Itemized refundSpecific product lines of an itemized saleItemized Refund
Cancel before startThe payment has not reached the device yetCancel Before Start

End-of-day records

You read the devices' end-of-day results and whether they match Lunixi's records (MATCHED, MISMATCH, UNMAPPED) from the End-of-Day Records endpoint. Which end of day a payment entered is in the payment object's settledAt and settlementBatchNo fields. → The Payment Object