LocalPaymentProtocol

Document Type
Version
Date
Confidentiality
By

: Technical Interface Specification
: 3.4.02
: 30-07-2012
: NONE
: Udvikling

This Document is the property of Point Transaction Systems A/S. It is transferred under the conditions of Active
Non-Disclosure.
Use of this document is subject to the terms of this NDA (Non Disclosure Agreement).
This document will be returned under request to Point Transaction Systems A/S.

Local Payment Protocol

Page 1

Index
Preface

5

New since version 3.3.00

5

New since version 3.4.00

5

1. Hardware overview

6

1.1 The Terminal

7

2. Software overview

8

2. Software overview

8

3. Terminal functionality

9

3.1 Initialisation
3.1.1 Connect
3.1.2 Disconnect
3.1.3 Open
3.1.4 Close

9
9
9
9
9

3.2. Transaction functions
3.2.1 PIN purchase transactions
3.2.2 Signature purchase transactions
3.2.3 Signature refund transactions

9
9
9
10

3.3. Administrative functions
3.3.1 End of day function
3.3.2 Unlock receipt function
3.3.3 Terminal report
3.3.4 Clock synchronisation
3.3.5 Debit/Credit Properties

10
10
10
10
10
10

3.4 The Connect and Open procedure

11

4. Demo application

12

5. The KISS protocol

13

5.1 Frame layout

13

5.2 Control characters

14

5.3 CRC computation

17

5.4 Time out controls

18

5.5 Retry counter

18

5.6 Byte stuffing

18

5.7 Transmission Control Sequences

19

5.8 Error recovery

22

5.9 Line supervision

23

5.10 Line characteristics

24

5.11 Function in C to calculate CRC

24

}

24

Local Payment Protocol

Page 2

5.12 Functions in C to build KISS frame

24

}

25

5.13 Functions in C to verify KISS frame

26

}6. The BER-TLV principle

26

6. The BER-TLV principle

27

6.1 Definition

27

6.2 Properties

27

6.3 Motivation

28

6.4 Quick illustrated Description

28

7. Data objects - Container tags

30

7.3 The TRANSACTION Container

32

7.4 The ADMIN Container

33

7.6 The RECEIPT Container

35

7.7 The ERROR Container

36

7.8 The HANDLERSTR Container

36

7.8 The HOSTDATA Container

36

7.9 The MENU Container

37

7.10 The ENAI Container

38

7.11 The STOPLIST tag

39

8. Flows of TLV data objects

40

8.1 The flow of a Connect command

40

8.2 The flow of a Disconnect command

40

8.3 The flow of an Open command

41

8.4 The flow of a Close command

41

8.5 The flow of a PIN Purchase

42

8.6 The flow of a Signature Purchase

46

8.7 The application menu functionality

49

8.8 The Advice log functionality

49

8.10 Get terminal files functionality

50

8.11 Abort from ECR

51

8.12 The flow of a Local Card transaction (initiated by ECR)

52

8.13 The flow of a Local Card transaction (initiated by the user)

55

8.14 The flow of an endofday

58

8.15 The flow of a Terminal report

60

8.16 The flow of a Last transaction receipt request

61

8.17 Advice transfer flag

63

8.18 The flow of the Get DC properties

63

Local Payment Protocol

Page 3

CAC9 data 88 A14. Appendix 88 A8.3 Close 67 9.1 Result data with Transaction 94 A3. The merchant state-events 88 A1. Acqmsg data A5. Result data 94 A3.1 Connect 65 9.3 Command data 93 A3.6 Extended Issuer Envelope (EIE) 74 10.1 Receiving Error data Local Payment Protocol 97 97 97 97 Page 4 .2 Binary data with Transaction-Result 96 A4. Tag definitions 89 A2.1 Transaction data 92 A2.2 Open 66 9.19 The flow of the ENAI 9.4 Binary data with Receipt-Text 97 A5. General Flowcharts 10. Value definitions 92 A2. Binary data 95 A4.3 Result data with Receipt 94 A4. Error data A6.1 Acqmsg data with Transaction A6.3 Binary data with Admin-Result 96 A4.4 Disconnect 68 SEQ 69 : 02 9.8.2 Result data with Admin 94 A3.1 The important flow of the receipt and the transaction result 87 87 A.1 Binary data with Info-Text 95 A4.2 Amount data 92 A2.5 ClockSyncPBS 70 9. Examples 64 65 9.

using TLV structures embedded in the KISS communication protocol. see Release_notes NOTE: from terminal sw version 3. CAC9 data 98 A8.3. Terminal states and number 100 A11.1 Abort data with Info 98 A8. ExtendedECR data 99 A9. Description of locked states 101 A12. The merchant state-events 105 Preface This document describes one of three different approaches for interfacing to the Point Flex Terminal.00 Terminal SW changes. The merchant events and number 102 A13.1 CAC9 data with Transaction 98 A9.1 ExtendedECR functions 99 A10.4. New since version 3.4.00 The state “locked in no receipt” is obsolete transaction type “KeyEntry” added Support for EIE (extended issuer envelope) New since version 3.00 the state “INGEN KVITTERING” / “NO RECEIPT” will no longer appear Local Payment Protocol Page 5 .A7. The merchant state-event diagram 104 A14. Abort data 98 A7. The approach described here is how to communicate directly with the terminal.

no COM cable is used. Local Payment Protocol Page 6 .1. Only 3 terminals are shown. The illustration shows an example of a normal set-up. The terminal can also communicate to the host and Point by ISDN. When communicating by TCP/IP. hence the ECR and terminal communicate by the local network. connected between the Terminals ECR port and a COM/serial port on the ECR. or by TCP/IP. Hardware overview The Terminal and ECR can communicate either by using a RS232 serial cable. but in principle there is no limit to the number of terminals on the network.

1 The Terminal The terminal can be configured with 4 different communication modules. TCP/IP is only supported with the Ethernet module. Communication module Ethernet ISDN GSM PSTN RS232 Supported Supported Supported Supported TCP/IP Supported Not supported Not supported Not supported The figure below shows the backside of the Xenta Terminal on newer terminals the connection may vary.1. Local Payment Protocol Page 7 . The ECR port is only used with RS232 communication.

This document provides a number of tags defining which information the tag withholds. It is described elsewhere in this document. Software overview The software interface is based on the ASN. Figure 1 illustrates an example of an OPEN command ECR TLV object Protocol wrapping the containing the TLV objects Open Command Terminal Flow Figure 1 Local Payment Protocol Page 8 . the tags are wrapped up in the KISS Protocol. All the transferred data objects are encoded in BER TLV – the document will give a description of the structure of TLV data objects. totally full duplex. asynchronous. The KISS Protocol is a serial byte oriented protocol.1 TLV principle.2. Finally. and with no notion of master or slave.

4 Close The close command changes the text in the terminal display from ‘TERMINALEN ER KLAR’ to ‘VELKOMMEN’. the user is requested to swipe/insert a card. the user must sign it.1 Connect The connect command.1. 3. In this case only one receipt is generated. The ECR must send a 4 byte compatibility number to verify its SW compatibility (e. 3.1.g. 3. This transaction type generates two receipts. The receipt must be printed.3.1 PIN purchase transactions PIN based transaction is initiated from either the terminal.2. is used to disconnect the terminal in the ‘CONNECTED’ state.1 Initialisation The initialisation functions are used to make the terminal available to the user. e. unless the host the rejects the transaction or a communication error occurs. 0x02. It is used if the terminal is in ‘OPEN’ mode. the user must enter the PIN code and wait for the amount from the ECR. and the operator must verify the signature (depending on PSAM configuration). enter a PIN code and press ‘Godkend’ (‘OK’). If initiated from the terminal. or from the ECR. 3. It is used if the terminal is in ‘CONNECTED’ mode.3 Open The open command changes the text in the terminal display to ‘TERMINALEN ER KLAR’. by swiping/inserting a card. 3. It is recommended for the ECR developer to read the merchant section in the OTRS specification.2 Signature purchase transactions Signature based transactions must be initiated from the ECR.1. 3. Terminal functionality The terminal functionality is fulfilling the PBS OTRS specification. The second receipt is then generated based on the operator’s decision if the functionality is available in the PSAM (signature accepted/rejected).0x00).1.2.2 Disconnect The disconnect command. Local Payment Protocol Page 9 .0x00. 3. In case of successful host communication/verification.0x00.g.2. Transaction functions These functions are used to make transactions. and immediately sent to the ECR. If initiated from the ECR. After initiating the transaction the user is requested to swipe/insert a card and approve the amount. 3. is used to connect the terminal in ‘DISCONNECTED’ state. the first receipt is generated by the terminal. The functions must be initiated from the ECR. just after the terminal is booted. by sending purchase information to the terminal. This transaction always generates a receipt.

In this case only one receipt is generated. unless the host the rejects the transaction or a communication error occurs.3 Signature refund transactions Refund transactions must be initiated from the ECR. It is not possible to initiate transactions in this state. E.3.3 Terminal report The terminal report gives vital information on the terminal configuration. 3. It is used to empty and balance the terminal’s Datastore against the transaction inquirer host system. e.g. 3. SW and HW version. or testing connection in case of communication errors during transactions.2 Unlock receipt function Unlock receipt request in used to fetch a copy of the last receipt from the terminal’s Datastore if the terminal is locked in the NO_RECEIPT State.4 Clock synchronisation The clock synchronisation function is very useful when testing the terminal’s communication capabilities.3. and the operator must sign the customer receipt. Administrative functions can only be initiated from the ECR.3.1 End of day function End of day routine must be called at least one time every 24 hours.5 Debit/Credit Properties Debit/Credit properties return the status of previous transactions. Both receipts must be printed. communication module etc. Booting the terminal will not unlock the terminal. to test the connection to PBS and/or Point when setting up the terminal in a store.3. This transaction type generates two receipts. 3. 3. In case of successful host communication/verification.2. 3.3. the two receipts are generated by the terminal and immediately send to the ECR.g.3. It is also used for PSAM updates. After initiating the transaction the user is requested to swiped/insert a card and approves the amount. This function is implemented from PSAM version 50. Administrative functions The administrative functions are used to retrieve information from the terminal or set-up the terminal. Local Payment Protocol Page 10 .3. 3.

4 The Connect and Open procedure The terminal operates in many internal states. and it is only 'usable' for the customer and the ECR in the 'OPEN' state. Local Payment Protocol Page 11 . Notice the sequence of connect and open.3.

Demo application The C# PointKasseDemoLPP_TAPA3_Thread is a demo implementation of the LPP ToDo: timeout/retransmit/error handling. More advanced transaction can be made with the PointWareEkspedient (trace must be enabled) or PointKasseDemoOCX_TAPA3_Thread or PointKasseDemoDLL_TAPA3_Thread demo’s. Local Payment Protocol Page 12 . With the demo you can make the basic transactions and in the status window see the LPP flow of commands.4.txt produced can be inspected using the “Decode flxComTrace” button in the demo’s. and from the source get ideas on how to make your own implementation. to show the LPP flow of commands. The flxComTrace.

the end and the validity. the numbering. a trailer and a CRC (16-bit Cyclic Redundancy Check). 5. which has been received correctly. and provides transparency over data field. They have the following structure: STX Sequence number User data ETX CRC(LSB) CRC(MSB) Supervision frames 1. asynchronous. by stuffing some characters (see Chapter Byte Stuffing). full duplex.1 Frame layout There are two kinds of frames exchanged: • Information frames • Supervision frames Information frames Information frames consist of user data with a header.Approach – the KISS & BER-TLV interface The rest of the document describes the direct approach to interfacing to the Point Smash terminal. Flow regulation frame (Wait for ACK) WACK All fields are described in detail in the next sections. 2. This approach is based on the KISS protocol and TLV (Tag Length Value) objects. A message has a maximum length of 2 KB. Local Payment Protocol Page 13 . It uses ASCII coding. The KISS protocol The KISS protocol is used in when communication to the terminal. Messages are wrapped with a header and a tail to determine the beginning. A message sent by the application is repeated up to 3 times (thus a total of 4 transmissions) by the protocol if the message is not acknowledged. 5. The KISS protocol is serial bytes oriented protocol. Affirmative acknowledge frame ACK Sequence number The Sequence Number is the number of the last frame. Negative acknowledge frame NAK 3. If messages are lost or cannot be acknowledged the protocol will re-synchronise itself on the numbering of the first next correctly received message. The connection is point-to-point. and with no notion of master or slave.

4.2 Control characters STX (0x02) Start of Text Definition The transmission control character STX precedes an information frame. 3. ACK is used to indicate that the last transmitted information frame has been correctly received. 2. a DLE character (Bytes stuffing) must precede it. STX is not included in the CRC computation. NAK or WACK from the other party. 2. 2. DLE informs the receiving station that the next character is to be treated as data and must not be considered as a control character. 3. Description of use 1. A sequence number follows ACK. no stuffing is done. Description of use 1. DLE (0x10) Data Link Escape Definition A transmission control character stuffs another control character in the data of an information frame. 5. ETX signals that the next following 16 bits are the CRC characters. 2. ETX and DLE when they are used in the data field of a message. no stuffing is done. If DLE appears in the sequence number. 4. 5. 3. which is identical to the number of the information frame to which an affirmative acknowledgement is given. If ETX appears in the sequence number. Description of use 1. Local Payment Protocol Page 14 . ETX (0x03) End of Text Definition A transmission control character. DLE is included in the CRC computation. ETX indicates the end of an information frame. no stuffing is done. Description of use 1. If a text contains a character ETX. ETX calls for a reply ACK. If STX appears in the sequence number. 6. a DLE character (byte stuffing) must precede it. ACK is transmitted by one station as an affirmative response to the other station. STX resets the CRC computation to zero. 3. which terminates an information frame. An information frame must be preceded by STX. DLE must precede STX. when preceding an information frame.5. ACK (0x06) Affirmative Acknowledgement Definition Transmission control character sent by a station as an affirmative response to the other station. ETX is included in the CRC computation. If a User Data contains a character STX. 4.

6. 8. A sequence number does not follow WACK. 5. WACK will be repeated regularly (every time the receiving station tries to give the frame to the application layer). WACK is used to indicate that the last frame has been correctly received but has not yet been given to the application layer. Local Payment Protocol Page 15 . an ACK is sent. WACK (0x13) Wait for ACK (flow regulation) Definition A transmission control character sent by a station as a request to the other station to wait for ACK. A sequence number does not follow NAK. which might be transmitted. Description of use 1. 7. It is however possible that data is sent before this ACK.NAK (0x15) Negative Acknowledgement Definition A transmission control character sent by a station as a negative response to the other station. WACK is transmitted by one station as a request to wait for ACK 2. and the receiving station is ready to receive the same one. The time between successive WACKs must be less than the time-out on the ACK reception on the transmission station. 4. NAK indicates that the last transmitted information frame was not received correctly. There is no limit on the number of WACKs. 3. A WACK re-triggers the ACK time-out at the transmission station. Description of use 1. because the buffers are not empty. When the frame is passed to the application layer.

2. it restarts to 00.Sequence Number (0x00. It should be incremented after an Affirmative Acknowledgement or after an answer time-out. No stuffing is done over the sequence number. The Sequence number is used to compute the CRC. the sequence numbering should start at 0x00 again.0xff) Definition A sequence number sent by both stations as a way to mark the frames. Each station manages its own transmission sequence numbering. Description of use 1. The same value must be repeated in the affirmative acknowledgement. Upon reaching the value 0xFF. 4. Local Payment Protocol Page 16 . and is sent just after the STX in an information frame. 3. The Sequence Number is a one-byte value. 7.. The Sequence number is used to avoid that the same frame is given twice (or more) to the application. Once the sequence number has reached FF. 5. 6. Value 0xff is the only value for which the receiving station always accepts the frame regardless of its previous sequence number.

0x1040. 0x1dc0. 0x8d01. 0xc241. 0x21c0. 0x60c0. 0x4a40. 0xe40. 0x4b00. 0x3840. 0xf3c1. 0xedc1. 0xc901. 0x9901. 0x7580. 0xb541. 0xd341. 0x1a40. 0xbc81. 0xf781. 0x2200. 0x1e00. 0x6fc0. 0x7ec0. 0x9ac1. 0xa3c1. 0xb681. 0xe101. 0x3fc0. 0x4040 }. 0xcc0. 0x5140. 0x780. 0xa501. 0x1400. 0xd701. 0x8081. A frame is made of: STX . 0x6600. 0xb7c1. 0x2ec0. 0xdc41. 0x3300.3 CRC computation The CRC is computed over the sequence number and the ETX of a frame. 0xe8c1. 0xbe01. 0x3ac0. 0xdd01. 0x90c1. 0x59c0. 0xd1c1. For each data byte between the Sequence Number (included) until and included the closing ETX. 0xb041. 0xe541. 0x6c0. 0x6ac0. 0x3740. 0x9c01. 0x24c0. 0xb101. 0xf141. 0x2f80. 0x2800. 0xe981. 0x7bc0. 0xe681. 0xe2c1. 0xf441. 0x9c0. 0x7340. 0xf6c1. 0x500. 0xba41. 0xa001. 0x81c1. 0x4540. 0x48c0. 0xce81. 0x4dc0. 0x3e80. 0x74c0. 0x9301. 0x1540. 0x4380.data field . 0x8581. 0x4680. 0xef41. 0xe401. 0x2580. 0x440. 0xcfc1. 0x4e00. 0x35c0. 0xd201. 0x8641. 0xcc01. 0x6900. 0x1680. 0xfd81. 0x18c0. 0xcac1. 0x8201. 0x3c0. 0x880. 0x3180. 0x56c0. 0x3b80. 0xb401. 0x9741.5. 0x9181. 0xacc1. 0x7f80. 0x2640.CRC (MSB) Upon reception of the STX. 0x1380. 0x30c0. 0x65c0. which is delivered together with the documentation package crctp[] = { 0x0. 0x4400. 0x8801. 0xa9c1. It uses the polynomial X15 + X13 + 1. 0xa441. 0xa781. 0x4c80. 0x1100. 0x9481. 0xf00. 0xcd41. 0x53c0. 0xc5c1. 0x1b00. and is sent after the ETX closing the frame. 0xa6c1. 0x5a00. 0x9241. 0xd941. 0xff01. 0x6300. 0xd80. 0xd641. 0x4100. 0x9d41. 0x7080. 0x17c0. 0x8ec1. the following algorithm is applied: table_index = CRC(LSB) XOR data_byte CRC(LSB) = CRC(MSB) XOR lsb(table(table_index)) CRC(MSB) = 0 XOR msb(table(table_index)) Where: LSB stands for Least Significant Byte MSB stands for Most Significant Byte XOR stands for eXclusive OR Table is an array of 256 values. 0x2080. 0x7640. 0xd581. 0x71c0. 0x1980. 0xf881. 0xa881. 0x7c40. 0x3900. 0xbdc1. 0x8a81. 0xdf81. 0x5b40. 0xb381. 0x8341. 0x2bc0. 0xaa01. 0xd081. 0x9b81. 0x4980. 0x6c00. 0x95c1. 0xb8c1. 0xea41. 0xec81. 0xc741. 0xfe41. 0x6740. 0xd801. 0xa141. 0x3480. 0xa00.Sequence number . 0xcb81. 0x6480. 0x6b80. 0x2c40. 0x2700. 0x2940. 0x5880. 0xf501. 0xdec1. 0xc181. 0xeb01. 0xa281. 0x47c0.CRC (LSB) . 0xf9c1. 0xb981. 0x6e80. 0x6d40. 0x9fc1. 0xbf41. 0x5780. 0xae41. 0x7700. 0x12c0. 0x7d00. 0xdbc1. 0xe7c1. 0x5cc0. 0x7a80. 0x3c00. 0xc601. 0x8bc1. 0xe041. 0x5d80. 0x5000. 0xf281. 0x5280. 0xf001. 0xe381. 0x84c1. 0xfb41. 0xd4c1. 0x42c0. 0x9601. 0xb40. 0x6240. 0x9e81. 0x2a80. 0x8c41. 0xee01. 0xda81. 0x3d40. 0x280. 0x8701. 0x1f40. 0x5500. 0xfcc1. 0xfa01. 0x8941. Page 17 .ETX . 0x7940. 0x8f81. 0x1c80. 0x140. 0x3600. 0x2340. 0x6180. 0x6840. 0x5440. 0xb2c1. 0x3240. 0x4f40. 0xaf01. 0xad81. the LSB and MSB of the CRC field are initialised with zeroes. 0xbb01. 0xc841. 0x7800. 0xc301. Local Payment Protocol 0xc0c1. 0x7200. 0x5e40. 0x5f00. 0x9841. 0xc481. 0x2d00. 0xab41.

a byte stuffing mechanism is implemented at both stations. reconstituting by the same way the original User data.6 Byte stuffing The User data field allows transparent transmission. Local Payment Protocol Page 18 . meaning that every byte in this field may have a valid value between 0 and 255. Note that the affirmative acknowledge is followed by the same sequence number as the frame just sent. 5. an ETX or a DLE control character. The answer time-out is stopped at the transmitting station when an answer (ACK. 5. To avoid confusion between some values and control characters. The value of the inter character time-out is 2ms.4 Time out controls Answer time-out The answer time-out is started at the transmitting station when a frame is sent. Value = 3.5 Retry counter The retry counter is the maximum number of times a message may be re-transmitted in case of NAK response. The time-out is 4 seconds Inter character time-out The inter character time-out prevents a station having received a STX and some more characters. On the receiving station. The transmitting station scans every byte it received from its application. NAK) is received from the other station. to be considered as a valid affirmative acknowledgement.Example of CRC computation: station 1 station 2 station 1 station 2 0808A06D 28771383 08 0707A063 68 2A781316 1 5 0707A063 2A781316 07 6A SS ECC TE<data> XQ AS SS CE KQ N TRR XCC ECC TE<data> XQ AS A K SS TRR XCC CE KQ ECC TE<data> XQ TRR XCC 5. to stay in this state infinitely. once the leading STX and the Sequence Number are received. If it does. to find a STX. The answer time-out is re-triggered at the transmitting station when a WACK is received. or no answer at all. it stuffs this control character by adding a DLE just before this character. The DLE's added by this stuffing mechanism are used in the CRC computation. every DLE will be discarded.

5.7 Transmission Control Sequences Normal message transmission station 1 station 2 SS ECC TE<data> XQ AS CE KQ TRR XCC CRC error and re-transmission accepted station 1 station 2 SS ECC TE<data> XQ N AS A CE K KQ SS TRR XCC ECC TE<data> XQ TRR XCC CRC error and re-transmissions refused station 1 station 2 SS ECC SS ECC SS ECC TE<data> TRR TE<data> TRR TE<data> TRR XQ XCC XQ XCC XQ XCC => warns its application that the last message is lost N A K N A K N A K ECC SS TE<data> TRR XQ XCC N A K Answer time-out and re-transmission accepted station 1 station 2 SS ECC TE<data> XQ => time-out AS CE KQ Local Payment Protocol SS TRR XCC ECC TE<data> XQ TRR XCC Page 19 .

Answer time-out and re-transmissions refused station 1 SS ECC SS ECC TE<data> TRR TE<data> TRR XQ XCC XQ XCC => time out => time out => warns its application ECC SS ECC SS TE<data> TRR TE<data> TRR XQ XCC XQ XCC => time out => time out station 2 Inter character time-out and re-transmission accepted station 1 station 2 SS SS TE<data> XQ ECC TE<data> XQ TRR XCC N AS A CE K KQ => inter character time out Normal full duplex exchange station 1 station 2 Ss ECC Te<data> Xq XCC AS TRR KQ SS ECC TE<data> XQ As TRR XCC CE Ce Kq Information frame with out of order sequence number station 1 station 2 SS ECC TE<data> XQ SS TRR XCC X ECC TE<data> XQ TRR XCC AS AS CE CE KQ KQ X => warns its application for break in sequence numbering Local Payment Protocol Page 20 .

Fall in time out and re-send frame station 2 AS AS CE KQ X CE KQ WACK frame followed by an ACK station 1 station 2 SS ECC TE<data> XQ W A C K W A C K Local Payment Protocol TRR XCC AS CE KQ Page 21 .ACK frame with out of order sequence number station 1 SS ECC SS ECC TE<data> TRR TE<data> TRR XQ XCC XQ XCC => invalid ACK.

the sending station generates an alarm to its application layer. The sequence number is incremented for this new information frame. This implies that the information frame is sent a number of times equal to the retry counter plus one ! When the retry counter overflows. and take the next information frame.5. the sending station generates an alarm to its application layer. The sequence number is incremented for this new information frame. Station 1 Station 2 SS ECC SS ECC ECC SS ECC TE<data> TRR TE<data> TE<data> TRR TE<new> XQ XCC XQ XQ XCC XQ + 1 => Warn application retry counter exceeds SS ECC SS TRR TRR XCC XCC TE<data> TRR XQ XCC N N N A A A K K K + 1 => Warns application AS CE KQ N A K a frame has been lost An answer time-out on an information frame on the sending station. In case of unsuccessful re-sending. causes the re-transmission of the information frame a number of times equal to the value of the retry counter + 1. The maximal number of re-transmissions is equal to the message retry counter (see RETRY COUNTER).8 Error recovery A negative (NAK) reply to an information frame causes re-transmission of the information frame. and takes the next information frame. Station 1 SS ECC ECC TE<data> TE<data> XQ XQ + 1 SS SS TRR TRR XCC XCC ECC ECC TE<data> TE<new> XQ XQ SS ECC SS TRR TRR XCC XCC TE<data> TRR XQ XCC => Warns to the application Station 2 AS CE KQ + 1 => Warns to the application a frame has been lost Local Payment Protocol Page 22 .

Message layoutfor "I'm alive" frame: STX Sequence number ETX CRC(LSB) CRC(MSB) The ‘I’m alive’ frame is supported in the terminal. After a reset. Reports to its application in case of no answer. The final choice is left open for the designer. A more efficient way to handle the inter character time-out is to generate a negative (NAK) reply. Only one of both stations sends these messages: it is called the sender. Station 1 Station 2 SS ECC TE<data> XQ + 1 SS TRR XCC ECC TE<data> XQ SS TRR XCC ECC TE<new> XQ TRR XCC AS AS AS CE CE CE KQ KQ KQ + => Give to application 1 => Discard ! => Give to application An inter character time-out is treated in two different ways. It sends an "I'm alive" message whenever it wants to know the connection is operational.9 Line supervision To monitor the link between both stations. Example : The External Device is the sender. The easiest way is not to answer and wait for the answer time-out to elapse. Sender/receiver selection depends on the configuration. it sends "I'm alive" frames regularly and reports to its application when it receives the first ACK frame. Local Payment Protocol Page 23 . causing the re-transmission of the information frame. 5. causing a faster re-transmission of the information frame. The other station is called the receiver. This is done by regularly sending an empty frame to the other station. Reports to its application in case of no reception. but it’s not mandatory for the ECR to send this frame. The receiver: Answers all "I'm alive" frames with an ACK frame.An information frame having the same Sequence Number as the previous received information frame. a so-called "I'm alive" mechanism is available. Message flow : The sender: Sends the "I'm alive" frames regularly. must be acknowledged but discarded towards its application layer.

} Local Payment Protocol Page 24 . i<sizeBuf. } return *pSeq. 8 data bits. // crc & 0xFF is first byte of CRC // crc >> 8 is second byte of CRC } 5.5. 1 stop bit Parity: Speed: Physical encoding method: Byte serialisation: Maximum user data length: None 4800 to 115200 Non Return to Zero (NRZ) Least Significant Bit (LSB) first Up to 2048 bytes 5.12 Functions in C to build KISS frame #define #define PKISS_INIT_OUT PKISS_INIT_IN 0x01 0x02 static int PKISS_CheckState(PKISS *pKiss. size_t sizeBuf) { unsigned int i.11 Function in C to calculate CRC unsigned int CalcCRC(const unsigned char * pBuf. } else { (*pSeq)++. i++) { cval = crc ^ (unsigned int) pBuf[i]. crc = (crc >> 8) ^ crctp[cval & 0xff]. } return crc.10 Line characteristics Asynchronous Full duplex 1 start bit. } static void PKISS_UnSetState(PKISS *pKiss. crc = 0. byte state) { pKiss->state ^= (state & pKiss->state). cval. for(i=0. } static byte PKISS_NewSeq(byte *pSeq) { if (*pSeq >= 0xFE) { *pSeq = 0x00. byte state) { return pKiss->state & state.

*pStart. } Local Payment Protocol Page 25 .static int PKISS_Stuff(byte *pSBuf. const byte *pData. 2 + fsize). pData. break. pStart = pSBuf. res++. PKISS_INIT_OUT). *pSBuf++ = *pCursor++. default: *pSBuf++ = *pCursor++. pKiss->oframe[2 + fsize] = ETX. PKISS_INIT_OUT)) { PKISS_UnSetState(pKiss. pKiss->oframe[0] = STX. } else { pKiss->oframe[1] = PKISS_NewSeq(&pKiss->oSeqNr). byte *pCursor. } static void PKISS_BuildFrame(PKISS *pKiss. } fsize = PKISS_Stuff(&pKiss->oframe[2]. } } } return res. pKiss->numberOfSends = 0. crc = PCRC_CalcCRC(&pKiss->oframe[1]. dataSize). pKiss->oSeqNr = 0xFF. crc. pEnd = pCursor + bufSize. size_t bufSize) { int res = 0. while(pCursor < pEnd) { switch(*pCursor) { case STX : case ETX : case DLE : *pSBuf++ = DLE. pKiss->oframe[4 + fsize] = crc >> 8. size_t dataSize) { uint fsize. pKiss->oframe[3 + fsize] = crc & 0xFF. pKiss->ofSize = fsize + 5. if (bufSize) { pCursor = (byte*) pBuf. res+= 2. pKiss->oframe[1] = 0xFF. const byte *pBuf. break. *pEnd. if (PKISS_CheckState(pKiss.

} return res. PKISS_INIT_IN)) { res = 1. recv_crc = pKiss->iframe[pKiss->ifSize . byte recvSeq. recv_crc."Seq error. } static int PKISS_VerifyFrame(PKISS *pKiss) { int res = 0. pKiss->ifSize . if (PKISS_VerifySeq(pKiss)) res = 1. fprintf(stderr. } else if ((recvSeq . } return res.recv_crc.1) == pKiss->iSeqNr) { res = 1. } else if ((recvSeq == 0x00) && (pKiss->iSeqNr >= 0xFE)) { res = 1. uint calc_crc.2]."CRC error..calc_crc). recvSeq = pKiss->iframe[1]. } } else { if (pKiss->numberOfSends >= pKiss->maxNumberOfSends) pKiss->error = PKISS_CRC_ERROR.3).5..13 Functions in C to verify KISS frame static int PKISS_VerifySeq(PKISS *pKiss) { int res = 0. if (recv_crc == calc_crc) { pKiss->error = PKISS_OK. if (PKISS_CheckState(pKiss. fprintf(stderr.. } Local Payment Protocol Page 26 .1] << 8.. } else if (recvSeq == 0xFF) { res = 1. } else if (recvSeq == pKiss->iSeqNr) { res = 1. %x %x\n".\n"). else { if (pKiss->numberOfSends >= pKiss->maxNumberOfSends) pKiss->error = PKISS_SEQ_ERROR. calc_crc = PCRC_CalcCRC(&pKiss->iframe[1]. recv_crc += pKiss->iframe[pKiss->ifSize .

6. The BER-TLV principle
The data objects are encoded in BER TLV – this section will give a brief description of the structure of
TLV data objects.
6.1 Definition
A BER TLV is an ISO standardised encoded representation of a Data Object. BER stands for Basic
Rules of Encoding (of a data object) while TLV stands for Tag, Length and Value.
6.2 Properties
A TLV is a data object that encapsulates three properties Tag, Length and Value as follows:
TAG:
LEN:
VAL:

a numerical value uniquely identifying the data object,
a numerical value specifying the length of data contained in the value property,
a data container for the actual value of the data object being encoded as a TLV.

TLV’s come in two forms: Constructed and Primitive.
Constructed TLV: is one that is used to embed one or more other TLV’s in its value property. These
embedded TLV’s can themselves be either primitive or constructed.
A Constructed TLV can contain virtually any number of other constructed TLV’s in there turn
containing other embedded TLV’s and so on.
A Constructed TLV could therefore be assimilated to a Directory in a traditional file structure.
Primitive TLV: is one that is used to convey only simple data in its value property.
It could be assimilated to a data File in a traditional file structure.

Constructed TLV
Primitive TLV
Primitive TLV
Constructed TLV
Constructed TLV
Constructed TLV
Primitive TLV
Primitive TLV
Constructed TLV

Constructed TLV

Primitive TLV
Constructed TLV

Primitive TLV

Primitive TLV

Local Payment Protocol

Page 27

6.3 Motivation
The use of TLV to convey data between two devices is specified for the following reasons
It is standardised following ISO specifications
Constructed TLV’s can embed other TLV’s which them selves if constructed may do the same,
which allows dynamic use and assembling of DO’s
Has been widely used, tested and documented.
6.4 Quick illustrated Description
The BER of TLVs are fully described in the SS-ISO 8825 series of standards. The reader is
recommended therefore to read this document in conjunction with those standards.
The first byte in a TLV is the Tag byte, composed of 3 fields: Class (2 bits) indicating its scope, Form
(1 bit) indicating if it is constructed or primitive, and Tagvalue (5 bits) representing the actual value of
the Tag.
The Tag byte: If the Tag value is greater than or equal to 31 then the first five bits of the first Tag byte
will be 111112 indicating that there is at least one following Tag byte. This next Tag byte has a Flag bit
(bit 8) indicating weather it is the last or not in a series of Tag bytes. The other bits (7 to 1) represent
the actual Tag value.
The Length byte: has a flag bit (bit 8) set to zero when bits 7 to 1 suffice to represent the length
otherwise set to 1 with bits 7 to 1 indicating the number of sub bytes representing the value of LEN.
Sub bytes do not have flag bits. LEN indicates the number of Value bytes.
The Value byte: is only data, with Tag describing its content and Length its length in bytes.

Tag octet - First Tag octet
Bit 8

Bit 7

0
0
1
1

0
1
0
1

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1 Scope
Class
Universal.
Application.
Context Specific.
Private.
Form
Primitive.
Constructed.

0
1

1
0

1

1
1
1 – 1E (hex)
0
0
0

1
0

Value
See next byte
EMV RESERVED
Not Used

Tag octet - Following Tag octet
Bit 8
0
1

Bit 7

Bit 6

Bit 5

Bit 4
1 – 7F (hex)

Local Payment Protocol

Bit 3

Bit 2

Bit 1 Description
Last Tag
See next Tag byte
Tag ID or Value

Page 28

Length octet
Bit
8

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1 Description
LEN < 128.
Bits 7 ->1 = LEN
LEN > 127.
Bits 7 -> 1 = N.Bytes LEN
Value

0
1
1 – 7Fh

Value octet
Bit 8

Bit 7

Bit 6

Local Payment Protocol

Bit 5
Bit 4
0 – FFh

Bit 3

Bit 2

Bit 1 Description
Value

Page 29

1 The INIT Container The INIT container request from the ECR to the terminal is constructed like this: Tag 0x69 Value Init 0x40 0x42 0x44 0x46 0x80 Connect Disconnect Open Close Binary Presence Mandatory Mandatory* Mandatory* Mandatory* Mandatory* Optional *Only one of these four tags included.Container tags This section describes the various Container tag data objects. which are sent between the ECR and the terminal.7.0x00. 0x02. Data objects .0x00). 7.0x00. The response from the terminal is constructed like this: Tag 0x69 Value Init 0x84 0x80 0x82 0x90 0x86 Result Binary Text ExtendedECR State Presence Mandatory Mandatory Optional Optional* Optional* Optional * The terminal id and extended ecr functions are included at Connect Local Payment Protocol Page 30 . The Connect tag must include version number as four bytes (eg.

2 The DATA Container The DATA container from the terminal is constructed like this: Tag 0x63 Value Data 0x71 0x6F 0x86 Local Card data Card data 0x52 Card number 0x54 AID State (binary) Presence Mandatory Mandatory** Mandatory Mandatory* Optional* Optional *The card number is included if available. If the transaction must be aborted the amount tag is optional but the result tag must be negative (0x01).7. ** This tag is included in conjunction with Local Card transactions Local Payment Protocol Page 31 . the amount tag must be included and the result tag must be positive (0x00). ** This tag is included in conjunction with Local Card transactions The DATA Container reply from the ECR is constructed like this: Tag 0x63 Value Data 0x48 0x6F 0x71 Amount Card data Local Card Data 0x84 Result Presence Mandatory Optional* Mandatory Mandatory** Mandatory *If the transaction must continue at this point.

the terminal will use the default values defined in its param. there will be no receipt. NOTE: If the Terminal is configured to forward ip traffic to the ECR.7. TT to 0x00 and TR to 0x00. ‘LANGE SVARTIDER’ from PBS). the ENAI container will also appear in the reply. For purchase set MI to 0x00. Local Payment Protocol Page 32 . the receipt will always be present.g. If the user presses ‘Slet Alt’ or the operator aborts the transaction before the transaction is send to the transaction inquirer. and can include several optional tags: Tag 0x65 Value Transaction 0x4E MI 0x4C CU 0x56 TT 0x50 TR 0x92 CARD_SOURCE 0x93 PREPAID 0x94 SCAN 0x95 TERMINAL ENV 0x4A REF_NO Presence Mandatory Optional* Optional* Optional* Optional* Optional* Optional* Optional* Optional* Optional* *If not included. for refund set MI to 0x00. The reply can include an INFO container with host information (e.ini file. E.3 The TRANSACTION Container This container tag is used to initiate a transaction from the ECR.g. TT to 0x20 and TR to 0x01. The ECR may not run any further transactions before an endOfDay routine has been accomplished. For KeyEntered transaction set CARD_SOURCE to 0x10 0x02 (shows as DLE 02 in demo) The reply from the terminal when the transaction finishes will be: Tag 0x65 Value Transaction 0x84 0x6B 0x80 0x86 0x13 0x11 0x08 Result Receipt Binary State ASW1ASW2 C9CA Acqmsg Presence Mandatory Mandatory Mandatory* Optional Optional Optional Optional Mandatory* *If the terminal have been communicating with the transaction acquirer. Advice Transfer will only appear if requested by PBS.

The reply from the terminal when the administrative function finishes will be: Tag 0x67 Value Admin 0x84 0x80 0x86 Result Binary State Presence Mandatory Mandatory Optional Optional NOTE: Reply for command value 0x80.4 The ADMIN Container This container tag is used to initiate administrative functions on the terminal Tag 0x67 Value Admin 0x88 0x10 0x5A Command STAN (bcd) Cardnumber (bcd) Presence Mandatory Mandatory Optional* Optional* *Command values (0x80 and 0x81) will add either STAN or Cardnumber. 0x81 and 0x83.7. are embedded in an INFO container. Local Payment Protocol Page 33 . NOTE: If the Terminal is configured to forward ip traffic to the ECR. the ENAI container will also appear in the reply.

Tag 0x60 Value Info 0x00 0x82 0x84 0x06 0x5A 0x10 0x5C 0x48 0x4C 0x80 0x86 TSI Text Result Abort Cardnumber * Stan*’ Timestamp*’ Amount’ Currency Code’ Binary’ State ascii ascii bcd bcd DTHR format Presence Mandatory Optional Optional Optional ** Optional Optional Optional Optional Optional Optional Optional Optional TSI: Transaction State Information.5 The INFO Container This tag is used to carry information. Amount. Timestamp. ‘ These tags only when command 0x80 and 0x81. * When available in the terminal. Stan (PBS reference #) and transaction timestamp are embedded into the first info container transmitted to the ECR. byte.7. exponent 1 byte. Local Payment Protocol Page 34 . which do not need any further action. ‘ Currency Code (2 byte) embeds the currency exponent as 3. the terminal may respond with Stan. Currency Code (+++) 2 byte. the full Card number. or if requested transaction properties not found with ASW1-ASW2 code (usually 0x1033) as a Binary tag. status messages. E.g. and response to administrative command 0x80 and 0x81. ** see transaction flow (transaction preresult). ‘ When the ECR issues administrative command 0x80 and 0x81.

Tag 0x6B Value Receipt Presence Mandatory 0x82 Receipt Text 0x02 Confirm** Optional 0x95 DCC rate*** Optional 0x0E Token (ascii) Optional 0x80 Binary Struct Optional (2) 0x99 E-receipt Optional(8) 0x13 Asw1Asw2 Optional (8) 0x5C Time (unix) Optional (8) 0x52 Card# (bcd) Optional (8) 0x48 Amount (binary) Optional (8) 0x58 Fee (binary) Optional (8) 0x1C Extra (binary) Optional (8) 0x59 Gratuity(binary) Optional(8) 0x4C Currency (bcd) Optional (8) 0x54 AID (ascii) * Optional (8) 0x0A ATC * Optional (8) 0x0C AED * Optional (8) 0x1E ARC * Optional (8) 0x10 STAN * Optional (8) 0x12 PSAMID * Optional (8) 0x14 ACODE * Optional (8) 0x16 CVM * Optional (8) 0x18 AutCode (ascii) Optional (8) 0x5E Cardname (ascii) Optional(8) 0x1E Terminal ID (ascii) Optional (8) 0x4A Refnr (binary) Mandatory 0x01 Number (ascii) Optional (4) 0x03 Name (ascii) Optional (4) 0x05 City (ascii) Optional (4) 0x07 Address (ascii) Optional (4) 0x09 Zip (ascii) Optional (4) 0x0B Phone (ascii) Optional (4) 0x0D Brn. (ascii) Optional (4) 0x86 State Optional 0x08 Host msg Optional 0x97 Batch Number Optional 0x98 DCC currency Optional 0x96 Cancellation allowed Optional 0x0E Token Optional 0x0F PSAM Creator Optional Local Payment Protocol Mandatory Page 35 .6 The RECEIPT Container This tag carries receipt information and it can be either nested in the transaction container or send as a standalone container.7.

7 The ERROR Container This tag is used to carry error information from the terminal to the ECR. depending on the terminal state.8 The HANDLERSTR Container This tag is used to carry handler string information.0x92 Card source Optional 0x5A Card Reconciliation Counter-id CRC Optional Optional (4): merchant info bit set in terminal.000000” The answer to a receipt must always look like this: Tag 0x6B Value Receipt 0x84 Result Presence Mandatory Mandatory 7. Tag 0x73 Value HandlerString 0x80 Data* Presence Mandatory Mandatory Variable length Host data. Error codes other than 3 are for internal use. *** DCC rate e. Optional (8): receipt information bit set in terminal * EMV specific value (information in EMV specification) ** see transaction flow. Tag 0x73 Value HostData 0x80 Data Presence Mandatory Mandatory See below pg. Local Payment Protocol Page 36 . 7.8 The HOSTDATA Container This tag is used to carry host data information. Host Data flow. Tag 0x6C Value Error 0x80 0x86 Error code State Presence Mandatory Mandatory Mandatory ECR must only handle Error codes 3. “1. The ECR does not answer this operation 7.g.

For command 3 (DCC) text holds the DCC pre-receipt text for printing (max 2048 bytes). giving a total of 21 chars per line and maximum 10 lines (total 210 bytes). otherwise the transaction is terminated (‘Afbrudt’). CH Currency. within the given timeout value. and the ECR must respond 1 for selection of DCC currency or 0 for not selection. ** CH Amount. The Binary tag includes a timeout value.7. CH Currency ACode (ch currency exponent) and ME Amount (ME currency always DKK) only with DCC and command 3. If the Command tag is 2 the text is ‘KORT ISAT KORREKT ?’.9 The MENU Container This tag is used to carry menu information. The response from the ECR must include the selected line number in the Result tag. the ECR respond must include 1 for ‘ja’ or 0 or –1 for ‘nej’. within the time of the timeout value. The terminal menu request to the ECR is constructed like this: Tag 0x77 Value Menu 0x88 0x82 0x80 0x48 0x4C 0x58 0x14 0x86 Command Text Binary DCC CH Amount DCC CH Currency DCC ME Amount DCC CH Currency Exp State Presence Mandatory Mandatory* Mandatory Mandatory Optional** Optional** Optional** Optional** Mandatory The Command tag is 1 for Application list. The response from the ECR is constructed like this: Tag 0x77 Value Menu 0x84 Local Payment Protocol Result Presence Mandatory Optional Page 37 . 2 for ECR card inserted correct and 3 for DCC. The Text tag holds menu text lines that are 20 chars long plus a termination zero. within the time of the timeout value.

g. Result equal 0x5A indicate that binary data is received OK. 22000 (decimal).229. routing of data to and from PBS through the ECR’s serial connection. The reply format from the ECR: Tag 0x79 Value ENAI 0x80 0x84 Binary Result 1 byte Presence Mandatory Optional Mandatory For the connect command Result equal 0x00 (one byte) indicate OK.g.g.132. IP Address is up to 15 chars e. IP Port and IP Timeout are present.g.10 The ENAI Container This container is used to carry data information and commands for External Network Application Interface. IP Timeout is a 4 byte integer e.7. IP Port is a 4 byte integer e. Local Payment Protocol Page 38 . The ECR must close the connection and reply the result to the Terminal. The terminal will discontinue an ip connection with the Command 0x02 (disconnect). The ECR must create a connection with the specified parameters and reply the Result to the Terminal. e. 30000 (for 30 seconds). 80. Result equal 0x01 indicate an ERROR. If data are send in the Binary tag. The ENAI container will only be transmitted during transactions and administrative commands (clock sync). and the ECR must forward these data to the connection. The ECR will forward received data with the Binary tag to the Terminal.164. The ECR must create and ip connection with the specified parameters and forward the traffic to the connection. The Terminal will transmit data with the Binary tag. The format from the Terminal: Tag 0x79 Value ENAI 0x80 0x8A 0x8C 0x8E 0x88 Presence Mandatory Optional Optional Optional Optional Optional Binary IP Address IP Port IP Timeout Command The Terminal will initiate an ip transmission with the Command 0x01 (connect) and the IP Address. If configured the terminal will embed and route all ip traffic to the ECR through the serial interface.

The stoplist is checked for transaction type offline.7. Tag 0x5B Value STOPLIST Local Payment Protocol 0-8 bytes Presence Mandatory Page 39 .11 The STOPLIST tag The stoplist tag is used to inform the ecr to return an authorisation code (issued by PBS. and usually obtained before start of the transaction). The ecr must return the authorisation code using the stoplist tag and including 8 bytes (the tag length must be eight). where the first six chars are the authorisation code received from PBS followed by two zeros. The default code is defined as six spaces.

Flows of TLV data objects 8.g.2 The flow of a Disconnect command To disconnect from the terminal.g. INIT for more detail.g. 0x00 and 0x01 ) TEXT ( value is terminal id e.8. 8.g. 0x00 ) BINARY ( value is e. ‘00990071’ ) ExtendedECR (value is e. Local Payment Protocol Page 40 . the following data must be send to the terminal: INIT DISCONNECT ( empty ) The immediate feedback from the terminal will be: INIT RESULT STATE ( optional ) The result will be either 0x00 for successful or 0x01 for unsuccessful. The immediate feedback from the terminal will be: INIT RESULT ( value is e. 0x00 0x00 0x00 0x00) STATE ( optional ) The result will be either 0x00 for successful or 0x01 for unsuccessful.1 The flow of a Connect command To connect to the terminal. 0x00 and 0x01 ) see.g. the following data must be send to the terminal: INIT CONNECT ( value is e.

4 The flow of a Close command To close the terminal. Local Payment Protocol Page 41 .8.3 The flow of an Open command To open the terminal. the following data must be send to the terminal: INIT CLOSE ( empty ) The immediate feedback from the terminal will be: INIT RESULT STATE ( optional ) The result will be either 0x00 for successful or 0x01 for unsuccessful. the following data must be send to the terminal: INIT OPEN ( empty ) BINARY ( optional ) The immediate feedback from the terminal will be: INIT RESULT BINARY ( optional ) STATE ( optional ) The result will be either 0x00 for successful or 0x01 for unsuccessful. 8.

If the card have been swiped before sending a purchase request: NOTE that in certain fallback situations TSI is send twice. which must be added to the transaction.g.g. 4571… ) PCI padded AID ( optional and only if applicable (EMV)) STATE ( optional ) If the card is accepted.5 The flow of a PIN Purchase To initiate a transaction. the ECR must respond with the 4-byte AMOUNT tag: DATA CARDDATA RESULT ( 0x00 ) AMOUNT ( e. If not sent. The immediate feedback from the terminal on the TRANSACTION tag will either be: INFO TSI ( “Afventer kort” ) BINARY ( 0x01 -> status line 1 ) STATE ( optional ) If the card have NOT been swiped before sending a purchase request. 19995 ) FEE (4 bytes) The FEE tag (optional) is directly related to the fee amount (DKK Øre). TT.g. Local Payment Protocol Page 42 .8. default values can be found in the appendix. The BINARY tag is optional.g. 0x0 for default transaction type ) CU ( e. TR and the REF_NO tags are all optional. DATA CARDDATA CARDNUMBER ( e. the following data must be send to the terminal: TRANSACTION MI ( e. 208 for DKK ) TT ( purchase or refund ) TR ( purchase or refund ) REF_NO (optional ) The MI. CU.

the ECR must reply negative to the DATA tag. etc. like this: DATA CARDDATA RESULT ( 0x01 ) The terminal replies a termination tag: TRANSACTION RESULT ( 0x01 ) RECEIPT TEXT ( “OLES PIZZABAR…. ” ) STATE ( optional ) REF_NO (optional ) Local Payment Protocol Page 43 .And the terminal replies: INFO TSI ( “Afventer PIN / beløb” ) BINARY ( terminal suggests: status line 1 ) STATE ( optional ) NOTE that in certain fallback situations CARDDATA is send twice. Or if the card is not accepted.

the terminal sends the expected(!) transaction result.The ECR must acknowledge the receipt by sending this tag: RECEIPT RESULT ( 0x00 or 0x01 ) If the ECR application accepts the card. before completing the transaction with the PSAM. INFO RESULT( expected(!) transaction result ) Local Payment Protocol Page 44 . the terminal will continue in the PIN ENTRY state and the state changes when the user presses Godkend: INFO TSI ( “Vent (arbejder)” ) BINARY ( status line 1 ) STATE ( optional ) Followed by several status messages: INFO TEXT ( “Opkald…” ) PAN (the full primary account number) STAN (a unique PBS reference number) TIME (transaction timestamp in DTHR format) BINARY ( status line 2) STATE ( optional ) INFO TEXT ( “Sender…” ) BINARY ( status line 2) STATE ( optional ) Etc… To make sure that the ECR receives the result of the transaction as soon as possible.

The ECR must. acknowledge the receipt by sending this tag: RECEIPT RESULT ( 0x00 or 0x01 ) If the TRANSACTION tag isn't received by the ECR. If the RECEIPT tag is not send from the ECR (cable error etc. However. the terminal will always generate a receipt. to verify the result. ” ) STATE ( optional ) BINARY ( optional ) REF_NO (optional ) NOTE that in certain fallback situations the TRANSACTION container is send twice. and can only be unlocked if the ECR requests a receipt unlock (ADMIN with ‘unlock receipt’ as the COMMAND). as always. the transaction must be handled manually (when convenient). the expected transaction result can be used to complete the transaction on the ECR. the terminal will enter the ‘Ingen Kvittering’ status.). NOTE: This “Ingen Kvittering” state has been removed from terminal SW version 3.4 Local Payment Protocol Page 45 .At this point. which also enclosed the final result of the transaction: TRANSACTION RESULT ( 0x00 or 0x01 ) RECEIPT TEXT ( “Point SMASH Terminal…etc.

19995 ) FEE (4 bytes) Local Payment Protocol Page 46 . 4571… ) AID ( optional and only if applicable (EMV)) STATE ( optional ) If the card is accepted.g. the ECR must respond with the 4-byte AMOUNT tag: DATA CARDDATA RESULT ( 0x00 ) AMOUNT ( e. 0x82 for Signature transaction type ) CU ( Optional ) TT ( 0x00 purchase ) REF_NO (optional ) The CU and the REF_NO tags are all optional.8.g.6 The flow of a Signature Purchase To initiate a signature transaction. the following data must be send to the terminal: TRANSACTION MI ( e. the following data is send to the ECR: DATA CARDDATA CARDNUMBER ( e. The immediate feedback from the terminal on the TRANSACTION tag will be: INFO TSI ( “Afventer kort” ) BINARY ( 0x01 -> status line 1 ) STATE ( optional ) When the card is swiped.g. If not sent. default values are used (can be found in the appendix).

” ) CONFIRM ( optional ) STATE ( optional ) BINARY ( optional ) REF_NO (optional ) Local Payment Protocol Page 47 . which the customer must sign is sent first: RECEIPT TEXT ( “Point SMASH Terminal…etc. like a PIN transaction. the ECR must reply negative to the DATA tag.And the terminal replies: INFO TSI ( “Afventer beløb” ) BINARY ( terminal suggests: status line 1 ) STATE ( optional ) Or if the card is not accepted.… The first receipt. the terminal will continue in the PIN ENTRY state and the state changes when the user presses ‘Godkend’: INFO TSI ( “Vent (arbejder)” ) BINARY ( status line 1) STATE ( optional ) Followed by several status messages: INFO TEXT ( “Opkald…” ) BINARY ( status line 2) STATE ( optional ) INFO TEXT ( “Sender…” ) BINARY ( status line 2) STATE ( optional ) Etc. If the ECR application accepts the card.

The answer to this receipt must be positive (0x00) to accept the customer signature and negative (0x01) to reject the transaction. This must be done within 3 minutes. If the CONFIRM tag appears. RECEIPT RESULT ( 0x00 or 0x01 ) The terminal will reply with either an approved receipt or a rejected receipt TRANSACTION RESULT ( 0x00 or 0x01 ) RECEIPT TEXT ( “Point SMASH Terminal…etc. ” ) STATE ( optional ) BINARY ( optional ) REF_NO (optional ) The ECR must also acknowledge the receipt by sending this tag: RECEIPT RESULT ( 0x00 or 0x01 ) Local Payment Protocol Page 48 . then the ECR/operator is requested to acknowledge the signature.

TEXT. menu.g. If RETURN is not within the number of lines. instead of the ECR. No reply is needed (DATA tag is even). 1 byte. The binary tag is optional. If timeout is expired RESULT is –2. no timeout is used (infinity). The ECR can then save a copy of the terminal datastore to be used in conjunction with errorhandling (primarily with offline transactions). if the first line is selected RESULT is 1. 21 bytes pr. BINARY COMMAND holds the line number to be displayed. For return transactions with gratuity this amount can be added. The ECR must reply with the following tag: MENU RESULT The RESULT tag must hold the value for the selected menu point. MENU COMMAND.8.9 Fee functionality If the terminal must calculate a fee. DATA ( 0x62 !! ) FEE ( 4 bytes ) GRATUITY (4 bytes) Local Payment Protocol Page 49 . The OTRS Specification specifies at least 10 lines to be shown. No reply is needed. 8. but cannot read/write from the card.7 The application menu functionality This functionality is used during refund transactions when the card requests a menu to be shown on the ECR display. The calculated fee is sent directly to ECR when the amount is known by the terminal. If this functionality is activated (terminal parameter) the transaction time is increased by half approx a second. HANDLERSTR BINARY 8. The information is given directly to the ECR. If the value is 0. This is done via the HANDLESTR tag. the terminal response is undefined. The MENU container is also used if the terminal detects an inserted chip card. The binary tag holds the timeout (to display the menu) in milliseconds.8 The Advice log functionality The terminal is able to send copies of datastore operations to the ECR. e. A text message “Card inserted correctly?” is then to be shown on the ECR display. TEXT holds 21 bytes per line (‘\0’ terminated text).

Local Payment Protocol Page 50 . it means that there are more datasegments in the file.<filnavn>". The ECR must then reply: DATAGRAM RESULT ( 0x00 ) The flow loops until the ECR receives a “PUTF”. "GET./dk/otrs. The terminal will reply with the following tags: DATAGRAM COMMAND ( "PUT.10 Get terminal files functionality The ECR is able to request certain files from the terminal. which means that the entire file has been received.<filename>" ) BINARY ( binary data segment ) If the terminal replies "PUT. hence the ECR is NOT “connected” to the terminal.8.< filename >" or "PUTF. The ECR must send the following tags to the terminal: DATAGRAM COMMAND ( "GET.g.<remote filename>" ) The COMMAND tag must include the name on the file to get: e.log". This functionality can only be used if the terminal is in IDLE state/mode.

The terminal will reply with the termination tag: TRANSACTION RESULT ( 0x01 ) BINARY ( optional ) STATE ( optional ) REF_NO ( optional ) Local Payment Protocol Page 51 .8.11 Abort from ECR It is possible to abort the transaction from the ECR at any time by sending the abort tag (ABORT tags from the ECR are ignored by the terminal after the user presses ‘Godkend’ and the transaction is transmitted to the host): INFO ABORT ( empty ).

12 The flow of a Local Card transaction (initiated by ECR) To initiate a Local Card transaction.g. Otherwise no amount is shown on the terminal: DATA LOCALCARDDATA RESULT ( 0x00 ) AMOUNT ( optional ) And the terminal replies: Local Payment Protocol Page 52 .8. If not sent. TT and the REF_NO tags are all optional. the ECR must attach the AMOUNT tag. the following data must be send to the terminal. default values can be found in the appendix. If the card have been swiped before sending a purchase request: DATA LOCALCARDDATA CARDNUMBER AID ( optional and only if applicable (EMV)) STATE ( optional ) The LOCALCARDDATA tag states that a Local Card have been swiped. The immediate feedback from the terminal on the TRANSACTION tag will either be: INFO TSI ( “Afventer kort” ) BINARY ( 0x01 -> status line 1 ) STATE ( optional ) If the card have NOT been swiped before sending a purchase request. If the amount must be shown n the terminal. Now the ECR must reply with the DATA tag.g. similar to a normal transaction: TRANSACTION MI ( e. 0x0 for default transaction type ) CU ( e. 208 for DKK ) TT ( purchase or refund ) TR ( purchase or refund ) REF_NO (optional ) The MI. The BINARY tag is optional. CU.

HOSTDATA BINARY( TAPA message ) Local Payment Protocol Page 53 .INFO TSI ( “Afventer beløb” ) BINARY ( terminal suggests: status line 1 ) STATE ( optional ) Or if the card is not accepted. like this: DATA LOCALCARDDATA RESULT ( 0x01 ) The terminal will reply with a termination tag: TRANSACTION RESULT ( 0x01 ) RECEIPT TEXT ( empty ) STATE ( optional ) REF_NO (optional ) The ECR must acknowledge the receipt by sending this tag: RECEIPT RESULT ( 0x00 or 0x01 ) If the ECR application accepts the card. The ECR must reply with the HOSTDATA tag hold the value of the “transaction result”. the terminal will show the amount and continue sending the following tag when the user presses Godkend or Slet Alt: HOSTDATA BINARY ( 0x00 if godkend and 0x01 if Slet Alt ) The HOSTDATA tag means that the terminal is now waiting for the ECR to approve/reject the transaction. the ECR must reply negative to the DATA tag.

The TAPA message 0x03 is approved and 0x07 is rejected The terminal will generate beeps and display texts similar to a PIN transaction TRANSACTION RESULT ( 0x00 or 0x01 ) STATE ( optional ) BINARY ( optional ) REF_NO (optional ) Local Payment Protocol Page 54 .

because no reply is needed: DATA (0x62) LOCALCARDDATA (0x70) CARDNUMBER AID ( optional and only if applicable (EMV)) STATE ( optional ) The ECR can now initiate the transaction: TRANSACTION MI ( e. CU.g. The BINARY tag is optional. the following tags are send to the ECR (terminal parameter specific).13 The flow of a Local Card transaction (initiated by the user) If the cardholder swipes the card before the transaction is initiated by the ECR.g. If the card have been swiped before sending a purchase request: DATA LOCALCARDDATA CARDNUMBER AID ( optional and only if applicable (EMV)) STATE ( optional ) Local Payment Protocol Page 55 . The immediate feedback from the terminal on the TRANSACTION tag will either be: INFO TSI ( “Afventer kort” ) BINARY ( 0x01 -> status line 1 ) STATE ( optional ) If the card have NOT been swiped before sending a purchase request. Please notice that the two container tags DATA and LOCALCARDDATA has different values. 0x0 for default transaction type ) CU ( e. If not sent. TT and the REF_NO tags are all optional.8. default values can be found in the appendix. 208 for DKK ) TT ( purchase or refund ) TR ( purchase or refund ) REF_NO (optional ) The MI.

the ECR must attach the AMOUNT tag.The LOCALCARDDATA tag states that a Local Card have been swiped. the ECR must reply negative to the DATA tag. Now the ECR must reply with the DATA tag. If the amount must be shown n the terminal. like this: DATA LOCALCARDDATA RESULT ( 0x01 ) The terminal will reply with a termination tag: TRANSACTION RESULT ( 0x01 ) RECEIPT TEXT ( empty ) STATE ( optional ) REF_NO (optional ) Local Payment Protocol Page 56 . Otherwise no amount is shown on the terminal: DATA LOCALCARDDATA RESULT ( 0x00 ) AMOUNT ( optional ) And the terminal replies: INFO TSI ( “Afventer beløb” ) BINARY ( terminal suggests: status line 1 ) STATE ( optional ) Or if the card is not accepted.

HOSTDATA BINARY( TAPA message ) The TAPA message 0x03 is approved and 0x07 is rejected The terminal will generate beeps and display texts similar to a PIN transaction TRANSACTION RESULT ( 0x00 or 0x01 ) STATE ( optional ) BINARY ( optional ) REF_NO (optional ) Local Payment Protocol Page 57 . The ECR must reply with the HOSTDATA tag hold the value of the “transaction result”.The ECR must acknowledge the receipt by sending this tag: RECEIPT RESULT ( 0x00 or 0x01 ) If the ECR application accepts the card. the terminal will show the amount and continue sending the following tag when the user presses Godkend or Slet Alt: HOSTDATA BINARY ( 0x00 if godkend and 0x01 if Slet Alt ) The HOSTDATA tag means that the terminal is now waiting for the ECR to approve/reject the transaction.

or final segment ) STATE ( optional ) Local Payment Protocol Page 58 .8. the following data must be send to the terminal: ADMIN COMMAND ( 0x02 for end of day ) The immediate feedback from the terminal will be: INFO TEXT ( “Afstemning” ) BINARY ( status line 1) STATE ( optional ) Followed by several status messages: INFO TEXT ( “Opkald…” ) BINARY ( terminal suggests status line 2 ) STATE ( optional ) INFO TEXT ( “Sender…” ) BINARY ( terminal suggests status line 2) STATE ( optional ) Etc… The end of day routine always delivers a receipt: RECEIPT TEXT ( “Point SMASH Terminal…etc. ” ) BINARY ( part of a larger segment.14 The flow of an endofday To initiate an ‘end of day’ (balancing) request.

you need to send this tag within 3 seconds from receiving the receipt: RECEIPT ( empty ) RESULT ( 0x00 or 0x01 ) The immediate terminal answer will be either a new receipt: RECEIPT TEXT ( “Point SMASH Terminal…etc. the termination tag (including result) is automatically send from the terminal after 6 seconds even though the receipt isn’t acknowledged. However. ” ) RESULT ( 0x00 or 0x01 ) BINARY ( part of a larger segment. or final segment ) STATE ( optional ) Or a termination tag: ADMIN RESULT ( 0x00 or 0x01 ) STATE ( optional ) The ECR needs to acknowledge every receipt (if several) within 3 seconds.When the receipt is ‘safe’ (on your harddrive). Local Payment Protocol Page 59 .

g. the following data must be send to the terminal: ADMIN COMMAND ( 0x01 for terminal report ) The immediate feedback from the terminal will be: INFO TEXT ( “Terminal rapport” ) BINARY ( terminal suggests status line 1 ) STATE ( optional ) Always followed by a receipt: RECEIPT TEXT ( “Point SMASH Terminal…etc. you need to send this tag within 5 seconds from receiving the receipt: RECEIPT ( empty ) The immediate answer will be: ADMIN RESULT ( 0x00 or 0x01 ) BINARY ( optional ) STATE ( optional ) Local Payment Protocol Page 60 .15 The flow of a Terminal report To initiate a terminal report request. on the harddrive). ” ) STATE ( optional ) When the receipt is ‘safe’ (e.8.

16 The flow of a Last transaction receipt request The last transaction receipt functionality can only be used in conjunction with transactions. the following data must be send to the terminal: ADMIN COMMAND ( 0x0F for ‘last receipt’ ) The immediate feedback from the terminal will be: INFO TEXT ( “Sidste kvittering” ) BINARY ( terminal suggests status line1 ) STATE ( optional ) Always followed by a receipt including a result tag which holds the result of that particular transaction: RECEIPT TEXT RESULT ( 0x00 or 0x01 ) REF_NO ( optional ) STATE ( optional ) When the receipt is ‘safe’ (on a harddrive).8. the ECR must respond by sending this tag within 5 seconds from receiving the receipt: RECEIPT RESULT Local Payment Protocol Page 61 . Which means that it cannot be used to fetch old terminal reports or logs. To initiate a last request.

If the terminal is locked in ‘Ingen kvittering’ state when requesting the last receipt.4 Local Payment Protocol Page 62 .The immediate answer from the terminal (in case of a PIN based transaction) will be: ADMIN RESULT ( 0x00 or 0x01 ) BINARY ( optional ) STATE ( optional ) Or if the last transaction generated two receipts ( signature or refund ): RECEIPT TEXT REF_NO ( optional ) STATE ( optional ) This must be acknowledged with and empty RECEIPT tag. the terminal will only unlock if the receipts are acknowledged The “Ingen Kvittering” state has been removed from terminal SW version 3.

CU (with exponent embedded) and TIME is only present if OK.18 The flow of the Get DC properties To initiate a get dc properties request. the following data must be send to the terminal (in open state): ADMIN COMMAND ( 0x80 STAN search key or 0x81 PAN is search key ) STAN (or PAN) The immediate feedback from the terminal will be: INFO STAN (optional) AMOUNT (optional) CU (optional) TIME (optional) BINARY (0 for OK 2 for ‘PSAM Not Ready/wrong version’) STATE ( optional ) STAN.8. if present ) 8. The immediate answer will be: ADMIN RESULT ( 0x00 or 0x01 ) Local Payment Protocol Page 63 . ” ) STATE ( optional ) BINARY ( optional ) REF_NO (optional ) ACQMSG ( mandatory. like this: TRANSACTION RESULT ( 0x00 or 0x01 ) RECEIPT TEXT ( “Point SMASH Terminal…etc. The Advice Transfer flag is sent (if sent) together with the TRANSACTION TAG. AMOUNT.17 Advice transfer flag The Advice Transfer flag is sent from the ECR when the transaction inquires requires an endOfDay routine.

Local Payment Protocol Page 64 . If so the ECR must be able to handle transmission and receiving if the ip traffic.) RESULT ( 0x5A ) When the session is ended the Terminal sends ENAI COMMAND (0x2 for disconnect) The ECR need not answer.132. The Terminal sends: ENAI COMMAND (0x01 for connect) IPADDR (“90.) ENAI BINARY (……… data to send ……….164. received data …………….8. This example illustrates the flow during a transaction. Note that the example only covers the ENAI flow.19 The flow of the ENAI The Terminal can be configured to forward (route) ip traffic through the serial connection to the ECR. The traffic is embedded in the ENAI container and appears in the transaction flow and for some selected administrative functions (clock sync).) When ip traffic is received by the ECR it will send: ENAI BINARY (………………. other containers can mix into the flow.. but must disconnect the session immediately.229”) IPPORT (22000) IPTIMEOUT (30000) The immediate feedback from the ECR may be: ENAI RESULT (0x00) During the transaction the Terminal will send one or more data packets ENAI BINARY (…… data to send ………….

OK '..' TAG : 90 .PTAG_RESULT TAGlen : 01 TAGvalue : 00 . Examples Examples on how to communicate with the terminal..' TAG : 82 ..2 Open 9.3 Close 9.PTAG_ECREXTENDEDFUNCTIONS TAGlen : 04 TAGvalue : 00 00 00 04 '.' TAG : 90 ..PTAG_CONNECT TAGlen : 04 TAGvalue : DLE 03 01 00 00 '.6 Extended Issuer Envelope 9.1 Connect 9.1 Connect Send to terminal: STX SEQ ETX CRC : 02 : ff TAG : 69 .5 ClockSyncPBS 9.' : 03 : 1944 Acknowledge from terminal ACK SEQ : 06 : ff Terminal response to connect STX SEQ : 02 : ff TAG : 69 ...PTAG_ECREXTENDEDFUNCTIONS TAGlen : 04 TAGvalue : 00 00 00 04 '.PTAG_SEQNO TAGlen : 01 TAGvalue : ff 'ÿ' Local Payment Protocol Page 65 ..9...PTAG_INIT Container TAGlen : DLE 10 TAG : 40 .PTAG_BINARY TAGlen : DLE 02 TAGvalue : 00 01 '.PTAG_BINARY TAGlen : DLE 02 TAGvalue : 00 00 '..PTAG_TEXT TAGlen : 08 TAGvalue : 39 39 30 33 36 39 00 00 '990369.' TAG : 80 .. made with the C# PointKasseDemoLPP_TAPA3_Thread demo 9.4 Disconnect 9.' TAG : 89 .' TAG : 80 ..PTAG_INIT Container TAGlen : 23 TAG : 84 .

Ballerup ' ' .250.0.0.' TAG : 86 ..0.1.255.PTAG_EVENT TAGlen : 01 TAGvalue : 19 .Lautrupb' 'jerg 10 ' '.0.OK '.0000017' '353. ' '4.PSTATE_CONNECTED '.3.PTAG_TEXT c0 39 30 33 36 31 2c 30 2c 35 33 2c 54 43 43 20 20 20 20 20 20 65 72 67 20 32 37 35 30 38 34 34 36 20 2c 20 20 36 2c 20 64 38 2c 32 30 2e 30 30 30 39 31 65 20 20 31 20 38 20 61 38 30 2c 2c 73 2c 20 30 20 20 20 2c 2c 2c 31 30 74 42 2c 20 20 20 20 32 30 30 37 2c 20 61 4c 20 20 20 20 35 2c 2c 2c 30 52 6c 61 20 2c 20 20 30 33 33 33 30 65 6c 75 20 2b 20 20 2c 34 2e 35 30 74 65 74 20 34 20 20 32 2c 33 2c 30 61 72 72 20 35 20 20 35 20 2e 31 30 69 75 75 20 20 20 20 35 20 30 2c 31 6c 70 70 20 34 20 20 2c 20 30 31 37 20 20 62 20 34 20 2c 32 20 00 '990369.Test Retail ' 'DCC .PTAG_OPEN TAGlen : 00 '' : 03 : c956 Acknowledge from terminal ACK SEQ : 06 : 00 Terminal response to open with configuration parameters STX SEQ : 02 : 00 TAG : 69 .' '16.3.34. da.' TAG : 87 .PTAG_BINARY TAGlen : DLE 02 TAGvalue : 00 00 '.PEVENT_ECR_CONNECT_OK '.' TAG : 80 .' TAG TAGlen TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue : : : : : : : : : : : : : : 82 81 39 2c 33 44 20 6a 2c 36 20 31 30 34 Local Payment Protocol .35.1.PTAG_INIT Container TAGlen : DLE 02 TAG : 44 .PSTATE_IDLE '.1' '.2' '08. .208.2750 .' Page 66 .PTAG_STATE TAGlen : 01 TAGvalue : 05 .0000.ETX CRC TAG : 85 .2 Open Send to terminal: STX SEQ ETX CRC : 02 : 00 TAG : 69 .00.1.PTAG_FROMSTATE TAGlen : 01 TAGvalue : DLE 03 .PTAG_RESULT TAGlen : 01 TAGvalue : 00 .' : 03 : 86c7 Send acknowledge to terminal ACK SEQ : 06 : ff 9.PTAG_INIT Container TAGlen : 81 dc TAG : 84 .+45 44' '684468 ' ' .17.

.' TAG : 85 ..' TAG : 87 .PSTATE_OPEN '.' : 03 : 9fa5 Send acknowledge to terminal ACK SEQ : 06 : 00 9.' TAG : 89 .PTAG_STATE TAGlen : 01 TAGvalue : 07 .PTAG_ECREXTENDEDFUNCTIONS TAGlen : 04 TAGvalue : 00 00 00 04 '.PEVENT_ECR_CLOSE '.' Local Payment Protocol Page 67 .PTAG_INIT Container TAGlen : 0f TAG : 84 .PSTATE_OPEN '.PSTATE_CONNECTED '.PTAG_EVENT TAGlen : 01 TAGvalue : 1c .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 07 .' TAG : 87 .PEVENT_ECR_OPEN '.PTAG_CLOSE TAGlen : 00 '' : 03 : 7856 Acknowledge from terminal ACK SEQ : 06 : 01 Terminal response to close STX SEQ : 02 : 01 TAG : 69 .3 Close Send to terminal: STX SEQ ETX CRC : 02 : 01 TAG : 69 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 05 .PTAG_RESULT TAGlen : 01 TAGvalue : 00 .PTAG_SEQNO TAGlen : 01 TAGvalue : 00 '.PTAG_INIT Container TAGlen : DLE 02 TAG : 46 .' TAG : 86 .ETX CRC TAG : 90 ..PTAG_EVENT TAGlen : 01 TAGvalue : 1a .OK '.PTAG_SEQNO TAGlen : 01 TAGvalue : 01 '.' TAG : 89 .' TAG : 85 .

OK '.PTAG_FROMSTATE TAGlen : 01 TAGvalue : 05 .PTAG_SEQNO TAGlen : 01 TAGvalue : DLE 02 '.PEVENT_ECR_DISCONNECT '.' TAG : 85 .' TAG : 86 .PTAG_DISCONNECT TAGlen : 00 '' : 03 : 0a97 Acknowledge from terminal ACK SEQ : 06 : 02 Terminal response to disconnect STX SEQ ETX CRC : 02 : 02 TAG : 69 .' : 03 : 3b97 Send acknowledge to the terminal ACK SEQ : 06 : 01 9.PTAG_RESULT TAGlen : 01 TAGvalue : 00 .PTAG_STATE TAGlen : 01 TAGvalue : DLE 03 .PTAG_INIT Container TAGlen : DLE 02 TAG : 42 .TAG : 86 .PTAG_INIT Container TAGlen : 0f TAG : 84 .PSTATE_CONNECTED ETX CRC '.4 Disconnect Send to terminal: STX SEQ ETX CRC : 02 : 02 TAG : 69 .PSTATE_CONNECTED '.' : 03 : d35e Send acknowledge to terminal ACK : 06 Local Payment Protocol Page 68 .PTAG_EVENT TAGlen : 01 TAGvalue : 1b .PSTATE_IDLE '.' TAG : 87 .PTAG_STATE TAGlen : 01 TAGvalue : 05 .' TAG : 89 .

SEQ : 02 Local Payment Protocol Page 69 .

PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.PTAG_COMMAND TAGlen : 01 TAGvalue : 09 .' TAG : 85 .PTAG_INFO Container TAGlen : 20 TAG : 00 .PSTATE_ADMIN '+' TAG : 87 .PTAG_EVENT TAGlen : 01 TAGvalue : 28 .' : 03 : ac58 Send acknowledge to terminal ACK SEQ : 06 : 05 Terminal response INFO line 1 SYNKRONISER UR PBS STX SEQ ETX CRC : 02 : 05 TAG : 60 .PTAG_TSI TAGlen : 12 TAGvalue : 53 59 4e 4b 52 4f 4e 49 53 45 52 20 55 52 20 50 TAGvalue : 42 53 'SYNKRONISER UR P' 'BS' TAG : 80 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .ADMIN_CLOCKSYNCPBS '.PEVENT_ECR_INFO '(' TAG : 86 .PTAG_INFO Container TAGlen : 23 TAG : 00 .PTAG_ADMIN Container TAGlen : DLE 03 TAG : 88 .' TAG : 89 .PTAG_STATE TAGlen : 01 TAGvalue : 2b .PTAG_TSI TAGlen : 0f TAGvalue : 56 45 4e 54 20 28 41 52 42 45 4a 44 45 52 29 Local Payment Protocol 'VENT (ARBEJDER)' Page 70 .5 ClockSyncPBS Send to terminal: STX SEQ ETX CRC : 02 : 05 TAG : 67 .PTAG_BINARY TAGlen : 01 TAGvalue : 01 '.PSTATE_ADMIN '+' : 03 : 1c77 Send acknowledge to terminal ACK SEQ : 06 : 05 Terminal response INFO line 1 VENT (ARBEJDER) STX SEQ : 02 : 06 TAG : 60 .9.

' TAG : 85 .' TAG : 85 .' TAG : 89 .PEVENT_ECR_INFO '(' TAG : 86 .PTAG_EVENT TAGlen : 01 TAGvalue : 28 .PSTATE_ADMIN '+' : 03 : 48a7 Send acknowledge to terminal ACK SEQ : 06 : 07 Terminal response INFO line 2 SENDER… STX SEQ TAG : 02 : 08 : 60 .PTAG_STATE TAGlen : 01 TAGvalue : 2b .PTAG_INFO Container Local Payment Protocol Page 71 .PSTATE_ADMIN '+' : 03 : bbcc Send acknowledge to terminal ACK SEQ : 06 : 06 Terminal response INFO line 2 OPKALD… STX SEQ : 02 : 07 TAG : 60 ..PEVENT_ECR_INFO '(' TAG : 86 .PTAG_STATE TAGlen : 01 TAGvalue : 2b .PSTATE_ADMIN '+' TAG : 87 .' TAG : 89 .PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.PTAG_INFO Container TAGlen : 1a TAG : 82 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .PTAG_TEXT TAGlen : 09 TAGvalue : 4f 50 4b 41 4c 44 2e 2e 2e ETX CRC 'OPKALD.PSTATE_ADMIN '+' TAG : 87 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .PTAG_EVENT TAGlen : 01 TAGvalue : 28 .ETX CRC TAG : 80 .' TAG : 80 .PTAG_BINARY TAGlen : 01 TAGvalue : 01 '..PTAG_BINARY TAGlen : 01 TAGvalue : DLE 02 '.

PTAG_STATE TAGlen : 01 TAGvalue : 2b .PTAG_EVENT TAGlen : 01 TAGvalue : 28 .PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.TAGlen : 1a TAG : 82 .' TAG : 89 .PSTATE_ADMIN '+' : 03 : 2be4 Send acknowledge to the terminal ACK SEQ : 06 : 08 Terminal response INFO line 2 MODTAGER… STX SEQ ETX CRC : 02 : 09 TAG : 60 .PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.' TAG : 80 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .PTAG_INFO Container TAGlen : 1c TAG : 82 .' TAG : 85 .PSTATE_ADMIN '+' TAG : 87 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .PEVENT_ECR_INFO '(' TAG : 86 .PTAG_TEXT TAGlen : 09 TAGvalue : 53 45 4e 44 45 52 2e 2e 2e ETX CRC 'SENDER.PTAG_STATE TAGlen : 01 TAGvalue : 2b ...PTAG_TEXT TAGlen : 0b TAGvalue : 4d 4f 44 54 41 47 45 52 2e 2e 2e 'MODTAGER.PTAG_BINARY TAGlen : 01 TAGvalue : DLE 02 '.PTAG_EVENT TAGlen : 01 TAGvalue : 28 .PSTATE_ADMIN '+' TAG : 87 .' TAG : 80 .' TAG : 85 ..PEVENT_ECR_INFO '(' TAG : 86 .PTAG_BINARY TAGlen : 01 TAGvalue : DLE 02 '.PSTATE_ADMIN '+' : 03 : 41a8 Send acknowledge to terminal ACK SEQ : 06 : 09 Terminal response INFO line 2 GODKENDT Local Payment Protocol Page 72 .' TAG : 89 ..

PSTATE_ADMIN '+' TAG : 87 .PTAG_TEXT TAGlen : 08 TAGvalue : 47 4f 44 4b 45 4e 44 54 'GODKENDT' TAG : 80 .PTAG_EVENT TAGlen : 01 TAGvalue : 28 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.PEVENT_ECR_INFO '(' TAG : 86 .' TAG : 89 .PTAG_TEXT TAGlen : 08 TAGvalue : 41 46 42 52 59 44 45 52 'AFBRYDER' TAG : 80 .PSTATE_ADMIN '+' TAG : 87 .STX SEQ ETX CRC : 02 : 0a TAG : 60 .PSTATE_ADMIN '+' : 03 : 59aa Send acknowledge to terminal ACK SEQ : 06 : 0b Local Payment Protocol Page 73 .PTAG_STATE TAGlen : 01 TAGvalue : 2b .PSTATE_ADMIN '+' : 03 : 647c Send acknowledge to terminal ACK SEQ : 06 : 0a Terminal response INFO line 2 AFBRYDER STX SEQ ETX CRC : 02 : 0b TAG : 60 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .' TAG : 89 .PTAG_STATE TAGlen : 01 TAGvalue : 2b .PTAG_INFO Container TAGlen : 19 TAG : 82 .PTAG_EVENT TAGlen : 01 TAGvalue : 28 .PTAG_BINARY TAGlen : 01 TAGvalue : DLE 02 '.PTAG_INFO Container TAGlen : 19 TAG : 82 .' TAG : 85 .' TAG : 85 .PTAG_BINARY TAGlen : 01 TAGvalue : DLE 02 '.PEVENT_ECR_INFO '(' TAG : 86 .

PSTATE_OPEN '.0.07601100' '01.PBS PSAM-146 ' ' ÆØÅ.(+45) 4' Page 74 .13.1.' TAG : 85 .LAUTRUPBJ' 'ERG 10 .' TAG : 89 .0..PTAG_ADMIN Container TAGlen : 0f TAG : 84 .PTAG_FROMSTATE TAGlen : 01 TAGvalue : 2b .0.' ETX CRC : 03 : 180c Send acknowledge to terminal ACK SEQ : 06 : 0c 9.PTAG_EVENT TAGlen : 01 TAGvalue : 1e .008 128 mean enabled.PTAG_BINARY DLE 02 00 00 TAG TAGlen TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue 82 .' TAG : 86 .PEVENT_ECR_TRANSACTION_COMPLETED '.Terminal response to ADMIN command STX SEQ : 02 : 0c TAG : 67 .' '.PTAG_RESULT TAGlen : 01 TAGvalue : 00 .PTAG_RESULT TAGlen : 01 TAGvalue : 00 .0.' '1.PTAG_INIT Container TAGlen : 81 fa TAG : 84 .OK '.PTAG_OPEN : 00 '' 03 c956 06 00 TimeStamp: STX : 02 SEQ : 21 TAG : 69 .BALLERUP ' ' .PTAG_STATE TAGlen : 01 TAGvalue : 07 . 0 disabled TimeStamp: STX : 02 SEQ : 00 TAG : TAGlen : TAG TAGlen ETX CRC : : TimeStamp: ACK : SEQ : 69 .PSTATE_ADMIN '+' TAG : 87 .' 35 31 42 c5 20 31 37 35 2c 53 2c 20 30 35 2c 30 20 42 2c 20 30 31 2c 50 41 4c 20 20 33 30 53 4c 41 20 2c 2c 37 41 4c 55 20 28 30 36 4d 45 54 20 2b 2c 30 2d 52 52 20 34 30 31 31 55 55 20 35 2c 31 34 50 50 20 29 30 30 36 20 42 20 20 2c 30 20 20 4a 2c 34 '990555.' 'DK-2750 .6 Extended Issuer Envelope (EIE) In the open response we now get the EIE data if the PSAM support this > 71.0.PTAG_INIT Container DLE 02 : 44 .OK TAG : TAGlen : TAGvalue : 80 .PTAG_SEQNO TAGlen : 01 TAGvalue : 05 '.PTAG_TEXT 81 de 39 39 30 35 31 2c 30 2c 30 31 2c 50 20 20 c6 d8 20 20 20 20 45 52 47 20 44 4b 2d 32 : : : : : : : : : Local Payment Protocol '.

TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue ETX CRC : : : : : : : 34 20 2c 30 30 58 30 20 2c 20 38 30 45 2c 36 31 64 2c 2c 4e 31 38 32 61 30 30 54 35 20 33 2c 2c 2c 41 30 34 34 30 33 33 2c 2c 34 35 2c 34 2e 31 33 20 36 32 2c 33 32 34 36 37 35 20 2e 38 30 38 38 35 20 30 2c 2c 20 20 2c 20 31 31 31 20 20 32 20 2c 32 36 20 20 30 33 30 38 30 20 20 38 2e 2c 2c 00 20 2c 2c 30 30 31 20 34 32 30 2c 35 '4 68 44 68 ' ' .0..PTAG_SEQNO 01 00 '..0.3.208.' TAG : TAGlen : TAGvalue : 85 .128.150.340.0.PTAG_EVENT 01 1a .PTAG_ECREXTENDEDFUNCTIONS 04 00 00 00 04 '.' TAG : TAGlen : TAGvalue : 86 .160.' TAG : TAGlen : TAGvalue : 87 .PTAG_FROMSTATE 01 05 .' : : ACK SEQ 03 5540 : 06 : 21 flxOpen(): CONNECT_OK 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: TERMINALID RECEIPTTYPE GRATUITYMODEL DCC TOKEN PREPAID KEYENTRY OFFLINE IP ROUTING MERCHANTNUMBER MERCHANTNAME MERCHANTCITY MERCHANTADDRESS MERCHANTZIP MERCHANTPHONE MERCHANTBRN FLXTRACELEVEL LANGUAGE VAT USERINPUT COUNTRYCODE DEFAULTCURRENCY CONTACTLESSFLAGS TERMINALTYPE DCCMARKUP TCS SOFTWARE_VERSION CDP PSAM_CDP HARWARENAME EIE PSAM_EIE ISSUER_ENVELOPE_NON_EMV_SIZE ISSUER_ENVELOPE_EMV_SIZE TOTAL_ISSUER_ENVELOPE_NON_EMV_SIZE TOTAL_ISSUER_ENVELOPE_EMV_SIZE 990555 13 0 0 0 1 0 1 0 0760110001 PBS PSAM-146 ÆØÅ BALLERUP LAUTRUPBJERG 10 DK-2750 (+45) 44 68 44 68 12345678 4 da 0 255 208 208 0 34 3.0.PSTATE_CONNECTED '.' 'XENTA.0.PSTATE_OPEN '.34.3.2' '08.3.01.01 0 0 XENTA 128 128 150 150 340 160 MI = MI_PIN and transaction type = FLX_TRANS_PURCHASE StartTid 2011-12-30 08:59.0000 0 3.37-566 TimeStamp: STX : SEQ : TAG TAGlen 02 01 : : 65 . da. 3.00' '00.4' '.255.PTAG_TRANSACTION Container 25 Local Payment Protocol Page 75 .15' '0.' TAG : TAGlen : TAGvalue : 89 .128.PEVENT_ECR_OPEN '.12345678 .PTAG_STATE 01 07 ..' TAG : TAGlen : TAGvalue : 90 .

Ð' TAG : TAGlen : TAGvalue : 56 .PSTATE_TRANS '.PTAG_TR 01 00 '.PTAG_TSI TAGlen : 0d TAGvalue : 41 46 56 45 4e 54 ETX CRC ACK SEQ 45 52 20 4b 4f 52 54 'AFVENTER KORT' TAG : TAGlen : TAGvalue : 80 .' TAG : TAGlen : TAGvalue : 57 .PTAG_PREPAID 01 00 '..' TAG : TAGlen : TAGvalue : 86 .PTAG_MI 01 00 '.PTAG_REF_NO 04 00 01 e2 40 '.PTAG_EVENT 01 1d .PSTATE_OPEN '.ETX CRC TAG : TAGlen : TAGvalue : 4e .PEVENT_ECR_TRANSACTION '..' TAG : TAGlen : TAGvalue : 92 .' TAG : TAGlen : TAGvalue : 85 .PTAG_STATE 01 09 .PTAG_CARD_SOURCE 01 00 '.PTAG_TEXT Local Payment Protocol Page 76 .PTAG_FROMSTATE 01 07 ..' TAG : TAGlen : TAGvalue : 87 .PTAG_TT 01 00 '.PTAG_VAT 04 00 00 00 00 '.' : : 03 c528 : 06 : 22 Status: AFVENTER KORT line: 1 TimeStamp: STX : 02 SEQ : 23 TAG : TAGlen : TAG 60 .' TAG : TAGlen : TAGvalue : 89 .' TAG : TAGlen : TAGvalue : 4a .PTAG_SEQNO 01 01 '.PTAG_CU DLE 02 00 d0 '.' TAG : TAGlen : TAGvalue : 93 ..' TAG : TAGlen : TAGvalue : 4c .' TAG : TAGlen : TAGvalue : 50 ...PTAG_INFO Container 1c : 82 .' : : TimeStamp: ACK : SEQ : 03 ebbf 06 01 TimeStamp: STX : 02 SEQ : 22 TAG : 60 .PTAG_GRATUITY 04 00 00 00 00 '..â@' TAG : TAGlen : TAGvalue : 59 .PTAG_BINARY 01 01 '.PTAG_INFO Container TAGlen : 1e TAG : 00 .

PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 .PTAG_STATE 01 09 .PTAG_EVENT 01 : : Local Payment Protocol Page 77 .ETX CRC TAGlen : TAGvalue : 0b 49 TAG : TAGlen : TAGvalue : 80 .PSTATE_TRANS '.Data from pbsIPhandle received ok 'Z' TAG : TAGlen : TAGvalue : 89 .PTAG_TEXT TAGlen : 04 TAGvalue : 56 45 4e 54 ETX CRC ACK SEQ 'VENT' TAG : TAGlen : TAGvalue : 80 ..' TAG : TAGlen : TAGvalue : 85 .PTAG_FROMSTATE 01 09 .PTAG_ENAI Container TAGlen : 0f TAG : 84 ..PTAG_EVENT 01 28 .PSTATE_TRANS '.PTAG_STATE 01 09 .' TAG : TAGlen : TAGvalue : 89 .PSTATE_TRANS '.PTAG_SEQNO 01 01 '.' : : 03 682c : 06 : 24 Status: VENT line: 2 TimeStamp: STX : 02 SEQ : 25 TAG : 79 .' : : ACK SEQ 4e 44 4c c6 53 20 4b 4f 52 54 'INDLÆS KORT' 03 4e2a : 06 : 23 Status: INDLÆS KORT line: 2 TimeStamp: STX : 02 SEQ : 24 TAG : 60 .' TAG : TAGlen : TAGvalue : 89 .' TAG : TAGlen : TAGvalue : 85 .PTAG_INFO Container TAGlen : DLE 15 TAG : 82 .PSTATE_TRANS '.' TAG TAGlen 87 .PSTATE_TRANS '.PTAG_BINARY 01 DLE 02 '.PTAG_FROMSTATE 01 09 .PTAG_FROMSTATE 01 09 .' TAG : TAGlen : TAGvalue : 87 .PTAG_RESULT TAGlen : 01 TAGvalue : 5a .PTAG_EVENT 01 28 .PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 .PTAG_BINARY 01 DLE 02 '.PTAG_SEQNO 01 01 '.' TAG : TAGlen : TAGvalue : 87 .' TAG : TAGlen : TAGvalue : 85 .PTAG_SEQNO 01 01 '.

..................PTAG_DATA Container TAGlen : 26 TAG : 6f ......0000000000000' '000.PTAG_CU DLE 02 00 d0 '.PTAG_RESULT TAGlen : 01 TAGvalue : 00 .......' TAG : TAGlen : TAGvalue : 87 ...' '..' '..0123456' '7890123456789abc' 'def..PTAG_EIE 82 01 0d 01 0a 00 00 37 38 39 30 64 65 66 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 30 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : : : : : : : : : : : : : : : Local Payment Protocol 00 31 00 00 00 00 00 30 00 00 00 00 00 fa 32 00 00 00 00 00 30 00 00 00 00 00 00 33 00 00 00 00 00 30 00 00 00 00 00 00 34 00 00 00 00 00 30 00 00 00 00 00 00 35 00 00 00 00 00 30 00 00 00 00 00 30 36 00 00 00 00 00 30 00 00 00 00 00 31 37 00 00 00 00 00 30 00 00 00 00 00 32 38 00 00 00 00 00 30 00 00 00 00 00 33 39 00 00 00 00 00 30 00 00 00 00 00 34 61 00 00 00 00 00 30 00 00 00 00 00 35 62 00 00 00 00 00 30 00 00 00 00 00 36 63 00 00 00 00 00 30 00 00 00 00 00 '.......PEVENT_TAPA_GET_AMOUNT '2' TAG : TAGlen : TAGvalue : 86 .......PSTATE_TRANS '........Ð' TAG TAGlen TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue 51 .....PTAG_FROMSTATE 01 09 ...OK '.ú....' Page 78 ......' TAG : TAGlen : TAGvalue : 48 ......' '....' : : ACK SEQ 03 7f79 : 06 : 25 TimeStamp: STX : 02 SEQ : 26 TAG : 63 ........PSTATE_TRANS '.........PTAG_DATA Container TAGlen : 82 01 20 TAG : 6f ....' '..' TAG : TAGlen : TAGvalue : 89 ..PTAG_STATE 01 09 ....' '...' '..ETX CRC TAGvalue : 67 .....PSTATE_TRANS_REQ_AMOUNT '.....' '......... CardType:PBS_CARD FLX_CARDNUMBER_CMD: 'FLX_CARDNUMBER_OK' TimeStamp: STX : 02 SEQ : 02 TAG : 63 ..PTAG_CARDNUMBER TAGlen : DLE 10 TAGvalue : 35 34 31 33 33 33 58 TAG : TAGlen : TAGvalue : ETX CRC ACK SEQ 58 58 58 58 58 31 36 31 32 5a ......PTAG_AMOUNT 04 00 00 11 94 '.PTAG_SEQNO 01 01 '........PTAG_CARDDATA Container TAGlen : 00 TAG : 84 ...' TAG : TAGlen : TAGvalue : 85 ....' '.............' : : '541333XXXXXX1612' 03 16e7 : 06 : 26 SET CARD DATA Cardnumber:541333XXXXXX1612...' TAG : TAGlen : TAGvalue : 4c ..PTAG_STATE 01 0f .' '.PTAG_CARDDATA Container TAGlen : 18 TAG : 52 .....PTAG_CRCNUMBER 04 00 00 00 DLE 03 '.PEVENT_MAX 'g' TAG : TAGlen : TAGvalue : 86 .....PTAG_EVENT 01 32 ..

....TAGvalue TAGvalue TAGvalue TAGvalue ETX CRC : : TimeStamp: ACK : SEQ : : : : : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 31 00 00 00 32 00 00 00 33 00 00 00 34 00 00 00 35 00 00 00 36 00 00 00 37 00 00 00 38 00 00 00 39 00 00 00 00 00 00 06 02 59 .PTAG_GRATUITY 04 00 00 00 00 '...PSTATE_TRANS '.PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 .' TAG : TAGlen : TAGvalue : 87 .PTAG_FROMSTATE 01 09 ...PTAG_EVENT 01 28 ........PTAG_FROMSTATE 01 09 .......' TAG : TAGlen : TAGvalue : ACK SEQ ETX CRC '....' TAG : TAGlen : TAGvalue : 89 .0123456789' 03 7433 TimeStamp: STX : 02 SEQ : 27 TAG : 62 ..' '.PTAG_EVENT 01 56 .' TAG : TAGlen : TAGvalue : 89 ..PTAG_STATE 01 09 .' TAG : TAGlen : TAGvalue : 85 ..' : : 03 1c0f : 06 : 27 TimeStamp: STX : 02 SEQ : 28 TAG : 60 ...PTAG_FEE TAGlen : 04 TAGvalue : 00 00 00 00 ETX CRC 00 00 00 45 52 20 50 49 4e 2f 42 45 4c 'AFVENTER PIN/BEL' 'ØB' TAG : TAGlen : TAGvalue : 80 .' : : 03 6540 : 06 : 28 Status: AFVENTER PIN/BELØB line: 1 Local Payment Protocol Page 79 .PSTATE_TRANS '.......PTAG_BINARY 01 01 '..PTAG_INFO Container TAGlen : 23 TAG : 00 ....PEVENT_ECR_FEE 'V' TAG : TAGlen : TAGvalue : 86 .' TAG : TAGlen : TAGvalue : 85 ..PSTATE_TRANS '.PTAG_TSI TAGlen : 12 TAGvalue : 41 46 56 45 4e 54 TAGvalue : d8 42 ACK SEQ '.....PTAG_STATE 01 09 .PTAG_SEQNO 01 0c '.' TAG : TAGlen : TAGvalue : 87 .PTAG_SEQNO 01 0c '..PSTATE_TRANS '.' '...' '.....PTAG_DATA_1 Container TAGlen : 18 TAG : 58 ...

line: 2 TimeStamp: Local Payment Protocol Page 80 .PTAG_FROMSTATE 01 DLE 13 ..PTAG_STATE 01 DLE 13 .PTAG_INFO Container TAGlen : 20 TAG : 00 ..PSTATE_TRANS_COMMIT '.PTAG_STATE 01 DLE 13 ..PSTATE_TRANS_COMMIT '.PTAG_INFO Container TAGlen : 30 TAG : 82 ..' ee 16 12 'T.TimeStamp: STX : 02 SEQ : 29 TAG : 60 .PSTATE_TRANS_COMMIT '.PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 .' TAG : TAGlen : TAGvalue : 89 .' TAG : TAGlen : TAGvalue : 87 .' : : ACK SEQ 59 03 81ed : 06 : 2a Status: OPKALD.q' TAG : TAGlen : TAGvalue : 5c .PTAG_TIME 05 11 12 30 08 '.PTAG_SEQNO 01 0c '..PTAG_BINARY 01 01 '..PTAG_SEQNO 01 0c '...' TAG : TAGlen : TAGvalue : 87 .' TAG : TAGlen : TAGvalue : 85 .PTAG_EVENT 01 28 .PTAG_EVENT 01 28 .PTAG_CARDNUMBER 08 54 DLE 13 33 ee ee TAG : TAGlen : TAGvalue : DLE 10 .' : : ACK SEQ 03 c025 : 06 : 29 Status: VENT (ARBEJDER) line: 1 TimeStamp: STX : 02 SEQ : 2a TAG : 60 ..PTAG_TEXT TAGlen : 09 TAGvalue : 4f 50 4b 41 4c 44 ETX CRC 2e 2e 2e 'OPKALD.PTAG_FROMSTATE 01 DLE 13 .0.' TAG : TAGlen : TAGvalue : 85 .PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 ..' TAG : TAGlen : TAGvalue : 52 .' TAG : TAGlen : TAGvalue : 89 .PTAG_BINARY 01 DLE 02 '..PSTATE_TRANS_COMMIT '.3îîî..Y' TAG : TAGlen : TAGvalue : 80 ..PTAG_STAN DLE 03 00 DLE 03 71 '.PTAG_TSI TAGlen : 0f TAGvalue : 56 45 4e 54 20 28 ETX CRC 41 52 42 45 4a 44 45 52 29 'VENT (ARBEJDER)' TAG : TAGlen : TAGvalue : 80 ..

' TAG : TAGlen : TAGvalue : 89 .PSTATE_TRANS_COMMIT '.' : : 03 238a : 06 : 2c Status: MODTAGER.PTAG_TEXT TAGlen : 09 TAGvalue : 53 45 4e 44 45 52 ETX CRC 2e 2e 2e 'SENDER.' TAG : TAGlen : TAGvalue : 85 .PTAG_TEXT TAGlen : 0b TAGvalue : 4d 4f 44 54 41 47 ETX CRC ACK SEQ 45 52 2e 2e 2e 'MODTAGER..PTAG_EVENT 01 28 .PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 ..PTAG_SEQNO 01 0c TAG 85 .' Page 81 ..' TAG : TAGlen : TAGvalue : 87 .' TAG : TAGlen : TAGvalue : 85 ..' TAG : TAGlen : TAGvalue : 80 ...PTAG_SEQNO 01 0c '.PTAG_INFO Container TAGlen : 1c TAG : 82 .PSTATE_TRANS_COMMIT '.... line: 2 TimeStamp: STX : 02 SEQ : 2c TAG : 60 ...STX SEQ : : 02 2b : : TAG 60 .PTAG_DATA Container TAGlen : 17 TAG : 51 ....PTAG_BINARY 01 DLE 02 '..PTAG_BINARY 01 DLE 02 '.' '.PTAG_STATE 01 DLE 13 .' TAG : TAGlen : TAGvalue : 80 .' TAG : TAGlen : TAGvalue : 87 .' TAG : TAGlen : TAGvalue : 89 .PTAG_EVENT 01 28 .PTAG_STATE 01 DLE 13 .PSTATE_TRANS_COMMIT '.PSTATE_TRANS_COMMIT '.PTAG_FROMSTATE : Local Payment Protocol 00 00 00 00 '.PTAG_FROMSTATE 01 DLE 13 ...PTAG_EIE TAGlen : 09 TAGvalue : DLE 06 00 00 00 00 TAG : TAGlen : TAGvalue : 89 ..PTAG_INFO Container TAGlen 1a TAG : 82 .. line: 2 TimeStamp: STX : 02 SEQ : 2d TAG : 63 .PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 .PTAG_FROMSTATE 01 DLE 13 .' : : ACK SEQ 03 a5d9 : 06 : 2b Status: SENDER..PTAG_SEQNO 01 0c '....

....' TAG : TAGlen : TAGvalue : 87 ...PTAG_EVENT 01 6a ..PTAG_EIE TAGlen : 40 TAGvalue : DLE 03 14 00 00 00 TAGvalue : 36 37 38 39 00 00 TAGvalue : 32 33 34 35 36 37 TAGvalue : 00 00 00 00 00 00 TAGvalue : 00 ETX CRC : : TimeStamp: ACK : SEQ : 23 00 38 00 00 00 39 00 ACK SEQ Status: 00 00 62 00 30 00 63 00 31 00 64 00 32 00 65 00 33 00 66 00 34 30 00 00 35 31 00 00 '..PTAG_STATE 01 DLE 13 ..Unknown 'j' TAG : TAGlen : TAGvalue : 86 .#.PTAG_TEXT TAGlen : 08 TAGvalue : 47 4f 44 4b 45 4e TAG : TAGlen : TAGvalue : 80 .PEVENT_SIG_PRERESULT 'E' TAG : TAGlen : TAGvalue : 86 ..' TAG : TAGlen : TAGvalue : 89 .PTAG_STATE 01 DLE 13 .PTAG_INFO Container TAGlen : 0f TAG : 84 ....01' '23456789abcdef..' '......' Page 82 ....PTAG_INFO Container TAGlen : 19 TAG : 82 ..PTAG_SEQNO 01 DLE 03 '..PTAG_BINARY 01 DLE 02 Local Payment Protocol 44 54 'GODKENDT' '..' 03 31cf 06 03 TimeStamp: STX : 02 SEQ : 2e TAG : 60 ..ETX CRC TAGlen : TAGvalue : 01 DLE 13 .PTAG_FROMSTATE 01 DLE 13 .PSTATE_TRANS_COMMIT '...' TAG : TAGlen : TAGvalue : 87 .PSTATE_TRANS_COMMIT '.PSTATE_TRANS_COMMIT '.PSTATE_TRANS_COMMIT '...OK ETX CRC 00 00 61 00 '.' : : 03 b043 : 06 : 2e line: 1 TimeStamp: STX : 02 SEQ : 2f TAG : 60 ...PTAG_DATA Container TAGlen : 42 TAG : 51 .' TAG : TAGlen : TAGvalue : 85 .012345' '6789.PTAG_EVENT 01 45 ..' '...' : : ACK SEQ 03 c53f : 06 : 2d Extended Issuer Envelope data received: 060000000000000000 TimeStamp: STX : 02 SEQ : 03 TAG : 63 ..PTAG_RESULT TAGlen : 01 TAGvalue : 00 ...

.PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 .PTAG_EVENT 01 28 .PTAG_RECEIPT Container TAGlen : 82 DLE 02 a5 TAG : 82 ..PSTATE_TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK 'B' : : 03 9b89 : 06 : 30 Status: KVITTERING UDSKRIVES line: 4 TimeStamp: STX : 02 SEQ : 31 TAG : 65 .PTAG_INFO Container TAGlen : 25 TAG : 82 .' TAG : TAGlen : TAGvalue : 85 .PSTATE_TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK 'B' TAG : TAGlen : TAGvalue : 87 .PSTATE_TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK 'B' : : ACK SEQ 03 cb75 : 06 : 2f Status: GODKENDT line: 2 TimeStamp: STX : 02 SEQ : 30 TAG : 60 .PTAG_SEQNO 01 DLE 03 '.' TAG : TAGlen : TAGvalue : 85 .KØB ' ' DKK 45.LAUTRUPBJERG ' '10.PTAG_TEXT TAGlen : 14 TAGvalue : 4b 56 49 54 54 45 TAGvalue : 49 56 45 53 ETX CRC ACK SEQ 52 49 4e 47 20 55 44 53 4b 52 'KVITTERING UDSKR' 'IVES' TAG : TAGlen : TAGvalue : 80 .ETX CRC TAG : TAGlen : TAGvalue : 89 ..PTAG_FROMSTATE 01 42 .XXXX' ' XXXX XXXX 1612.PIN K' 'ØB.PTAG_FROMSTATE 01 42 .PTAG_STATE 01 42 .TLF: (+45) 4' '4 68 44 68 .PTAG_TEXT TAGlen : 82 01 6d TAGvalue : 0a 0a 50 42 53 20 TAGvalue : d8 c5 0a 4c 41 55 TAGvalue : 31 30 0a 44 4b 2d TAGvalue : 52 55 50 0a 54 4c TAGvalue : 34 20 36 38 20 34 TAGvalue : 30 31 31 2d 31 32 TAGvalue : 20 20 30 38 3a 35 TAGvalue : 20 20 20 44 4b 4b TAGvalue : 30 0a 20 20 20 20 TAGvalue : 2d 2d 2d 2d 2d 2d TAGvalue : d8 42 0a 4d 41 53 TAGvalue : 20 20 20 20 20 20 TAGvalue : 20 58 58 58 58 20 TAGvalue : 54 45 52 4d 3a 20 TAGvalue : 35 2d 30 30 30 33 Local Payment Protocol 50 54 32 46 34 2d 39 20 20 2d 54 20 58 20 37 53 52 37 3a 20 33 0a 20 20 2d 45 20 58 20 31 41 55 35 20 36 30 0a 20 20 2d 52 20 58 20 0a 4d 50 30 28 38 20 4b 20 20 2d 43 20 58 30 44 2d 42 20 2b 20 20 d8 20 20 0a 41 20 20 30 41 31 4a 42 34 20 20 42 20 20 50 52 0a 31 39 31 34 45 41 35 0a 20 20 34 20 49 44 58 36 39 20 36 52 4c 29 0a 20 20 35 20 4e 20 58 31 30 20 20 47 4c 20 0a 20 20 2c 20 20 20 58 32 35 20 c6 20 45 34 32 20 20 30 2d 4b 20 58 0a 35 4e '. -' '----------.DK-2750 BALLE' 'RUP..PBS PSAM-146 Æ' 'ØÅ.PSTATE_TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK 'B' TAG : TAGlen : TAGvalue : 87 .' TAG : TAGlen : TAGvalue : 89 .PTAG_STATE 01 42 .PEVENT_ECR_INFO '(' TAG : TAGlen : TAGvalue : 86 .PTAG_EVENT 01 28 .PTAG_BINARY 01 04 '.' 'TERM: 0099055' '5-000371.PTAG_SEQNO 01 DLE 03 '..0' '0.DA1 N' Page 83 ..2' '011-12-30 ' ' 08:59.PTAG_TRANSACTION Container TAGlen : 82 DLE 02 b8 TAG : 6b .MASTERCARD ' ' .

..' TAG : TAGlen : TAGvalue : 92 .TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue TAGvalue : : : : : : : : 45 31 30 20 30 20 3a 4d 54 0a 30 20 30 20 30 46 53 50 30 20 30 20 30 d8 20 53 30 20 0a 20 30 52 4e 41 30 20 41 20 33 54 4f 4d 30 20 55 20 37 0a TAG : TAGlen : TAGvalue : 5c ...' TAG : TAGlen : TAGvalue : 4c .3îîî..' TAG : TAGlen : TAGvalue : 1e ...PTAG_TIME 04 4e fd 6f 6e TAG TAGlen TAGvalue TAGvalue 52 ..' TAG : TAGlen : TAGvalue : 1c .PTAG_ARC DLE 02 00 00 '.' TAG : TAGlen : TAGvalue : 48 ...PTAG_STAN DLE 06 30 30 30 33 37 '000371' TAG : TAGlen : TAGvalue : 12 ..PTAG_FEE 04 00 00 00 00 '...' TAG : TAGlen : TAGvalue : 18 ....' TAG TAGlen : : 54 .....PSAM: 5374978-' '0000000540..AUT..' 'Nýon' ee 16 12 00 00 00 00 00 00 00 'T.PTAG_AMOUNT 04 00 00 11 94 '.PTAG_ATC DLE 02 00 00 '.ARC: ' ' STATUS:0' '000.' TAG : TAGlen : TAGvalue : 59 .' TAG : TAGlen : TAGvalue : 58 ...PTAG_EXTRA 04 00 00 00 00 '...PTAG_CARDNUMBER DLE 10 54 DLE 13 33 ee ee 00 : : : : 3a 3a 30 20 54 31 31 0a 30 20 35 20 2e 30 20 0a 37 35 34 53 20 3a 20 0a 36 33 30 54 4b 34 20 0a 30 37 0a 41 4f 4f 20 0a 31 34 41 54 44 4b 47 0a 31 39 52 55 45 0a 45 0a 30 37 43 53 3a 52 4e 30 38 3a 3a 20 45 4e 30 2d 20 30 20 46 45 'ETS NO:076011000' '1..PTAG_AED DLE 03 00 00 00 '.PTAG_CARDNAME DLE 10 4d 41 53 54 45 52 TAG TAGlen 1a .PTAG_GRATUITY 04 00 00 00 00 '..PTAG_PSAMID 04 00 00 DLE 02 1c '..REF' ':000371 GENNE' 'MFØRT.' TAG : TAGlen : TAGvalue : DLE 13 ..PTAG_CVM 01 0b '.PTAG_AID 00 TAG : TAGlen : TAGvalue : 0a .' '.....PTAG_TERMID 08 : : Local Payment Protocol '' 31 43 41 52 44 20 20 20 20 20 20 'MASTERCARD ' Page 84 .PTAG_CARD_SOURCE 01 01 '.PTAG_ASW1ASW2 DLE 02 00 00 '.' TAG : TAGlen : TAGvalue : 14 ....' TAG : TAGlen : TAGvalue : 16 ..PTAG_ACODE DLE 02 00 00 '. KODE: ' ' 10:4OK.PTAG_AUTCODE DLE 06 31 30 3a 34 4f 4b '10:4OK' TAG : TAGlen : TAGvalue : 5e .' TAG : TAGlen : TAGvalue : 0c ..PTAG_CU DLE 02 DLE 02 08 '.' TAG : TAGlen : TAGvalue : DLE 10 ..

..OK '.PTAG_CANCELLATION 01 01 '..PTAG_STATE 01 17 ...' : : ' 03 7e6f Local Payment Protocol Page 85 .' TAG : TAGlen : TAGvalue : 01 .' 20 20 20 '550033 41 4d 2d 31 34 36 20 20 20 c6 'PBS PSAM-146 'ØÅ' Æ' TAG : TAGlen : TAGvalue : 05 .PSTATE_TRANS_WAIT_ACK '.' TAG : TAGlen : TAGvalue : 87 .PTAG_MI_ZIP 08 44 4b 2d 32 37 35 30 20 TAG TAGlen TAGvalue TAGvalue : : : : 0b ...PTAG_EVENT 01 31 .PEVENT_TAPA_TRANSACTION_COMPLETE '1' TAG : TAGlen : TAGvalue : 86 .PTAG_DCC_RATE 09 31 2e 30 30 30 TAG : TAGlen : TAGvalue : 5a .PTAG_PSAM_CREATOR 04 81 11 00 DLE 02 TAG : TAGlen : TAGvalue : 95 .PTAG_MI_BRN 0c 31 32 33 34 35 36 37 38 20 20 20 20 TAG : TAGlen : TAGvalue : 4a .PTAG_DCC_CU DLE 02 DLE 02 08 '..PTAG_CRCNUMBER 04 00 00 00 01 '.PTAG_MI_CITY DLE 10 42 41 4c 4c 45 52 55 50 20 20 20 20 20 20 20 20 'BALLERUP TAG TAGlen TAGvalue TAGvalue : : : : 07 .' TAG : TAGlen : TAGvalue : 89 ..ETX CRC TAGvalue : 30 TAG : TAGlen : TAGvalue : 0f .PTAG_MI_ADDR 18 4c 41 55 54 52 20 20 20 20 20 55 20 50 20 42 20 4a 45 52 47 20 31 30 20 'LAUTRUPBJERG 10 ' ' ' TAG : TAGlen : TAGvalue : 09 ..000000.PTAG_FROMSTATE 01 DLE 15 .PTAG_MI_NR 05 07 60 11 00 01 '.' TAG : TAGlen : TAGvalue : 85 .PTAG_RESULT 01 00 .PTAG_VAT 04 00 00 00 00 '.' TAG TAGlen TAGvalue TAGvalue DLE 03 ..' TAG : TAGlen : TAGvalue : 96 ....PTAG_REF_NO 04 00 01 e2 40 ' 'DK-2750 ' 34 34 20 36 '(+45) 44 68 44 6' '8 ' '12345678 ' '.PTAG_MI_PHONE 18 28 2b 34 35 29 38 20 20 20 20 20 20 34 20 34 20 20 36 38 20 TAG : TAGlen : TAGvalue : 0d .' TAG : TAGlen : TAGvalue : 57 .' 30 20 30 20 00 20 '1.PSTATE_PRINT_WAIT_ACK '...`.PTAG_SEQNO 01 DLE 03 '.PTAG_BATCHNUMBER 0c 35 35 30 30 33 33 TAG : TAGlen : TAGvalue : 98 .PTAG_MI_NAME 12 50 42 53 20 50 53 d8 c5 : : : : 30 39 39 30 35 30 35 35 '00990555' '.â@' TAG : TAGlen : TAGvalue : 84 ..' TAG : TAGlen : TAGvalue : 97 .

00 ----------- PIN KØB MASTERCARD XXXX XXXX XXXX 1612 TERM: 00990555-000371 DA1 NETS NO:0760110001 PSAM: 5374978-0000000540 ARC: STATUS:0000 AUT.ACK SEQ : 06 : 31 PBS PSAM-146 ÆØÅ LAUTRUPBJERG 10 DK-2750 BALLERUP TLF: (+45) 44 68 44 68 2011-12-30 KØB 08:59 DKK 45.PTAG_RECEIPT Container TAGlen : DLE 03 TAG : 84 . KODE: 10:4OK REF:000371 GENNEMFØRT PrintReceipt TimeStamp: STX : 02 SEQ : 04 TAG : 6b .' 03 a494 flxCardTransaction result=SUCCESS flxCardTransaction error=0 StopTid 2011-12-30 08:59.OK ETX CRC : : '.PTAG_RESULT TAGlen : 01 TAGvalue : 00 .49-906 TimeStamp: ACK : SEQ : 06 04 Local Payment Protocol Page 86 .

the receipt is the responsibility of the ECR after acknowledging the receipt. Terminal ECR Transaction begins Communication to inguirer Transaction Completed (to PSAM) Transaction ends Terminal ensures that the receipt is handled correctly before ECR has acknowledged the receipt Start receipt timer Receipt and transaction result is sent to ECR Receitpt is received by the ECR Receitpt is acknowledged by ECR No Receipt timer? No Acknowledge received? Yes Yes Terminal is locked Terminal is ready Local Payment Protocol ECR has the responsibility of the receipt after acknowledge Page 87 .1 The important flow of the receipt and the transaction result As seen on the sketch below. General Flowcharts 10.10.

1 Transaction data A2.A.1 Acqmsg data with Transaction A6 Error tags A6. ExtendedECR data A9.3 Command data A3 Result data A3.1 Receiving Error data A7 Abort data A7.1 ExtendedECR functions A10 Terminal States and number A11. The merchant state-event diagram A14.2 Amount data A2. The merchant state-events Local Payment Protocol Page 88 . CAC9 data A9.2 Binary data with Transaction-Result A4. The merchant events and number A13.1 Binary data with Info-Text A4. Description of locked states A12. Appendix A1 Tag definitions A2 Value definitions A2.1 Abort data with info A8.2 Result data with Admin A4 Binary data A4.3 Binary data with Admin-Result A4.1 Result data with Transaction A3.4 Binary data with Receipt-Text A5 Acqmsg tags A5.

Extended ECR functions (bitmask) Connect tags Definition Length Description CONNECT DISCONNECT OPEN CLOSE 0x40 0x42 0x44 0x46 2 bytes Empty Empty Empty First/second -> SW compatibility/new functionality Transaction tags Definition Length Description AMOUNT VAT FEE GRATUITY REF_NO CU MI TR TT TIME ASW1ASW2 CARD_SOURCE PREPAID TERMENV E_RECEIPT 0x48 0x57 0x58 0x59 0x4A 0x4C 0x4E 0x50 0x56 0x5C 0x13 0x92 0x93 0x94 0x99 4 bytes 4 bytes 4 bytes 4 bytes 4 bytes 2 (in)/3(out) bytes 1 byte 1 byte 1 byte 4/5 byte 2 bytes 1 byte 1 byte 1 byte Max 65 bytes Card number tags Definition Length Description LOCALCARDDATA EIE CARDNUMBER AID CRCNUMBER 0x71 0x51 0x52 0x54 0x5A CDO Max 521 Max 37 1 byte 4 byte Holding the Local Card data info Extended Issuer Envelope data Card number as ascii Application ID Card Reconciliation Counter # Local Payment Protocol Contains data to/from extern host IP routing Currency Code (+ exponent) Merchant Initiative Transaction Type Transaction request Unix time stamp/DTHR format ASW1ASW2 value 0. 1 for a admin terminal report Response to command with seq. Container tags (CDO) Definition Length Value Description INFO DATA_1 DATA CARDDATA TRANSACTION ADMIN INIT RECEIPT ERROR ADVICE_RECON HOSTDATA HANDLERSTR PRERESULT MENU ENAI 0x60 0x61 0x63 0x6F 0x65 0x67 0x69 0x6B 0x6C 0x6D 0x73 0x74 0x75 0x77 0x79 CDO CDO CDO CDO CDO CDO CDO CDO CDO CDO CDO CDO CDO CDO CDO Contains info like status messages Contains data needing no response Contains data – needing response Holding card data info Contains transaction data Contains data for administrative functions Contains data for init functions Contains receipt data Contains error messages General tags Definition Length Description STOPLIST BINARY TEXT RESULT FROM_STATE STATE EVENT COMMAND SEQNO ExtendedECR 0x5B 0x80 0x82 0x84 0x85 0x86 0x87 0x88 0x89 0x90 8 bytes Max 1000 Max 1000 1 byte 1 byte 1 byte 1 byte Max 1000 1 byte 4 bytes Check Stop List/authorisation code Binary data Text data.2. e. e.A1.2. Tag definitions The general rule is that an odd tag definition requires an answer. transaction result info State machine data State machine data Event in state machine E. Page 89 .g.g.g.1. no.3.1.4. value 0. therefore all container tags will return at some point. value 0. status or receipt Result data.1.

CARDNAME Local Payment Protocol 0x5E 17 byte Card name as ascii Page 90 .

Info tags Definition Length Description TSI CONFIRM KEYPRESS ABORT CAC9 ACQMSG 0x00 0x02 0x04 0x06 0x11 0x08 Max 24 Empty 1 byte 1 byte 1 byte Max 1000 Transaction State Information Receipt tags Definition Length Description ATC AED STAN PSAMID ACODE CVM AUTCODE TERMID EXTRA ARC MI_NR MI_NAME MI_CITY MI_ADDR MI_ZIP MI_PHONE MI_BRN TOKEN PSAM_CREATOR DCC_RATE DCC_CURRENCY 0x0A 0x0C 0x10 0x12 0x14 0x16 0x18 0x1A 0x1C 0x1E 0x01 0x03 0x05 0x07 0x09 0x0B 0x0D 0x0E 0x0F 0x95 0x98 2 bytes 3 bytes 3 bytes 4 bytes 2 bytes 1 byte 6 bytes 8 bytes 4 bytes 2 bytes 5 bytes 18 bytes 16 bytes 24 bytes 8 bytes 24 bytes 12 bytes Max 1024 bytes 4 bytes 8 bytes 2/3 bytes Consult EMV specification Consult EMV specification PBS reference number (bcd) PSAM id.domain Admin tags Definition Length Description PARAM_STR 0x49 X bytes Parameters for admin function Local Payment Protocol Number of terminal numeric key presses Enhanced Host advises Host advice Page 91 .xxx.xxx or host.000000” DCC currency IP routing tags Definition Length Description IPADDR IPPORT IPTIMEOUT 0x8A 0x8C 0x8E X bytes 4 bytes 4 bytes xxx. PBS Authorisation code Terminal id Consult EMV specification Merchant info number ascii Merchant info name ascii Merchant info city ascii Merchant info address ascii Merchant info zip code ascii Merchant info phone number ascii Merchant info business number (cvr) ascii Transaction token PSAM Creator DCC rate ascii “1. Action code Cardholder verification method.xxx. consult EMV spec.

A2.g. which defines the transaction type to initiate TT (Transaction Type) Value Purchase Transaction 0x00 Refund Transaction 0x01 The reference number is a four-byte value chosen by the ECR and can be used to keep track of a transaction REF_NO Value E. These tags are optional to send. The merchant initiative is a one-byte value. keep track of purchase number 1 0x00000001 A2. More can be added by appointment with Point A/S CU (Currency Code) Value DKK 0x00D0 (208d) EUR 0x03D2 (978d) Etc… … The Transaction Type is a one-byte value. which can hold the following values: MI (Merchant Initiative) Value Default value 0x00 Forced PIN 0x81 Signature transaction 0x82 No CVM 0x80 The currency code is a two-byte value. which defines the transaction request (see PBS OTRS) TR (Transaction Request) Value Purchase Transaction 0x00 Refund Transaction 0x20 The Transaction Type is a one-byte value. so if they not used the default values are: Default terminal value Value MI (Merchant Initiative) 0x00 for Default CU (Currency Code) 0x00D0 for DKK TT (Transaction Type) 0x00 for Purchase TR (Transaction request) According to the PBS OTRS specification CARD_SOURCE ( 0x00 default REF_NO Any value A2.2 Amount data The amount is given in the smallest possible unit (Øre for DKK) consists of 4 bytes Amount Value E.1 Transaction data If the transaction tags are used. The terminal has by default 10 currency codes embedded.g 19995 (in DKK -> 199 Kroner and 95 Øre) 0x00004E1B Local Payment Protocol Page 92 . the can be given the following values. Value definitions These tables define the values used when initiating a transaction.

<STAN> <ADVICE_FILE_INDEX> <BATCH_NUMBER> <IP ADDRESS> <IP ADDRESS> Page 93 .A2. SENDLOG CLEARDATASTORE DOWNLOADPROGRAM DOWNLOADPARAM. like this: ADMIN COMMAND [PARAM_STR] The command defines which function to initiate Optional parameters to selected commands Command ENDOFDAY ENDOFDAYLOG.3 Command data When initiating an administrative function e.<FILENUMBER>. REPORT_TERMINALREPORT REPORT_TOTALS REPORT_LOG REPORT_OLDLOG LASTRECEIPT UNLOCK_RECEIPT CLOCKSYNCPBS CLOCKSYNCPOINT. DOWNLOADPAN DOWNLOADTLCMDB RESTORETLCMDB CONTRASTUP CONTRASTDOWN RESTARTTERMINAL EJECTCARD ADMIN_MSC (For future use) ADMIN_BACKLIGHT_ON ADMIN_BACKLIGHT_OFF REPORT_NETWORKREPORT REPORT_RATESREPORT GRATUITY_RECEIPT EXCLUDE_DATASTORE_RECORD_WITH_STAN ADVICE_FORWARDING REPORT_FILE5STATUS RESERVED_FOR_OCX REPORT_PCT DOWNLOAD_DCC_RATES UPDATE_PSAM UPDATE_FEE_TABLE UPDATE_SALT GETADVICERECON SET_BATCH_NUMBERS REPORT TCS REPORT TPROPS CVS ADMIN_EVENTLOG_PRINT ADMIN_EVENTLOG_SEND ADMIN_EVENTLOG_DELETE Value 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2A 0x2B ADMIN_GET_DC_PROPERTIES_STAN ADMIN_GET_DC_PROPERTIES_PAN ADMIN_SET_DC_PROPERTIES ADMIN_ID_REPORT 0x80 0x81 0x82 0x83 Local Payment Protocol ASCII CSV string parameter/s <AMOUNT>.<RECORDID>.g.<CURRENCYCODE> <PSAMID>.

<PARAMX> A3. like this: ADMIN RESULT The result value is reflecting if the administrative function was carried out successfully or not: Admin result Successful Unsuccessful Value 0x00 0x01 A3. Result data A3... like this: TRANSACTION RESULT The result value is a direct answer from the host (the transaction inquirer ): Transaction result Transaction Approved Transaction not approved Value 0x00 0x01 A3. e.3 Result data with Receipt When acknowledging receipts. e.SET_ECR_EXTENDED_FUNCTIONS GET_ECR_EXTENDED_FUNCTIONS 0x84 0x85 SET_TERMINAL_PROPERTIES 0xEE <PARAM1>.g.1 Result data with Transaction When receiving RESULT tags in conjunction with TRANSACTION tags (not Local Card).2 Result data with Admin When receiving RESULT tags in conjunction with ADMIN tags.g. the ECR must reply with a result tag like this: ADMIN RESULT The result value is reflecting the following: Receipt result Saved/Signature OK Error/Signature not OK Value 0x00 0x01 Local Payment Protocol Page 94 .<PARAM2>..

Binary data The binary tags are optional A4. e. like this: INFO TEXT ( “Købet er afbrudt” ) BINARY ( status line 2) The binary data holds information on where to place the text: Placement of text Status line 1 Status line 2 Status line 3 Status line 4 Value 0x01 0x02 0x03 0x04 Local Payment Protocol Page 95 .1 Binary data with Info-Text When receiving BINARY tags in conjunction with INFO and TEXT tags.g.A4.

A4. e.2 Binary data with Transaction-Result When receiving BINARY tags in conjunction with TRANSACTION and RESULT tags. e. like this: ADMIN RESULT BINARY The binary data holds information on transaction failure Local Payment Protocol Page 96 . like this: TRANSACTION RESULT ( always 0x01 in this situation ) BINARY The binary data holds information on transaction failure A4.3 Binary data with Admin-Result When receiving BINARY tags in conjunction with ADMIN and RESULT tags.g.g.

g. Acqmsg data A5.A4. Error data A6.g. like this: RECEIPT TEXT BINARY The binary data holds information on that this segment is part of a larger receipt: Receipt segment If the current receipt is part of a larger receipt -> at least one more receipt is missing Value 0x01 A5.1 Receiving Error data When receiving ERROR tags.4 Binary data with Receipt-Text When receiving BINARY tags in conjunction with RECEIPT and TEXT tags e. they will be constructed like this: ERROR BINARY STATE MSG – the unknown TLV or TLV not possible in current terminal state The BINARY tag can have the following values: BINARY Not TLV Unknown TLV TLV not allowed/possible in the current terminal state Local Payment Protocol Value 0x01 0x02 0x03 Page 97 . like this: TRANSACTION ACQMSG ( value ) The binary data holds information on that this segment is part of a larger receipt: Acqmsg If the acquirer requests an endOfDay routine Value 0x01 A6.1 Acqmsg data with Transaction When receiving ACQMSG tags in conjunction TRANSACTION tags e.

g.1 CAC9 data with Transaction When receiving CAC9 tags in conjunction TRANSACTION tags e.A7. e. Abort data A7. CAC9 data A8. like this: INFO ABORT The abort data holds information on how the transaction was aborted: Transaction aborted origin Operator/ECR aborts transaction User Timeout in terminal MI disagreement (the user swipes the card and the operator sends a signature purchase) Transaction type disagreement (the user swipes the card and the operator starts a refund transaction) Value 0x01 0x02 0x03 0x04 0x05 A8.1 Abort data with Info When receiving BINARY tags in conjunction with INFO and ABORT tags. like this: TRANSACTION CAC9 ( value ) The value data holds information: CAC9 Display Line for Host Message Advice request flag Local Payment Protocol Value 0xCA 0xC9 Page 98 .g.

ExtendedECR data A9. Local Payment Protocol Page 99 . so it must be reset every time the terminal is reboot. 0x85 ADMIN_GET_ECR_EXTENDED_FUNCTIONS The response is a PTAG_INFO container with a PTAG_ECREXTENDEDFUNCTIONS tag giving the value. ExtendedECR is 4 hex digits Example: [ECREXTENDEDFUNCTIONS] “1af5” LPP GET terminals EcrExtendedFunctions: Via LPP it’s possible to get the terminals current setting using an ADMIN command.A9. 0x90 PTAG_ECREXTENDEDFUNCTIONS Tag with the value to give the terminals EcrExtendedFunctions variable.1 ExtendedECR functions If no value is send during connect the terminal uses the default setting from its parameter file. 0x90 PTAG_ECREXTENDEDFUNCTIONS Tag with the value of terminals EcrExtendedFunctions variable. LPP SET terminals EcrExtendedFunctions: Via LPP it’s possible to set the terminals current setting using an ADMIN command. 0x84 ADMIN_SET_ECR_EXTENDED_FUNCTIONS With a PTAG_ECREXTENDEDFUNCTIONS tag giving the value. Observe only the 2 last bytes of 4 bytes is used. this value is not saved. Observe only the 2 last bytes of 4 bytes long value is used.

"AMOUNT_READY". "ADMIN_PRINT_PREV_NP". "TRANS_ABORT". "ADMIN_REBOOT". "IDLE_NP". "EXT_TRANS_END". "TRANS_WAIT_ACK". "TRANS_END_ADMIN". "EXT_CARD_WAIT_ACK". "SEND_CARDDATA". // 20 "PRINT_WAIT_ACK". "TRANS_CARD". "STOPLIST". "TRANS_LASTPRINT". "TRANS_COMMIT". // 40 "EXTTRANS_END_CARD_ADMIN". "EXT_CARD_TRANS". // 60 "TRANS_MENU". "ADMIN_RECEIPT_PRINTED_NP". "ADMIN_PRINT_PREV". "OPEN_MENU". "ADMIN_PREV_PRINTED". "IDLE". “TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK”. "SYSTEM_ERROR". "ADMIN_PRINT". "ADMIN_PRINT_NP". "TRANS_OPEN". "ADMIN". Terminal states and number "". "CARD_REQ_AMOUNT". "TRANS_ABORT_TIMEOUT". "OPEN". "CONNECTED".A10. "ADMIN_NP". "TRANS_REQ_AMOUNT". "TRANS_ECRCOMERR_AMOUNT". "PRINT_WAIT_ACK_VERIFY". Local Payment Protocol Page 100 . "ADMIN_PREV_PRINTED_NP". "ADMIN_RECEIPT_PRINTED". "EXT_CARD_COMMIT_CONFIRM". "TRANS_END_TRANS". "ECRCOMERR". "TRANS_END". "CONNECTED_NP". "TRANS_SIGNATURE_CONFIRMED". "OPEN_NP". // 10 "CARD". // 50 "ADMIN_ERROR". "ADMIN_PRINT_SECOND_RECEIPT". "TRANS_PRINT". "EXT_CARD_COMMIT". "EXTTRANS_END_CARD". "EXT_WAIT_HOSTDATA". // 1 "INIT". "TRANS". "EXT_CARD". "TRANS_PRINTED". "TRANS_END_CARD". "ADMIN_PRINT_FIRST_RECEIPT". // 30 "TRANS_END_ADMIN_LOCK". "ANS_AMOUNT". "EXTTRANS_END_CARD_ADMINLOCK". "EXT_CARD_COMMIT_NOECR". "CARD_ABORT". "TRANS_ECRCOMERR".

but another receipt is still remaining in the terminal Page 101 . which prints the last receipt in a series. The receipt is acknowledged.A11. Description of locked states State name IDLE_NP State 4 CONNECTED_NP 6 OPEN_NP 8 ADMIN_NP 54 ADMIN_PRINT_NP 55 ADMIN_RECEIPT_PRINTED_NP 56 ADMIN_PRINT_PREV_NP 57 ADMIN_PREV_PRINTED_NP 58 Local Payment Protocol Description The terminal is not connected and a receipt is remaining in the terminal The terminal is connected and a receipt is remaining in the terminal The terminal is ready but a receipt is remaining in the terminal The terminal is running an administrative function while a receipt is remaining in the terminal The terminal is running an administrative function which prints a receipt while another receipt is remaining in the terminal The terminal is running an administrative function. which prints a receipt. but another receipt is still remaining in the terminal The terminal is running an administrative function which prints a receipt while another receipt is remaining in the terminal The terminal is running an administrative function.

TAPA_TRANS_VER_SIGNATURE. ECR_VERSIG_ACKNOWLEDGED. ECR_ERROR. INT_TIMEOUT_RECEIPT. TAPA_TRANSACTION_COMPLETE. INT_TIMER_ABORT. INT_USER_ABORT. INT_TIMEOUT_AMOUNT. INT_DISCONNECT. INT_TIMEOUT_COMPLETE. // Tapa events TAPA_TRANSACTION_STATE_INFO. ECR_OPEN. INT_OPERATOR_ABORT. INT_TIMEOUT. TAPA_WRITE_HANDLER_STRING. INT_ABORT. ECR_AMOUNT. ECR_TRANSACTION_COMPLETED. // 2 // 10 // 20 // 30 // 40 // 50 // Signal events SIG_GET_AMOUNT. ECR_CONNECT_OK. INT_FIRST_RECEIPT. ECR_ADMIN. The merchant events and number INT_DEFAULT INT_STATUS. ECR_RECEIPT_ACKNOWLEDGED. ECR_TRANSACTION. // ECR events ECR_CONNECT. TAPA_READ_HANDLER_STRING. Local Payment Protocol Page 102 . ECR_CLOSE. INT_NOCONFIRM. ECR_RECEIPT_VERIFY. INT_NORECEIPT. INT_ECR_COM_ERR. ECR_LAST_RECEIPT. ECR_INFO. INT_CONFIRM. TAPA_CLOSE_HANDLER. TAPA_GET_AMOUNT. TAPA_UNKNOWN. TAPA_CHECK_STOP_LIST. ECR_ABORT. ECR_RECEIPT. INT_TIMEOUT_LOCALCARD. INT_SECOND_RECEIPT. ECR_IDLE. TAPA_OPEN_HANDLER. INT_TRANSACTION_STATE_INFO. INT_REBOOT. INT_ADMIN_ANOTHER_RECEIPT.A12. ECR_DISCONNECT. INT_ADMIN_PRINT_END. TAPA_DISPLAY_MESSAGE.

SIG_PRINT,
SIG_GET_STATE,
SIG_PRINTER_STATUS,
SIG_USER_STOP,
SIG_TRANSACTION_STATE,
SIG_TRANS_COMMIT,
SIG_ADVICE_FLAG,
SIG_CARDDATA,
SIG_ASW_CODE,
SIG_EXTERNAL_CARDDATA,
SIG_EXTERNAL_CARDNAME,
SIG_EXTERNAL_HOSTDATA,
SIG_IDLE,
SIG_EJECTCARD,
SIG_TERM_INITIALISED,
SIG_PRERESULT,
// Other events
ECR_PREV_RECEIPT,
ECR_PREV_RECEIPT_LAST,
ECR_UNLOCK_RECEIPT,
ECR_LOCK_RECEIPT,
ECR_CLOSE_RECEIPT,
ECR_EXTCARD,
ECR_EXTCARD_CONFIRM,
ECR_EXTCARD_HOSTRSP,
SIG_LOCKED,
INT_CARD_AMOUNT2,
INT_RECEIPT_ACK,
INT_RECEIPT_NAK,
INT_TAPA_WRITESTR,
TAPA_GET_AMOUNT_NOPAN,
ECR_MENU,
ECR_MENU_REPLY,
ECR_FEE,
ECR_DUMMY1,
SIG_INIT,
SYSTEM_ERROR,
SIG_ENAI_SEND,
ECR_ENAI_RECEIVE,
SIG_ENAI_CONNECT,
SIG_ENAI_DISCONNECT,
TAPA_GET_MERCHANT_DATA,
ECR_CHECK_STOP_LIST,
ECR_CHECK_STOP_LIST_OK,
INT_TIMEOUT_STOPLIST,
ECR_PRERESULT,
ECR_AMOUNT_DCC,
SIG_PRINT_ACK,
ECR_AMOUNT_USER,
ECR_ABORT_APE_DAPE_ERROR,

Local Payment Protocol

// 60

// 70

// 80

// 90

// 100

Page 103

A13. The merchant state-event diagram
A PDF file of the current state-event diagram is available upon request.

The state diagram shows all the states available the merchant module in the terminal.

Event colour codes:
BLACK
GREEN
RED

Static events – these events are events, which are only handled in that particular state
Dynamic events – these events can be handled in the current state or in the
hierarchical ‘parent’ state if the event isn’t available in the current state
Hierarchy - these red lines shows the hierarchical structure of the state machine

Local Payment Protocol

Page 104

A14. The merchant state-events
From state
INIT,2
IDLE,2
CONNECTED,5
CONNECTED,5
OPEN,7
OPEN,7
OPEN,7
OPEN,7
OPEN,7
OPEN,7
OPEN,7
OPEN,7
TRANS,9
TRANS,9
TRANS,9
TRANS,9
TRANS,9
TRANS,9
TRANS,9
TRANS,9
CARD,11
CARD,11
CARD,11
CARD_REQ_AMOUNT,14
CARD_REQ_AMOUNT,14
CARD_REQ_AMOUNT,14
TRANS_REQ_AMOUNT,15
TRANS_REQ_AMOUNT,15
TRANS_REQ_AMOUNT,15
TRANS_REQ_AMOUNT,15
TRANS_COMMIT,19
TRANS_COMMIT,19
TRANS_COMMIT,19
PRINT_WAIT_ACK,21
PRINT_WAIT_ACK,21
PRINT_WAIT_ACK,21
PRINT_WAIT_ACK,21
PRINT_WAIT_ACK_VERIFY,22

Local Payment Protocol

Event
SIG_TERM_INITIALISED
ECR_CONNECT_OK
ECR_DISCONNECT
ECR_OPEN
ECR_ADMIN
ECR_CLOSE
ECR_MENU
SIG_CARDDATA
SIG_INIT
TAPA_CHECK_STOP_LIST
TAPA_GET_AMOUNT
TRANS_START_KEY
ECR_AMOUNT
ECR_MENU
ECR_RECEIPT_ACKNOWLEDGED
INT_ECR_COM_ERR
SIG_EXTERNAL_CARDDATA
SIG_TRANS_COMMIT
TAPA_GET_AMOUNT
TAPA_TRANSACTION_COMPLETE
ECR_TRANSACTION
TAPA_GET_AMOUNT
TAPA_TRANSACTION_COMPLETE
ECR_CONNECT
ECR_TRANSACTION
INT_ABORT
ECR_AMOUNT_DCC
ECR_AMOUNT_USER
INT_ECR_COM_ERR
TAPA_GET_AMOUNT
ECR_RECEIPT
ECR_RECEIPT_VERIFY
SIG_PRERESULT
ECR_RECEIPT_ACKNOWLEDGED
ECR_RECEIPT_ACKNOWLEDGED
SIG_PRERESULT
TAPA_TRANS_VER_SIGNATURE
ECR_RECEIPT_ACKNOWLEDGED

To state
IDLE,2
CONNECTED,5
IDLE,2
OPEN,7
ADMIN,43
CONNECTED,5
OPEN_MENU,60
CARD,11
TRANS_OPEN,62
STOPLIST,65
CARD_REQ_AMOUNT,14
TRANS_KEY,67
AMOUNT_READY,17
TRANS_MENU,61
TRANS_WAIT_ACK,21
TRANS_ECRCOMERR,48
EXT_CARD_TRANS,33
TRANS_COMMIT,19
TRANS_REQ_AMOUNT,15
TRANS_WAIT_ACK,21
TRANS,9
CARD_REQ_AMOUNT,15
OPEN,7
TRANS_REQ_AMOUNT,15
TRANS_REQ_AMOUNT,15
OPEN,7
TRANS_MENU,61
TRANS_MENU,61
TRANS_ECRCOMERR_AMOUNT,49
TRANS_REQ_AMOUNT,15
PRINT_WAIT_ACK,21
PRINT_WAIT_ACK,21
TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK,66
TRANS_COMMIT,19
TRANS_COMMIT,19
TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK,66
PRINT_WAIT_ACK_VERIFY,22
TRANS_COMMIT,19

Page 105

STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
DYNAMIC
STATIC
DYNAMIC
STATIC
STATIC
STATIC
DYNAMIC
STATIC
DYNAMIC
STATIC
DYNAMIC
STATIC
STATIC
DYNAMIC
STATIC
STATIC
STATIC
STATIC
STATIC
DYNAMIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC

44 OPEN.7 EXT_TRANS_END.5 OPEN.44 ADMIN_PRINT.32 EXT_CARD_TRANS.7 ADMIN_PREV_PRINTED.52 ADMIN_PREV_PRINTED.43 ECRCOMERR.52 ADMIN_PREV_PRINTED.61 TRANS_MENU.51 ADMIN.7 TRANS.9 EXT_CARD_COMMIT_CONFIRM.62 TRANS_OPEN.35 OPEN.29 OPEN.33 OPEN.53 ADMIN_PRINT.27 TRANS_END_TRANS.46 ADMIN_PRINT_PREV.48 ECRCOMERR.39 ADMIN.9 TRANS.45 TRANS_ECRCOMERR.38 EXT_CARD_COMMIT_CONFIRM.7 EXT_CARD_WAIT_ACK.43 ADMIN.35 EXT_WAIT_HOSTDATA.PRINT_WAIT_ACK_VERIFY.19 TRANS_END.53 ADMIN.61 TRANS_OPEN.32 Page 106 STATIC STATIC STATIC STATIC STATIC DYNAMIC DYNAMIC STATIC DYNAMIC DYNAMIC STATIC STATIC STATIC STATIC STATIC DYNAMIC STATIC STATIC STATIC STATIC STATIC STATIC DYNAMIC STATIC STATIC DYNAMIC DYNAMIC STATIC DYNAMIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC .37 EXT_WAIT_HOSTDATA.35 ADMIN_RECEIPT_PRINTED.7 EXT_WAIT_HOSTDATA.62 TRANS_OPEN.32 EXT_CARD.61 TRANS_MENU.60 OPEN_MENU.7 TRANS.34 OPEN.34 EXT_WAIT_HOSTDATA.27 TRANS_END_TRANS.45 ADMIN_ERROR.51 ADMIN_ERROR.62 TRANS_OPEN.50 CONNECTED.7 ADMIN_REBOOT.44 ADMIN_RECEIPT_PRINTED.60 OPEN_MENU.33 EXT_CARD_WAIT_ACK.51 ADMIN_PRINT_PREV.43 ADMIN_PRINT.7 EXT_CARD.27 TRANS_END.39 EXT_CARD_COMMIT.60 TRANS_MENU.43 ADMIN.59 ADMIN_RECEIPT_PRINTED.37 EXT_TRANS_END.9 OPEN.50 ADMIN_ERROR.34 EXT_CARD_WAIT_ACK.7 OPEN.7 OPEN.60 OPEN_MENU.36 EXT_CARD_COMMIT_NOECR.44 ADMIN_PRINT.21 TRANS_END.32 EXT_CARD.60 TRANS.61 OPEN.53 OPEN_MENU.43 ADMIN.43 ADMIN.43 TRANS_MENU.29 EXT_CARD.43 ADMIN.32 EXT_CARD.9 TRANS_REQ_AMOUNT.22 TRANS_WAIT_ACK.7 OPEN.36 EXT_CARD_TRANS.43 ADMIN.35 EXT_CARD_COMMIT.15 OPEN_MENU.53 ADMIN_PREV_PRINTED.62 Local Payment Protocol INT_TIMEOUT_RECEIPT INT_RECEIPT_ACK ECR_TRANSACTION SIG_IDLE SIG_IDLE ECR_EXTCARD_CONFIRM ECR_EXTCARD ECR_TRANSACTION TAPA_TRANSACTION_COMPLETE TAPA_TRANSACTION_COMPLETE ECR_RECEIPT_ACKNOWLEDGED INT_TIMEOUT_RECEIPT ECR_EXTCARD_HOSTRSP INT_ECR_COM_ERR SIG_EXTERNAL_HOSTDATA TAPA_TRANSACTION_COMPLETE SIG_EXTERNAL_HOSTDATA ECR_LAST_RECEIPT ECR_PREV_RECEIPT ECR_PREV_RECEIPT_LAST ECR_PREV_RECEIPT_LAST ECR_RECEIPT ECR_TRANSACTION_COMPLETED INT_REBOOT ECR_LAST_RECEIPT INT_ECR_COM_ERR INT_TIMEOUT_RECEIPT ECR_RECEIPT_ACKNOWLEDGED TAPA_TRANSACTION_COMPLETE ECR_CONNECT_OK ECR_TRANSACTION_COMPLETED ECR_RECEIPT_ACKNOWLEDGED ECR_RECEIPT_ACKNOWLEDGED ECR_TRANSACTION INT_ABORT INT_TIMEOUT_LOCALCARD SIG_IDLE ECR_MENU_REPLY INT_TIMEOUT_LOCALCARD TAPA_GET_AMOUNT ECR_MENU ECR_TRANSACTION INT_ABORT SIG_EXTERNAL_CARDDATA TRANS_COMMIT.

19 TRANS_COMMIT.19 TRANS_COMMIT.63 STOPLIST.21 TRANS_WAIT_ACK.21 Page 107 STATIC DYNAMIC STATIC STATIC DYNAMIC STATIC DYNAMIC DYNAMIC .19 PRINT_WAIT_ACK.66 TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK.TRANS_OPEN.7 ADMIN.14 OPEN.66 Local Payment Protocol TAPA_GET_AMOUNT TAPA_TRANSACTION_COMPLETE ECR_ADMIN TAPA_CHECK_STOP_LIST ECR_RECEIPT_ACKNOWLEDGED INT_TIMEOUT_RECEIPT SIG_PRINT TAPA_TRANSACTION_COMPLETE CARD_REQ_AMOUNT.62 SYSTEM_ERROR.43 TRANS_COMMIT.66 TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK.65 TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK.66 TRANS_DELAY_PRERES_UNTIL_RECEIPT_ACK.62 TRANS_OPEN.

32 EXT_CARD_TRANS.36 EXT_WAIT_HOSTDATA.63 OPEN.5 SYSTEM_ERROR.9 TRANS_OPEN CARD.9 TRANS.9 AMOUNT_READY.22 TRANS_WAIT_ACK.14 TRANS_ECRCOMERR_AMOUNT.3 CONNECTED.11 TRANS_ECRCOMERR.48 ADMIN.37 EXT_CARD_WAIT_ACK.17 OPEN.37 IDLE.32 EXT_CARD_TRANS.2 IDLE.52 ADMIN_PREV_PRINTED.7 TRANS.15 AMOUNT_READY.53 EXT_CARD_TRANS.52 EXT_CARD.33 EXT_CARD_COMMIT_CONFIRM.3 CONNECTED.Parent state Child state INIT.39 EXT_CARD_COMMIT_NOECR.3 IDLE.23 PRINT_WAIT_ACK_VERIFY.44 ADMIN_RECEIPT_PRINTED.60 TRANS_MENU.33 EXT_CARD_COMMIT.7 OPEN.35 EXT_TRANS_END.5 OPEN.35 EXT_TRANS_END.36 EXT_WAIT_HOSTDATA.33 EXT_CARD.38 EXT_CARD_COMMIT.7 TRANS.48 TRANS_ECRCOMERR.7 OPEN.43 ADMIN_PRINT_PREV.45 ADMIN_PRINT_PREV.34 Local Payment Protocol Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Hierarchy Page 108 .50 ADMIN_ERROR.49 ECRCOMERR.7 TRANS.44 ADMIN.61 TRANS_KEY PRINT_WAIT_ACK.9 TRANS_COMMIT.9 TRANS.43 ADMIN_PRINT.21 CARD_REQ_AMOUNT.19 OPEN_MENU.51 ADMIN_PRINT.19 PRINT_WAIT_ACK.9 TRANS_REQ_AMOUNT.17 TRANS_COMMIT.43 ADMIN.23 TRANS_COMMIT CARD.