Transaction flows
This section shows some procedural and transaction flow diagrams to help understand a typical sequence of callbacks during a transaction.
Connection
Client | Terminal | |
---|---|---|
ConnectNetwork | -> | |
<- | ConnectNetwork: returns OK | |
<- | callback: Link |
|
Login | -> | |
<- | callback: Busy |
|
<- | callback: Display("Please wait") | |
<- | callback: Busy |
|
<- | Login: returns OK | |
<- | callback: Display("Welcome") | |
Transactions happen, etc... | ||
Disconnect | -> | |
<- | callback: Link |
Simple transaction
Client | Terminal | |
---|---|---|
Purchase | -> | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Display("Please wait") | |
<- | callback: Card |
|
<- | callback: Display("MasterCard / Ask for PIN / Signature possible") | |
<- | callback: Display("Please wait") | |
<- | callback: Display("Please wait") | |
<- | callback: Print |
|
<- | callback: Print |
|
<- | callback: Display("PURCHASE / Approved / Ask customer to take card") | |
<- | callback: Card |
|
<- | callback: Display("Approved") | |
<- | Purchase returns OK | |
<- | callback: Display("Welcome") |
Pre-amount transaction
This sequence shows a pre-amount transaction, where the transaction is started with no amounts specified, and the amounts are sent later.
Client | Terminal | |
---|---|---|
PurchaseBeforeAmount | -> | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Card |
|
<- | callback: Display("MasterCard / Ask for PIN / Signature possible") | |
<- | callback: Display("Please wait") | |
<- | callback: Display("Chip is read / Waiting for amount") | |
SendPurchaseAmounts | -> | |
<- | SendPurchaseAmounts response OK | |
<- | callback: Display("Confirm total amount / MasterCard / 550,00 SEK") | |
<- | callback: Display("Please wait") | |
<- | callback: Print |
|
<- | callback: Display("Purchase approved / Ask customer to take card") | |
<- | callback: Card |
|
<- | callback: Display("Purchase approved") | |
<- | PurchaseBeforeAmount returns OK | |
<- | callback: Display("Welcome") |
In this example the amounts are sent after the “Waiting for amount” display prompt, but that is not a requirement. Here is a sequence that shows the amount being sent before the card is inserted. Note that there is no “confirm total amount” display, because the amount is shown on the PIN entry screen so the customer has the option to cancel the transaction if the amount is wrong.
Client | Terminal | |
---|---|---|
PurchaseBeforeAmount | -> | |
<- | callback: Display("New customer / Waiting for card") | |
SendPurchaseAmounts | -> | |
<- | SendPurchaseAmounts response OK | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Card |
|
<- | callback: Display("MasterCard / Ask for PIN / Signature possible") | |
<- | callback: Display("Please wait") | |
<- | callback: Print |
|
<- | callback: Display("Purchase approved / Ask customer to take card") | |
<- | callback: Card |
|
<- | callback: Display("Purchase approved") | |
<- | PurchaseBeforeAmount returns OK | |
<- | callback: Display("Welcome") |
Purchase with signature verification
The sequence below shows the terminal asking for signature verification during a purchase, where the cardholder has chosen signature rather than PIN.
Note that the merchant receipt is printed earlier than in a non-signature transaction, because the merchant receipt is the one that is signed by the customer.
Note also that the card is removed before signature verification in this sequence.
Client | Terminal | |
---|---|---|
Purchase | -> | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Card |
|
<- | callback: Display("MasterCard / Ask for PIN / Signature possible") | |
<- | callback: Display("Please wait") | |
<- | callback: Print |
|
<- | callback: Display("550,00 SEK / MasterCard / Ask customer to take card / Verify signature") | |
<- | callback: Card |
|
<- | callback: Verify |
|
VerifySignature returns True, signatureOk=True |
-> | |
<- | callback: Print |
|
<- | callback: Display("Purchase approved") | |
<- | Purchase returns OK | |
<- | callback: Display("Welcome") |
Cancelled transaction
A cancelled transaction is where the cardholder chooses to end the transaction early. In this sequence the card is removed at the PIN entry stage. Note the CardStatus callback showing the card removal. Note also that only one receipt is printed here because there is normally no merchant receipt for cancelled transactions.
Client | Terminal | |
---|---|---|
Purchase | -> | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Card |
|
<- | callback: Display("MasterCard / Ask for PIN / Signature possible") | |
<- | callback: Card |
|
<- | callback: Display("Transaction aborted") | |
<- | callback: Print |
|
<- | Purchase returns OK | |
<- | callback: Display("Welcome") |
Aborted transaction
An aborted transaction is where the transaction is ended early by the client application. As detailed in the API documentation, there is no response to the RequestTransactionAbort method. The client application must wait for the transaction result to be returned and then act accordingly.
Client | Terminal | |
---|---|---|
Purchase | -> | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Card |
|
<- | callback: Display("MasterCard / Ask for PIN / Signature possible") | |
RequestTransactionAbort | -> | |
<- | callback: Display("Transaction aborted / Ask customer to take card") | |
<- | callback: Print |
|
<- | callback: Card |
|
<- | callback: Display("Transaction aborted") | |
<- | Purchase returns OK |
Refund transaction
A refund transaction behaves in the same way as a simple purchase transaction. It is simpler from the customer’s perspective because there is no PIN entry. The authorisation and authentication responsibility in a refund is on the merchant rather than the card issuer.
Client | Terminal | |
---|---|---|
Refund | -> | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Print |
|
<- | callback: Print |
|
<- | callback: Display("Refund / Approved") | |
<- | callback: Card |
|
<- | callback: Display("Refund / Approved") | |
<- | Refund returns OK |
Reversal of the last transaction
The last approved transaction can normally be reversed. There is no scope for cardholder interaction here, and the client application will not have to supply any additional information.
Client | Terminal | |
---|---|---|
ReverseLastTransaction | -> | |
<- | callback: Print |
|
<- | callback: Print |
|
<- | callback: Display("Reversal / Approved") | |
<- | Reversal returns OK |
Enable the card reader
The client application can enable the card readers (chip card and magnetic stripe readers only) outside of a transaction. This allows the customer to present a card ahead of a transaction being started, allowing the client application more time to establish what kind of transaction is needed.
This can also be used to read bonus / loyalty card information for administrative purposes.
Client | Terminal | |
---|---|---|
EnableCardReaders with enable = True | -> | |
<- | EnableCardReaders returns OK | |
<- | callback: Display("New customer / Waiting for card") | |
<- | callback: Card |
|
<- | callback: Display("Please wait") | |
<- | callback: Card |