Concept of Certification for ISO 8583 in RuPay, MasterCard, and Visa

πŸ”· 1. Understanding ISO 8583

ISO 8583 is a standard for financial transaction message format. Each transaction (e.g., purchase, refund, balance inquiry) is encoded into a message with fields called Data Elements (DEs) (like DE2 for PAN, DE4 for amount, DE22 for POS entry mode, etc.).

πŸ”· 2. What is Certification?

Certification ensures that your terminal, switch, or host system:

  • Communicates correctly with the card scheme’s network.
  • Follows functional, format, and security requirements.
  • Accurately processes different types of card transactions (Online, Offline, PIN, Contactless, Fallback, Reversal, etc.)

πŸ”Ά Steps to Certify RuPay, MasterCard & Visa Cards Using ISO 8583

βœ… Step 1: Understand Scheme-Specific Certification Requirements

Each card network (RuPay, Visa, MasterCard) provides:

  • Certification Test Plans
  • Host Interface Specifications (HIS)
  • Test Cases & Expected Results
  • Field mapping for ISO 8583 (for DE1 to DE128)

βœ… Step 2: Prepare the System for Testing

You need a test-ready environment:

  • POS terminal or acquiring system integrated with your host.
  • Support for all card types: EMV, Contactless (CTLS), Magstripe, Fallback.
  • ISO 8583 message parser and validator.
  • Logs enabled for all DEs.

Each application transaction includes 1 Bitmap, A Bitmap consists of 64 bits from the left starting with bit ‘1’. If any ISO message doesn’t support a secondary bit map processing, then the first bit of the bit map is ‘0’

βœ… Step 3: Execute Test Scenarios

Perform the required functional test cases as per scheme guidelines. Typical test cases:

Test Case TypeDescription
PurchaseOnline EMV with PIN, Offline EMV, CTLS, fallback
ReversalFull/partial reversals with correct DE90
RefundCorrect use of DE2, DE3, DE4, DE22, DE37
Balance InquiryUsing correct processing code (DE3)
Declined TransactionsHandle response codes like 05 (Do not honor), 91 (Issuer unavailable)
PIN Bypass / Offline PINMust reflect in DE22 and EMV DEs
Fallback / Magstripe / ManualProper handling of DE22 and fallback rules
Key Exchange / MAC validationFor secure messaging

βœ… Step 4: Validate ISO 8583 Messages

Ensure:

  • All required fields are present (DE2, DE3, DE4, DE11, DE22, DE35, DE37, DE39, DE41, DE42, DE52, DE55, DE90).
  • DE values follow correct formats (e.g., numeric/ASCII/BCD).
  • Field dependencies are respected (e.g., DE52 with DE53, DE22 with DE55).

βœ… Step 5: Submit Logs to Scheme

Once tests are done:

  • Share ISO 8583 request/response logs.
  • Mention test cases and results.
  • Scheme will verify log compliance.
  • If passed, you receive a certification letter or approval for production.

πŸ’³ Examples for Each Scheme

πŸ”· RuPay

  • Uses NPCI-provided ISO 8583 specs.
  • May involve certifications like: POS Certification, Host Certification, Terminal Integration Certification.
  • Done via RITS (RuPay Integration Test System).

πŸ”· Visa

  • Uses VTS (Visa Test System).
  • Test message formats follow VisaNet standards.
  • Visa provides simulation tools for test card profiles.

πŸ”· MasterCard

  • Certification through MCPS (MasterCard Certification Platform System).
  • Test plans managed in MasterCard’s CollabNet portal.
  • Focus on EMV contact, CTLS, Online/Offline, and Risk Management.

πŸ“Œ Summary

StepAction
1.Study scheme ISO 8583 specs and certification test plans
2.Set up test environment with logging and validation
3.Execute all required test cases (EMV, CTLS, fallback, refund, etc.)
4.Verify DE fields, values, and formatting for ISO 8583 compliance
5.Submit logs for review and get certified

βœ… Sample ISO 8583 Log for EMV Chip Transaction with PIN

πŸ“Œ Message Type Indicator (MTI):

javaCopyEdit0200 β€” Financial Transaction Request (Purchase)

πŸ“‹ Sample Data Elements Breakdown:

DE#Field NameSample ValueDescription
2Primary Account Number539999XXXXXX1234PAN (masked)
3Processing Code000000Purchase
4Transaction Amount000000010000β‚Ή100.00
7Transmission Date & Time0617171032MMDDhhmmss
11STAN (System Trace Audit)123456Unique for each transaction
14Expiry Date2608YYMM
22POS Entry Mode553EMV chip with PIN
23Card Sequence Number001Optional
25POS Condition Code00Normal
35Track 2 Data539999XXXXXX1234=26081234567890123456
37Retrieval Ref Number123456789012RR Number
38Authorization ID Response654321Provided by issuer
39Response Code00Approved
41Terminal IDTERM12348-char
42Merchant IDMRC12345678901215-char
52PIN DataFFFFFFFFFFFFFFFFEncrypted
55ICC Data9F2608AABBCCDDEEFF…EMV tag data
90Original Data ElementsFor reversal/refund
128MAC (Message Auth Code)A1B2C3D4E5F60789Optional in RuPay

🧾 Sample Raw ISO 8583 Log (Hex Dump Representation)

ISO 8583 Message
MTI: 0200
Bitmap: B238000108C00000

DE 02: 5399991234 DE 03: 000000 DE 04: 000000010000 DE 07: 0617171032 DE 11: 123456 DE 14: 2608 DE 22: 553 DE 23: 001 DE 25: 00 DE 35: 5399991234=26081234567890123456
DE 37: 123456789012
DE 38: 654321
DE 39: 00
DE 41: TERM1234
DE 42: MRC123456789012
DE 52: FFFFFFFFFFFFFFFF
DE 55: 9F2608AABBCCDDEEFF1122…
DE 90:
DE 128: A1B2C3D4E5F60789

βœ… Certification Focus Points

  • DE22 = 553 β†’ Must match EMV with PIN
  • DE55 β†’ Contains all required EMV tags like 9F26, 9F27, 9F10, 5F2A, etc.
  • DE52 β†’ Encrypted PIN block present
  • DE39 = 00 β†’ Transaction approved
  • MTI = 0200 β†’ Request
  • MTI = 0210 β†’ (response, not shown here)

Let me know if you want:

  • Sample Reversal (MTI 0400)
  • Sample Fallback Transaction (DE22 = 620 or 623)
  • Sample CTLS (Contactless) Transaction (DE22 = 911/913)
  • Sample Declined Response (DE39 = 05/91)

βœ… EMV TLV Parser – Explanation & Sample Tool Format

EMV TLV stands for Tag-Length-Value format used in EMV transactions, especially in DE55 (Data Element 55) of ISO 8583, which contains ICC (Integrated Circuit Card) data.


πŸ” What is TLV?

Each EMV TLV block is structured as:

cssCopyEdit[Tag] [Length] [Value]
  • Tag: 1–3 bytes (identifies the data type, e.g., 9F26)
  • Length: 1 byte or more (length of value in bytes)
  • Value: Actual data (hexadecimal, depends on Tag)

πŸ”– Example TLV String (DE55 / EMV Data)

CopyEdit9F2608AABBCCDDEEFF11229F2701809F101307010103A0A800010A010000000000BF9F3704AABBCCDD9F3602001E950500000480009A031906179C01009F02060000001000005F2A020356820239009F1A020356

🧾 Parsed Output:

TagLengthValueDescription
9F2608AABBCCDDEEFF1122Application Cryptogram
9F270180Cryptogram Information Data
9F101307010103A0A800010A01…Issuer Application Data
9F3704AABBCCDDUnpredictable Number
9F3602001EApplication Transaction Counter
95050000048000Terminal Verification Results
9A03190617Transaction Date
9C0100Transaction Type
9F0206000000100000Amount Authorized
5F2A020356Transaction Currency Code (INR)
82023900Application Interchange Profile
9F1A020356Terminal Country Code (INR)

βœ… Tag 95 – TVR (Terminal Verification Results) Decoder in EMV

The Terminal Verification Results (TVR) is a 5-byte (40-bit) bitmap that indicates the status of various checks performed by the terminal during a chip card transaction.


πŸ“Œ Structure of TVR (Tag 95)

TVR = 95 05 <value>

  • Length: 5 bytes = 40 bits
  • Each bit has a predefined meaning according to EMVCo specification.

πŸ“‹ TVR Bit Mapping

ByteBitMeaning
Byte 18Offline data authentication was not performed
7SDA failed
6ICC data missing
5Card appears on terminal exception file
4DDA failed
3CDA failed
2Reserved
1Reserved
Byte 28ICC and terminal have different application versions
7Expired application
6Application not yet effective
5Requested service not allowed for card product
4New card
3Reserved
2Reserved
1Reserved
Byte 38Cardholder verification was not successful
7Unrecognized CVM
6PIN Try Limit exceeded
5PIN entry required and PIN pad not present or not working
4PIN entry required, PIN pad present, but PIN was not entered
3Online PIN entered
2Reserved
1Reserved
Byte 48Transaction exceeds floor limit
7Lower consecutive offline limit exceeded
6Upper consecutive offline limit exceeded
5Transaction selected randomly for online processing
4Merchant forced transaction online
3Reserved
2Reserved
1Reserved
Byte 58Default TDOL used
7Issuer authentication failed
6Script processing failed before final GENERATE AC
5Script processing failed after final GENERATE AC
4-1Reserved

πŸ§ͺ Example Decode

Input:

nginxCopyEditTag 95 = 0000048000

Step-by-step:

  1. Convert hex 0000048000 to binary: iniCopyEdit00 = 00000000 00 = 00000000 04 = 00000100 80 = 10000000 00 = 00000000
  2. Merge bits into bitfields: pgsqlCopyEditByte 1: 00000000 β†’ All OK Byte 2: 00000000 β†’ All OK Byte 3: 00000100 β†’ Bit 6 set = PIN Try Limit Exceeded ❗ Byte 4: 10000000 β†’ Bit 8 set = Transaction exceeds floor limit ⚠️ Byte 5: 00000000 β†’ All OK

πŸ” Decoded Result:

  • βœ… SDA, DDA, CDA β†’ Passed
  • ❌ PIN Try Limit Exceeded
  • ⚠️ Floor Limit Exceeded (went online)

βœ… ISO 8583 Bitmap – Detailed Explanation with Example

The ISO 8583 bitmap is a crucial component of the message that indicates which data elements (DEs) are present in the transaction.


🧾 What is a Bitmap in ISO 8583?

  • It’s a 64-bit (or 128-bit for extended bitmap) binary map.
  • Each bit position corresponds to a Data Element (DE).
  • If bit n = 1, then DE n is present in the message.

πŸ“˜ Types of Bitmaps

TypeBitsHexadecimal Length
Primary Bitmap6416 bytes (hex)
Secondary Bitmap6416 bytes (hex)
Tertiary Bitmap64Rarely used
  • If bit 1 (MSB) is set β†’ Secondary Bitmap is present

πŸ“Œ Sample Hex Bitmap (Primary)

makefileCopyEditHex: F23C048108C00000

Step 1: Convert Hex to Binary

makefileCopyEditF2 = 11110010  
3C = 00111100  
04 = 00000100  
81 = 10000001  
08 = 00001000  
C0 = 11000000  
00 = 00000000  
00 = 00000000  

Combined (64-bit):  
11110010 00111100 00000100 10000001 00001000 11000000 00000000 00000000

Step 2: Determine Active Data Elements

Bit #StatusMeaning
11Secondary bitmap present (DE 65–128 may exist)
21DE 2 β†’ PAN
31DE 3 β†’ Processing Code
41DE 4 β†’ Amount
71DE 7 β†’ Transmission Date & Time
111DE 11 β†’ STAN
141DE 14 β†’ Expiry Date
221DE 22 β†’ POS Entry Mode
251DE 25 β†’ POS Condition Code
351DE 35 β†’ Track 2 Data
371DE 37 β†’ Retrieval Ref #
411DE 41 β†’ Terminal ID
421DE 42 β†’ Merchant ID
0All other DEs not present

πŸ§ͺ Visual Bitmap Representation

plaintextCopyEditBit #:  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 ...
Value:  1  1  1  1  0  0  1  0  0  0  1  1  1  1  0  0 ...

πŸ› οΈ Bitmap Calculation Example

If your message has DEs: 2, 3, 4, 11, 41

  • Set bits: 2, 3, 4, 11, 41
  • Convert to binary bitmap β†’ 64 bits
  • Convert to hex β†’ 16 characters (primary bitmap)

βœ… Summary

  • Each bit in bitmap tells if DE is present.
  • Bitmaps help parse ISO messages dynamically.
  • Common tools: Wireshark, Hex editors, or custom parsers.

Leave a Comment