Skip to main content

Postpaid Bill Payment

For postpaid orders, 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.

This diagram is logical. It omits delivery-mode details; see Architecture for the delivery model.

Message types:

Message typeDirectionPurpose
BillPreparationRequestedOpenApp -> POSAsk the POS to prepare or freeze a postpaid bill.
BillPreparationResultPOS -> OpenAppReturn prepared bill details or rejection details.
BillPaymentCompletedOpenApp -> POSTell the POS that later OpenApp payment succeeded.
BillPaymentFailedOpenApp -> POSTell the POS that OpenApp payment failed and prepared state should be released.
BillPaymentResultPOS -> OpenAppConfirm or reject applying the OpenApp payment in the POS.

Bill preparation rejection vocabulary: see Bill preparation rejection reasons.

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