Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

POS Interface

NSDL

Hitachi Payment Services Pvt. Ltd.


July 2020
HPY NSDL POS Interface

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.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
2 Version: 1.0
HPY NSDL POS Interface

Table of Contents
1. INTRODUCTION ................................................................................................................................... 5
2. MESSAGE STRUCTURE .......................................................................................................................... 6

2.1. TRANSPORT PROTOCOL DATA UNIT ............................................................................................................... 6


2.1.1. Request TPDU ............................................................................................................................... 6
2.1.2. Response TPDU ............................................................................................................................. 6
2.2. APPLICATION DATA .................................................................................................................................... 7
2.2.1. Message Type Identifier ............................................................................................................... 7
2.2.2. Bitmap .......................................................................................................................................... 8
2.2.3. Data Elements .............................................................................................................................. 8
2.3. COMMUNICATION OVER TCP/IP ........................................................................................................... 9
3. TRANSACTION DATA FORMAT ........................................................................................................... 10
3.1. DATA ATTRIBUTE ..................................................................................................................................... 11
3.2. MESSAGE TYPE / PROCESSING CODE TABLE .................................................................................................. 12
4. TRANSACTION DATA FIELDS ............................................................................................................... 13

4.1. PRIMARY ACCOUNT NUMBER, FIELD 02 ....................................................................................................... 13


4.2. PROCESSING CODE, FIELD 03 ..................................................................................................................... 13
4.2.1. Account Selection ....................................................................................................................... 13
4.2.2. Processing / Flow Control Definition .......................................................................................... 13
4.3. AMOUNT, TRANSACTION, FIELD 04 ............................................................................................................. 14
4.4. SYSTEM TRACE AUDIT NUMBER, FIELD 11 .................................................................................................... 14
4.5. TIME, LOCAL TRANSACTION, FIELD 12 ......................................................................................................... 14
4.6. DATE, LOCAL TRANSACTION, FIELD 13 ......................................................................................................... 14
4.7. DATE, EXPIRY, FIELD 14 ............................................................................................................................ 14
4.8. POS ENTRY MODE, FIELD 22 ..................................................................................................................... 14
4.9. NII, FIELD 24 .......................................................................................................................................... 15
4.10. POS CONDITION CODE, FIELD 25 ............................................................................................................... 15
4.11. TRACK II, FIELD 35 ................................................................................................................................... 16
4.12. RETRIEVAL REFERENCE NUMBER, FIELD 37 ................................................................................................... 16
4.13. AUTHORIZATION CODE, FIELD 38 ................................................................................................................ 16
4.14. RESPONSE CODE, FIELD 39 ........................................................................................................................ 16
4.15. TERMINAL ID, FIELD 41 ............................................................................................................................ 16
4.16. CARD ACCEPTOR ID CODE, FIELD 42 ........................................................................................................... 16
4.17. LOCATION, FIELD 43 ................................................................................................................................. 16
4.18. PIN DATA, FIELD 52................................................................................................................................. 16
4.19. SECURITY INFO, FIELD 53........................................................................................................................... 16
4.20. AMOUNT, ADDITIONAL, FIELD 54 ............................................................................................................... 17
4.21. ICC DATA, FIELD 55 ................................................................................................................................. 17
4.21.1. Tags for MasterCard & Visa EMV Cards ..................................................................................... 17
4.22. BATCH NUMBER, FIELD 56 .................................................................................................................... 18
4.23. PRIVATE USE – 2, FIELD 60........................................................................................................................ 19
4.23.1. Batch Number............................................................................................................................. 19
Hitachi Payment Services Pvt. Ltd. Company Confidential
Mumbai, India. Document: POS/HPY/TECH/2019/1.0
3 Version: 1.0
HPY NSDL POS Interface

4.23.2. Original amount ......................................................................................................................... 19


4.24. PRIVATE USE – 3, FIELD 61........................................................................................................................ 19
4.25. PRIVATE USE – 4, FIELD 62........................................................................................................................ 19
4.25.1. Invoice Number........................................................................................................................... 19
4.26. PRIVATE USE – 5, FIELD 63........................................................................................................................ 19
4.26.1. Reconciliation Request Totals ..................................................................................................... 19
4.26.2. Cash Amount (41) ....................................................................................................................... 20
4.26.3. TIP Amount (38) .......................................................................................................................... 20
4.27. MESSAGE AUTHENTICATION CODE, FIELD 64 ................................................................................................ 20
5. TRANSACTION FORMAT DEFINITIONS ................................................................................................ 21
5.1. TEST TRANSACTION ................................................................................................................................... 21
5.1.1. Request dump ............................................................................................................................. 21
5.1.2. Response dump .......................................................................................................................... 21
5.2. TERMINAL STATISTICS ......................................................................................................................... 22
5.2.1. Statistics Data............................................................................................................................. 22
5.3. SALE ..................................................................................................................................................... 24
5.3.1. Request dump ............................................................................................................................. 25
5.3.2. Response dump .......................................................................................................................... 25
5.4. PRE-AUTHORIZATION .......................................................................................................................... 26
5.5. PRE-AUTHORIZATION COMPLETION ................................................................................................... 27
5.6. SALE & CASH ......................................................................................................................................... 29
5.7. VOID, SALE ........................................................................................................................................... 31
5.7.1. Request dump ............................................................................................................................. 31
5.7.2. Response dump .......................................................................................................................... 32
5.8. REVERSAL ............................................................................................................................................... 33
5.8.1. Request dump ............................................................................................................................. 34
5.8.2. Response dump .......................................................................................................................... 34
5.9. TIP ADJUSTMENT ................................................................................................................................. 34
5.10. SETTLEMENT REQUEST ............................................................................................................................... 36
5.10.1. Request dump ............................................................................................................................. 36
5.10.2. Response dump .......................................................................................................................... 36
5.11. BATCH UPLOAD ................................................................................................................................... 37
5.12. SETTLEMENT, AFTER UPLOAD ................................................................................................................. 38
5.12.1. Request dump ............................................................................................................................. 38
5.12.2. Response dump .......................................................................................................................... 38
5.13. REFUND, OFFLINE ................................................................................................................................ 39
6. RESPONSE CODE DESCRIPTION ........................................................................................................... 41

7. DATA CRYPTO .................................................................................................................................... 42


7.1. ENCRYPTION LOGIC .................................................................................................................................. 42

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
4 Version: 1.0
HPY NSDL POS Interface

1. INTRODUCTION
This document explains about the message structure which has to be used by the POS terminal to
interface with HPY Host.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
5 Version: 1.0
HPY NSDL POS Interface

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

2.1. TRANSPORT PROTOCOL DATA UNIT

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

2.1.1. REQUEST TPDU

- TPDU ID Identifies TPDU Type, 60h is used for transactions


- Destination Address Network International Identifier
- Originator Address Identifies the individual terminal

2.1.2. RESPONSE TPDU

- TPDU ID Identifies TPDU Type, 60h is used for transactions


- Destination Address Contains Originator Address
- Originator Address Contains Destination Address

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
6 Version: 1.0
HPY NSDL POS Interface

2.2. APPLICATION DATA


Each application message consists of three components in the following sequence; Message Type
Identifier, Bit Map, and a variable number of data elements.

Transport Protocol
Application Data
Data Unit
Destination Originator
ID Message Type Bitmap Data Elements
Address Address

2.2.1. MESSAGE TYPE IDENTIFIER


The Message Type Identifier (Message Type) consists of four (4) digits and is used to define the
message type of the transaction. The first and second digits identify the class of message. The third
and fourth digits identify the message function and transmission mode:

Digits 1 & 2 Message Class


01 Authorization Request
02 Financial Request
03 File update / transfer
04 Reversal Request
05 Reconciliation Request
06 Administrative Request
08 Network Management

Digits 3 & 4 Transmission Mode


00 Interactive request
10 Interactive response
20 Non-interactive advice
30 Non-interactive advice response

The following Message Type Identifiers (MTI) is used:

Message Type Application


Identifier
0100 Authorization request
0110 Authorization request response
0200 Financial request
0210 Financial request response

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
7 Version: 1.0
HPY NSDL POS Interface

0220 Financial advice


0230 Financial advice response
0304 Message download request
0314 Message download response
0320 Batch upload request
0330 Batch upload response
0400 Reversal request
0410 Reversal response
0420 Reversal advice request
0430 Reversal advice response
0500 Card Acceptor Reconciliation Request
0510 Card Acceptor Reconciliation Response
0800 Network management request
0810 Network management response
0620 Notification request
0630 Notification response

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).

2.2.3. DATA ELEMENTS


Data Element characteristics - names, formats, attributes, conditional code values - are described fully
in the ISO 8583 specification.
The following rules apply to the data elements within a message:
- All data elements begin on a byte boundary.
- Fixed length “n” type fields with an odd length are right-justified to a byte boundary, and zero-
filled on the left. For example, a field type “n3” field will occupy 2 bytes, and the most
significant nibble of the first byte will be 0.
- All lengths for variable length fields are represented in binary coded decimal (BCD), right-
justified to a byte boundary, and zero-filled on the left. For example, an ‘LLVAR’ field with a
length of 15 will have a length indicator of ‘15h’ occupying one byte. An ‘LLLVAR’ field with a
length of 15 will have a length indicator of ‘0015h’, occupying two bytes.
- The length indicator for a variable length field is a count of the number of data elements to
follow. It does not include the length of the length indicator.
- The variable length Primary Account Number field, field 2, with an odd length is left justified
within the field and “F” filled.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
8 Version: 1.0
HPY NSDL POS Interface

2.3. COMMUNICATION OVER TCP/IP


In case the terminal is communicating to HPY Host over Ethernet, then before the TPDU, a 2 byte
TCP/IP header must be present. This TCP/IP header will contain the length of the message packet
(TPDU + Application Data).

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
9 Version: 1.0
HPY NSDL POS Interface

3. TRANSACTION DATA FORMAT


The below table shows the field format which is to be used.
Field Field Name Length Field
Nr. (Packing … Format) (Packing … Type … Length)
002 Primary Account Nr Bcd LLVAR Bcd:__F b ..19
003 Processing Code Fixed Bcd:0__ n 6
004 Amount, Transaction None Bcd:0__ n 12
011 System Trace Audit Nr Fixed Bcd:0__ n 6
012 Time, Transaction Fixed Bcd:0__ n 6
013 Date, Transaction Fixed Bcd:0__ n 4
014 Date, Expiry Fixed Bcd:0__ n 4
022 POS Entry Mode Fixed Bcd:0__ n 3
024 NII Fixed Bcd:0__ n 3
025 POS Condition Code Fixed Bcd:0__ n 2
035 Track - 2 Bcd LLVAR Bcd:0__ ans ..37
037 Retrieval Reference Nr Fixed None anp 12
038 Authorization Code Fixed None ans 6
039 Response Code Fixed None an 2
041 Terminal ID Fixed None ans 8
042 Card Acceptor ID Fixed None ans 15
043 Location Fixed None ans 40
044 Encryption Type Bcd LLVAR None ans ..10
045 Track - 1 Bcd LLVAR None ans ..76
048 Private Use, 1 Bcd LLLVAR None b ..999
052 PIN Block Fixed None b 8
053 Security Info Bcd LLLVAR None b ..999
054 Amount, Additional Bcd LLLVAR None an* ..120
055 ICC Data, MC & Visa Bcd LLLVAR None b ..255
056 Batch Number Fixed None ans 06
060 Private Use, 2 Bcd LLLVAR None ans ..999
061 Private Use, 3 Bcd LLLVAR None ans ..999
062 Private Use, 4 Bcd LLLVAR None ans ..999
063 Private Use, 5 Bcd LLLVAR None ans ..999
064 Message Authentication Fixed None b 8
Code

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
10 Version: 1.0
HPY NSDL POS Interface

3.1. DATA ATTRIBUTE

Attribute Abbreviation Meaning


a Alphabetic characters from A to Z, a to z
b Binary
n Numeric data from 0 to 9
p Pad character i.e. space
s Special character i.e. other printable character
x C for Credit & D for Debit
z Track 2 data as in ISO 7813
an Alpha numeric
ans Alpha numeric special
as Alpha special
ns Numeric special
np Numeric and padded character
anp Alpha numeric and padded characters
YY Year 00 to 99
YYYY Year 0000 to 9999
MM Month 01 to 12
DD Date, 01 to 31
hh Hour, 00 to 23
mm Minute, 00 to 59
ss Seconds, 00 to 59
L, LL or LLL Length of the field as on one, two or three decimal digits
X, XX or XXX Length indicator containing the length of the field

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
11 Version: 1.0
HPY NSDL POS Interface

3.2. MESSAGE TYPE / PROCESSING CODE TABLE


Transaction Message Type Processing Code
Sale 0200 00 aa 00
Sale & Cash 09 aa 00
Void, Sale 02 aa 00
Pre-authorization 0100 00 00 00
Pre-authorization Completion 0220 00 00 00
Refund 20 00 00
Reversal 0400 Same as original transaction
Settlement Request 0500 92 00 00
Settlement, after upload 96 00 00
Batch upload 0320 Same as original transaction
Statistics 0800 91 00 00
Test Transaction 99 00 00

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
12 Version: 1.0
HPY NSDL POS Interface

4. TRANSACTION DATA FIELDS

The following section describes the ISO 8583 fields implemented.

4.1. PRIMARY ACCOUNT NUMBER, FIELD 02


The Primary Account Number (PAN) contains the card account number when track I or track II is not
available. The terminal must not store the track information, therefore, the PAN has to be sent on all
advice transactions (i.e. adjust, batch upload, etc.) and reversal.

It will contain the Wallet Number / ID in case of a Wallet transaction.

4.2. PROCESSING CODE, FIELD 03


The processing code is used in conjunction with the message type to define the type of transaction
being sent by the terminal to the host. It also includes account selection information. (See the Message
Type / Processing Code Table section for processing code definitions.)

4.2.1. ACCOUNT SELECTION


The account information is represented in the 3rd and 4th digits. The following values are used:

Account Type Description


00 Default Account
10 Savings Account
20 Current / Checking Account
30 Credit Account
70 Loyalty Account

4.2.2. PROCESSING / FLOW CONTROL DEFINITION


In order to send extra information to the terminal during a response, the Host will use Position 5 & 6
of the Processing Code to convey the same to the terminal.

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.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
13 Version: 1.0
HPY NSDL POS Interface

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.

4.3. AMOUNT, TRANSACTION, FIELD 04


The terminal must not decline the transaction response based on amount check as the amount will be
zero for declined transaction (response code not equals 00), will be different for partial completion
and different for surcharge.

4.4. SYSTEM TRACE AUDIT NUMBER, FIELD 11


The systems trace audit number (STAN) is generated automatically by the terminal. It is incremented
for each transaction processed. The STAN will be sent in the response as the terminal should use it to
validate the response. The STAN should be used only as a method of identifying a transaction. The
STAN will be used for time out reversal processing. The terminal should never generate a STAN of
000000.

4.5. TIME, LOCAL TRANSACTION, FIELD 12


The time stamp of the transaction when it originally was entered into the host. This time stamp is
permanent, it does not change on subsequent transactions (i.e. adjust). This value has to be used by
the terminal to print on the charge-slip.

4.6. DATE, LOCAL TRANSACTION, FIELD 13


The date stamp of the transaction when it originally was entered. This date stamp is permanent, it
does not change on subsequent transactions (i.e. adjust). This value has to be used by the terminal to
print on the charge-slip.

4.7. DATE, EXPIRY, FIELD 14


This is the expiration date of the PAN. It is included when the Track I or Track II data is not present.
The expiration date is included as part of the track data when track data is present.

4.8. POS ENTRY MODE, FIELD 22


The POS entry mode is used to indicate how the primary account number was entered into the
terminal.

Position 1 & 2 PAN Entry Mode


00 Unknown

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
14 Version: 1.0
HPY NSDL POS Interface

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

Position 3 PIN Entry Capability


0 Unknown
1 Terminal can accept PIN
2 Terminal cannot accept PIN

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.

4.9. NII, FIELD 24


The NII is used to identify the acquiring host.

4.10. POS CONDITION CODE, FIELD 25


The below code describes the condition under which the transaction takes place at the Point-Of-
Service.

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

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
15 Version: 1.0
HPY NSDL POS Interface

4.11. TRACK II, FIELD 35


The information encoded on Track 2 of the magnetic stripe as defined in ISO 7813, including field
separators but excluding the begin sentinel, end sentinel and longitudinal redundancy check
characters.

4.12. RETRIEVAL REFERENCE NUMBER, FIELD 37


The host assigns the RRN. The terminal stores the reference number and includes it on all advice
transactions. If an advice receives a new RRN the terminal will replace the old RRN with the new value.

4.13. AUTHORIZATION CODE, FIELD 38


It is usually referred to as the “approval code”. It is assigned by the authorization host when the
transaction is approved. In case of “Offline Refund” transaction, this field must be set as zeroes
(000000). For “Offline Sale”, this field will contain the value entered by the merchant.

4.14. RESPONSE CODE, FIELD 39


This field is returned to the terminal from the authorization host to indicate the status of the
transaction. A “00” response code indicates an approval status. All other values are partial approval
or non-approval or error responses.

4.15. TERMINAL ID, FIELD 41


The terminal id used to uniquely identify the terminal.

4.16. CARD ACCEPTOR ID CODE, FIELD 42


The merchant number assigned to the terminal.

4.17. LOCATION, FIELD 43


Not used.

4.18. PIN DATA, FIELD 52


PIN block data as received from the terminal pin pad.

4.19. SECURITY INFO, FIELD 53


DUKPT Key Serial Number (KSN) as returned from the encrypting device.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
16 Version: 1.0
HPY NSDL POS Interface

4.20. AMOUNT, ADDITIONAL, FIELD 54


Not used.

4.21. ICC DATA, FIELD 55


This field is used to transmit ICC data from ICC to card issuer and from card issuer to ICC formatted
according to the ISO7816-6 (tag – length – value) coding structure.

Len TLV coded data objects in any order


of DE
nnn Tag1 Len1 Value1 Tag2 Len2 Value2 Tag3 Len3 Value3
4F 10 AID 5A 0A PAN 9A 03 Date

4.21.1. TAGS FOR MASTERCARD & VISA EMV CARDS

Field / Tag Attribute Bytes Description / Values


9F02 n 12 6 The amount of the transaction.
9F03 n 12 6 Secondary amount associated with the transaction,
representing a cash back amount.
4F b 5 - 16 Application Identifier / Dedicated Filename
82 b 2 Application Interchange profile
9F36 b 2 Application Transaction Counter
9F07 b 2 Application Usage Control
8A an 2 Authorization Response Code
9F26 b 8 Cryptogram generated by the ICC
9F27 b 1 Cryptogram information data
8E b Var up to 252 CVM list
9F34 b 3 CVM results
9F1E an 8 Interface device serial number
9F0D b 5 Issuer action code – default
9F0E b 5 Issuer action code – denial
9F0F b 5 Issuer action code – offline
9F10 b Var up to 32 Application data
9F09 b 2 Terminal application version number

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
17 Version: 1.0
HPY NSDL POS Interface

9F33 b 3 Terminal capabilities


9F1A n3 2 Terminal country code
9F35 n2 1 Terminal type
95 b 5 Terminal Verification Result
9F53 ans 1 1 Terminal category code
5F2A n3 2 Transaction Currency Code
5F34 n2 1 PAN sequence number – retrieved from the card
9A n6 3 Transaction date (YYMMDD)
9F41 n .. 8 Var up to 4 Transaction sequence counter
9C n2 1 Transaction type
9F37 b 4 Unpredictable number
9F36 b 2 Application Transaction counter
71 & 72 b Var up to 256 Issuer script template
9F6E b 32 Form Factor Indicator
9F7C b Var upto 32 Customer Exclusive Data

4.22. BATCH NUMBER, FIELD 56


This contains the Batch Number of the current batch. It should be present in all transactions (except
Network Messages).

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
18 Version: 1.0
HPY NSDL POS Interface

4.23. PRIVATE USE – 2, FIELD 60

4.23.1. BATCH NUMBER

Field Attribute Byte Value


Length n 3 2 ‘0006’ – BCD length
Batch Number ans 6 6 As generated by the terminal automatically.

4.23.2. ORIGINAL AMOUNT


The original amount is used to carry the amount of the transaction prior to a void or adjustment.
Field Attribute Byte Value
Length n 3 2 ‘0012’ – BCD length
Original Amount an 12 12 Original amount of the transaction before being
adjusted

4.24. PRIVATE USE – 3, FIELD 61

This field will be used in the response to send American Express Merchant ID.

4.25. PRIVATE USE – 4, FIELD 62


4.25.1. INVOICE NUMBER
Field Attribute Byte Value
Length n 4 2 ‘00LL’ – BCD length
Invoice Number an 6 6 As generated by the terminal automatically.

4.26. PRIVATE USE – 5, FIELD 63


4.26.1. RECONCILIATION REQUEST TOTALS

Field Attribute Byte Value


Length n 3 2 ‘00LL’ – BCD length

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
19 Version: 1.0
HPY NSDL POS Interface

Sales Count an 3 3 000 – 999


Sales Amount an 12 12 12 digit amount in minor
Refund Count an 3 3 000 – 999
Refund Amount an 12 12 12 digit amount in minor

The reconciliation totals:


1. The Sale Count is the sum of all the non-voided / reversed transactions for which the terminal
has processed successfully.
2. The Sale Amount is the sum of all the non-voided / reversed transactions for which the
terminal has processed successfully.
3. The Adjust transaction will affect the amount, but not the count
4. The VOID transaction will affect the amount and will decrement the count

4.26.2. CASH AMOUNT (41)


It should contain the “Cash” amount in case of “Cash-back” and “Cash @ POS” transactions. Its use is
optional.

Field Attribute Byte Value


Length n 3 2 ‘00LL’ – BCD length
Table ID ans 2 2 ‘41’
Cash Amount an 12 12 12 digit amount in minor

4.26.3. TIP AMOUNT (38)


It should contain the “TIP” amount in case of “TIP Adjustment”. Its use is optional.

Field Attribute Byte Value


Length n 3 2 ‘00LL’ – BCD length
Table ID ans 2 2 ‘38’
TIP Amount an 12 12 12 digit amount in minor

4.27. MESSAGE AUTHENTICATION CODE, FIELD 64

Not used.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
20 Version: 1.0
HPY NSDL POS Interface

5. TRANSACTION FORMAT DEFINITIONS

5.1. TEST TRANSACTION


The test transaction is used to check if the terminal configuration is correct and if it is able to
communicate with the Host over the configured network.
Bit Data Element Name Request Response Comments
Message Type 0800 0810
Bitmap M M
03 Processing Code M M 99 00 00
11 STAN M M
39 Response Code M
41 Terminal ID M M
42 Card Acceptor ID Code M -
63 Private Use M - Will contain the Terminal Serial
Nr & Terminal Application
Version separated by “|” symbol

5.1.1. REQUEST DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0102]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0304]
0800:
[Fixed n 6 006] 003 [990000]
[Fixed n 6 006] 011 [053723]
[Fixed ans 8 008] 041 [10042290]
[Fixed ans 15 015] 042 [010123456789123]
[LLLVAR ans ..999 020] 063 [212-123-456|03.12.06]

5.1.2. RESPONSE DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0304]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0102]
0810:
[Fixed n 6 006] 003 [990000]
[Fixed n 6 006] 011 [053723]
[Fixed n 6 006] 012 [163446]
[Fixed n 4 004] 013 [0321]
[Fixed an 2 002] 039 [00]
[Fixed ans 8 008] 041 [10042290]

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
21 Version: 1.0
HPY NSDL POS Interface

5.2. TERMINAL STATISTICS


The message is used by the terminal to advise the host of the offline activities on the terminal. This
message is required after successful settlement.
Bit Data Element Name Request Response Comments
Message Type 0800 0810
Bitmap M M
03 Processing Code M M 91 00 00
11 STAN M M
12 Time, Transaction M HHMMSS
13 Date, Transaction M MMDD
24 NII O
39 Response Code M Will be always ‘00’
41 Terminal ID M M
42 Card Acceptor ID Code M
48 Private Use M Should be structured as
mentioned below.

5.2.1. STATISTICS DATA

Field Name Type Length Description


Application Version ans 12 Should contain the application version
Terminal Serial Number ans 12 Should contain the terminal serial number
OS Version Number ans 12 Should contain the OS Version
GMA Version Number ans 10 GMA Version
Access Point Name ans 25 For GPRS connections. If not present then it
should be blank.
ESN Number ans 10 ESN Number
Failed Card Swipes An 2 Count of the failed card swipes / card read
errors
Last 4 digits mis-match An 2 Count of last 4 digits mismatch
Messages In N 2 Incremented for each message sent by the
terminal. Includes all messages, software
loads, initializations, and transactions.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
22 Version: 1.0
HPY NSDL POS Interface

Messages Out N 2 Incremented for each message received by


the terminal. Includes all messages, software
loads, initializations, and transactions.
Transaction Count N 2 Incremented for each authorization / financial
transaction processed by the terminal.
Redials N 2 Incremented for each dial attempt for a
transaction or function.
Communication Error N 2 Incremented for each transaction failure due
to exhausting all dial attempts without a
connection.
Transaction Time-outs N 2 Incremented for each transaction that fails to
receive a response after sending a request,
including reversal timeouts
Time-outs due to Reversal N 2 Incremented for each reversal request that
pending fails to receive a response.
Receive Errors N 2 Incremented for each receive error wherein
the terminal is not able to receive the
incoming data
Response Time Count 1 N 2 Transactions count < 10 seconds
Response Time Count 2 N 2 Transactions count < 20 seconds
Response Time Count 3 N 2 Transactions count < 45 seconds
Response Time Count 4 N 2 Transactions count < 90 seconds
Transactions on Primary N 2 Incremented for each authorization / financial
Telephone Number transaction processed using the primary
telephone number.
Transactions on Secondary N 2 Incremented for each authorization / financial
Telephone Number transaction processed using the secondary
telephone number.
SIM Number ans 25 Should contain the SIM number

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
23 Version: 1.0
HPY NSDL POS Interface

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)

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
24 Version: 1.0
HPY NSDL POS Interface

62 Invoice Number M
63 Private Use O Depending on the System
configuration, the field will be
returned. Example: Surcharge,
Card details

5.3.1. REQUEST DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0102]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0304]
0200:
[Fixed n 6 006] 003 [000000]
[None n 012] 004 [000000150000]
[Fixed n 6 006] 011 [041761]
[Fixed n 3 003] 022 [901]
[Fixed n 3 003] 024 [001]
[Fixed n 2 002] 025 [00]
[LLVAR ans ..37 027] 035 [421621******0023D1212******]
[Fixed ans 8 008] 041 [10042290]
[Fixed ans 15 015] 042 [010123456789123]
[LLLVAR ans ..999 006] 062 [155541]

5.3.2. RESPONSE DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0304]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0102]
0210:
[Fixed n 6 006] 003 [000000]
[None n 012] 004 [000000150000]
[Fixed n 6 006] 011 [041761]
[Fixed n 6 006] 012 [155758]
[Fixed n 4 004] 013 [0225]
[Fixed anp 12 012] 037 [000001023379]
[Fixed ans 6 006] 038 [0000CB]
[Fixed an 2 002] 039 [00]
[Fixed ans 8 008] 041 [10042290]

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
25 Version: 1.0
HPY NSDL POS Interface

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

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
26 Version: 1.0
HPY NSDL POS Interface

5.5. PRE-AUTHORIZATION COMPLETION


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. The settle amount cannot be greater than the pre-authorized amount.
This transaction will be present in the batch.

Bit Data Element Name Request Response Comments


Message Type 0220 0230
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 Completion amount
11 STAN M M Same as original
12 Time, Transaction M M Same as original
13 Date, Transaction M 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 M M Same as original
Number
38 Authorization Code M O Same as original
39 Response Code M Will be present for all the
transactions
41 Terminal ID M M Same as original
42 Card Acceptor ID Code M Same as original
53 Security Info O
55 ICC Data O For EMV cards
56 Batch Number M Terminal’s Current Batch
Number
60 Private Use M It should contain the Original
amount
62 Invoice Number M Same as original

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
27 Version: 1.0
HPY NSDL POS Interface

63 Private Use O Depending on the System


configuration, the field will be
returned. Example: Surcharge,
Card details

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
28 Version: 1.0
HPY NSDL POS Interface

5.6. SALE & CASH


The transaction is used to obtain authorization of a financial transaction. It is an authorization
transaction and when approved is stored in the terminal batch for later settlement. When an approval
is received, it should display the “Authorization Code” (Field 38) on the display and should print the
Merchant copy first. In case of non-pin based cards, it should display “Signature Verified” and should
wait for the Merchant to select “YES” / “NO”. If the merchant selects “YES”, then it should print the
Customer copy. If the merchant selects “NO”, then the terminal must send a VOID of the transaction
and print the VOID charge-slip.
In case of Cash only transaction, the Sale amount must be zero and the amounts present in Field 004
and Field 060 will be the same.
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 09 aa 00
04 Amount, Transaction M O Amount = Sale + Cash
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

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
29 Version: 1.0
HPY NSDL POS Interface

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
60 Private Use O It should contain the Sale
amount or alternatively the
Cash amount can be sent in
Field 63
62 Invoice Number M
61 Private Field O O Will contain AMEX MID (in case
of AMEX transaction)
63 Private Use O O Request
Cash amount can be sent in this
field. The host will pick this field
in case Field 60 is absent.

Response
Depending on the system
configuration, this field will be
set. Example: Surcharge, Card
details

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
30 Version: 1.0
HPY NSDL POS Interface

5.7. VOID, SALE


The Void transaction is used to reverse a previously approved Sale transaction. The VOID transaction
must be sent online to the Host.
Bit Data Element Name Request Response Comments
Message Type 0200 0210
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 02 aa 00
04 Amount, Transaction M O Amount Field must be present
and should be all zeroes
11 STAN M M Same as original
12 Time, Transaction M M
13 Date, Transaction M M
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 M M Same as original
Number
38 Authorization Code M O
39 Response Code O 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
60 Original Amount M
62 Invoice Number M Same as original

5.7.1. REQUEST DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0102]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0304]
0200:

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
31 Version: 1.0
HPY NSDL POS Interface

[LLVAR b ..19 016] 002 *[4216210000000023]


[Fixed n 6 006] 003 [020000]
[None n 012] 004 [000000000000]
[Fixed n 6 006] 011 [003422]
[Fixed n 6 006] 012 [125758]
[Fixed n 4 004] 013 [0301]
[Fixed n 3 003] 022 [901]
[Fixed n 3 003] 024 [001]
[Fixed n 2 002] 025 [00]
[Fixed anp 12 012] 037 [000001024087]
[Fixed ans 6 006] 038 [0000CB]
[Fixed ans 8 008] 041 [10042290]
[Fixed ans 15 015] 042 [010123456789123]
[LLLVAR ans ..999 012] 060 [000000150000]
[LLLVAR ans ..999 006] 062 [125603]

5.7.2. RESPONSE DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0304]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0102]
0210:
[LLVAR b ..19 016] 002 *[4216210000000023]
[Fixed n 6 006] 003 [020000]
[None n 012] 004 [000000150000]
[Fixed n 6 006] 011 [003422]
[Fixed n 6 006] 012 [125758]
[Fixed n 4 004] 013 [0301]
[Fixed anp 12 012] 037 [000001024087]
[Fixed ans 6 006] 038 [0000CB]
[Fixed an 2 002] 039 [00]
[Fixed ans 8 008] 041 [10042290]

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
32 Version: 1.0
HPY NSDL POS Interface

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

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
33 Version: 1.0
HPY NSDL POS Interface

5.8.1. REQUEST DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0102]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0304]
0400:
[LLVAR b ..19 016] 002 *[4216210000000023]
[Fixed n 6 006] 003 [000000]
[None n 012] 004 [000000000000]
[Fixed n 6 006] 011 [044059]
[Fixed n 3 003] 022 [901]
[Fixed n 3 003] 024 [001]
[Fixed n 2 002] 025 [00]
[Fixed ans 8 008] 041 [10042290]
[Fixed ans 15 015] 042 [010123456789123]
[LLLVAR ans ..999 012] 060 [000000150000]
[LLLVAR ans ..999 006] 062 [103044]

5.8.2. RESPONSE DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0304]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0102]
0410:
[LLVAR b ..19 016] 002 *[4216210000000023]
[Fixed n 6 006] 003 [000000]
[None n 012] 004 [000000150000]
[Fixed n 6 006] 011 [044059]
[Fixed n 6 006] 012 [103228]
[Fixed n 4 004] 013 [0302]
[Fixed anp 12 012] 037 [000001024342]
[Fixed ans 6 006] 038 [0000CB]
[Fixed an 2 002] 039 [00]
[Fixed ans 8 008] 041 [10042290]

5.9. TIP ADJUSTMENT


The TIP adjustment transaction is used for restaurant merchants to adjust the TIP. The transaction
must be sent online to the Host and should not be piggy backed.
Bit Data Element Name Request Response Comments
Message Type 0220 0230
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 02 aa 00
04 Amount, Transaction M O Amount = Orig Amt + TIP

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
34 Version: 1.0
HPY NSDL POS Interface

11 STAN M M Same as original


12 Time, Transaction M M
13 Date, Transaction M M
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 M M Same as original
Number
38 Authorization Code M O Same as original
39 Response Code O M Will be present for all the
transactions
41 Terminal ID M M Same as original
42 Card Acceptor ID Code M Same as original
55 ICC Data O For EMV cards
53 Security Info O
56 Batch Number M Terminal’s Current Batch
Number
60 Private Use C It should contain the Original
amount. In case this field is
absent, the terminal must send
Field 63.
62 Invoice Number M Same as original
63 Private Use C See Table ID ‘38’ for TIP. In case
this field is absent, the terminal
must send Field 60.

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
35 Version: 1.0
HPY NSDL POS Interface

5.10. SETTLEMENT REQUEST

Bit Data Element Name Request Response Comments


Message Type 0500 0510
Bitmap M M
03 Processing Code M M 92 00 00
11 STAN M M
12 Time, Local Transaction M Will be sent by the Host in the
format HHMMSS
13 Date, Local Transaction M Will be sent by the Host in the
format MMDD
39 Response Code M Will be sent by the Host
41 Terminal ID M M
42 Card Acceptor ID Code M
60 Batch Number M M Should contain the Terminal
Settlement Batch Number
61 Host Date Time O Date & Time in Format
YYYYMMDDHHMM
63 Totals M Should contain the Terminal
Batch Totals

5.10.1. REQUEST DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0102]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0304]
0500:
[Fixed n 6 006] 003 [920000]
[Fixed n 6 006] 011 [054567]
[Fixed ans 8 008] 041 [10042290]
[Fixed ans 15 015] 042 [010123456789123]
[LLLVAR ans ..999 006] 060 [000001]
[LLLVAR ans ..999 030] 063 [002000000300000000000000000000]

5.10.2. RESPONSE DUMP

[Bcd:0__ n 002 M] : 'TPDU ID' = [60]


[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0304]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0102]
0510:
[Fixed n 6 006] 003 [920000]

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
36 Version: 1.0
HPY NSDL POS Interface

[Fixed n 6 006] 011 [054567]


[Fixed n 6 006] 011 [000794]
[Fixed n 6 006] 012 [131202]
[Fixed an 2 002] 039 [95]
[Fixed ans 8 008] 041 [10042290]
[LLLVAR ans ..999 006] 060 [000001]

5.11. BATCH UPLOAD


The sale transaction is used to obtain authorization of a financial transaction. It is an authorization
transaction and when approved is stored in the terminal batch for later settlement.
Bit Data Element Name Request Response Comments
Message Type 0320 0330
Bitmap M M
02 Primary Account Nr M O Same as original
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 M M Same as original
13 Date, Transaction M M Same as original
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 M Same as original
Number
38 Authorization Code M Same as original
39 Response Code M M Same as original
41 Terminal ID M M Same as original
42 Card Acceptor ID Code M Same as original
49 Transaction Currency O Same as original
53 Security Info O
56 Batch Number M Original Batch Number
62 Invoice Number M Same as original

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
37 Version: 1.0
HPY NSDL POS Interface

5.12. SETTLEMENT, AFTER UPLOAD


After the batch upload has been done, the terminal should send the following details in the settlement
message.

Bit Data Element Name Request Response Comments


Message Type 0500 0510
Bitmap M M
03 Processing Code M M 96 00 00
11 STAN M M
12 Time, Local Transaction M Will be sent by the Host in the
format HHMMSS
13 Date, Local Transaction M Will be sent by the Host in the
format MMDD
37 Retrieval Reference Nr M Will be sent by the Host
39 Response Code M Will be sent by the Host
41 Terminal ID M M
42 Card Acceptor ID Code M
60 Batch Number M M Should contain the Terminal
Settlement Batch Number
61 Host Date Time O Date & Time in Format
YYYYMMDDHHMM
63 Totals M Should contain the Terminal
Batch Totals

5.12.1. REQUEST DUMP


[Bcd:0__ n 002 M] : 'TPDU ID' = [60]
[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0102]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0304]
0500:
[Fixed n 6 006] 003 [960000]
[Fixed n 6 006] 011 [054567]
[Fixed ans 8 008] 041 [10042290]
[Fixed ans 15 015] 042 [010123456789123]
[LLLVAR ans ..999 006] 060 [000001]
[LLLVAR ans ..999 030] 063 [002000000300000000000000000000]

5.12.2. RESPONSE DUMP

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
38 Version: 1.0
HPY NSDL POS Interface

[Bcd:0__ n 002 M] : 'TPDU ID' = [60]


[Bcd:0__ n 004 M] : 'TPDU DESTINATION' = [0304]
[Bcd:0__ n 004 M] : 'TPDU ORIGINATOR' = [0102]
0510:
[Fixed n 6 006] 003 [960000]
[Fixed n 6 006] 011 [054567]
[Fixed n 6 006] 011 [000794]
[Fixed n 6 006] 012 [131202]
[Fixed an 2 002] 039 [95]
[Fixed ans 8 008] 041 [10042290]
[LLLVAR ans ..999 006] 060 [000001]
[LLLVAR ans ..999 030] 063 [002000000300000000000000000000]

5.13. REFUND, OFFLINE

Bit Data Element Name Request Response Comments


Message Type 0220 0230
Bitmap M M
02 Primary Account Nr M O Only when Track data is not
present
03 Processing Code M M 20 aa 00
04 Amount, Transaction M O
11 STAN M M
12 Time, Transaction M HHMMSS
13 Date, Transaction M MMDD
14 Date, Expiry M Only when Track data is not
present. Format  YYMM
22 POS Entry Mode M
24 NII M
25 POS Condition Code M
37 Retrieval Reference C M Original RRN (For RUPAY Cards)
Number
38 Authorization Code M O Auth Code of the Original
transaction
39 Response Code M Will be “00”
41 Terminal ID M M
42 Card Acceptor ID Code M
53 Security Info O

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
39 Version: 1.0
HPY NSDL POS Interface

56 Batch Number M Terminal’s Current Batch


Number
62 Invoice Number M

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
40 Version: 1.0
HPY NSDL POS Interface

6. RESPONSE CODE DESCRIPTION


Given below is the response from the Host and its description.
Sr Response Code Description Terminal Display
No
1 00 Successful / Approved APPROVED <AUTH ID>
2 01 Refer to Card Issuer DECLINE, CALL ISSUER
3 02 Refer to Card Issuer DECLINE, CALL ISSUER
4 03 Invalid Merchant INVALID MID/TID, CALL
HELP
5 04 Pick-up Card PICKUP CARD
6 05 Do not honour DO NOT HONOR
7 06 Error CALL HELP, 06
8 12 Invalid Transaction INVALID TRANSACTION
9 13 Invalid Amount INVALID AMOUNT
10 14 Invalid Card Number INVALID CARD
11 15 No such Issuer BANK NOT SUPPORTED
12 30 Format Error FORMAT ERROR
13 33 Expired Card, Pick-up EXPIRED CARD, PICKUP
14 34 Suspected Fraud, Pick-up SUSPECTED FRAUD, PICKUP
15 36 Restricted Card, Pick-up RESTRICTED CARD, PICKUP
16 38 PIN Tries Exceeded, Pick-up PIN TRIES EXCEEDED
17 39 No Credit Account NO CREDIT ACCOUNT
18 41 Lost Card, Pick-up LOST CARD, PICKUP
19 42 No Universal Account NO ACCOUNT
20 43 Stolen Card, Pick-up STOLEN CARD, PICKUP
21 51 Not Sufficient Funds INSUFFICIENT FUNDS
22 52 No Check Account NO CHECKING ACCOUNT
23 53 No Savings Account NO SAVINGS ACCOUNT
24 54 Expired Card EXPIRED CARD
25 55 Incorrect PIN INCORRECT PIN
26 57 TNP to Cardholder TRANSACTION NOT
PERMITTED TO CARDHOLDER
27 58 TNP on Terminal TRANSACTION NOT
PERMITTED ON TERMINAL
28 59 Suspected Fraud SUSPECTED FRAUD
29 61 Exceeds Withdrawal Limit EXCEEDS LIMIT
30 62 Restricted Card RESTRICTED CARD
31 75 PIN Tries Exceeded PIN TRIES EXCEEDED

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
41 Version: 1.0
HPY NSDL POS Interface

32 91 Issuer Not Available ISSUER / SWITCH


INOPERATIVE
33 92 Routing Error ROUTING ERROR
34 95 Reconcile Error RECONCILE ERROR
35 96 System Malfunction SYSTEM MALFUNCTION
36 98 Exceeds Cash Limit EXCEEDS CASH LIMIT
37 L1 Merchant Daily Limit Exceeded MERCHANT LIMIT EXCEEDED
38 L2 Card Re-use Limit Exceeded CARD REUSE LIMIT
EXCEEDED
39 L3 International Acceptance not INTL CARD ACCEPT
enabled DISABLED

40 89 TID not present on host TID NOT PRESENT, CALL


HELP
41 63 Security Violation, keys either not DEBIT KEY ERROR, CALL
present on terminal, or log on not HELP
done or keys not mapped

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

7.1. ENCRYPTION LOGIC


 The data to be encrypted has to be in multiples of 16 (8 bytes packed). If not, then this has to
be padded with zeroes on the “left”
 Initialization Vector (IV) is set to all zeroes
 Say the clear block is B1 B2 B3 B4 B5
 Encryption Key – E1
 Encryption Logic as below
o X1 = B1 XOR IV
o C1 = Encrypt(X1, E1) – using Triple DES

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
42 Version: 1.0
HPY NSDL POS Interface

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)

Hitachi Payment Services Pvt. Ltd. Company Confidential


Mumbai, India. Document: POS/HPY/TECH/2019/1.0
43 Version: 1.0

You might also like