Click here to Skip to main content
15,122,335 members
Articles / Programming Languages / C#
Posted 3 May 2012


15 bookmarked


Rate me:
Please Sign up or sign in to vote.
4.79/5 (12 votes)
25 Mar 2013BSD
Implementation of ISO8583 in .NET


BIM-ISO8583.NET is a .NET library that allows developers to parse and create ISO8583 messages.

This library was released to help financial system developers to fully comply with ISO 8583 protocol's standard and make development fast and easy.


The program method and technique used in this library were developed by Bim Garcia. He aims to establish a significant contribution for the enhancement and advancement of the present technology specifically in the financial industry. 

Using the Library

Here's how to use the library:  

  1. Download full source code of library (click here to download)
  2. Use the codes below.

Create an ISO8583 message:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BIM_ISO8583;

namespace Sample_ISO8583_Message_Builder
    class Program
        static void Main(string[] args)
            //1. Set/Define Data
            //Message Type Identifier (Financial Message Request)
            string MTI = "0200";
            //Primary Account No or Card No. [DE #2]
            string PAN ="60197105032103634";
            //Processing Code.[DE #3] (Purchase Transaction, Savings)
            string ProCode= "001000";
            //Transaction Amount.[DE #4] (X100) (ex: $150.75 = 15075 or
            // 000000015075)  or simply remove the decimal.
            string Amount ="15075";    
            //Transmission Date and Time.[DE #7] (format: MMDDhhmmss)
            string DateTime ="0429104720";
            //System Trace Audit No.[DE #11] (456 or 000456)
            string STAN ="456";
            //Terminal ID. [DE #41]    
            string TID="44449999";
            //Point of Service Entry Mode. [DE #22] (02 - Magnetic Stripe)
            string POSEM = "02";

            //2.Create an object BIM-ISO8583.ISO8583
            BIM_ISO8583.NET.ISO8583 iso8583 = new BIM_ISO8583.NET.ISO8583();

            //3. Create Arrays
            string[] DE = new string[130];

            //4. Assign corresponding data to each array
            //   Ex: ISO8583 Data Element No.2 (PAN) shall assign to newly created array, DE[2];

            DE[2] = PAN;
            DE[3] = ProCode;
            DE[4] = Amount;
            DE[7] = DateTime;
            DE[11] = STAN;
            DE[22] = POSEM;
            DE[41] = TID;

            //5.Use "Build" method of object iso8583 to create a new  message.
            string NewISOmsg= iso8583.Build(DE, MTI);
            Console.WriteLine("Build ISO8583 Message");
            Console.WriteLine( NewISOmsg);

Parse an ISO8583 message:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BIM_ISO8583;

namespace Parser
    class Program
        static void Main(string[] args)
            //<<< 1. Create an object of iso8583 >>>>
            BIM_ISO8583.NET.ISO8583 iso8583 = new BIM_ISO8583.NET.ISO8583();

            //2.<<< Prepare ISO8583 message to be parsed >>>
            string ISO8583Message = "0200722004000080000016601971" + 
            //3. <<< Declare String Arrays >>>
            string[] DE;

            //4. <<< Use "Parse" method of object iso8583. >>>
            DE = iso8583.Parse(ISO8583Message);

            //That was it!!!

            //If there is no error occurred then you have successfully parsed a valid ISO8583 message

            //Here's how to use the newly parsed ISO8583 Data Elements
            string PrimaryBitMap = DE[0];
            string SecondaryBitMap = DE[1];
            string PAN = DE[2];
            string ProcessingCode = DE[3];
            string Amount = DE[4];
            string TransmissionTime = DE[7];
            string SystemTraceNo = DE[11];
            string TerminalID = DE[41];
            string MerchantID = DE[42];
            string AdditionalData = DE[48];
            string MTI = DE[129];               

            //Displaying  Data Elements
            Console.WriteLine("Please Press 'ENTER' to continue...");
            Console.WriteLine(" PrimaryBitMap = DE[0]" + " = {0}", DE[0]);
            Console.WriteLine(" SecondaryBitMap = DE[1]" + "= {0}", DE[1]);
            Console.WriteLine(" PAN = DE[2]" + "= {0}", DE[2]);
            Console.WriteLine(" ProcessingCode = DE[3]" + "= {0}", DE[3]);
            Console.WriteLine(" Amount = DE[4]" + "= {0}", DE[4]);
            Console.WriteLine(" TransmissionTime = DE[7]" + "= {0}", DE[7]);
            Console.WriteLine(" SystemTraceNo = DE[11]" + "= {0}", DE[11]);
            Console.WriteLine(" TerminalID = DE[41]" + "= {0}", DE[41]);
            Console.WriteLine(" MerchantID = DE[42]" + "= {0}", DE[42]);
            Console.WriteLine(" AdditionalData = DE[48]" + "= {0}", DE[48]);


This article, along with any associated source code and files, is licensed under The BSD License


About the Author

Bim Garcia
Software Developer (Senior)
Philippines Philippines
Bim has over 20 years of software development experience, with 15 years spent in the eBanking and payments space.

He has extensive experience developing banking and payment solutions, co-engineered a military-grade Secure Cryptographic Device, and authored BIMISO8583.NET and .JAVA libraries.

He is also a co-founder in three alpha-stage blockchain startups, including the Philippines first offline Bitcoin Wallet.

Currently, he is working with one of the most innovative Supply Chain and Logistic technology Providers (SCLTP).

Comments and Discussions

QuestionISO8583 Pin
Member 830019912-Jun-21 4:19
MemberMember 830019912-Jun-21 4:19 
Questioni try ur lib but error found Pin
eliezery180728-Jun-19 10:06
Membereliezery180728-Jun-19 10:06 
QuestionISO8583 Pin
Member 1180360723-Jan-19 7:45
MemberMember 1180360723-Jan-19 7:45 
AnswerRe: ISO8583 Pin
Bim Garcia24-Feb-19 2:58
MemberBim Garcia24-Feb-19 2:58 
QuestionIve got problem of data type in bitmap 035... Pin
Member 916701730-Jul-18 20:15
MemberMember 916701730-Jul-18 20:15 
AnswerRe: Ive got problem of data type in bitmap 035... Pin
Bim Garcia24-Feb-19 2:56
MemberBim Garcia24-Feb-19 2:56 
QuestionISO8583 2003 version Pin
chris2476-Aug-17 9:17
Memberchris2476-Aug-17 9:17 
QuestionHow to add sub fields in 127DE i.e. 127.2, 127.33 etc Pin
Er. Imran Khan16-Jan-17 21:59
professionalEr. Imran Khan16-Jan-17 21:59 
QuestionHow to implement ISO8583_93 Pin
Member 1231604710-Feb-16 2:07
MemberMember 1231604710-Feb-16 2:07 
QuestionSending the parsed ISO 8583 Message to a switch. Pin
Islam Kiracho29-Jan-16 4:15
MemberIslam Kiracho29-Jan-16 4:15 
QuestionISO8583 BizTalk Parser Pin
Member 1191437617-Aug-15 2:32
MemberMember 1191437617-Aug-15 2:32 
QuestionConvert hexa to 8583 message Pin
Zobayer Rabbi5-Aug-15 19:29
MemberZobayer Rabbi5-Aug-15 19:29 
QuestionSome Field in ISO8583 Pin
leontiy_leo14-Apr-15 5:05
Memberleontiy_leo14-Apr-15 5:05 
QuestionSend using socket or winsock Pin
DebugMePls3-Mar-15 15:15
MemberDebugMePls3-Mar-15 15:15 
QuestionUsing the dll in passbook printing application Pin
Black_Rose15-Sep-14 21:05
MemberBlack_Rose15-Sep-14 21:05 
QuestionHow to know at what index to set which value? Pin
Ibrahim Islam28-Jun-14 23:27
MemberIbrahim Islam28-Jun-14 23:27 
AnswerRe: How to know at what index to set which value? Pin
CDMTJX25-Sep-15 12:06
MemberCDMTJX25-Sep-15 12:06 
QuestionDynamic Message Length Pin
nonintrusive24-Dec-13 23:13
Membernonintrusive24-Dec-13 23:13 
QuestionHow to Add headers details Pin
khan khateeb21-Jul-13 22:32
Memberkhan khateeb21-Jul-13 22:32 
QuestionField 123 and 127 Pin
Programm3r22-Apr-13 22:52
MemberProgramm3r22-Apr-13 22:52 
QuestionDoubts on ISO8583 standard Pin
Amajaya12321-Feb-13 20:40
MemberAmajaya12321-Feb-13 20:40 
AnswerRe: Doubts on ISO8583 standard Pin
Bim Garcia10-Apr-13 19:18
MemberBim Garcia10-Apr-13 19:18 
GeneralRe: Doubts on ISO8583 standard Pin
George Panou14-Oct-14 5:45
MemberGeorge Panou14-Oct-14 5:45 
QuestionEBCDIC Pin
Member 390018714-Dec-12 21:49
MemberMember 390018714-Dec-12 21:49 
AnswerRe: EBCDIC Pin
Bim Garcia15-Jan-13 21:46
MemberBim Garcia15-Jan-13 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.