Usage and Message Flows

There are a few common scenarios you can encounter when using the PayProtocol (P3) and PayServer. The messages used are described on the message specification page.
Simple Transactions
The diagram below shows a simple, successful transaction sequence message flow.
After logging the merchant in, the client should remember the list of the devices and their components in order to be able to send the execute transaction request message to the correct resource. If the device has only one transaction component, this information doesn't have to be displayed to the user, but the client still needs to store it.
Abort a Transaction
The diagram below shows an aborted transaction sequence message flow. The merchant should only have the option to abort a transaction if the previous transaction update indicated that the transaction is currently abortable. After sending abort operation request, the client should wait, not only for the abort operation response, but also for the execute transaction response. Aborting a transaction might take a moment, depending on its state. Do not assume that the transaction is over after you send or receive the abort operation messages. There will always be a proper execute transaction response.
Transaction Actions
Sometimes, during an ongoing transaction process, the PayServer asks you to do some additional actions, e.g., ask the shopper for a signature. When this happens the ongoing process stops and will not continue until you submit the correct message or, potentially, abort the process.
Submit Signature Action
In this case the PayServer is asking you to submit the customer's signature. You can do this by making a
SUBMIT_SIGNATURE_REQUEST
, in which you can either submit a digital signature or tell the transaction process that the shopper will sign the printed receipt. To keep the standard request-response flow, the PayServer responds to this by sending a
SUBMIT_SIGNATURE_RESPONSE
, which can have
"status": "error"
in case something was wrong with the request. The diagram below shows a transaction with signature sequence message flow.
Abort a Transaction During Action
When the PayServer indicates an action, you can also respond with a normal abort flow. The diagram below shows a transaction aborted on signature action sequence message flow.