Professional Documents
Culture Documents
HPY NSDL POS Interface V1.0
HPY NSDL POS Interface V1.0
NSDL
Confidentiality Statement
The information included in this document is confidential information relating to the business of Hitachi
Payment Services Pvt. Ltd. (“HPY”). It is being presented to you based on the understanding that it will
not be used for any reason other than consideration of a commercial relationship with HPY, and in
particular, will not be used in connection with any decision to trade in securities of HPY. Please
be advised that any disclosure of the information contained in this presentation to any other person, or
any use of this information in connection with the trading of HPY securities, may be a violation.
Table of Contents
1. INTRODUCTION ................................................................................................................................... 5
2. MESSAGE STRUCTURE .......................................................................................................................... 6
1. INTRODUCTION
This document explains about the message structure which has to be used by the POS terminal to
interface with HPY Host.
2. MESSAGE STRUCTURE
The message structure is as shown below. It is split into 2 main parts: Transport Protocol Data Unit
and Application Data.
Transport Protocol
Application Data
Data Unit
Destination Originator
ID Message Type Bitmap Data Elements
Address Address
The TPDU contains addressing information related to both the transaction destination (host
application process or network address) and the transaction-originating device (Terminal or POS
system). The TPDU is a 5-byte header that precedes the application data.
Transport Protocol
Application Data
Data Unit
Destination Originator
ID Message Type Bitmap Data Elements
Address Address
Transport Protocol
Application Data
Data Unit
Destination Originator
ID Message Type Bitmap Data Elements
Address Address
2.2.2. BITMAP
ISO 8583 uses a concept called "bit map", where each data element is assigned a position indicator in
a control field, or bit map. The presence of a data element in a specific message is indicated by a one
(1) in the assigned position; the absence of a data element is indicated by a zero (0) in the assigned
position. Each application transaction includes one (1) bit map. A bit map consists of 64 bits numbered
from the left starting with bit 1. The first bit of the bit map represents a secondary bit map. For our
current implementation we will use only the first bitmap and hence the first bit of the bit map will be
zero (0).
Code Description
00 Normal processing
01 Prompt the Merchant to Settle the Batch
02 Download Terminal Parameters. Terminal might settle the present batch if transactions
are present and then download the terminal parameters.
03 Download Terminal Application. Terminal will have to settle the present batch if
transactions are present and then download the terminal parameter & application.
04 Download Messages from Host. Special Messages to the Merchants can be downloaded
and sent to the Terminal for Merchant to view.
01 Manual
02 Magnetic stripe, CVV may not be checked
05 ICC, CVV can be checked
07 Auto-entry via contactless ICC
90 Magnetic stripe as read from track 2, CVV can be checked
91 Auto-entry via contactless mag-stripe
95 ICC, CVV may not be checked
Note: For fall-back cases, the terminal should send a value of “90”. The host will check the Service
Code and Field 55 and will decide accordingly on the value to be sent to External networks like Visa,
MasterCard, and AMEX etc.
Code Meaning
00 Normal presentment
01 Customer not present
02 Unattended cardholder-activated Terminal
05 Card not present
06 Pre-authorized request
08 Mail Order / Telephone Order
This field will be used in the response to send American Express Merchant ID.
Not used.
5.3. SALE
The sale transaction is used to obtain authorization of a financial transaction
Bit Data Element Name Request Response Comments
Message Type 0200 0210
Bitmap M M
02 Primary Account Nr O O Only when Track data is not
present
03 Processing Code M M 00 aa 00
04 Amount, Transaction M O
11 STAN M M
12 Time, Transaction O M HHMMSS
13 Date, Transaction O M MMDD
14 Date, Expiry O Only when Track data is not
present. Format YYMM
22 POS Entry Mode M
24 NII M
25 POS Condition Code M
35 Track 2 O Required for transactions
swiped
37 Retrieval Reference M
Number
38 Authorization Code O Will be present for successful
transactions
39 Response Code M Will be present for all the
transactions
41 Terminal ID M M
42 Card Acceptor ID Code M
45 Track 1 O Only if Track 2 is not readable
52 PIN block O For Debit Cards
53 Security Info O
55 ICC Data O For EMV cards
56 Batch Number M Terminal’s Current Batch
Number
61 Private Field O O Will contain AMEX MID (in case
of AMEX transaction)
62 Invoice Number M
63 Private Use O Depending on the System
configuration, the field will be
returned. Example: Surcharge,
Card details
5.4. PRE-AUTHORIZATION
The pre-authorization transaction is used to take an authorization and put a hold on the customer’s
funds and settle at a later stage. This transaction will not be present in the batch.
Bit Data Element Name Request Response Comments
Message Type 0100 0110
Bitmap M M
02 Primary Account Nr O O Only when Track data is not
present
03 Processing Code M M 00 aa 00
04 Amount, Transaction M O
11 STAN M M
12 Time, Transaction O M HHMMSS
13 Date, Transaction O M MMDD
14 Date, Expiry O Only when Track data is not
present. Format YYMM
22 POS Entry Mode M
24 NII M
25 POS Condition Code M
35 Track 2 O Required for transactions
swiped
37 Retrieval Reference M
Number
38 Authorization Code O Will be present for successful
transactions
39 Response Code M Will be present for all the
transactions
41 Terminal ID M M
42 Card Acceptor ID Code M
45 Track 2 O Only if Track 2 is not readable
52 PIN block O For PIN based cards
53 Security Info O
55 ICC Data O For EMV cards
56 Batch Number M Terminal’s Current Batch Nr
61 Private Field O O
62 Invoice Number M
Response
Depending on the system
configuration, this field will be
set. Example: Surcharge, Card
details
5.8. REVERSAL
The reversal transaction is sent when the terminal does not receive a response for the Sale transaction.
This is sent continuously until a successful response is received from the Host.
Bit Data Element Name Request Response Comments
Message Type 0400 0410
Bitmap M M
02 Primary Account Nr M M Must contain the original card
number as Track is not present
03 Processing Code M M Same as original
04 Amount, Transaction M O Same as original
11 STAN M M Same as original
12 Time, Transaction C M Same as original
13 Date, Transaction C M Same as original
14 Date, Expiry O Only when Track data is not
present. Format YYMM
22 POS Entry Mode M Same as original
24 NII M Same as original
25 POS Condition Code M Same as original
37 Retrieval Reference O The data of original transaction
Number if present in the Host will be
populated.
38 Authorization Code O The data of original transaction
if present in the Host will be
populated.
39 Response Code M Will be present for all the
transactions
41 Terminal ID M M
42 Card Acceptor ID Code M
53 Security Info O
55 ICC Data O For EMV cards
62 Invoice Number M Same as original
63 Private Use O Same as original
7. DATA CRYPTO
The cryptography details are as follows:
Sr No Elements Description
1 DUKPT Derived Unique Key Per Transaction
(DUKPT) is a key management scheme in
which for every transaction, a unique key
is used
2 BDK Base Derivation Key (BDK) is used to
derive the keys
3 IPEK Initial PIN Encryption Key (IPEK) A key
is irreversibly derived from the BDK. The
IPEK is then injected into the devices
4 KSN Key Serial Number (KSN) is returned from
the encrypting device
o X2 = B2 XOR C1
o C2 = Encrypt(X2, E1)
o X3 = B3 XOR C2
o C3 = Encrypt(X3, E1)
o X4 = B4 XOR C3
o C4 = Encrypt(X4, E1)
o X5 = B5 XOR C4
o C5 = Encrypt(X5, E1)