0% found this document useful (0 votes)
298 views92 pages

Full-Integration Implementation Guide - USCA V1.02.00 - 20220526

PAX

Uploaded by

INFO ANS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
298 views92 pages

Full-Integration Implementation Guide - USCA V1.02.00 - 20220526

PAX

Uploaded by

INFO ANS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 92

Full-Integration Implementation Guide

V1.02.00
20220526

PAX Technology, Inc..


All Rights Reserved.
Preface
Full-Integration Implementation Guide
Version: V1.02.00
Status: [ ]Draft [★]Release [ ]Modify
Copyright © 2016-2025 PAX Technology, Inc. All rights reserved.

The Programs (which include both the software and documentation) contain proprietary information; they are
provided under a license agreement containing restrictions on use and disclosure and are also protected by
copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or
decompile of the Programs, except to the extent required to obtain interoperability with other independently
created software or as specified by law, is prohibited.

The information contained in this document is subject to change without notice. If you find any problems in the
documentation, please report them to us in writing. This document is not warranted to be error-free. Except as
may be expressly permitted in your license agreement for these Programs, no part of these Programs may be
reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose.

Security Notice: No part of this publication may be copied, distributed, stored in a retrieval
system, translated into any human or computer language, transmitted, in any form or by any
means, without the prior written consent of PAX Technology, Inc.
PAX is a registered trademark of PAX Corporation and/or its affiliates. Other names may be trademarks of their
respective owners.

Technical Support
If you encounter a problem while installing, registering or operating this product, please make sure that you have
read the documentation. If you cannot resolve the Issue, please contact us.

Web: https://developer.pax.us

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 2-
Revision History
Date Version Author Description
2022/5/26 1.02.00 Keenan Wu 1. Update EDC Type Definition and Transaction Type
Definition.
2. Add TransType list for EDC table.
3. Update document format.
4. Add sample code for Initialize, Get Variable, Set Variable,
Input Account With EMV, Authorize Card and Get PIN Block.
5. Add screenshot for Show Message, Show Dialog, Show
Textbox and ShowMessageCenter.
6. Add AuthorizeCard Flow, CompleteOnlineEMV Flow and
GetPinblock Flow.
7. Update InputAccountWithEMV Flow.
8. Removed Q25 from Classic Terminal list.
2022/3/11 1.01.06 Jack Zhang 1. Add GetFormList command
2. Add GetVatList command
3. Add SetVarList command
4. Add RunForm command
2022/2/23 1.01.05 Jack Zhang Rename ShowThankYou to ShowMessageCenter
2021/11/18 1.01.04 Jack Zhang 1. Update the Full-Integration solution introduction
2. Modify the terminal information
2021/10/14 1.01.03 Jack Zhang 1. Add UploadFTP command
2. Add ShowThankYou command
3. Update the init response information
4. Update Android Terminal EMV Kernel version
2021/8/18 1.01.02 Jack Zhang 1. Add “KSN Flag” to Get PIN Block, AuthorizeCard, Input
AccountwithEMV.
2. Add AES DUKPT Key type to command Get PED
Information
3.Add Luhn Validation Result to support Luhn check
4. Update GetVar/SetVar parameters
5. Add Apple Pay VAS and Google Smart Tap command
6. Add terminal information by app supported
2021/6/28 1.01.01 Jack Zhang 1. Support MACCalculation command
2. Support GetPEDInformation command
3. Support IncreaseKSN command
2021/4/23 1.01.00 Jack Zhang Support TermLink Manager application
2021/3/6 1.00.01 Jack Zhang 1. Add the partial EMV flow
2. Add the Encrypted Sensitive TLV Data Format Definition
3. Add the callback flow and example
4. Add Offline Data Verification For Contactless
2020/10/15 1.00.00 Jack Zhang First version
Contents

Preface .............................................................................................................................................................................................................2

Revision History.............................................................................................................................................................................................1

Cont ents ............................................................................................................................................................................................................I

1 Overall Description.......................................................................................................................................................................................1

1.1 Fu ll-Integration So lution Introduction .............................................................................................................................................. 1

1.2 BroadPOS P2PE/TermLin k Application Introduction ................................................................................................................... 1

1.3 BroadPOS P2PE/TermLin k Application Features .......................................................................................................................... 2

1.4 TermLink Manager Application (Only used in Android TermLink external calling) .............................................................. 2

2 Transaction Flow...........................................................................................................................................................................................4

2.1 Manual Flo w.......................................................................................................................................................................................... 4

2.2 Swipe Flow ............................................................................................................................................................................................ 5

2.3 Contact EM V Flow............................................................................................................................................................................... 6

2.4 Contactless EMV Flow ........................................................................................................................................................................ 7

3 Communication Type ...................................................................................................................................................................................8

3.1 Android BroadPOS P2PE/TermLin k Applicat ion .......................................................................................................................... 8

3.1.1 Internal Calling Model................................................................................................................................................................. 8

3.1.2 External Calling Model (Need Install TermLin k Manager Applicat ion) ............................................................................ 8

3.2 Classic BroadPOS P2PE/TermLin k Applicat ion ............................................................................................................................ 8

4 Commands .....................................................................................................................................................................................................9

4.1 In itialize .................................................................................................................................................................................................. 9

4.1.1 Description ..................................................................................................................................................................................... 9

4.1.2 Request ........................................................................................................................................................................................... 9

4.1.3 Response......................................................................................................................................................................................... 9

4.1.4 Code Examp le ............................................................................................................................................................................... 9

4.2 Get Variab le ......................................................................................................................................................................................... 10

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. -I-
4.2.1 Description ................................................................................................................................................................................... 10

4.2.2 Request ......................................................................................................................................................................................... 10

4.2.3 Response....................................................................................................................................................................................... 10

4.2.4 Code Examp le ............................................................................................................................................................................. 10

4.2.5 Parameter Define ........................................................................................................................................................................ 11

4.3 Set Variable .......................................................................................................................................................................................... 12

4.3.1 Description ................................................................................................................................................................................... 12

4.3.2 Request ......................................................................................................................................................................................... 12

4.3.3 Response....................................................................................................................................................................................... 13

4.3.4 Code Examp le ............................................................................................................................................................................. 13

4.3.5 Parameter Define ........................................................................................................................................................................ 13

4.4 Show Dialog ........................................................................................................................................................................................ 14

4.4.1 Description ................................................................................................................................................................................... 14

4.4.2 Request ......................................................................................................................................................................................... 14

4.4.3 Response....................................................................................................................................................................................... 15

4.4.4 Screenshot.................................................................................................................................................................................... 15

4.5 Get Signature ....................................................................................................................................................................................... 15

4.5.1 Description ................................................................................................................................................................................... 15

4.5.2 Request ......................................................................................................................................................................................... 15

4.5.3 Response....................................................................................................................................................................................... 15

4.6 Show Message..................................................................................................................................................................................... 15

4.6.1 Description ................................................................................................................................................................................... 15

4.6.2 Request ......................................................................................................................................................................................... 16

4.6.3 Response....................................................................................................................................................................................... 16

4.6.4 Screenshot.................................................................................................................................................................................... 17

4.7 Clear Message ..................................................................................................................................................................................... 17

4.7.1 Description ................................................................................................................................................................................... 17

4.7.2 Request ......................................................................................................................................................................................... 17

4.7.3 Response....................................................................................................................................................................................... 17

4.8 Reset...................................................................................................................................................................................................... 18

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - II -
4.8.1 Description ................................................................................................................................................................................... 18

4.8.2 Request ......................................................................................................................................................................................... 18

4.8.3 Response....................................................................................................................................................................................... 18

4.9 Update Resource File ......................................................................................................................................................................... 18

4.9.1 Description ................................................................................................................................................................................... 18

4.9.2 Request ......................................................................................................................................................................................... 18

4.9.3 Response....................................................................................................................................................................................... 19

4.10 Do Signature ...................................................................................................................................................................................... 19

4.10.1 Descript ion................................................................................................................................................................................. 19

4.10.2 Request....................................................................................................................................................................................... 19

4.10.3 Response .................................................................................................................................................................................... 19

4.11 Reboot................................................................................................................................................................................................. 19

4.11.1 Descript ion................................................................................................................................................................................. 19

4.11.2 Request....................................................................................................................................................................................... 19

4.11.3 Response .................................................................................................................................................................................... 19

4.12 Get PIN Block ................................................................................................................................................................................... 20

4.12.1 Descript ion................................................................................................................................................................................. 20

4.12.2 Request....................................................................................................................................................................................... 20

4.12.3 Response .................................................................................................................................................................................... 20

4.12.4 Code Examp le ........................................................................................................................................................................... 21

4.13 Reset MSR ......................................................................................................................................................................................... 23

4.13.1 Descript ion................................................................................................................................................................................. 23

4.13.2 Request....................................................................................................................................................................................... 23

4.13.3 Response .................................................................................................................................................................................... 23

4.14 Input Text ........................................................................................................................................................................................... 23

4.14.1 Descript ion................................................................................................................................................................................. 23

4.14.2 Request....................................................................................................................................................................................... 23

4.14.3 Response .................................................................................................................................................................................... 24

4.15 Check File .......................................................................................................................................................................................... 24

4.15.1 Descript ion................................................................................................................................................................................. 24

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - III -
4.15.2 Request....................................................................................................................................................................................... 24

4.15.3 Response .................................................................................................................................................................................... 24

4.16 Authorize Card .................................................................................................................................................................................. 24

4.16.1 Descript ion................................................................................................................................................................................. 24

4.16.2 Request....................................................................................................................................................................................... 24

4.16.3 Response .................................................................................................................................................................................... 26

4.16.4 Code Examp le ........................................................................................................................................................................... 26

4.17 Co mplete Online EM V.................................................................................................................................................................... 29

4.17.1 Descript ion................................................................................................................................................................................. 29

4.17.2 Request....................................................................................................................................................................................... 29

4.17.3 Response .................................................................................................................................................................................... 29

4.18 Remove Card ..................................................................................................................................................................................... 30

4.18.1 Descript ion................................................................................................................................................................................. 30

4.18.2 Request....................................................................................................................................................................................... 30

4.18.3 Response .................................................................................................................................................................................... 30

4.19 Get EM V TLV Data ......................................................................................................................................................................... 30

4.19.1 Descript ion................................................................................................................................................................................. 30

4.19.2 Request....................................................................................................................................................................................... 30

4.19.3 Response .................................................................................................................................................................................... 30

4.20 Set EM V TLV Data.......................................................................................................................................................................... 31

4.20.1 Descript ion................................................................................................................................................................................. 31

4.20.2 Request....................................................................................................................................................................................... 31

4.20.3 Response .................................................................................................................................................................................... 31

4.21 Input Account With EM V............................................................................................................................................................... 31

4.21.1 Descript ion................................................................................................................................................................................. 31

4.21.2 Request....................................................................................................................................................................................... 31

4.21.3 Response .................................................................................................................................................................................... 34

4.21.4 Code Examp le ........................................................................................................................................................................... 36

4.22 Show Textbo x ................................................................................................................................................................................... 39

4.22.1 Descript ion................................................................................................................................................................................. 39

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - IV -
4.22.2 Request....................................................................................................................................................................................... 40

4.22.3 Response .................................................................................................................................................................................... 40

4.22.4 Screenshot.................................................................................................................................................................................. 41

4.23 Card Insert Detection ....................................................................................................................................................................... 41

4.23.1 Descript ion................................................................................................................................................................................. 41

4.23.2 Request....................................................................................................................................................................................... 41

4.23.3 Response .................................................................................................................................................................................... 42

4.24 Session Key Inject ............................................................................................................................................................................ 42

4.24.1 Descript ion................................................................................................................................................................................. 42

4.24.2 Request....................................................................................................................................................................................... 42

4.24.3 Response .................................................................................................................................................................................... 42

4.25 MAC Calculat ion.............................................................................................................................................................................. 43

4.25.1 Descript ion................................................................................................................................................................................. 43

4.25.2 Request....................................................................................................................................................................................... 43

4.25.3 Response .................................................................................................................................................................................... 43

4.26 Get PED Information ....................................................................................................................................................................... 44

4.26.1 Descript ion................................................................................................................................................................................. 44

4.26.2 Request....................................................................................................................................................................................... 44

4.26.3 Response .................................................................................................................................................................................... 44

4.27 Increase KSN..................................................................................................................................................................................... 45

4.27.1 Descript ion................................................................................................................................................................................. 45

4.27.2 Request....................................................................................................................................................................................... 45

4.27.3 Response .................................................................................................................................................................................... 45

4.28 VAS Set Merchant parameters ....................................................................................................................................................... 45

4.28.1 Descript ion................................................................................................................................................................................. 45

4.28.2 Request....................................................................................................................................................................................... 45

4.28.3 Response .................................................................................................................................................................................... 45

4.29 VAS Push Data ................................................................................................................................................................................. 46

4.29.1 Descript ion................................................................................................................................................................................. 46

4.29.2 Request....................................................................................................................................................................................... 46

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - V-
4.29.3 Response .................................................................................................................................................................................... 46

4.30 Up load FTP........................................................................................................................................................................................ 46

4.30.1 Descript ion................................................................................................................................................................................. 46

4.30.2 Request....................................................................................................................................................................................... 46

4.30.3 Response .................................................................................................................................................................................... 46

4.31 ShowMessageCenter........................................................................................................................................................................ 47

4.31.1 Descript ion................................................................................................................................................................................. 47

4.31.2 Request....................................................................................................................................................................................... 47

4.31.3 Response .................................................................................................................................................................................... 47

4.31.4 Screenshot.................................................................................................................................................................................. 48

4.32 GetFormList ...................................................................................................................................................................................... 48

4.32.1 Descript ion................................................................................................................................................................................. 48

4.32.2 Request....................................................................................................................................................................................... 48

4.32.3 Response .................................................................................................................................................................................... 49

4.33 Get VarList ......................................................................................................................................................................................... 49

4.33.1 Descript ion................................................................................................................................................................................. 49

4.33.2 Request....................................................................................................................................................................................... 49

4.33.3 Response .................................................................................................................................................................................... 49

4.34 Set VarList .......................................................................................................................................................................................... 49

4.34.1 Descript ion................................................................................................................................................................................. 49

4.34.2 Request....................................................................................................................................................................................... 49

4.34.3 Response .................................................................................................................................................................................... 49

4.35 RunForm ............................................................................................................................................................................................ 49

4.35.1 Descript ion................................................................................................................................................................................. 49

4.35.2 Request....................................................................................................................................................................................... 50

4.35.3 Response .................................................................................................................................................................................... 50

5 Data Define..................................................................................................................................................................................................51

5.1 EDC Type Defin ition ......................................................................................................................................................................... 51

5.2 Transaction Type Definit ion ............................................................................................................................................................. 51

5.3 TransType list for EDC...................................................................................................................................................................... 52


NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - VI -
5.4 EM V Kernel Configuration Type .................................................................................................................................................... 52

5.5 Encrypted Sensitive TLV Data Format Definit ion ....................................................................................................................... 53

5.5.1 Manual .......................................................................................................................................................................................... 53

5.5.2 MSR .............................................................................................................................................................................................. 53

5.5.3 CC/NFC ........................................................................................................................................................................................ 53

5.6 Key Information Defin ition............................................................................................................................................................... 55

5.6.1 DUKPT Key Informat ion Defin ition....................................................................................................................................... 55

5.6.2 Session Key Information Defin ition ........................................................................................................................................ 55

5.6.3 Session Key Detail Information Defin ition ............................................................................................................................ 55

5.6.4 A ES DUKPT Key Detail Info rmation Definition ................................................................................................................. 55

5.7 VA S Code Defin ition ......................................................................................................................................................................... 55

5.8 Apple Pay VAS Definit ion................................................................................................................................................................ 56

5.9 Google Smart Tap Definition ........................................................................................................................................................... 56

5.9.1 Google Smart Tap Capabilit ies Bit map Defin ition ............................................................................................................... 56

5.9.2 Google Serv ice Type Bit map Definit ion ................................................................................................................................ 57

5.9.3 Google Smart Tap Push Service Defin ition ........................................................................................................................... 57

5.9.4 Google Serv ice Usage Defin ition............................................................................................................................................. 58

5.9.5 Google Serv ice Update Definition ........................................................................................................................................... 58

5.9.6 Google Ne w Service Defin ition ............................................................................................................................................... 58

5.10 Hardware Bit map Definit ion .......................................................................................................................................................... 59

6 Response Code............................................................................................................................................................................................60

6.1 Response code for EM V.................................................................................................................................................................... 60

6.2 Response code for VAS..................................................................................................................................................................... 61

6.3 Response code for PED ..................................................................................................................................................................... 61

7 Best Practice (Only for Android App) ......................................................................................................................................................63

7.1 Android BroadPOS P2PE/TermLin k App Internal Calling ......................................................................................................... 63

7.1.1 Internal Calling Model............................................................................................................................................................... 63

7.1.2 Transaction Flow With Callback ............................................................................................................................................. 64

7.1.3 Callback with Single Activ ity Only ......................................................................................................................................... 68

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - VII -
7.1.4 Use EventBus .............................................................................................................................................................................. 68

7.1.5 API ................................................................................................................................................................................................ 68

7.2 Android BroadPOS P2PE/TermLin k App External Calling (Need Install TermLink Manager Application) ................... 69

7.2.1 External Calling Model.............................................................................................................................................................. 69

7.2.2 UI Customization ........................................................................................................................................................................ 69

8 Appendix ......................................................................................................................................................................................................78

8.1 Classic Terminal EM V Kernel Version .......................................................................................................................................... 78

8.2 Android Terminal EM V Kernel Version ........................................................................................................................................ 78

8.3 Offline Data Verification For Contactless...................................................................................................................................... 79

8.4 Control Character for Text Showing ............................................................................................................................................... 80

8.5 Terminal Supported By BroadPOS P2PE/TermLink Application ............................................................................................. 80

8.5.1 Android Terminal ....................................................................................................................................................................... 80

8.5.2 Classic Terminal ......................................................................................................................................................................... 81

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - VIII -
1 Overall Description
1.1 Full-Integration Solution Introduction

Picture 1 Full-Integration

1.2 BroadPOS P2PE/TermLink Application Introduction


PAX provides an application called BroadPOS P2PE/TermLink for Full-Integration solution. BroadPOS
P2PE/TermLink does not store the transactions, nor does it pack messages to any gateway or processor on its
own. BroadPOS P2PE/TermLink only reads cards, retrieves track data, PAN, EMV TLV Data, and PIN Blocks
through secure entry. The data is returned to the ECR to process online, then the transaction is completed.

Note: The difference between BroadPOS P2PE and TermLink is that BroadPOS P2PE requires that the data
must be encrypted (the encryptionFlag must be entered and not zero), but TermLink can set the value
of encryptionFlag to 0(data is not encrypted).

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 1-
1.3 BroadPOS P2PE/TermLink Application Features
BroadPOS P2PE/TermLink application include Android and Classic version, currently supports
InputAccountWithEMV, AuthorizeCard, GetPINBlock, CompleteOnlineEMV and other No-EMV function
commands. With these product features, users can get PAN, PIN and other card information from swiping the
card, inserting the card, taping the card or manually typing in the card number, this helps users complete their
transaction.

1.4 TermLink Manager Application (Only used in Android


TermLink external calling)
For Android BroadPOS P2PE/TermLink, it only supports AIDL communication. It is used in conjunction with
POSLink for integration into terminal, as a service. It runs in the background; this limits our application scenarios.
To expand more application scenarios, we need to separate POSLink from Android BroadPOS P2PE/TermLink.
Since Android BroadPOS P2PE/TermLink is a background service, we need an app that manages different
communication types that can be selected by the user based on need.

TermLink Manager is an application that evokes BroadPOS P2PE/TermLink service and manages the way
app communicates with POS. The terminal will remain idle unless closed with a password. The application
includes three parts: Operation, Communication and System. In the operation, we can set the idle display with the
current communication type, set the password, and support UI customization. In Communication, we can choose
different types of communication, including Bluetooth, UART, USB, and Ethernet (the communication prot ocol
currently supports TCP/SSL/HTTP/HTTPS ). In the system, we can get the current BroadPOS P2PE/TermLink
service version number and the device SN, and other information.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 2-
Picture 2 TermLink Manager Screen

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 3-
2 Transaction Flow
2.1 Manual Flow
StartTrans

Call InputAccountWithEMV
Manual Flag = 1

Input Account

Expiry Date Prompt


Yes
Flag =1 or 2

Input Expiry Date


No

CVV Prompt Flag


Yes
= 1 or 2

Input CVV
No

Zip Prompt Flag


Yes
= 1 or 2

Input Zip Code


No

Finish

Picture 3 Manual Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 4-
2.2 Swipe Flow
StartTrans

Call InputAccountWithEMV

Swipe Card

Need PinBlock? Yes Call GetPinBlock

No

Customer Processing

Finish

Picture 4 Swipe Card Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 5-
2.3 Contact EMV Flow
Start

Call InputAccountWithEMV

Call AuthorizeCard

Authorization
Result = 2(ARQC)

Yes

Customer Online Processing

No

Call CompeletOnlineEMV

Call RemoveCard

End

Picture 5 EMV Contact Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 6-
2.4 Contactless EMV Flow
Start

Call InputAccountWithEMV

Authorization
No
Result = 2(ARQC)

Yes

Online PIN
No
Flag =1

Yes

Call GetPINBlcok

Customer Processing

End

Picture 6 EMV Contactless Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 7-
3 Communication Type
3.1 Android BroadPOS P2PE/TermLink Application
3.1.1 Internal Calling Model
A customer can choose internal calling when the POSLink and BroadPOS P2PE/TermLink app are integrated on
the same terminal, BroadPOS P2PE/TermLink app only support AIDL communication with POSLink.

3.1.2 External Calling Model (Need Install TermLink Manager Application)


If a customer chooses external calling, TermLink manager application must be installed firstly, customer can set
the Communication type through it. BroadPOS P2PE/TermLink application supports
Bluetooth/USB/UART/Ethernet(TCP/SSL/HTTP/ HTTPS)

3.2 Classic BroadPOS P2PE/TermLink Application


For Classic Terminal and ECR communication, BroadPOS P2PE/TermLink application supports
UART/USB/Ethernet/Bluetooth, Ethernet also includes communication types such as TCP/HTTP/HTTPS/SSL.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 8-
4 Commands
4.1 Initialize
4.1.1 Description
This command is used to initialize the PAX terminal. The PAX terminal will do internal test/check and initialize the
terminal for transactions. It is supported on both classic and Android terminals. Typically, this command is used to
get device information.

4.1.2 Request
Command Field Description
Init Null Null

4.1.3 Response
Command Field Description
Init App Name App name
App version App version
SN Terminal SN
Model Name Model Name.
OS Version OS Version.
MAC Address MAC address for LAN module in text.
LinesPerScreen Number of lines per screen for ShowMessage command.
CharsPerLine Number of characters per line for ShowMessage command.
WifiMac Wifi Mac address
Touchscreen Indicates whether terminal use a touchscreen
Y: Use
N: Not use
Hardware Support Bitmap Determines what hardware is supported on the device. Please
see Hardware Bitmap Definition for details.

4.1.4 Code Example


It should be noted that the following code is not suitable for running in the main thread.
1. Init.InitResponse initResponse = Init.init(context,commSetting);

Code 1 Initialize Example for Android

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 9-
1. PosLink posLink = new PosLink();
2. ManageRequest manageRequest = new ManageRequest();
3. manageRequest.TransType = manageRequest.ParseTransType("INIT");
4. posLink.ManageRequest = manageRequest;
5. ProcessTransResult result = posLink.ProcessTrans();
6. if (result.Code == ProcessTransResult.ProcessTransResultCode.OK) {
7. ManageResponse manageResponse = posLink.ManageResponse;
8. }

Code 2 Initialize Example for Java

4.2 Get Variable


4.2.1 Description
This command is used to get the control variables and configure parameters in the terminal. It uses the single
transaction flow. It is supported on both classic and Android terminals.

4.2.2 Request
Command Field Description
GetVariable EDC Type EDC Type
VarName The name of the variable
VarName 1 The name of the variable
VarName 2 The name of the variable
VarName 3 The name of the variable
VarName 4 The name of the variable

4.2.3 Response
Command Field Description
GetVariable Result Code Result Code
Result txt If local error message exists, this field is mandatory.
VarValue The value of the variable, if the value exists, this field is
mandatory.
VarValue 1 The value of the variable, if the value exists, this field is
mandatory.
VarValue 2 The value of the variable, if the value exists, this field is
mandatory.
VarValue 3 The value of the variable, if the value exists, this field is
mandatory.
VarValue 4 The value of the variable, if the value exists, this field is
mandatory.

4.2.4 Code Example


It should be noted that the following code is not suitable for running in the main thread.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 10 -
1. Variable.GetVariableRequest getVariableRequest = new Variable.GetVariableRequest();
2. getVariableRequest.setVariableName("param_name");
3. Variable.GetVariableResponse getVariableResponse = Variable.getVariable(context,getVariableRequest,commonSet-
ting);

Code 3 Get Variable for Android

1. PosLink posLink = new PosLink();


2. ManageRequest manageRequest = new ManageRequest();
3. manageRequest.TransType = manageRequest.ParseTransType("GETVAR");
4. manageRequest.VarName = "param_name";
5. posLink.ManageRequest = manageRequest;
6. ProcessTransResult result = posLink.ProcessTrans();
7. if (result.Code == ProcessTransResult.ProcessTransResultCode.OK) {
8. ManageResponse manageResponse = posLink.ManageResponse;
9. }

Code 4 Get Variable for Java

4.2.5 Parameter Define


Parameter Name Description
contactRetryBeforeFallback The number of contact chip retries before fallback swipe
e2eeIdentityString The ID String used for Voltage E2EE Encryption
InitializationVector The initialization vector for DUKPT encryption.
When the algorithm is DUKPT DES, the length is 16.
When the algorithm is DUKPT AES, the length is 32.
If the value is empty, the initialization vector will be filled with 0
e2eeEncryptionMode The mode used to determine which voltage encryption format terminal
should use. Valid values are TEP1X, TEP2X, TEP4.
binWhitelist The string used for enable and disable BIN Whitelist
Y: Enabled
N: Disabled
quickChipMode Enable or disable quick chip mode.
Y: Enable
N: Disable
quickChipPlaceholderAmount When quickChipMode is enabled, this will be the default amount to
process the ICC if the transaction amount is set to zero.
contactlessReadBeep Enable or disable the beep when contactless read
Y: Enable
N: Disable
emvCardRemoveBeepForCont actless Enable or disable EMV Card Remove Beep For Contactless
Y: Enable
N: Disable
emvCardRemoveBeep EMV Card Remove Beep
0: No Beep

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 11 -
1: One Beep
2: Continuous Beep
swipeTapPriority The response priority of Swipe or Tap for the terminals which
contactless reader near the magnetic stripe reader. In these terminals,
such as A920, A920pro, A77, A30, we might get both swipe and tap
signal when user swipe.
S: Swipe First
T: Tap First
KeyPeriod The injected E2EE key will expire after a certain period of time. This
parameter specifies the time span(days).
Scope: [1, 365]
autoShowSecuredKeyboard Auto show secured keyboard when manual input Account and CVV.
N: Never
Y: Always
A: Only manual entry
lineEncryptionMode The encryption mode for the communication between A80 and SP30.
When use BroadPOS P2PE, this parameter must be Y(enable).
N: Disabled
A: Auto
Y: Enabled
EMVContactVersion Get information about Kernel version of Contact EMV
PaywaveVersion Get information about Kernel version of Paywave
PaypassVersion Get information about Kernel version of Paypass
DPASVersion Get information about Kernel version of D-PAS
ExpresspayVersion Get information about Kernel version of Expresspay
JSpeedyVersion Get information about Kernel version of JSpeedy
QPBOCVersion Get information about Kernel version of QPBOC
FlashVersion Get information about Kernel version of Flash

4.3 Set Variable


4.3.1 Description
This command is used to set the control variables and configure parameters in the terminal. It is supported on
both classic and Android terminals.

4.3.2 Request
Command Field Description
SetVariable EDC Type EDC Type
VarName The name of the variable
VarValue The value of the variable
VarName 1 The name of the variable
VarValue 1 The value of the variable
VarName 2 The name of the variable
VarValue 2 The value of the variable
VarName 3 The name of the variable
VarValue 3 The value of the variable
VarName 4 The name of the variable
VarValue 4 The value of the variable
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 12 -
4.3.3 Response
Command Field Description
SetVariable Result Code Response code
Response Message If local error message exists, this field is mandatory.

4.3.4 Code Example


It should be noted that the following code is not suitable for running in the main thread.

1. Variable.SetVariableRequest request = new Variable.SetVariableRequest();


2. request.setVariableName("param_name");
3. request.setVariableValue("param_value");
4. Variable.SetVariableResponse response = Variable.setVariable(context,request,commonSetting);

Code 5 Set Variable for Android

1. PosLink posLink = new PosLink();


2. ManageRequest manageRequest = new ManageRequest();
3. manageRequest.TransType = manageRequest.ParseTransType("SETVAR");
4. manageRequest.VarName = "param_name";
5. manageRequest.VarValue = "param_value";
6. posLink.ManageRequest = manageRequest;
7. ProcessTransResult result = posLink.ProcessTrans();

Code 6 Set Variable for Java

4.3.5 Parameter Define


Parameter Name Description
contactRetryBeforeFallback The number of contact chip retries before fallback swipe
e2eeIdentityString The ID String used for Voltage E2EE Encryption
InitializationVector The initialization vector for DUKPT encryption.
When the algorithm is DUKPT DES, the length is 16.
When the algorithm is DUKPT AES, the length is 32.
If the value is empty, the initialization vector will be filled with 0
e2eeEncryptionMode The mode used to determine which voltage encryption format terminal
should use. Valid values are TEP1X, TEP2X, TEP4.
binWhitelist The string used for enable and disable BIN Whitelist
Y: Enabled
N: Disabled
quickChipMode Enable or disable quick chip mode.
Y: Enable
N: Disable
quickChipPlaceholderAmount When quickChipMode is enabled, this will be the default amount to
process the ICC if the transaction amount is set to zero.
contactlessReadBeep Enable or disable the beep when contactless read

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 13 -
Y: Enable
N: Disable
emvCardRemoveBeepForCont actless Enable or disable EMV Card Remove Beep For Contactless
Y: Enable
N: Disable
emvCardRemoveBeep EMV Card Remove Beep
0: No Beep
1: One Beep
2: Continuous Beep
swipeTapPriority The response priority of Swipe or Tap for the terminals which
contactless reader near the magnetic stripe reader. In these terminals,
such as A920, A920pro, A77, A30, we might get both swipe and tap
signal when user swipe.
S: Swipe First
T: Tap First
KeyPeriod The injected E2EE key will expire after a certain period of time. This
parameter specifies the time span(days).
Scope: [1, 365]
autoShowSecuredKeyboard Auto show secured keyboard when manual input Account and CVV.
N: Never
Y: Always
A: Only manual entry
lineEncryptionMode The encryption mode for the communication between A80 and SP30.
When use BroadPOS P2PE, this parameter must be Y(enable).
N: Disabled
A: Auto
Y: Enabled

4.4 Show Dialog


4.4.1 Description
Shows screen with title and buttons or menu items. It is supported on both classic and Android terminals.

4.4.2 Request
Command Field Description
ShowDialog Title Title
Button name 1 The name of button1 on terminal
Button name 2 The name of button2 on terminal
Button name3 The name of button3 on terminal
Button name 4 The name of button4 on terminal
Timeout Timeout in 100ms for waiting text input. Valid value should be
[0, 9999]. The value of “” means waiting till user canceled or
confirmed. The value of “0” means non-blocking mode, only
valid when no button.
Continuous Screen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but wait for the
next command.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 14 -
4.4.3 Response
Command Field Description
ShowDialog Result code Result code
Result message If local error message exists, this field is mandatory.
Button number The button number of selection.

4.4.4 Screenshot

Picture 7 Android screenshot for ShowDialog

4.5 Get Signature


4.5.1 Description
This command is used to get the signature image file from the terminal. It is supported on both classic and
Android terminals.

4.5.2 Request
Command Field Description
GetSignature Null Null

4.5.3 Response
Command Field Description
GetSignature Result code Result code
Result message If local error message exists, this field is mandatory.
Signature Data According to the signature data to generate image

4.6 Show Message


4.6.1 Description
Terminal can display several line messages. The newest message can be displayed on the first line or the last
line. It is supported on both classic and Android terminals.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 15 -
4.6.2 Request
Command Field Description
ShowMessage Title Title, Please refer to Control Character for Text Showing
DisplayMessage The message needs to be display, it can be controlled to be
displayed in different area using different font size. Please refer to
Control Character for Text Showing
DisplayMessage2 The message needs to be display, it can be controlled to be
displayed in different area using different font size. Please refer to
Control Character for Text Showing
Topdown Text pushed in top down or bottom up.
Y: top down
N: bottom up.
Default as Y, and the value is only effective at the initial request.
TaxLine Tax line to be displayed. Conditional for models with different screen
size.
TotalLine Total line to be displayed. Conditional for models with different screen
size.
ImageName Product image name. The image is preloaded on the terminal.
Conditional for models with different screen size and terminal
capability
ImageDescription Product name or description, Conditional for models with different
screen size and terminal capability.
ItemIndex Use to reference to a line when added.

4.6.3 Response
Command Field Description
ShowMessage Result code Response code
Result message If local error message exists, this field is mandatory.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 16 -
4.6.4 Screenshot

Picture 8 Android ShowMessage screenshot

4.7 Clear Message


4.7.1 Description
Clear the message buffer on terminal: if terminal receives this command, and then receives the show message
command, the terminal only displays the message getting from the show message command. It is supported on
both classic and Android terminals.

4.7.2 Request
Command Field Description
ClearMessage Null Null

4.7.3 Response
Command Field Description
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 17 -
ClearMessage Result code Response code
Result message If local error message exists, this field is mandatory.

4.8 Reset
4.8.1 Description
“Reset” command resets the terminal screen to idle state. It is supported on both classic and Android terminals.

4.8.2 Request
Command Field Description
Reset Null Null

4.8.3 Response
Command Field Description
Reset Result code Result code
Result message If local error message exists, this field is mandatory.

4.9 Update Resource File


4.9.1 Description
This command is used to update resource file like image and EMV parameter file in the terminal. It is supported
on both classic and Android terminals.
Note: Resources that need to be updated must be placed in a ZIP file, and “ResourcePath” refers to the path of a
ZIP file.

4.9.2 Request
Command Field Description
UpdateResource ResourcePath The path of resource
FileType 0: Resource file(Default). A zip package which contains multiple files.
Terminal will replace the files according the file names.

1: Offline RKI key file. A zip package which contains the file which used
to inject offline RKI key.

2: Installation package file. The file downloaded from PAXSTORE. The


file name is like “TermLink-Q25L_V 1.02.00E.zip”. Please check you
download correct installation package, otherwise it may corrupt the
terminal. In Android terminals, APP and OTA upgrade packages can
only support upgrade installation, not downgrade installation.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 18 -
4.9.3 Response
Command Field Description
UpdateResource Result code Result code
Result message If local error message exists, this field is mandatory.

4.10 Do Signature
4.10.1 Description
This command is used to do signature in the terminal. It is supported on both classic and Android terminals.

4.10.2 Request
Command Field Description
DoSignature EDCType EDC Type
Upload 1: need upload to host.
0: doesn’t need upload to host.
HRefNum Which transaction need do signature.
This parameter may be used that upload flag is 1.
Timeout This is timeout for doing signature. The timeout unit is 100ms. The
valid value should be from 150 to 9999.
If value is null, it means no timeout and waiting for user cancelation or
confirmation.
Continuous Screen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but waiting for the next
command.

4.10.3 Response
Command Field Description
DoSignature Result code Result code
Result message If local error message exists, this field is mandatory.

4.11 Reboot
4.11.1 Description
Reboot the terminal. It is supported on both classic and Android terminals.

4.11.2 Request
Command Field Description
Reboot Null Null

4.11.3 Response
Command Field Description
Reboot Result code Result code
Result message If local error message exists, this field is mandatory.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 19 -
4.12 Get PIN Block
4.12.1 Description
This command is used to input PIN and calculate pin block. It is supported on both classic and Android terminals.

4.12.2 Request
Command Field Description
GetPINBlock AccountNumber The length of the account number must from 13 to 19.

EncryptionType 1: DUKPT.
2: Master Session
3: AES DUKPT
KeySlot Key slot number, start from 1. Default to 1.

PinMinLength The value must be not less 4, and must be not more than pin max
length. Default to 4.
PinMaxLength The value must be not less pin min length, and must be not more
than 12. Default to 12.
PIN Bypass The value is as below, default to 0:
0: not allowed
1: allowed.
PINAlgorithm The value is as below, default to 0:
0: ISO9564_0
1: ISO9564_1
3: ISO9564_3
Timeout Timeout in 100ms for waiting PIN entry. Valid value should be [0,
3000]. The value of “” or 0 means waiting till user canceled or
confirmed.
EDCType EDC Type
TransType Transaction Type
Title The title that to be displayed, default as “Amount: $0.00”.
Pinpad Type 0: Internal Pinpad. (Default)
1: External Pinpad. (A80 only, if use other device will return param
error)
2: RNIB Pinpad.
KSN Flag Indicate whether to increase KSN, when MAC key type is 1(DUKPT
Key)
Default KSN flag is 1(Increase)
0: Not increase.
1: Increase.

4.12.3 Response
Command Field Description
GetPINBlock Result code Result code
Result message If local error message exists, this field is mandatory.
PinBlock The PIN block value.
KSN The KSN value.
Pinpad Type 0: Internal Pinpad.
1: External Pinpad.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 20 -
4.12.4 Code Example

Callback

To achieve the complete transaction process, the user should implement the following CallBack to monitor the
events in the transaction process.

1. GetPINBlock.CurrentStepCallback currentStepCallback =
2. new GetPINBlock.CurrentStepCallback() {
3. @Override
4. public void onSuccess() {
5. // Current step input completed
6. }
7. @Override
8. public void onFail(String code, String message) {
9. //The currently step failed
10. }
11. };

Code 7 GetPINBlock.CurrentStepCallback

1. GetPINBlock.EnterPinCallBack enterPinCallBack = new GetPINBlock.EnterPinCallBack() {


2. @Override
3. public void onAddedPinCharacter() {
4. //When a PIN char is added, this method will be called back,
5. // and you can customize the UI displayeffect for this
6. }
7. @Override
8. public void onClearPin() {
9. //When a PIN char is deleted, this method will be called back
10. }
11. };

Code 8 GetPINBlock.EnterPinCallback

If additional callback methods are needed, you can change EnterPinCallBack to EnterPinCallBack Expand.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 21 -
1. GetPINBlock.GetPINBlockCallback getPINBlockCallback = new GetPINBlock.GetPINBlockCallback() {
2. @Override
3. public void onEnterPinStart() {
4. // Prompt the customer to start input PIN.
5. // You can monitor some status information bycalling handleInputPinStart.
6. GetPINBlock.getInstance().handleInputPinStart(enterPinCallBack,currentStepCallback);
7. }
8. };

Code 9 GetPINBlockCallback

1. BasePOSLinkCallback<GetPINBlock.GetPINBlockResponse> posLinkCallback =
2. new BasePOSLinkCallback<GetPINBlock.GetPINBlockResponse>() {
3. @Override
4. public void onFinish(GetPINBlock.GetPINBlockResponse getPINBlockResponse) {
5. //Run when GetPINBlock finished.
6. }
7. };

Code 10 POSLinkCallback for GetPINBlock

Call GetPINBlock

You can call a GetPINBlock transaction by the following methods. It should be noted that the following code is not
suitable for running in the main thread.

1. GetPINBlock.GetPINBlockRequest getPINBlockRequest = new GetPINBlock.GetPINBlockRequest();


2. getPINBlockRequest.setAccountNumber("account_number");
3. getPINBlockRequest.setEncryptionType("1"); //1-DUKPT DES
4. getPINBlockRequest.setKeySlot("1");
5. getPINBlockRequest.setPinAlgorithm("1");
6. GetPINBlock.getPinBlock(context,getPINBlockRequest,commSetting,posLinkCallback,getPINBlockCallback);

Code 11 GetPINBlock for Android

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 22 -
1. PosLink posLink = new PosLink();
2. ManageRequest manageRequest = new ManageRequest();
3. manageRequest.TransType = manageRequest.ParseTransType("GETPINBLOCK");
4. manageRequest.PinAlgorithm = "1";
5. manageRequest.EncryptionType = "1";
6. manageRequest.KeySlot = "1";
7. manageRequest.TimeOut = "300";
8. posLink.ManageRequest = manageRequest;
9. posLink.SetCommSetting(CommSetting);
10. ProcessTransResult result = posLink.ProcessTrans();
11. if (result.Code == ProcessTransResult.ProcessTransResultCode.OK) {
12. ManageResponse manageResponse = posLink.ManageResponse;
13. }

Code 12 GetPINBlock for Java

4.13 Reset MSR


4.13.1 Description
Reset terminal magnetic card reader buffer. It is supported on both classic and Android terminals.

4.13.2 Request
Command Field Description
ResetMSR Null Null

4.13.3 Response
Command Field Description
ResetMSR Result code Result code
Result message If local error message exists, this field is mandatory.

4.14 Input Text


4.14.1 Description
This command is used to get text input. It is supported on both classic and Android terminals.

4.14.2 Request
Command Field Description
InputText Title The title that to be displayed, default as empty.
InputType Input type. Default as 0.
0 for Alpha-Numeric string.
1 for Numeric string.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 23 -
2 for date in MMDDYYYY format.
3 for time in HHMMSS format.
4 for currency in XXXXXX. XX format.
5 for password format.
6 for phone number as “(xxx) xxx-xxxx”.
MINLength MIN length. Default to 0. Valid value [0, 32].
MAXLength MAX length. Default to 32. Valid value [1, 32].
DefaultValue Default input value. Valid if ”InputType” is 0 or 1.
Timeout Timeout in 100ms for waiting text input. Valid value should be [1,
9999]. The value of “” means waiting till user canceled or confirmed.
ContinuousScreen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but waiting for the next
command.

4.14.3 Response
Command Field Description
InputText Result code Result code
Result message If local error message exists, this field is mandatory.
Text Text input by customer.
For currency input, 10000 will be returned if the customer input
$100.00 on device.

4.15 Check File


4.15.1 Description
This command is used to check file existence. It is supported on both classic and Android terminals.

4.15.2 Request
Command Field Description
CheckFile FileName The file name with the suffix.

4.15.3 Response
Command Field Description
CheckFile Result code Result code
Result message If local error message exists, this field is mandatory.
“OK” with Response Code “000000”means file existed
Checksum The algorithm is MD5.

4.16 Authorize Card


4.16.1 Description
This command is used to authorize contact EMV card. It is supported on both classic and Android terminals.

4.16.2 Request
Command Field Description

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 24 -
AuthorizeCard Amount Amount Information(Not include Cash Back)
CashBackAmount The cash back amount, $$$$$$CC, if the field is NULL,
and the switch on terminal turn on, terminal will prompt
dialog to enter it.
MerchantDecision Merchant decision to the current transaction. The default
value is 0.
0: default (no merchant decision)
1: force online
2: force decline
EncryptionType This field is effective only when ONLINE PIN is required
The value is as below:
1: DUKPT.
2: Master Session
3: AES DUKPT
KeySlot This field is effective only when ONLINE PIN is required
PINMinLength This field is effective only when PIN is required.
The value must be not less 4, and must be not more
than pin max length. Default to 4.
PINMaxLength This field is effective only when PIN is required.
The value must be not less pin min length, and must be
not more than 12. Default to 12.
PINBypass The value is as below, default to 0:
0: not allow PIN Bypass
1: bypass offline PIN automatically
2: bypass online PIN automatically
3: bypass both offline and online PINs automatically.
4: allow user to bypass both offline and online PINs
PINAlgorithm The value is as below, default to 0:
0: ISO9564_0
1: ISO9564_1
3: ISO9564_3
EmvKernelConfigurationSelection EMV Kernel Configuration Type

TransactionDate Transaction Date (use terminal date by default)


Format is YYMMDD.
TransactionTime Transaction Time (use terminal time by default) format is
HHMMSS.
CurrencyCode Transaction Currency Code (“840” by default)
Currency Exponent Transaction Currency Exponent ("02” by default)
Tag List EMV tag list to be returned in EMV TLV data in
response message.
Timeout Timeout in 100ms for waiting PIN entry. Valid value
should be [0, 3000]. The value of “” or 0 means waiting
till user canceled or confirmed.
Continuous Screen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but waiting
for the next command.
Pinpad Type 0: Internal Pinpad. (default)
1: External Pinpad. (A80 only, if use other device will
return param error)
2: RNIB Pinpad.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 25 -
KSN Flag Indicate whether to increase KSN, when MAC key type
is 1(DUKPT Key)
Default KSN flag is 1(Increase)
0: Not increase.
1: Increase.

4.16.3 Response
Command Field Description
AuthorizeCard Result code Result code
Result message If local error message exists, this field is mandatory.
AuthorizationResult Indicate the transaction result after 1st GAC:
0: transaction offline approved
1: transaction offline declined
2: transaction online authorization needed
SignatureFlag Indicate that if signature is needed
0: Signature NOT needed
1: Signature needed
PINBypassStatus 0: False
1: True
PIN Block This field is effective only when the CVM type ONLINE PIN is
applied.
The pin block value.
KSN This field is effective only when the CVM type ONLINE PIN is
applied.
The KSN value for online PIN encryption.
EMVTLVData EMV TLV data will be returned in consecutive TLV format data
based on the Tag List filed in the request message.
CVM Cardholder Verification Method (CVM) Codes,
0 - Fail CVM processing
1 - Plaintext Offline PIN Verification
2 - Online PIN
3 - Plaintext Offline PIN and Signature
4 - Enciphered Offline PIN Verification
5 - Enciphered Offline PIN Verification and Signature
6 - Signature
7 - No CVM Required
8 - On Device CVM
Pinpad Type 0: Internal Pinpad.
1: External Pinpad.

4.16.4 Code Example

Callback

To achieve the complete transaction process, the user should implement the following CallBack to monitor the
events in the transaction process.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 26 -
1. AuthorizeCard.EnterPinCallBack enterPinCallBack = new AuthorizeCard.EnterPinCallBack() {
2. @Override
3. public void onAddedPinCharacter() {
4. //When a PIN char is added, this method will be called back,
5. // and you can customize the UI displayeffect for this
6. }
7. @Override
8. public void onClearPin() {
9. //When a PIN char is deleted, this method will be called back
10. }
11. };

Code 13 AuthorizeCard.EnterPINCallback

If additional CallBacks are needed, whether or not the screen is touched, you can change EnterPinCallBack to
EnterPinCallBack Expand.

1. AuthorizeCard.CurrentStepCallback currentStepCallback =
2. new AuthorizeCard.CurrentStepCallback() {
3. @Override
4. public void onSuccess() {
5. // Current step input completed
6. }
7. @Override
8. public void onFail(String code, String message) {
9. //The currently step failed
10. }
11. };

Code 14 CurrentStepCallback for AuthorizeCard

1. AuthorizeCard.AuthorizeCallback authorizeCallback = new AuthorizeCard.AuthorizeCallback() {


2. @Override
3. public void onEnterPinStart() {
4. // Prompt the customer to start input PIN.
5. // You can monitor some status information bycalling handleInputPinStart.
6. AuthorizeCard.getInstance().handleInputPinStart(enterPinCallBack,currentStepCallback);
7. }
8. };

Code 15 AuthorizeCallback

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 27 -
1. BasePOSLinkCallback<AuthorizeCard.AuthorizeResponse> posLinkCallback =
2. new BasePOSLinkCallback<AuthorizeCard.AuthorizeResponse>() {
3. @Override
4. public void onFinish(AuthorizeCard.AuthorizeResponse authorizeResponse) {
5. //Run when AuthorizeCard finished.
6. }
7. };

Code 16 POSLinkCallback for AuthorizeCard

Call AuthorizeCard

You can call a AuthorizeCard transaction by the following methods. It should be noted that the following code is
not suitable for running in the main thread.

1. AuthorizeCard.AuthorizeRequest authorizeRequest = new AuthorizeCard.AuthorizeRequest();


2. authorizeRequest.setAmount("100");
3. authorizeRequest.setPinEncryptionType("1");
4. authorizeRequest.setKeySlot("1");
5. authorizeRequest.setTimeOut(300);
6. AuthorizeCard.authorize(context,authorizeRequest,commSetting,posLi nkCallback,authorizeCallback);

Code 17 AuthorizeCard for Android

1. PosLink posLink = new PosLink();


2. ManageRequest manageRequest = new ManageRequest();
3. manageRequest.TransType = manageRequest.ParseTransType("AUTHORIZECARD");
4. manageRequest.Amount = "100";
5. manageRequest.PinAlgorithm = "1";
6. manageRequest.EncryptionType = "1";
7. manageRequest.KeySlot = "1";
8. manageRequest.TimeOut = "300";
9. posLink.ManageRequest = manageRequest;
10. posLink.SetCommSetting(CommSetting);
11. ProcessTransResult result = posLink.ProcessTrans();
12. if (result.Code == ProcessTransResult.ProcessTransResultCode.OK) {
13. ManageResponse manageResponse = posLink.ManageResponse;
14. }

Code 18 Authcard for Java

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 28 -
4.17 Complete Online EMV
4.17.1 Description
This command is used to complete the online authorized EMV transaction. It is supported on both classic and
Android terminals.

4.17.2 Request
Command Field Description
CompleteOnlineEMV OnlineAuthorizationResult 0: transaction approved online
1: transaction declined online
2: connect host failed
3: request partial EMV
ResponseCode Host authorization response code, tag 8A.
i.e. Contact tag 8A:
Y1: Offline approved
Y3: Unable to go online, offline approved
Z1: Offline declined
Z3: Unable to go online, offline declined
Other: Online approved or declined
AuthorizationCode EMV tag 89, Value generated by the authorization
authority for an approved transaction.
IssuerAuthenticationData If issuer authentication data (tag 91) is returned by host, it
shall be set to terminal
IssuerScript 1 If issuer script (tag 71) is returned by host, it shall be set to
terminal
IssuerScript 2 If issuer script (tag 72) is returned by host, it shall be set to
terminal
Tag List EMV tag list to be returned in EMV TLV data in response
message.
Continuous Screen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but waiting for
the next command.

4.17.3 Response
Command Field Description
CompleteOnlineEMV Result code Result code
Result message If local error message exists, this field is mandatory.
AuthorizationResult Indicate the below transaction result after 2nd GAC:
0: transaction approved
1: transaction declined
Indicate the below transaction result for partial EMV only.
2: partial EMV approve
3: partial EMV decline
EMVTLVData EMV TLV data will be returned in consecutive TLV format data
based on the Tag List filed in the request message.
IssuerScriptResults Issuer script results, HEX format.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 29 -
4.18 Remove Card
4.18.1 Description
This command is used to prompt cardholder to remove card. It is supported on both classic and Android
terminals.

4.18.2 Request
Command Field Description
RemoveCard Message 1 Default message is “Please remove card”
Message 2 Default message is NULL
Continuous ‘0’ default.
Screen ‘1’ indicate the terminal not go to idle screen but waiting for the
next command.
Pinpad Type 0: Internal Pinpad. (Default)
1: External Pinpad. (A80 only, if use other device will return param
error)

4.18.3 Response
Command Field Description
RemoveCard Result code Result code
Result message If local error message exists, this field is mandatory.
Pinpad Type 0: Internal Pinpad.
1: External Pinpad.

4.19 Get EMV TLV Data


4.19.1 Description
This command is used to get EMV TLV Data from terminal. It is supported on both classic and Android terminals.

4.19.2 Request
Command Field Description
GetEMVTLVData TLV Type 00 for EMV contact
01 for EMV contactless
Tag List List of requested tags. All the tags are consecutive without any
separators.

4.19.3 Response
Command Field Description
GetEMVTLVData Result code Result code
Result message If local error message exists, this field is mandatory.
EMVTLVData If contact EMV card is read successfully, some related EMV data
will be returned in consecutive TLV format data

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 30 -
4.20 Set EMV TLV Data
4.20.1 Description
This command is used to set EMV TLV Data to terminal. It is supported on both classic and Android terminals.

4.20.2 Request
Command Field Description
SetEMVTLVData TLVType 00 for EMV contact
01 for EMV contactless
EMVTLVData If contact EMV card is read successfully, some related EMV data
will be returned in consecutive TLV format data.

4.20.3 Response
Command Field Description
SetEMVTLVData Result Code Result Code
Result message If local error message exists, this field is mandatory
Tag List List of tags which have been set successfully. All the tags are
consecutive without any separators.

4.21 Input Account With EMV


4.21.1 Description
This command is used to get account input with EMV card support . It is supported on both classic and Android
terminals.

4.21.2 Request
Command Field Description
InputAccountWithEMV EDCType EDC Type
TransType Transaction Type
Amount Amount Information(Not include Cash Back)
CashBackAmt Cash back amount information
MagneticSwipeEntryFlag Whether magnetic card swipe is allowed. Default as 0.
0 : not allowed.
1 : Internal Pinpad.
2 : External Pinpad. (A80 only, if use other device will
return param error)
3: External Pinpad first. If external pinpad is present, use
external pinpad. If not, use internal pinpad. (A80 only, if
use other device will return param error)
ManualEntryFlag Whether manual entry is allowed. Default as 0.
0 for not allowed.
1 for allowed.
ContactlessEntryFlag Whether contactless entry is allowed. Default as 0.
0 : not allowed.
1 : Internal Pinpad.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 31 -
2 : External Pinpad. (A80 only, if use other device will
return param error)
3: External Pinpad first. If external pinpad is present, use
external pinpad. If not, use internal pinpad. (A80 only, if
use other device will return param error)
ContactEMVEntryFlag Whether contact EMV entry is allowed. Default as 0.
0 : not allowed.
1 : Internal Pinpad.
2 : External Pinpad. (A80 only, if use other device will
return param error)
3: External Pinpad first. If external pinpad is present, use
external pinpad. If not, use internal pinpad. (A80 only, if
use other device will return param error)
FallbackSwipeEntryFlag Whether fallback swipe is allowed after reading EMV card
failed. Default as 0.
0 for not allowed.
1 for allowed.
FallbackInsertEntryFlag Whether fallback Insert is allowed after reading EMV card
failed. Default as 0.
0 for not allowed.
1 for allowed.
2: Prompt: Bypass Not Allowed
ScannerFlag Whether laser scanner entry is allowed. Default as 0.
0 for not allowed.
1 for allowed.
ExpiryDatePrompt Whether expiry date needs to be prompted during manual
entry. Default as 0.
0: not need to prompt.
1: need to prompt.
2: Prompt: Bypass Not Allowed
CVVPrompt Whether Zip code need to prompted during manual entry,
Default as 0:
0: not need to prompt.
1: need to prompt.
2: Prompt: Bypass Not Allowed
ZipCodePrompt Whether Zip code need to prompted during manual entry,
Default as 0:
0: Do not prompt.
1: Prompt.
2: Prompt: Bypass Not Allowed
EncryptionFlag Data Encryption flag. Default as 0.

0 for not encrypted.


1 for DUKPT Triple DES Key with CBC mode
2 for DUKPT Triple DES Key with ECB mode
3 for DES/TDES method
(Depends on the Key length:
TDES for 24 bytes key
DES for 8/16 bytes key).
4 for Voltage E2EE.
5 for AES CBC DUKPT.
6 for AES ECB DUKPT.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 32 -
The application will convert it from hexadecimal binary
array into an ASCII string. For example, the 3 bytes binary
array “\x1a\x23\xd4” can be converted into “1a23d4”.
KeySlot Data Encryption key slot number, start from 1.

Padding Char This is used to indicate what value needs to pad on data
string before encryption.
0: padding 0x00;
F: padding 0xFF;
The default padding char is 0. Only valid when
DatEncryption Flag is 1, 2 or 3.
MIN Account Length MIN account length. Default to 10. Valid value [1, 32].
Manual Entry only
MAX Account Length MAX account length. Default to 19. Valid value [1, 32].
Manual Entry Only
EMV Kernel EMV Kernel Configuration Selection
Configuration Selection
Transaction Date Transaction Date (use terminal date by default)
Format is YYMMDD.
Transaction Time Transaction Time (use terminal time by default) format is
HHMMSS.
Currency Code Transaction Currency Code (“840” by default)
Currency Exponent Transaction Currency Exponent ("02” by default)
Merchant Category Merchant Category Code(“0001” by default)
Code
Transaction CVM Limit Configure the limit value of CVM for current transaction.
(Only for Visa payWave and only for command Input
Account with EMV)
Tag List For EMV TRANSACTION ONLY:
EMV tag list to be returned in EMV TLV data in response
message.
Timeout Timeout in 100ms for waiting account entry. Valid value
should be [200, 9999].
Continuous Screen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but waiting
for the next command.
Fallback Insert Entry Whether fallback insert is allowed after reading
Flag contactless card failed. Default as 0.
0 for not allowed.
1 for allowed.
KSN Flag Indicate whether to increase KSN, when MAC key type is
1(DUKPT Key)
Default KSN flag is 1(Increase)
0: Not increase.
1: Increase.
ReportStatus Whether to report status back.
“1” to report.
“0” not to report.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 33 -
4.21.3 Response
Command Field Description
InputAccountWithEMV Result Code Result Code
Result Message If local error message exists, this field is mandatory.
EntryMode 0: Manual
1: Swipe
2: Contactless
3: Laser scanner
4: Chip
5: Chip Fall Back Swipe
6: Front camera
7: Rear camera
Track1Data Track1 data or tag 56, will be encrypted if the data encryption
is enabled.
Track2Data Track2 data or tag 57 (Track 2 Equivalent Data), will be
encrypted if the data encryption is enabled.
Track3Data Track3 data, will be encrypted if the data encryption is enabled.
PAN Account Number or tag 5A (PAN), will be encrypted if the data
encryption is enabled.
MaskedPAN First 6 and last 4
Example: 5454545****5454
BarcodeType Barcode Type
‘0’- QRCode
‘1’ – 2D-barcode
‘2’ – 3Dbarcode

BarcodeData Barcode Data


KSN The KSN value for account encryption as DUKPT.
Encryption Encryption Transmission Block.
Transmission Block Only valid when Encryption Flag as 4(Voltage E2EE).
Contactless For CONTACTLESS TRANSACTION ONLY:
Transaction Path The first character represents the card type
10 - contactless PAYPASS (MSD)
11 - contactless PAYPASS (MCHIP)
20 - contactless PAYWAVE (MSD)
21 - contactless PAYWAVE (QVSDC)
22 - contactless PAYWAVE (CONTACT)
23 - contactless PAYWAVE (WAVE2)
24 - contactless PAYWAVE (MSD_CVN17)
25 - contactless PAYWAVE (MSD_LEGACY)
26 - contactless PAYWAVE (VSDC)
30 - contactless DPAS (MSD)
31 – contactless DPAS (EMV)
32 – contactless DPAS (ZIP)
40 - contactless EXPRESSPAY (MSD)
41 - contactless EXPRESSPAY (EMV)
50 - contactless JCB (MSD)
51 - contactless JCB (EMV)
52 - contactless JCB (LEGACY)
53 - contactless JCB (WAVE2)
60 - contactless qPBOC (QVSDC)
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 34 -
61 - contactless qPBOC (VSDC)
70 - contactless Flash (EMV)
AuthorizationResult For CONTACTLESS TRANSACTION ONLY:
Indicate the transaction result:
0: transaction offline approved
1: transaction offline declined
2: transaction online authorization needed
SignatureFlag For CONTACTLESS TRANSACTION ONLY:
Indicate that if signature is needed
0: Signature is NOT needed
1: Signature is needed
OnlinePINFlag For CONTACTLESS TRANSACTION ONLY:
Indicate that if online PIN is needed
0: Online PIN is NOT needed
1: Online PIN is needed
EMVTLVData For EMV TRANSACTIONs ONLY:
EMV TLV data will be returned in consecutive TLV format data
based on the Tag List filed in the request message.
Encrypted EMV Encrypted field 40 EMV TLV Data.
TLV Data
Encrypted Sensitive Encrypted Sensitive data.
TLV Data Please see the definition format of Encrypted Sensitive TLV
Data.

Expiry Date The expiration date for manual entry, MMYY.


Card Holder Name The card holder name, if the card holder name exists, this field
is mandatory.
Service Code The service code of the card
CVV Code The CVV code, will be encrypted if the data encryption is
enabled.
Zip Code The zip code
CVM Cardholder Verification Method (CVM) Codes,
0 - Fail CVM processing
1 - Plaintext Offline PIN Verification
2 - Online PIN
3 - Plaintext Offline PIN and Signature
4 - Enciphered Offline PIN Verification
5 - Enciphered Offline PIN Verification and Signature
6 - Signature
7 - No CVM Required
8 - On Device CVM
VASCODE VAS response code. refer to section VAS Code Definition
VASDATA Tokens returned from card. Separated by <RS>. Please see
note.
NDEFDATA Google Smart Tap response data in format of NDEF, the
message will be encoded with Base64.
Pinpad Type 0: Internal Pinpad
1: External Pinpad
Luhn Validation If terminal not support, this field is empty. Otherwise, it will use
Result following value.
0: Not performed
1: Passed
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 35 -
2: Failed
Please note:
1. Not all card support Luhn. So please make sure the card
support Luhn before you use this field. If the card not support
Luhn, this value is invalid.
2. Terminal will verify Luhn only when entry mode is Manual or
Swipe.

4.21.4 Code Example

Callback

To achieve the complete transaction process, the user should implement the following CallBack to monitor the
events in the transaction process.

1. BasePOSLinkCallback<InputAccount.InputAccountResponse> posLinkCallback =
2. new BasePOSLinkCallback<InputAccount.InputAccountResponse>() {
3. @Override
4. public void onFinish(InputAccount.InputAccountResponse inputAccountResponse) {
5. //Run when InputAccountWithEMV finished.
6. }
7. };

Code 19 PosLinkCallback for InputAccountWithEMV

1. InputAccount.CurrentStepCallback currentStepCallback =
2. new InputAccount.CurrentStepCallback() {
3. @Override
4. public void onSuccess() {
5. // Current step input completed
6. }
7. @Override
8. public void onFail(String code, String message) {
9. //The currently entered information does not meet the specifications,
10. // for example, the length of the CVV is incorrect.
11. }
12. };

Code 20 CurrentStepCallback for InputAccountWithEMV

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 36 -
1. InputAccount.CardEventListener cardEventListener =
2. new InputAccount.CardEventListener() {
3. @Override
4. public void onEvent(String event) {
5. //Used to receive the status of card processing,
6. //Such as contactless light, FALLBACK, etc.
7. //see ${com.pax.poslink.constant.CardEvent}
8. }
9. };

Code 21 CardEventListener

1. InputAccount.InputAreaParams areaParams = new InputAccount.InputAreaParams();


2. areaParams.height = 100;
3. areaParams.width = 500;
4. areaParams.offsetX= 100;
5. areaParams.offsetY= 300;
6. areaParams.hint = "Please Input XXX";
7. InputAccount.getInstance().sendInputArea(areaParams, new InputAccount.EnterSecuri-
tyCallBack() {
8. @Override
9. public void onAddedSecurityCharacter() {
10. //When a character is added, this method will be called back,
11. // and you can customize the UI displayeffect for this
12. }
13. @Override
14. public void onDeletedSecurityCharacter() {
15. //When a character is deleted, this method will be called back
16. }

17. });

Code 22 SendInputArea

1. InputAccount.ProcessingMessageUpdateCallback processingMessageUpdateCallback =
2. new InputAccount.ProcessingMessageUpdateCallback() {
3. @Override
4. public void onUpdate(String s, String s1) {
5. // Modify the content of the prompt here.
6. }
7. };

Code 23 ProcessingMessageUpdateCallback

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 37 -
1. InputAccount.InputAccountCallback inputAccountCallback = new InputAccount.InputAccountCallbackCompat() {
2. @Override
3. public void onInputAccountStart() {
4. // Prompt the customer to start reading the card.
5. // You can monitor some status information in the EMV process by calling handleInputAccount.
6. InputAccount.getInstance().handleInputAccount(currentStepCallback, cardEventListener);
7. // If you need to manuallyinput, you can displaya security flow textbox by calling sendInputArea.
8. // After completing the input, the following method needs to be called:
9. InputAccount.getInstance().handleInputCardNum(null, currentStepCallback);
10. }
11. @Override
12. public void onEnterExpiryDate() {
13. // Prompt the user to enter the ExpiryDate manually.
14. // After completing the input, the following method needs to be called:
15. InputAccount.getInstance().handleInputExpiry("MMYY", currentStepCallback);
16. }
17. @Override
18. public void onEnterZip() {
19. // After completing the input, the following method needs to be called:
20. InputAccount.getInstance().handleInputZip("zip_data", currentStepCallback);
21. }
22. @Override
23. public void onEnterCVV() {
24. // You can displaya security flow textbox by calling sendInputArea.
25. // After completing the input, the following method needs to be called:
26. InputAccount.getInstance().handleInputCVV(null, currentStepCallback);
27. }
28. @Override
29. public void onSelectEMVApp(List<String> list) {
30. // When the AID needs to be manuallyselected in the EMV process,
31. // you need to prompt the user to select here
32. // Once the selection is complete, you need to inform which one was selected.
33. InputAccount.getInstance().handleSelectEMVApp(list.get(selectIndex), currentStepCallback);
34. }
35. @Override
36. public void onProcessing(String code, String message) {
37. // Displaysome necessarystatus information here.
38. // Some content may change, so you need to call the following methods to monitor
39. // whether the content changes, or end the prompt.
40. InputAccount.getInstance().handleProcessing(processingMessageUpdateCallback, currentStepCallback);
41. }
42. @Override
43. public void onWarnRemoveCard() {
44. // Prompt the user to move the card here, and listening remove status bycall this method:
45. InputAccount.getInstance().handleWarnRemoveCard(currentStepCallback);
46. }
47. };

Code 24 InputAccountCallback
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 38 -
Call InputAccountWithEMV

You can call an InputAccountWithEMV transaction by the following methods. It should be noted that the following
code is not suitable for running in the main thread.

1. InputAccount.InputAccountRequest request = new InputAccount.InputAccountRequest();


2. request.setAmount("100");
3. request.setContactEMVEntryFlag("1");
4. request.setMagneticSwipeEntryFlag("1");
5. request.setContactlessEntryFlag("1");
6. request.setEdcType(EDCType.CREDIT);
7. request.setTransType(TransType.SALE);
8. request.setTimeOut("300");
9. ...
10. InputAccount.inputAccountWithEMV(context,request,commSetting,posLinkC allback,inputAccountCallback);

Code 25 InputAccountWithEMV for Android

1. PosLink posLink = new PosLink();


2. ManageRequest manageRequest = new ManageRequest();
3. manageRequest.TransType = manageRequest.ParseTransType("INPUTACCOUNTWITHEMV");
4. manageRequest.Amount = "100";
5. manageRequest.Trans = manageRequest.ParseTrans("SALE");
6. manageRequest.EDCType = manageRequest.ParseEDCType("CREDIT");
7. manageRequest.MagneticSwipeEntryFlag = "1";
8. manageRequest.ContactEMVEntryFlag = "1";
9. manageRequest.ContactlessEntryFlag = "1";
10. manageRequest.TimeOut = "300";
11. posLink.ManageRequest = manageRequest;
12. posLink.SetCommSetting(CommSetting);
13. ProcessTransResult result = posLink.ProcessTrans();
14. if (result.Code == ProcessTransResult.ProcessTransResultCode.OK) {
15. ManageResponse manageResponse = posLink.ManageResponse;
16. }

Code 26 InputAccountWithEMV for Java

4.22 Show Textbox


4.22.1 Description
This command is used for showing a text box on terminal. It is supported on both classic and Android terminals.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 39 -
4.22.2 Request
Command Field Description
ShowTextBox Title The title on terminal, See CONTROL-CHARA CTE R-FOR-TE XT-
SHOWING for supported special characters.
Text The text to be displayed. Limitation depends on terminal screen size and
font size, generally as many as 10 pages can be displayed on terminal.
See CONTROL-CHA RACTER-FOR-TE XT-SHOWING for supported
special characters.
Button1 The name of button1 on terminal
Buttoncolor1 Please use the hexadecimal to represent the color.
For example, ffffff which represent the white color.
00ff00 which means the green color. If this value not to be set, the default
value will be used.
Button2 The name of button2 on terminal
Buttoncolor2 Please use the hexadecimal to represent the color.
For example, ffffff which represent the white color.
00ff00 which means the green color. If this value not to be set, the default
value will be used.
Button3 The name of button3 on terminal
Button color3 Please use the hexadecimal to represent the color.
For example, ffffff which represent the white color.
00ff00 which means the green color. If this value not to be set, the default
value will be used.
Timeout Timeout in 100ms for waiting text input. Valid value should be [0, 9999].
The value of “” means waiting till user canceled or confirmed. The value
of “0” means non-blocking mode, only valid when no button or signature
box.
ButtonKey1 The hard key to be mapped for Button 1
ButtonKey2 The hard key to be mapped for Button 2
ButtonKey3 The hard key to be mapped for Button 3
EnableHardKey Whether to disable virtual button displaying.
1 – Enable Hard Key only.
0 – Enable both virtual button and hard keys.
0 as Default.
HardKeylist Hard keys separated by <SPACE>, like “KEY0 KEY1”.
SignatureBox Signature Box:
0 – no signature box(default value)
1 – show signature box
ContinuousScreen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but waiting for the next
command
BarcodeType It can be empty or 7 (QRCODE)
BarcodeData Barcode data. For QRCODE, the data length scope is [1, 126]

4.22.3 Response
Command Field Description
ShowTextBox Result Code Result Code
Result Message If local error message exists, this field is mandatory.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 40 -
Button number The button number of selection.
SignStatus Signature status:
1: done the signature.
Signature Data Signature data.

4.22.4 Screenshot

Picture 9 Android ShowTextBox screenshot

4.23 Card Insert Detection


4.23.1 Description
It is used to detect whether card inserted or not. It is supported on both classic and Android terminals.

4.23.2 Request
Command Field Description
CardInsertDetection Null Null

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 41 -
4.23.3 Response
Command Field Description
CardInsertDetection Result Code Result Code
Result Message If local error message exists, this field is mandatory.
CardInsertStatus 0 means no card inserted
1 means has EMV Card inserted
2 means has card inserted, but this is not the EMV card. (Prolin Only)

4.24 Session Key Inject


4.24.1 Description
It is used to inject a session key to a terminal. It is supported on both classic and Android terminals.

4.24.2 Request
Command Field Description
SessionKeyInject SourceKeyType Support Key Type:
TMK(Terminal Master Key) = 1;
Note: Now only supports TMK.
SourceKeyIndex If source key type = TMK, the source key index should be [1,99].
DestinationKeyType TPK(Terminal PIN Key) = 0;
TAK(Terminal MAC Key) = 1;
TDK(Terminal DES Key) = 2;
DestinationKeyIndex The destination key index should be [1, 99].
DestinationKeyValue Destination key plaintext or the cipher test, for DES keys, the
destination key is the ciphertext which encrypted by the source
key in the mode of 3DES ECB.
Valid the length of key value is 8, 16, 24.
Note: key data must be in ASCII format. For example, the 8
bytes binary array “\x11\x22\x33\x44\x55\x66\x77\x88” can be
converted into “1122334455667788”.
CheckMode 0: No KCV check
1: Perform DES/TDES encryption on 8 bytes 0x00, and use first
4 bytes as KCV.
CheckBuffer If check mode = 0, PED won’t check KCV, this data is no
meaning.
If check mode = 1, the KCV length should be 4 bytes.

Note: the data must be in ASCII format. For example, the 4 bytes
binary array “\x11\x22\x33\x44” can be converted into
“11223344”.

4.24.3 Response
Command Field Description
SessionKeyInject Result Code Result Code
Result Message If local error message exists, this field is mandatory.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 42 -
4.25 MAC Calculation
4.25.1 Description
This command is used for MAC Calculation. It is supported on both classic and Android terminals.

4.25.2 Request
Command Field Description
MACCalculation Input Data The data used for MAC Calculation.
The data can be divided into several parts by vertical bar (‘|’).
Use ‘Encryption Bitmap’ to indicate which parts is encrypted.
Terminal will remove the vertical bars (‘|’) and decrypt the cipher
text, then MAC will be calculated using the decrypted data.
The data is represented in hexadecimal. For example:
3031|4a4b|6061.
Encryption Bitmap Indicate which parts of input data are encrypted.
0: Plaintext
1: Ciphertext
For example: if input data contain 5 parts. 00101 means the third
and the fifth part are ciphertext.
Default is 0, means this part is plaintext.
MAC Key Slot Key Index in PED: range is [1, 99].
MAC Work Mode MAC calculation mode:
Default is 0.
0: ANSI X9.9.
1: Hypercom Fast Mode.
2: ANSI X9.19.
Encryption Key Slot The key slot used to encrypt input data parts. The key can’t be
DUKPT key.
Padding Char This is used to indicate what value had been padded on data
when encryption. Terminal will remove the padding chars first
when calculate MAC.
0: padding 0x00;
F: padding 0xFF;
If this field is empty, terminal won’t remove the padding chars.
MAC Key Type The type of the key which is used to calculate MAC value.
Default MAC key type is 0(TAK)
0: TAK
1: DUKPT key
KSN Flag Indicate whether to increase KSN, when MAC key type is
1(DUKPT Key)
Default KSN flag is 0(Not increase)
0: Not increase.
1: Increase.

4.25.3 Response
Command Field Description
MACCalculation Result Code Result Code
Result Message If local error message exists, this field is mandatory.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 43 -
Result Data The MAC result, represented in hexadecimal
KSN KSN Value

4.26 Get PED Information


4.26.1 Description
This command is used to get PED information. It is supported on both classic and Android terminals.

4.26.2 Request
Command Field Description
GetPEDInformation Key Type 1 = Master Key
2 = Session Key
3 = DES DUKPT Key
4 = AES DUKPT Key
Empty value means all key information.
If you want to specify Key Slot, you need to specify key type first
Key Slot Slot, Slots or Range of Slot; Use Comma (,) to separate slot
numbers and Dash ( - ) to indicate range
Empty value means all slot.

4.26.3 Response
Command Field Description
GetPEDInformation Result Code Result Code
Result Message If local error message exists, this field is mandatory.
Available Key Slots Number of key slots remaining available for use, each Key type
Count has its own key slot.
Separate by a “,” (comma). The sequence is Master key,
Session key, DES DUKPT key.
Session key include Terminal Pin Key, Terminal MAC Key,
Terminal DES Key.
If only specify key type, other values should be empty. For
example, if key type in request is 2(session key), this field will be
like “,90”.
If specify key type and key slot, this field value will be the
available key slots count in the specified scope.
Master Key Info Terminal Master Key info group. See M/S Key Detail Information
Definition.
Session Key Info Session Key Info. See Session Key Information Definition.
DES DUKPT Key DUKPT Key Info group. See DUKPT Key Information Definition.
Info
AED DUKPT Key AES DUKPT Key Info group. See
Info AES DUKPT Key Information Definition

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 44 -
4.27 Increase KSN
4.27.1 Description
This command is used to get increase KSN. It is supported on both classic and Android terminals.

4.27.2 Request
Command Field Description
IncreaseKSN Key Type 3 = DES DUKPT Key
4 = AES DUKPT Key
Key Slot Key slot

4.27.3 Response
Command Field Description
IncreaseKSN Result Code Result Code
Result Message If local error message exists, this field is mandatory.
KSN KSN value after increasing

4.28 VAS Set Merchant parameters


4.28.1 Description
This command is used to configure the parameters of Apple Pay VAS or Google Smart Tap. It is supported on
both classic and Android terminals.

4.28.2 Request
Command Field Description
VasSetMerchanParameters Vas Program ‘1’ – Apple Pay VAS
‘2’ – Google Smart Tap
VAS Mode VAS Mode
0 --- VAS_ONLY
1 --- VAS_AND_PAYMENT
2 --- VAS_OR_PAYMENT
3 --- PAYMENT_ONLY
Apple VAS specific data please refer to section Apple Pay VAS Definition
for detail
Google VAS specific data please refer to section Google Smart Tap
Definition for detail

4.28.3 Response
Command Field Description
VasSetMerchanParameters Result Code Result Code
Result Message If local error message exists, this field is mandatory.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 45 -
4.29 VAS Push Data
4.29.1 Description
This command is used to configure the parameters of Google Smart Tap to push data from terminal to mobile,
such as merchant info. It is supported on both classic and Android terminals.

4.29.2 Request
Command Field Description
VasPushData Vas Program Reserve
Must set this field to 2 (Google Smart Tap)
VAS Mode VAS Mode
0 --- VAS_ONLY
1 --- VAS_AND_PAYMENT
2 --- VAS_OR_PAYMENT
3 --- PAYMENT_ONLY
VAS Push Data Google Smart Tap Push Service. Please refer to Google
Smart Tap Push Service Definition for detail.

4.29.3 Response
Command Field Description
VasPushData Result Code Result Code
Result Message If local error message exists, this field is mandatory.

4.30 Upload FTP


4.30.1 Description
This command is used to tell terminal to upload log files to the FTP server. It is supported on both classic and
Android terminals.

4.30.2 Request
Command Field Description
UploadFTP Null Null

4.30.3 Response
Command Field Description
UploadFTP Result Code Result Code
Result Message If local error message exists, this field is mandatory.
SFTP Parameter Encrypted by CBC TDES. Hexadecimal
Upload Status Upload log files status.
0 - OK
1 - COMM ERROR
2 - ABORTED
3 - CONNECT ERROR
4 - UNKNOW ERROR
5 - SFTP COMM ERROR
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 46 -
6 - NO DATA TO UPLOAD

4.31 ShowMessageCenter
4.31.1 Description
This command is used to show message center aligned, the default title is “Transaction Approved,” and the
default message is "Thank You". It is supported on both classic and Android terminals.

4.31.2 Request
Command Field Description
ShowMessageCenter Title The title of thank you screen.
Message1 The message1 of thank you screen. See CONTROL-CHA RACTE R-
FOR-TEXT-S HOWING for supported special characters.
Message2 The message2 of thank you screen. See CONTROL-CHA RACTE R-
FOR-TEXT-S HOWING for supported special characters.
TimeOut Timeout in 100ms. Valid value should be [0, 9999].
The value of “0” means non-blocking mode.
PinpadType 0: Internal Pinpad. (default).
1: External Pinpad. (A80 only, if use other device will return param
error).
3: External Pinpad first. If external pinpad is present, use external
pinpad. If not, use internal pinpad. (A80 only, if use other device will
return param error).
Icon Type 0: No icon is displayed. (Default)
1: Approved icon is displayed.
2: Declined icon is displayed.

4.31.3 Response
Command Field Description
ShowMessageCenter Result Code Result Code
Result Message If local error message exists, this field is mandatory.
PinpadType 0: Internal Pinpad. (default).
1: External Pinpad. (A80 only, if use other device will return param
error).
3: External Pinpad first. If external pinpad is present, use external
pinpad. If not, use internal pinpad. (A80 only, if use other device will
return param error).

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 47 -
4.31.4 Screenshot

Picture 10 Android ShowMessageCenter screenshot

4.32 GetFormList
4.32.1 Description
This command is designed for Dual Browser TermLink App, it is supported on Q20/IM20 terminal.

4.32.2 Request
Command Field Description
GetFormList FormType “0” for external forms
“1” for internal forms

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 48 -
4.32.3 Response
Command Field Description
GetFormList Result Code Result Code
Result Message If local error message exists, this field is mandatory.
FormList Form List in format:
form1,form2,form3,……

4.33 GetVarList
4.33.1 Description
This command is designed for Dual Browser TermLink App, it is supported on Q20/IM20 terminal.

4.33.2 Request
Command Field Description
GetVarList VarNameList It uses comma to separate each field Format:
varName1, varName2,...

4.33.3 Response
Command Field Description
GetVarList Result Code Result Code
Result Message If local error message exists, this field is mandatory.
VarList Return a list of variable and value pair. JSON format:
{“VARNAME1”:”VARVALUE1”,”VARNAME2”:”VARVA LUE 2”,……}

4.34 SetVarList
4.34.1 Description
This command is designed for Dual Browser TermLink App, it is supported on Q20/IM20 terminal.

4.34.2 Request
Command Field Description
SetVarList VarList It uses JSON format:{"VARNAME1":"VARVALUE1",
"VARNAME2":"VARVALUE2"}

4.34.3 Response
Command Field Description
SetVarList Result Code Result Code
Result Message If local error message exists, this field is mandatory.

4.35 RunForm
4.35.1 Description
This command is designed for Dual Browser TermLink App, it is supported on Q20/IM20 terminal.
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 49 -
4.35.2 Request
Command Field Description
RunForm formName Form name that want to run
timeOut Timeout in 100ms, valid value should be [0, 9999]

"" – no timeout, wait till user cancel


"0" – non-blocking mode
Continuous Screen ‘0’ default.
‘1’ indicate the terminal not go to idle screen but waiting for the next
command.

4.35.3 Response
Command Field Description
RunForm Result Code Result Code
Result Message If local error message exists, this field is mandatory.
Result Result in format:
“RESULT1|RESULT2|RES ULT3|RESULT4|RES ULT5”
maximum 5 results in one API call.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 50 -
5 Data Define
5.1 EDC Type Definition
EDC Type Value Description
All 00 All EDC type
CREDIT 01 Credit card
DEBIT 02 Debit card
EBT 03 EBT card(The same rule as Credit)
GIFT 04 Gift card(The same rule as Credit)
LOYALTY 05 Loyalty(The same rule as Credit)
CASH 06 Cash(The same rule as Credit)
CHECK 07 Check(The same rule as Credit)

5.2 Transaction Type Definition


Trans Type Value Description
ALL 00 Do not support
SALE 01 Tag 9C: 00(Sale), 09(Sale with cashback)
RETURN 02 Tag 9C: 20(Return)
AUTH 03 Tag 9C: 00(Sale), 09(Sale with cashback)
POST_AUTH 04 Tag 9C: 00(Sale), 09(Sale with cashback)
FORCED 05 Tag 9C: 00(Sale), 09(Sale with cashback)
ADJUST 06 DEFAULT VALUE - Tag 9C: 00(Sale)
WITH DRAWAL 07 DEFAULT VALUE - Tag 9C: 00(Sale)
ACTIVATE 08 DEFAULT VALUE - Tag 9C: 00(Sale)
ISSUE 09 DEFAULT VALUE - Tag 9C: 00(Sale)
ADD 10 DEFAULT VALUE - Tag 9C: 00(Sale)
CASH OUT 11 DEFAULT VALUE - Tag 9C: 00(Sale)
DEACTIVATE 12 DEFAULT VALUE - Tag 9C: 00(Sale)
REPLACE 13 DEFAULT VALUE - Tag 9C: 00(Sale)
MERGE 14 DEFAULT VALUE - Tag 9C: 00(Sale)
REPORT LOST 15 DEFAULT VALUE - Tag 9C: 00(Sale)
VOID 16 DEFAULT VALUE - Tag 9C: 00(Sale)
VOID SALE 17 Tag 9C: 02(Void Sale)
VOID RETURN 18 Tag 9C: 22(Void Return)
VOID AUTH 19 DEFAULT VALUE - Tag 9C: 00(Sale)
VOID POST 20 Tag 9C: 02(Void Sale)
VOID FORCE 21 Tag 9C: 02(Void Sale)
VWITH DRAW 22 DEFAULT VALUE - Tag 9C: 00(Sale)
BALANCE 23 Tag 9C: 30(Balance)
VERIFY 24 DEFAULT VALUE - Tag 9C: 00(Sale)
REACTIVE 25 DEFAULT VALUE - Tag 9C: 00(Sale)
FORCED ISSUE 26 DEFAULT VALUE - Tag 9C: 00(Sale)
FORCED ADD 27 DEFAULT VALUE - Tag 9C: 00(Sale)

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 51 -
UNLOAD 28 DEFAULT VALUE - Tag 9C: 00(Sale)
RENEW 29 DEFAULT VALUE - Tag 9C: 00(Sale)
GET CONVERT DETAIL 30 DEFAULT VALUE - Tag 9C: 00(Sale)
CONVERT 31 DEFAULT VALUE - Tag 9C: 00(Sale)
TOKENIZE 32 DEFAULT VALUE - Tag 9C: 00(Sale)
INCREMENT AUTH 33 DEFAULT VALUE - Tag 9C: 00(Sale)
BALANCE WITH LOCK 34 DEFAULT VALUE - Tag 9C: 00(Sale)
REDEMPTION 35 DEFAULT VALUE - Tag 9C: 00(Sale)
REWARDS 36 DEFAULT VALUE - Tag 9C: 00(Sale)
REENTER 37 DEFAULT VALUE - Tag 9C: 00(Sale)
ADJUSTMENT 38 DEFAULT VALUE - Tag 9C: 00(Sale)
TRANSFER 39 DEFAULT VALUE - Tag 9C: 00(Sale)
REVERSAL 99 DEFAULT VALUE - Tag 9C: 00(Sale)

5.3 TransType list for EDC


EDC Type Transaction Type
AUTH, SALE, FORCED, RETURN, BALANCE, VOID, VOID SALE, VOID FORCED, VOID
CREDIT RETURN, ADJUST, POST AUTH, VERIFY, TOKENIZE, VOID AUTH, VOID POST,
INCREMENT AUTH
DEBIT SALE, VOID, VOID SALE, BALANCE, RTURN, VOID RETURN, ADJUST, REENTER
SALE, BALANCE, REFUND, VOID, VOID SALE, VOID RETURN, ADJUST,WITHDRAWAL,
EBT
REENTER
SALE, BALANCE, VOUID, UNLOAD, DEACTIVATE, ACTIVATE, RETURN, ADD, ADJUST,
GIFT
CASHOUT, AUTH, POST AUTH, RELOAD, TRANSFER, REPLACE
BALANCE, VOID, DEACTIVATE, ACTIVATE, ADD, REPLACE, ADJUST, REWARD, RETURN,
LOYALTY
RENEW, VOID RETURN, TRANSFER, ISSUE, RELOAD
CASH SALE, RETURN, VOID, VOID SALE, VOID RETURN

5.4 EMV Kernel Configuration Type


EMV Terminal Online Offline Offline Signature No Comments
Kernel Type PIN Enciphered Plaintext CVM
Value PIN PIN
01 Attended √ √ √ √ √ All CVM Supported.
02 Attended × √ √ √ × “No CVM” and “Online PIN” are
disabled.
03 Attended × √ √ √ √ “Online PIN” is disabled.
04 Attended √ √ √ √ × “No CVM” is disabled.
05 Attended × × × √ × Only “Signature” is ENABLED.

06 Attended × × × × √ Only “No CVM” is ENABLED.


07 Attended √ √ √ × √ “Signature” is disabled.
08 Attended × × × √ √ Only “No CVM” and “Signature”
are ENABLED.
09 Unattend √ √ √ × √ “Signature” is disabled.
ed

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 52 -
10 Unattend √ √ √ × × “Signature” and “No CVM” are
ed disabled.
11 Unattend √ × × × × Only “Online PIN” is ENABLED.
ed
12 Unattend × √ √ × √ “Signature” and “Online PIN” are
ed disabled.

5.5 Encrypted Sensitive TLV Data Format Definition


5.5.1 Manual
Tag Data Object Description Format Examples
DFA001 Private PAN - key cn PAN Entered: 123456789
entered TLV: \xDF\xA0\x01\x05\x12\x34\x56\x78\x9F
DFA002 Private CVV/CID cn CVV Entered: 123
TLV: \xDF\xA0\x02\x02\x12\x3F
DFA003 Private Expiry date cn EXPDATE Entered: 1219
(YYMM) TLV: \xDF\xA0\x03\x02\x12\x19

Sample Decrypted Encrypted Sensitive Data:


\xDF\xA0\x01\x05\x12\x34\x56\x78\x9F\xDF\xA0\x02\x02\x12\x3F\xDF\xA0\x03\x02\x12\x19

5.5.2 MSR
Tag Data Object Description Format Examples
DFA004 Private Raw magstripe ascii Raw Track2:
Track2 including ;4055010000000005= 15125025432198712345?
start and end TLV:
sentinel \xDF\xA0\x04\x39;4055010000000005=1512502543
2198712345?
DFA005 Private Raw magstripe ascii
(optional ) Track1 including
start and end
sentinel

Sample Decrypted Encrypted Sensitive Data:


\xDF\xA0x04\x39;4055010000000005=15125025432198712345?

5.5.3 CC/NFC
Tag Data Object Description Format Examples
57 Track 2 Contains the data elements b TLV:
Equivalent of track 2 according to \x57\x19\x47\x61\x73\x90\x01\x01\x00\x
Data ISO/IEC 7813, excluding 10\xD1\x81\x22\x01\x11\x43\x87\x80\x01
start sentinel, end sentinel, \x 62\x9F
and Longitudinal
Redundancy Check (LRC)

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 53 -
5A Application Valid cardholder account cn TLV: \x5A\x08\x47\x61\x73\x90\x01\x
Primary number. 01\x00\x10
Account
Number
(PAN)
9F6B Track 2 Data Contains the data objects of Optional
(optional) the Track 2 according to b
(ISO/IEC 7813), excluding
start sentinel, end sentinel
and LRC.
Optional.
MasterCard Only.
56 Track1 Data Track 1 Data contains the Optional
(optional) data objects of the track 1 ans
according to [ISO/IEC 7813]
Structure B, excluding start
sentinel, end sentinel and
LRC. The Track 1 Data may
be present in the file read
using the READ RECORD
command during a mag-
stripe mode transaction.
9F1F Track 1 Discretionary part of track 1 Optional
(optional) Discretionary according to ISO/IEC 7813 ans
Data
9F20 Track 2 Discretionary part of track 2 Optional
(optional) Discretionary according to ISO/IEC 7813 cn
Data

Sample Decrypted Encrypted Sensitive Data:


\x57\x19\x47\x61\x73\x90\x01\x01\x00\x 10\xD1\x81\x22\x01\x11\x43\x87\x80\x01\x
62\x9F\x5A\x08\x47\x61\x73\x90\x01\x 01\x00\x10

The follow is the illustration for format.


cn - Compressed numeric data elements consist of two numeric digits (having values in the range Hex '0'–'9') per
byte. These data elements are left justified and padded with trailing hexadecimal 'F's. Example: The Application
Primary Account Number (PAN) is defined as “cn” with a length of up to ten bytes. A value of 1234567890123
may be stored in the Application PAN as Hex '12 34 56 78 90 12 3F FF' with a length of 8.

b - These data elements consist of either unsigned binary numbers or bit combinations that are defined elsewhere
in the specification. Binary example: The Application Transaction Counter (ATC) is defined as “b” with a length of
two bytes. An ATC value of 19 is stored as Hex '00 13'.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 54 -
5.6 Key Information Definition
5.6.1 DUKPT Key Information Definition
Field Description

Key Slot Key slot with key injected PED

KSN KSN(Key Serial Number) in terminal PED. corresponding to values returned in Key Slot.
KCV KCV(Key Check Value) in terminal PED. corresponding to values returned in Key Slot.

5.6.2 Session Key Information Definition


Field Description
TPK Terminal Pin Key info group.
TAK Terminal MAC Key info group
TDK Terminal Des Key info group.

5.6.3 Session Key Detail Information Definition


Field Description
Key Slot Key slot with key injected PED.
KCV KCV(Key Check Value) in terminal PED, corresponding to values returned in Key Slot.

5.6.4 AES DUKPT Key Detail Information Definition


Field Description

Key Slot Key slot with key injected PED


KSN KSN(Key Serial Number) in terminal PED. corresponding to values returned in Key Slot.

KCV KCV(Key Check Value) in terminal PED. corresponding to values returned in Key Slot.

5.7 VAS Code Definition


VAS CODE Description
200 VAS OK.
201 VAS OSE error.
202 VAS get data command error.
203 VAS issue, need to start payment.
204 The app version of mobile is too low.
205 In VAS mode, mobile capabilities: Skip Loyalty Protocol.
206 In dual mode, mobile capabilities: Skip Loyalty Protocol and No Payment Data Forthcoming.
207 In single mode, Mobile Capabilities: Skip Loyalty Protocol and No Payment Data Forthcoming
208 6A83-VAS Data not found (iPhone without the pkpass)
209 6287-VAS Data not active (without fingerprint auth)
6984-User Intervention Required on mobile device (a special iOS version will trigger this issue,
210
maybe is without auth, too)

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 55 -
211 VAS parameter error, The merchant ID is null.
212 VAS get key error, Error when get key from key file
213 VAS Data Decryption Error. Data can't be decrypted by the current key.
255 Unknown error

5.8 Apple Pay VAS Definition


Field Description
Merchant ID Max 3 merchant ID connect by ‘#’, Each merchant ID (0, 36]
URL Mode 0 --- Full VAS Mode
1 --- URL mode
URL Merchant URL, Eg. www.apple.com

5.9 Google Smart Tap Definition


Field Description
Bitmaps for the various capabilities that the ECR supports.
Google Smart Tap CAP Please see Google Smart Tap Capabilities Bitmap Definition
Default value is “00000000000000000000000000000000”
Collect ID Predefined number specific to the merchant.
Store Local ID Merchant address code
Terminal ID Merchant terminal code
Merchant name Merchant name
Digit merchant code referring to the category of the merchant as defined by the
Merchant category
networks.
Please refer to Google Service Type Bitmap Definition
Service Type
Default value is “1000000000000000”
0 --- Normal
1 --- Securely
Security
2 --- Pre_signature
3 --- Need not a right auth.
0 --- Normal flow (default)
End Tap
1 --- Stop tap session
0 --- Normal flow (default)
OSE TO PPSE
1--- Stop VAS and do payment directly

5.9.1 Google Smart Tap Capabilities Bitmap Definition


A 32 digits String, 1 for each position means the specified CAP is supported.
Type Capability
Stand-alone
Semi-integrated
Unattended
Online
System
Offline
MMP
zlib support
Reserved for future
UI Printer
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 56 -
Printer graphics
Display
Images
Audio
Animation
Video
Reserved for future
Support payment
Support digital receipt
Support service issuance
Support OTA POS data
Checkout
Reserved for future
Reserved for future
Reserved for future
Reserved for future
Online PIN
CD PIN
Signature
No CVM
CVM
Device-generated code
SP-generated code
ID capture
Bio-metric

5.9.2 Google Service Type Bitmap Definition


A 16 digits String, 1 for each position means the specified service type is chosen, 0 indicates that the service type
is not chosen.
Service Type Description
All services This flag must be 0 when specify other flags.
All services except PPSE This flag must be 0 when specify other flags.
PPSE
Loyalty
Offer
Gift Card 1
Private Label Card
Cloud Based Wallet
Mobile Marketing Platform
Wallet Customer

5.9.3 Google Smart Tap Push Service Definition


Field Description
0 --- Normal
1 --- Securely
Security
2 --- Pre_signature
3 --- Need not a right auth.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 57 -
Bitmaps for the various capabilities that the ECR supports.
Google Smart Tap CAP Please see Google Smart Tap Capabilities Bitmap Definition
Default value is “00000000000000000000000000000000”
Collect ID A predefined number specific to the merchant
Service Usage Please refer to Google Service Usage Definition.
Please refer to Google Service Update Definition.
Service Update
Must specify one of
New Service Please refer to Google New Service Definition
0 --- Normal flow (default)
End Tap
1 --- Stop tap session

Note: Service usage/ Service update/ New service can’t be all empty.

5.9.4 Google Service Usage Definition


Field Description
Usage ID Service usage ID
Service state
0:Unspecified
State 1:Success
2:Invalid format
3: Invalid value
Title A short description of valuables. Detailed product information which is not
displayed and can be accessed from the URI.
Intended to be used to provide more context on how the valuable was
Describe
used.

5.9.5 Google Service Update Definition


Field Description
Update ID Service update ID
Provide update operations for application services
0:No operation
1:Remove service object
Update Operation 2:Set balance
3:Add balance
4:Subtract balance
5:Free
Update payload Details of service updates

5.9.6 Google New Service Definition


Field Description
New services type
0:Unspecified
1:Valuable
Type 2:Receipt
3:Survey
4:Goods
5:Signup
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 58 -
Title Title of the new service
URI An endpoint where the user may access the new service

5.10 Hardware Bitmap Definition


Position Property
1 Magstripe
2 EMV Chip
3 EMV Contactless/NFC
4 Camera-Front
5 Laser Scanner
6 Camera-Rear
7 Printer
8 Touchscreen
9 RFU
10 RFU
11 RFU
12 RFU
13 RFU
14 RFU
15 RFU
16 RFU

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 59 -
6 Response Code
6.1 Response code for EMV
Code Message Description
000000 OK The result is OK
100003 1-Chip Malfunction IC card reset failed
100003 2–Chip Read Error IC card command failed
100003 3–Chip Blocked IC card blocked
100003 4–Chip Error Return code of IC card command is error
100003 5–Chip Blocked EMV Application is blocked
100003 6–Chip Not Accepted No matching EMV Application in the IC card
6-ChipNotAccept
100003 7–User Abort User canceled current operation or transaction
100003 8–User Timeout User’s operation timed out
100003 9–Data Error IC card data error
100003 10–Chip Not Accepted Transaction is not accepted
10-ChipNotAccept
100003 11-Chip Reject Transaction should be declined by devices according to spec.
100003 12–CAPK Expired CAPK Key Expired
100003 13–PIN Pad Error There’s No PIN Pad or PIN Pad can’t be used
100003 14–PIN Pad Error No PIN Pad or PIN Pad can’t be used
100003 15–General Error Sum of Key Verify is incorrect
100003 16–General Error Unable to find Appointed Data Element
100003 17–General Error There is no data in the appointed Data Element
100003 18–General Error Memory is overflow
100003 19–General Error No transaction log present
100003 20–General Error Appointed log does not exist
100003 Appointed Label does not exist in current log record
21–General Error

100003 22-Chip Error Receive Returned Status Code of 6985 in GPO response.
100003 23–Tap Not Accepted Prompt for card entry method other than contactless
23-TapNotAccept
100003 24–General Error EMV File error.
100003 25–Tap Terminated Must terminate the transaction right now.
100003 26–Tap General Error Contactless failed.
26–TapGeneralErr
100003 27-Tap Decline Transaction should be declined by devices according to spec.
100003 28–Tap Not Accepted Try another card (DPAS and AMEX).
28–TapNotAccept
100003 30–Param Error Parameter error = EMV_PARAM_ERR
100003 31–Tap General Error International transaction(for VISA AP PayWave Level2 IC card
31–TapGeneralErr use)
100003 32–Tap General Error Wave2 DDA response TLV format error
32–TapGeneralErr
100003 33–Tap General Error US card(for VISA AP PayWave L2 IC card use)
33–TapGeneralErr

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 60 -
100003 34–Tap General Error Need to use IC card for the transaction(for VISA PayWave IC
34–TapGeneralErr card use)
100003 35–Tap General Error Need to redo the EMV Application Select.
35–TapGeneralErr
100003 36–Card Expired Contactless IC card has expired
100003 37–Tap General Error No application is supported(Select PPSE error)
37–TapGeneralErr
100003 38–Tap General Error Contactless PBOC
38–TapGeneralErr
100003 39–Tap CVM Fail CVM result in decline for AE
100003 40-See Phone Command response with 6986
100003 41–Tap General Error The last read record command error.
41–TapGeneralErr
100003 42–Tap General Error Wrong order API calls.
42–TapGeneralErr
100003 48–Tap General Error Try Tap Again
48–TapGeneralErr
100003 PIN Pad Timeout PED Timeout
100003 PIN Pad Failure PED Failure
100003 105-Declined Contactless offline declined
100003 108-Too many cards present Too many cards present.
100003 CLSS ERROR General contactless error
100003 TERMINAL PARAMETER The terminal parameter file is corrupted
ERROR

6.2 Response code for VAS


Error Code Error Message Description
101000 VAS OK, PAYMENT ERROR + Apple or Google pay use VAS function. For VAS OK, but
ERROR MESSAGE payment failed
101001 VAS ERROR, PAYMENT OK Apple or Google pay use VAS function. For VAS failed, but
payment OK
101002 VAS ERROR + (VAS code) Apple or Google pay use VAS function.
For VAS ONLY mode, return error
101003 VAS ERROR, PAYMENT ERROR Apple or Google pay use VAS function.
+ ERROR MESSAGE For VAS and Payment both failed
101004 VAS ERROR, PAYMENT NOT Google Smart Tap failed, and not perform payment.
PERFORMED
101005 VAS OK, PAYMENT NOT Google Smart Tap OK, but not perform payment
PERFORMED

6.3 Response code for PED


Error Code Error Message Description
100503 PED BUSY PED is busy
100504 PED INJECTION ERROR PED injection error
100505 MAC KEY TYPE DISMATCH the specified MAC key type dismatch the specified
algorithm

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 61 -
100506 ENCRYPTION KEY TYPE the encryption key type dismatch the specified algorithm
DISMATCH
100507 PED PARAMETER ERROR PED parameter error
100508 PED GENERAL ERROR PED general error
100509 PED UNKNOWN ERROR PED unknown error

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 62 -
7 Best Practice (Only for Android App)
7.1 Android BroadPOS P2PE/TermLink App Internal Calling
7.1.1 Internal Calling Model
Users can put TermLink and POSLink-integrated applications in a terminal to Standalone mode.

Picture 11 Internal Call for Standalone use

Or communicate with the ECR through a customer-defined protocol by POSLink-integrated application.

Picture 12 Internal Call for ECR

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 63 -
7.1.2 Transaction Flow With Callback

InputAccountWithEMV Flow

Picture 13 InputAccountWithEMV Callback Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 64 -
AuthorizeCard Flow

Picture 14 AuthorizeCard Callback Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 65 -
GetPinblock Flow

Picture 15 GetPinBlock Callback Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 66 -
CompleteOnlineEMV Flow

Picture 16 CompleteOnlineEMV Flow

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 67 -
7.1.3 Callback with Single Activity Only
The structure for InputAccount.InputAccountCallback:
1. public interface InputAccountCallback {
2. ......
3. onInputAccountStart
4. onEnterExpiryDate
5. onSelectEMVApp
6. onProcessing
7. onWarnRemoveCard
8. ......
9. }

Code 27 InputAccount Callback

Each onXXX callback needs the user to display a different view.


As a result, using fragments or dialog to display different views in a Single Activity to help users reduce
the complexity of Activity management.

7.1.4 Use EventBus


EventBus is a Java library that simplifies communication between Activities, Fragments, Threads, Services,
etc.
Users can get details from https://github.com/greenrobot/EventBus
As mentioned above, there are lots of callbacks in InputAccountCallback, so users can separate the
callbacks from the user’s Activity and use EventBus to communicate between InputAccountCallback and the
user’s Activity.

7.1.5 API
Please see the POSLink Java document for details.
The main functions are in the package com.pax.poslink.fullintegration. The Class in which the main functions
of full-Integration are listed below.
Model Command Package and class
INIT com.pax.poslink.fullIntegration.Init
GETVAR com.pax.poslink.fullIntegration.Variable
SETVAR com.pax.poslink.fullIntegration.Variable
SHOWDIALOG com.pax.poslink.formManage.ShowDialog
GETSIGNATURE com.pax.poslink.formManage.DoSignature
DOSIGNATURE com.pax.poslink.formManage.DoSignature
UPDATEIMAGE/UPATERESOURCE com.pax.poslink.fullIntegration.UpdateResource
CHECKFILE com.pax.poslink.fullIntegration.CheckFile
REBOOT com.pax.poslink.PosLink
GETPINBLOCK com.pax.poslink.fullIntegration.GetPinBlock
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 68 -
RESETMSR com.pax.poslink.PosLink
INPUTTE XT com.pax.poslink.formManage.Input Text
AUTHORIZE CARD com.pax.poslink.fullIntegration.Authoriz eCard
COMPLETEONLINEEMV com.pax.poslink.fullIntegration.CompleteOnlineEMV
REMOVECARD com.pax.poslink.fullIntegration.RemoveCard
GETEMVTLVDATA com.pax.poslink.fullIntegration.EMVTLVData
SETEMVTLVDATA com.pax.poslink.fullIntegration.EMVTLVData
INPUTACCOUNTWITHEMV com.pax.poslink.fullIntegration.InputAccount
SHOWTEXTBOX com.pax.poslink.formManage.Input Text
CARDINSERTDE TE CTION com.pax.poslink.PosLink
VASSETMERCHANTPARAME TERS com.pax.poslink.fullIntegration.VasSetMerchantParamet ers
VASPUSHDATA com.pax.poslink.fullIntegration.VasPushData
SESSIONKEYINJECTION com.pax.poslink.PosLink

7.2 Android BroadPOS P2PE/TermLink App External Calling


(Need Install TermLink Manager Application)
7.2.1 External Calling Model

Picture 17 External Call Mode

7.2.2 UI Customization
In addition to the built-in UI, our application also supports customer-defined UI.
How to use:
You need enable the customUI support first.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 69 -
For Example:

1. CommSetting commSetting = new CommSetting();


2. commSetting.setCommType();
3. commSetting.setBaudRate();
4. commSetting.setPort();
5. commSetting.setCustomerUISupport(true);
6. ConnectManager.getInstance(this).startListeningService(commSetting, connectionCallBack);

Code 28 Example of ExternalCall CommonSetting

For the action command

Create an Activity. Set intent-filter, it contains action and category.

1. <activity
2. android:name=".cusui.activity.EnterPinActivity"
3. android:allowTaskReparenting="true"
4. android:taskAffinity="com.pax.tlmanager">
5. <intent-filter>
6. <action android:name="com.pax.us.pay.action.ENTER_PIN" />
7.
8. <category android:name="com.pax.us.pay.ui.category.SECURITY" />
9. <category android:name="android.intent.category.DEFAULT" />
10. </intent-filter>
11. </activity>

Code 29 Action and Category of CustomUI Activity

The following commands support custom UI with Activity:


Command Intent-filter action category
SHOWDIALOG com.pax.us.pay.action.SHOW_DIALOG com.pax.us.pay.ui.category.MANA
GER
DOSIGNATURE com.pax.us.pay.action.GET_SIGNATURE com.pax.us.pay.ui.category.SIGNA
TURE
GETPINBLOCK com.pax.us.pay.action.ENTER_PIN com.pax.us.pay.ui.category.SECUR
ITY
INPUTTE XT com.pax.us.pay.action.INPUT_TE XT com.pax.us.pay.ui.category.MANA
GER
AUTHORIZE CARD com.pax.us.pay.action.ENTER_PIN com.pax.us.pay.ui.category.SECUR
ITY
INPUTACCOUNT- com.pax.us.pay.action.INPUT_ACCOUNT com.pax.us.pay.ui.category.SECUR
WITHEMV ITY
com.pax.us.pay.action.ENTER_EXPIRY_DA T com.pax.us.pay.ui.category.TEXT
E
com.pax.us.pay.action.ENTER_CVV com.pax.us.pay.ui.category.SECUR
ITY

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 70 -
com.pax.us.pay.action.ENTER_ZIP_CODE com.pax.us.pay.ui.category.TEXT
com.pax.us.pay.action.SELECT_AID com.pax.us.pay.ui.category.OPTIO
com.pax.us.pay.action.SELECT_LANGUAGE N
SHOWTEXTBOX com.pax.us.pay.action.SHOW_TEXT_BOX com.pax.us.pay.ui.category.MANA
GER
SHOWMESSAGECEN com.pax.us.pay.action.SHOW_MESSAGE_C com.pax.us.pay.ui.category.MANA
TER ENTER GER

Let your Activity implements IUIListener interface and create a ActionHelper to process the message and
callback. The ActionHelper will use IRespStatus to callback the transaction event and the user can use the
function sendNext() and sendAbort() to go to the next step or cancel the transaction.
For Example:

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 71 -
1. protected void onCreate(@Nullable Bundle savedInstanceState) {
2. super.onCreate(savedInstanceState);
3. mHelper = new EnterPinHelper(this, new IRespStatus() {
4. @Override
5. public void onAccepted() {
6. //when trans accepted. Usuallyclose the current activity
7. }
8. @Override
9. public void onDeclined(long code, @Nullable String message) {
10. //when trans declined with error message.
11. }
12. @Override
13. public void onMessage(@Nullable String message) {
14. //when trans need to send some message.
15. }
16. @Override
17. public void onReset() {
18. //when execute the reset command.
19. }
20. @Override
21. public void onClearMsg() {
22. //when execute the clearMessage command.
23. }
24. });
25. }
26. private void testOperate(){
27. mHelper.sendNext();//goto the next step for this transaction.
28. mHelper.sendAbort();//to cancel the current transaction.
29. }
30. @Override
31. public void onShowAmount(long amount) {
32. //set amount to textview or your label.
33. }
34. @Override
35. public void onShowCurrency(@Nullable String currency, boolean isPoint) {
36. //set currency symbol to textview or your label.
37. }
38. @Override
39. public void onShowMessage(@Nullable String transName, @Nullable String message) {
40. //set message to textview or your label.
41. }
42. @Override
43. public void onShowPin(@Nullable String pinStyles, boolean isOnline, boolean isPinBypass) {
44. //show your pin textbox or message.
45. }
46. @Override
47. public void showDetail(String msg) {
48. //you can show the detail message here.
49. }

Code 30 Examole of Callback for CustomUI Activity

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 72 -
The support ActionHelper for each action command like this:
Command Action Helper UI Listener Recommand Activity
Name
SHOWDIALOG SelectOptionsHelper ISelectOptionListener ShowDialogActivity
DOSIGNATURE SignatureHelper ISignatureListener DoSignatureActivity
GETPINBLOCK EnterPinHelper IEnterPinListener EnterPINActivity
INPUTTE XT InputTextHelper IInputTextListener InputTextActivity
AUTHORIZE CARD EnterPinHelper IEnterPinListener EnterPINActivity
INPUTACCOUNTWITHEM SearCardHelper ISearchCardListener SearchCardActivity
V EnterExpiryDateHelpe IEnterExpiryDateListene EnterExpiryDateActivity
r r
SecurityHelper ISecurityListener EnterCVVActivity
EnterZipCodeHelper IEnterZipCodeListener EnterZipActivity
SelectOptionsHelper ISelectOptionListener SelectOptionActivity
SHOWTEXTBOX ShowTextBoxHelper IShowTextBoxListener ShowTextBoxActivity
SHOWMESSAGECENTER ShowMessageHelper IEnterAmountListener ShowMessageCenterActivit
y

For the message command

The user can create a static BroadcastReceiver to receive the broadcast and set the intent-filter.

1. <receiver android:name=".cusui.receiver.StatusReceiver">
2. <intent-filter>
3. <action android:name="com.pax.us.pay.CARD_PROCESS_STARTED" />
4. <action android:name="com.pax.us.pay.CARD_PROCESS_ERROR" />
5. <action android:name="com.pax.us.pay.CARD_PROCESS_COMPLETED" />
6.
7. <category android:name="com.pax.us.pay.status.category.CARD" />
8. </intent-filter>
9. <intent-filter>
10. <action android:name="com.pax.us.pay.REMOVE_CARD_STARTED" />
11. <action android:name="com.pax.us.pay.REMOVE_CARD_FINISHED" />
12.
13. <category android:name="com.pax.us.pay.status.category.MANAGER" />
14. </intent-filter>
15. </receiver>

Code 31 BroadcastReveiver for Transaction Status

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 73 -
1. <receiver android:name=".cusui.receiver.ClssStatusReceiver">
2. <intent-filter>
3. <action android:name="com.pax.us.pay.CLSS_LIGHT_NOT_READY" />
4. <action android:name="com.pax.us.pay.CLSS_LIGHT_IDLE" />
5. <action android:name="com.pax.us.pay.CLSS_LIGHT_READY_FOR_TXN" />
6. <action android:name="com.pax.us.pay.CLSS_LIGHT_PROCESSING" />
7. <action android:name="com.pax.us.pay.CLSS_LIGHT_REMOVE_CARD" />
8. <action android:name="com.pax.us.pay.CLSS_LIGHT_COMPLETED" />
9. <action android:name="com.pax.us.pay.CLSS_LIGHT_ERROR" />
10. <action android:name="com.pax.us.pay.CLSS_LIGHT_BLUE_ON" />
11. <action android:name="com.pax.us.pay.CLSS_LIGHT_BLUE_OFF" />
12. <action android:name="com.pax.us.pay.CLSS_LIGHT_BLUE_BLINK" />
13. <action android:name="com.pax.us.pay.CLSS_LIGHT_YELLOW_ON" />
14. <action android:name="com.pax.us.pay.CLSS_LIGHT_YELLOW_OFF" />
15. <action android:name="com.pax.us.pay.CLSS_LIGHT_YELLOW_BLINK" />
16. <action android:name="com.pax.us.pay.CLSS_LIGHT_GREEN_ON" />
17. <action android:name="com.pax.us.pay.CLSS_LIGHT_GREEN_OFF" />
18. <action android:name="com.pax.us.pay.CLSS_LIGHT_GREEN_BLINK" />
19. <action android:name="com.pax.us.pay.CLSS_LIGHT_RED_ON" />
20. <action android:name="com.pax.us.pay.CLSS_LIGHT_RED_OFF" />
21. <action android:name="com.pax.us.pay.CLSS_LIGHT_RED_BLINK" />
22.
23. <category android:name="com.pax.us.pay.status.category.VIRTUAL_CLSS_LIGHT" />
24. </intent-filter>
25. </receiver>

Code 32 BroadcastReceiver for Contactless Light

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 74 -
1. <receiver android:name=".cusui.receiver.PinStatusReceiver">
2. <intent-filter>
3. <action android:name="com.pax.us.pay.PIN_CLEARED" />
4. <action android:name="com.pax.us.pay.PIN_ENTER_COMPLETED" />
5. <action android:name="com.pax.us.pay.PIN_ENTER_ABORTED" />
6. <action android:name="com.pax.us.pay.PIN_ENTERING" />
7. <action android:name="com.pax.us.pay.PIN_RNIB_TOUCH" />
8. <action android:name="com.pax.us.pay.SECURITY_ENTERING" />
9. <action android:name="com.pax.us.pay.SECURITY_DELETE" />
10. <action android:name="com.pax.us.pay.SECURITY_FORMAT_ERROR" />
11. <action android:name="com.pax.us.pay.SECURITY_LUHN_CHECK_ERROR" />
12. <action android:name="com.pax.us.pay.SECURITY_LUHN_CHECK_OK" />
13.
14. <category android:name="com.pax.us.pay.status.category.PIN" />
15. <category android:name="com.pax.us.pay.ui.category.SECURITY" />
16. </intent-filter>
17. </receiver>

Code 33 broadcastReceiver for Security Input status

The user can use the EventBus or other ways to notify your activity to display a dialog box or process related
content.
For Example:
In BroadcastReceiver

1. public class PinStatusReceiver extends android.content.BroadcastReceiver {


2.
3. @Override
4. public void onReceive(Context context, Intent intent) {
5. Log.d("PinStatusReceiver", "onReceive: " + intent.getAction());
6. if (TextUtils.isEmpty(intent.getAction()))
7. return;
8. EventBus.getDefault().post(intent.getAction());
9. }
10. }

Code 34 BroadcastReceiver code example

In Activity

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 75 -
1. @override
2. protected void onCreate(@Nullable Bundle savedInstanceState) {
3. super.onCreate();
4. EvensBus.getDefault().register(this);
5. }
6.
7. @Override
8. protected void onDestroy() {
9. EventBus.getDefault().unregister(this);
10. super.onDestroy();
11. }
12.
13. @Subscribe(threadMode = ThreadMode.MAIN)
14. public void onEventAsync(String action) {
15. switch (action) {
16. case PINStatus.PIN_ENTERING:
17. Log.i("EnterPinEvent", "PINStatus.PIN_ENTERING");
18. pinLen++;
19. String star = "*";
20. StringBuilder sb = new StringBuilder();
21. for (int i = 0; i < pinLen; i++) {
22. sb.append(star);
23. }
24. pwdInputText.setText(sb.toString());
25. break;
26. case PINStatus.PIN_ENTER_CLEARED:
27. Log.i("EnterPinEvent", "PINStatus.PIN_ENTER_CLEARED");
28. pinLen = 0;
29. pwdInputText.setText("");
30. break;
31. case PINStatus.PIN_RNIB_TOUCH:
32. Log.i("EnterPinEvent", "PINStatus.PIN_RNIB_TOUCH");
33. break;
34. }
35. }

Code 35 Example of Security Input Status usage

The following commands or messages support custom UI with BroadcastReceiver:


Command or Intent-filter action category
Message
REMOVECARD com.pax.us.pay.REMOVE_CARD_STARTE D com.pax.us.pay.status.category.MAN
com.pax.us.pay.REMOVE_CARD_FINISHE D AGER
CARD STATUS com.pax.us.pay.CARD_PROCESS_STA RTED com.pax.us.pay.status.category.CAR
com.pax.us.pay.CARD_PROCESS_COMPLE TE D D
CLSS LIGHT com.pax.us.pay.CLSS_LIGHT_NOT_REA DY com.pax.us.pay.status.category.
com.pax.us.pay.CLSS_LIGHT_READY_FOR_TXN VIRTUAL_CLSS_LIGHT
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 76 -
com.pax.us.pay.CLSS_LIGHT_P ROCESSING
com.pax.us.pay.CLSS_LIGHT_REMOVE_CARD
com.pax.us.pay.CLSS_LIGHT_COMP LE TED
com.pax.us.pay.CLSS_LIGHT_E RROR
com.pax.us.pay.CLSS_LIGHT_BLUE_ON
com.pax.us.pay.CLSS_LIGHT_BLUE_OFF
com.pax.us.pay.CLSS_LIGHT_BLUE_B LINK
com.pax.us.pay.CLSS_LIGHT_YELLOW_ON
com.pax.us.pay.CLSS_LIGHT_YELLOW_OFF
com.pax.us.pay.CLSS_LIGHT_YELLOW_BLINK
com.pax.us.pay.CLSS_LIGHT_GREE N_ON
com.pax.us.pay.CLSS_LIGHT_GREE N_OFF
com.pax.us.pay.CLSS_LIGHT_GREE N_BLINK
com.pax.us.pay.CLSS_LIGHT_RED_ON
com.pax.us.pay.CLSS_LIGHT_RED_OFF
com.pax.us.pay.CLSS_LIGHT_RED_BLINK
PIN SATAUS com.pax.us.pay.PIN_CLEARED com.pax.us.pay.status.category.PIN
com.pax.us.pay.PIN_ENTER_COMPLE TED com.pax.us.pay.ui.category.SECURI
com.pax.us.pay.PIN_ENTER_ABORTE D TY
com.pax.us.pay.PIN_ENTERING
com.pax.us.pay.PIN_RNIB_TOUCH
com.pax.us.pay.SECURITY_ENTERING
com.pax.us.pay.SECURITY_DELE TE

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 77 -
8 Appendix
8.1 Classic Terminal EMV Kernel Version
Application Provider PAX TECHNOLOGY, INC.
Address 4/F., No.3 Building, Software Park, 2nd Central
Science-Tech Road, High-Tech Industrial Park
Guangdong
Shenzhen 518057
CHINA
Payment model: S300, Q20, Q25, Q30, PX5, IM20, IM300, IM500, IM700, PX7, D190
Product Description: POS Terminal
Product Options: S300, Q20, Q25, Q30, PX5, IM20, IM300, IM500, IM700, PX7, D190

Run below contactless kernel in PAX BroadPOS P2PE Applications, version 1.xx.xx, and PAX TermLink
Application, version 1.xx.xx
 F WAVE LIB v353
 F MC LIB v552_01
 F DPAS LIB v151_1
 F AE LIB v250_02
 F QPBOC v351
 F JCB LIB v151_1
 F FLASH LIB v250
Run below contact kernel in PAX BroadPOS P2PE Applications, version 1.xx.xx, and PAX TermLink
Application, version 1.xx.xx
 EMV_LIB_v653

8.2 Android Terminal EMV Kernel Version


Application Provider PAX TECHNOLOGY, INC.
Address 4/F., No.3 Building, Software Park, 2nd Central
Science-Tech Road, High-Tech Industrial Park
Guangdong
Shenzhen 518057
CHINA
Payment model: A30, A35, A50, A60, A77, A80, A920, A920Pro, A930, AR6, AR8, IM30,
PX7A
Product Description: POS Terminal
Product Options: A30, A35, A50, A60, A77, A80, A920, A920Pro, A930, AR6, AR8, IM30,
PX7A

Run below contactless kernel in PAX BroadPOS P2PE Applications, version 1.xx.xx, and PAX TermLink
Application, version 1.xx.xx
 F WAVE LIB v353
 F MC LIB v553
 F DPAS LIB v152

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 78 -
 F AE LIB v250_03
 F QPBOC v352
 F JCB LIB v150_01
 F FLASH LIB v250
Run below contact kernel in PAX BroadPOS P2PE Applications, version 1.xx.xx, and PAX TermLink
Application, version 1.xx.xx
 EMV_LIB_v653

8.3 Offline Data Verification For Contactless

PayPass:
Only support the CDA, the <SecurityCapability> bit 4 can set the CDA.

PayWave:
Only support the fDDA, the specification requires that fDDA must be turned on for terminals that support
offline, it cannot be turned off by APP now.

ExpressPay:
Support SDA and CDA, the <TerminalCapability> B3b4 to set CDA, and the B3b8 to set SDA. the
specification requires that CDA and SDA must be turned on for terminals, the risk of closing SDA and CDA is
borne by the customer.

D-PAS:

Only support the CDA, the specification requires that CDA must be turned on for terminals, it cannot be

turned off.

JSpeedy:
Legacy Mode and Magstripe Mode does not support CDA, only EMV mode support CDA. The
<CombinationOptions> B1b6 to set CDA, the specification requires that CDA must be turned on for terminals, the
risk of closing SDA and CDA is borne by the customer.

QPBOC:
Only support the fDDA, the specification requires that fDDA must be turned on for terminals that support
offline, it cannot be turned off by APP now.

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 79 -
8.4 Control Character for Text Showing

Character Description Commands


\n Line feed ShowMessage
ShowMessageCenter
ShowTextBox
\C Center alignment ShowMessage
ShowMessageCenter
ShowTextBox
\L Left alignment ShowMessage
ShowMessageCenter
ShowTextBox
\R Right alignment ShowMessage
ShowMessageCenter
ShowTextBox
\B Bold word ShowMessage
ShowMessageCenter
ShowTextBox
Notes:
1. “\C” “\L” “\R” will not change line automatically, please add “\n” if you want to change to next line.
2. “\B” can be used along with “\L” or “\R” or “\C” with format like “\B\R”.
3. “\B” will automatically jump to next line if there are some words before “\B”.
4. “\B” will only bold the first line.

Control Character Description command


\1 Small font ShowMessage
ShowMessageCenter
ShowTextBox
\2 Normal font(default) ShowMessage
ShowMessageCenter
ShowTextBox
\3 Big font ShowMessage
ShowMessageCenter
ShowTextBox

8.5 Terminal Supported By BroadPOS P2PE/TermLink


Application
8.5.1 Android Terminal
Terminal Release Date
A920 2019/6
A60 2019/7
A80 2019/7
A930 2019/7
Aries6 2019/9
NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 80 -
Aries8 2019/9
PX7A 2019/9
IM30 2019/11
A50 2020/6
A30 2020/9
A77 2020/9
A920Pro 2020/9
A60 2020/10
A35 2021/8

8.5.2 Classic Terminal


Terminal Release Date
S300 2019/8
Q30 2019/10
PX5 2019/10
PX7 2019/10
IM300 2019/12
IM20 2020/1
Q20 2020/9
D190 2020/10
IM500 2021/5
IM700 2021/5

NOTE: Thi s document is CONFIDENTIAL and must be used exclusively for the operation of PAX programs. It may not
be duplicated, published, or disclosed without PAX pri or wri tten permission. - 81 -

You might also like