Thursday, October 6, 2016

ISO 8583 - Financial Transaction Message Format


ISO 8583 – Specifies a common interface by which financial transaction card originated messages may be interchanged between acquirers and card issuers.
  • Widely used financial transaction message format.
  • These financial message are being exchanged between source and destination whenever a card originated transaction is being invoked. Card originated transactions not only includes purchase, withdrawal, deposit, refund, reversal, balance inquiry, payments and inter-account transfers but also defines system-to-system messages for secure key exchanges, reconciliation of totals, network sign-on/sign-off and other administrative messages.
  • This standard is officially titled as Financial Transaction Card Originated Messages — Interchange Message Specifications.
  • An ISO 8583 message is structured in following way

    • Message Header – is network specific that’s why visa & master-card use different message header structure.
    • Message Type Indicator (MTI) – classifies the high level function of the message. It has four parts.
§  Digit 1 indicates version of the ISO 8583
§  Digit 2 indicates class of message
§  Digit 3 indicates function of the message
§  Digit 4 indicates who initiated the communication
    • Bitmaps - One or more bitmaps indicating which data elements are present in the message.
    • Data elements or fields – The individual fields that carrying the transaction information.

MTI (Message Type Indicator)
A four digit numeric field which classifies the high level function of the message.

  • Digit 1 of MTI – Version Number
Digit
Meaning
0xxx
ISO 8583:1987 version
1xxx
ISO 8583:1993 version
2xxx
Reserved for ISO use
3xxx
Reserved for ISO use
4xxx
Reserved for ISO use
5xxx
Reserved for ISO use
6xxx
Reserved for ISO use
7xxx
Reserved for ISO use
8xxx
Reserved for national use
9xxx
Reserved for private use
  • Digit 2 of MTI – Message Class
    • Defines purpose of the message
    • Below is the complete list which is taken from wikipedia
Digit
Meaning
Usage
x0xx            
Reserved by ISO

x1xx
Authorization message
Determine if funds are available, get an approval but do not post to account for reconciliation, Dual Message System (DMS), awaits file exchange for posting to account
x2xx
Financial messages
Determine if funds are available, get an approval and post directly to the account, Single Message System (SMS), no file exchange after this
x3xx
File Actions Message
Used for hot-card, TMS and other exchanges
x4xx
Reversal and Chargeback Messages
Reversal (x4x0 or x4x1): Reverses the action of a previous authorization.
Chargeback (x4x2 or x4x3): Charges back a previously cleared financial message.
x5xx
Reconciliation Message
Transmits settlement information message
x6xx
Administrative Message
Transmits administrative advice. Often used for failure messages (e.g. message reject or failure to apply)
x7xx
Fee Collection Messages

x8xx
Network Management Message
Used for secure key exchange, logon, echo test and other network functions
x9xx
Reserved by ISO

  •  Digit 3 of MTI – Message Function
    • Defines how the message should flow within the system.
    • Below is the complete list which is taken from wikipedia
Digit
Meaning
Xx0x     
Request
xx1x
Request response
xx2x
Advice
xx3x
Advice response
xx4x
Notification
X5xx
Notification Acknowledgement
xx6x
Instruction (ISO 8583:2003 only)
xx7x
Instruction Acknowledgement (ISO 8583:2003 only)
xx8x
Reserved for ISO use. (Some implementations use for Response acknowledgment)
xx9x
Reserved for ISO use. (Some implementations use for Negative acknowledgment)

  •  Digit 4 of MTI – Message Origin
    • The location of the message source within the payment chain.
    • Below is the complete list taken from wikipedia 
Digit
Meaning
xxx0
Acquirer
xxx1
Acquirer Repeat
xxx2
Issuer
xxx3
Issuer Repeat
xxx4
Other
xxx5
Other Repeat

Example: MTI 0410 indicates
0xxx -> version of ISO 8583 (for example: 1987 version)
X4xx -> class of the Message (for example: Reversal Message)
xx1x -> function of the Message (for example: Request Response)
xxx0 -> who began the communication (for example: Acquirer)


Bitmaps: MTI is followed by the bitmap that indicates which elements are present or absent in the body of the message.
  • A bitmap is an 8 byte binary value or 16 byte hexadecimal string that indicates the presence or absence of the data elements in the body of the message.
  • The first bitmap is known as “primary bitmap” which represents the first 64 data elements of the message. This is mandatory bitmap.
  • Second bitmap is known as “Secondary Bitmap” which indicates the data elements from 65 till 128. This bitmap is only present if any of the 65 till 128 fields are present in the message.
  • The third bitmap is known as 'Ternary bitmap' which indicates the data elements from 128 till 192. This bitmap is only present if any of the 128 till 192 fields are present in the message.
  • The first bit of every bitmap signifies the presence of the next bitmap. Example: If for first bitmap the first bit’s values is 1 that means the second bitmap is present, if the values is 0 the second bitmap is not present.


Data Elements: Individual fields carrying the transaction information.
  • The bitmap is always followed by the series of data elements or fields.
  • There are up to 192 data elements are defined in ISO 8583 standard which means a message can have maximum of 3 bitmaps in it.
  • Most of the elements have a specific purpose in the standard.
  • There are also some data elements which are general purpose and their use varies from implementation to implementation.
  • Each data element is represented in a standard format which defines permitted content of the field (numeric, binary, etc.) and the field length (variable or fixed).
  • Data elements format can be combination of one or more of these types listed below (List is compiled from wikipedia)

Type Abbreviation
Meaning
A
Alpha, including blanks
N
Numeric values only
S
Special characters only
an
Alphanumeric
as
Alpha & special characters only
ns
Numeric and special characters only
ans
Alphabetic, numeric and special characters.
B
Binary data
Z
Tracks 2 and 3 code set as defined in ISO/IEC 7813 and ISO/IEC 4909 respectively
. or .. or ...
Variable field length indicator, each . indicating a digit.
x or xx or xxx
Fixed length of field or maximum length in the case of variable length fields
H
Hex data
LL, LLL
Length of variable field that follows. ‘LL’ - Two-digit length indicator (1 byte BCD) ‘LLL - 3-digit length indicator (2 bytes BCD)
LLVAR or (..xx) 
Where 0 < LL < 100, means two leading digits LL specify the field length of field VAR
LLLVAR or (...xxx)
Where 0 < LLL < 1000, means three leading digits LLL specify the field length of field VAR
Fixed
No field length used

  • Each field may be either fixed or variable length. If variable, the length of the field will be preceded by a length indicator. Example: n..19, LLVAR which means a field with a maximum of 19 numeric digits with a 2-digit length indicator.
  • Below is the list of ISO defined data elements (List is being compiled from wikipedia):
Bit
Type
Name (Usage)
Format
1
b 64
Bitmap Indicator ( b 128 if secondary is present and b 192 if tertiary is present)
Fixed length binary field of 64 bits in length
2
n ..19
Primary account number (PAN)
LLVAR numeric field of up to 19 digits in length
3
n 6
Processing code
Fixed length field of 6 digits
4
n 12
Amount transaction
Fixed length field of 12 digits
5
n 12
Amount settlement
Fixed length field of 12 digits
6
n 12
Amount cardholder billing
Fixed length field of 6 digits
7
n 10
Transmission date & time
MMDDhhmmss (Fixed length field of 8 digits)
8
n 8
Amount cardholder billing fee
Fixed length field of 8 digits
9
n 8
Conversion rate settlement
Fixed length field of 8 digits
10
n 8
Conversion rate cardholder billing
Fixed length field of 8 digits
11
n 6
Systems trace audit number
Fixed length field of 6 digits
12
n 6
Time local transaction
Hhmmss (Fixed length of 6 digit)
13
n 4
Date local transaction
MMDD (Fixed length field of 4 digits)
14
n 4
Date expiration
YYMM (Fixed length field of 4 digits)
15
n 4
Date settlement
MMDD (Fixed length field of 4 digits)
16
n 4
Date conversion
MMDD (Fixed length field of 4 digits)
17
n 4
Date capture
MMDD (Fixed length field of 4 digits)
18
n 4
Merchant type
Fixed length field of  4 digits
19
n 3
Acquiring institution country code
Fixed length field of 3 digits
20
n 3
Primary account number (PAN) extended country code
Fixed length field of 3 digits
21
n 3
Forwarding institution country code
Fixed length field of 3 digits
22
n 3
Point of service entry mode
Fixed length field of 3 digits
23
n 3
Card sequence number
Fixed length field of 3 digits
24
n 3
Function code (ISO 8583:1993)/Network International identifier (NII)
Fixed length field of 3 digits
25
n 2
Point of service condition code
Fixed length field of 2 digits
26
n 2
Point of service capture code
Fixed length field of 3 digits
27
n 1
Authorizing identification response length
Fixed length field of 1 digit
28
n 8
Amount transaction fee
Fixed length field of 8 digits
29
n 8
Amount settlement fee
Fixed length field of 8 digits
30
n 8
Amount transaction processing fee
Fixed length field of 8 digits
31
n 8
Amount settlement processing fee
Fixed length field of 3 digits
32
n ..11
Acquiring institution identification code
LLVAR (numeric field of up to 11 digits in length)
33
n ..11
Forwarding institution identification code
LLVAR (numeric field of up to 11 digits in length)
34
n ..28
Primary account number extended
LLVAR (numeric field of up to 11 digits in length)
35
z ..37
Track 2 data
LLVAR
36
z ..104
Track 3 data
LLLVAR
37
an 12
Retrieval reference number
Fixed length field of 12 alphanumeric characters
38
an 6
Authorization identification response
Fixed length field of 6 alphanumeric characters
39
an 2
Response code
Fixed length field of 2 alphanumeric characters
40
an 3
Service restriction code
Fixed length field of 3 alphanumeric characters
41
ans 16
Card acceptor terminal identification
Fixed length field of 16 Alphabetic, numeric and special characters
42
ans 15
Card acceptor identification code
Fixed length field of 15 Alphabetic, numeric and special characters
43
ans 40
Card acceptor name/location
Fixed length field of 40 Alphabetic, numeric and special characters
44
an ..25
Additional response data
LLVAR (alphanumeric field of up to 25 characters in length)
45
an ..76
Track 1 data
LLVAR (alphanumeric field of up to 76 characters in length)
46
an ..999
Additional data ISO
LLVAR (alphanumeric field of up to 999 characters in length)
47
an ..999
Additional data national
LLVAR (alphanumeric field of up to 999 characters in length)
48
an ..999
Additional data private
LLLVAR (alphanumeric field of up to 999 characters in length)
49
an 3
Currency code transaction
Fixed length field of 3 alphanumeric characters
50
an 3
Currency code settlement
Fixed length field of 3 alphanumeric characters
51
a 3
Currency code card holder billing
Fixed length field of 3 characters 
52
b 16
Personal identification number (PIN) data
Fixed length field of binary data with 16 bits
53
n 18
Security related control information
Fixed length field of 18 digits
54
an ..120
Additional amounts
LLLVAR (alphanumeric field of up to 999 characters in length)
55-56
ans ..999
Reserved for ISO use
LLLVAR (alphanumeric field of up to 999 characters in length)
57-59
ans ..999
Reserved for national use
LLLVAR (alphanumeric field of up to 999 characters in length)
60-63
ans ..999
Reserved for private use
LLLVAR (alphanumeric field of up to 999 characters in length)
64
b 16
Message authentication code (MAC) field
Fixed length field of binary data with 16 bits
65

Reserved for ISO use

66
n 1
Settlement code
Fixed length field of 1 digits 
67
n 2
Extended payment code
Fixed length field of 2 digits 
68
n 3
Receiving institution country code
Fixed length field of 3 digits 
69
n 3
Settlement institution country code
Fixed length field of 3 digits 
70
n 3
Network management information code
Fixed length field of 3 digits 
71
n 4
Message number
Fixed length field of 4 digits 
72
ans ..999
Data record
LLLVAR (alphabets, numeric & special characters field of up to 999 characters in length)
73
n 6
Date action
YYMMDD (Fixed length field of 6 digits)
74
n 10
Credits number
Fixed length field of 10 digits 
75
n 10
Credits reversal number
Fixed length field of 10 digits 
76
n 10
Debits number
Fixed length field of 10 digits
77
n 10
Debits reversal number
Fixed length field of 10 digits 
78
n 10
Transfer number
Fixed length field of 10 digits 
79
n 10
Transfer reversal number
Fixed length field of 10 digits 
80
n 10
Inquiries number
Fixed length field of 10 digits 
81
n 10
Authorizations number
Fixed length field of 10 digits 
82
n 12
Credits processing fee amount
Fixed length field of 12 digits 
83
n 12
Credits transaction fee amount
Fixed length field of 12 digits 
84
n 12
Debits processing fee amount
Fixed length field of 12 digits 
85
n 12
Debits transaction fee amount
Fixed length field of 12 digits 
86
n 15
Credits amount
Fixed length field of 15 digits 
87
n 15
Credits reversal amount
Fixed length field of 15 digits 
88
n 15
Debits amount
Fixed length field of 15 digits 
89
n 15
Debits reversal amount
Fixed length field of 15 digits 
90
n 42
Original data elements
Fixed length field of 42 digits 
91
an 1
File update code
Fixed length field of 1 alphanumeric string
92
n 2
File security code
Fixed length field of 2 digits 
93
n 5
Response indicator
Fixed length field of 5 digits
94
an 7
Service indicator
Fixed length field of 7 alphanumeric string
95
an 42
Replacement amounts
Fixed length field of 42 alphanumeric string
96
an 8
Message security code
Fixed length field of 8 alphanumeric string
97
n 16
Amount net settlement
Fixed length field of 16 digits 
98
ans 25
Payee
Fixed length field of 24 alphabets, numeric, and special character string
99
n ..11
Settlement institution identification code
LLVAR
100
n ..11
Receiving institution identification code
LLVAR
101
ans ..99
File name
LLVAR
102
ans ..28
Account identification 1
LLVAR
103
ans ..28
Account identification 2
LLVAR
104
ans ..999
Transaction description
LLLVAR
105-111
ans ..999
Reserved for ISO use

112-119
ans ..999
Reserved for national use

120-127
ans ..999
Reserved for private use

128
b 16
Message authentication code (MAC) field









No comments:

Post a Comment