Skip to main content

Bill Preparation And Payment

For table postpay flows, OpenApp first asks the POS to prepare the bill. The POS should freeze or protect the bill state enough to ensure that the amount shown to the customer can be paid safely.

After the bill is prepared, OpenApp executes the customer payment. If payment succeeds, OpenApp tells the POS to apply the completed payment. If payment fails, OpenApp tells the POS to release the prepared state.

Message types:

Message typeDirectionPurpose
BillRequestedOpenApp -> POSAsk the POS to prepare or freeze a table bill.
BillPreparationResultPOS -> OpenAppReturn prepared bill details or rejection details.
PaymentCompletedOpenApp -> POSTell the POS that OpenApp payment succeeded.
PaymentFailedOpenApp -> POSTell the POS that OpenApp payment failed and prepared state should be released.
PosPaymentResultPOS -> OpenAppConfirm or reject applying the OpenApp payment in the POS.

Bill preparation rejection vocabulary: see Bill preparation rejection reasons.

After successful payment application, the POS should notify OpenApp that the table order is closed by sending TableOrderSnapshotChanged with changeType=ORDER_CLOSED.