ISO8583 Message Converter to XML SQL CSV interface specification mapping
Posted on 25th Jan 2022 8201 views
Sample ISO8583 conversion to JSON
This article describes how the ISO8583 Converter creates a JSON object from an incoming TCP/IP ISO8583 binary message, and then sends it to a HTTp host as a POST. Go to ISO8583 converter to JSON for more details and download links.
Analysis of a sample ISO8583 to JSON conversion, from the Converter.
Take the following ISO8583 sample message
06-11-23 06:00:41:068:CNV: Message received by Converter
06-11-23 06:00:41:069:- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
06-11-23 06:00:41:070:CNV: MessageType: 0100
06-11-23 06:00:41:071:CNV: Bitmap: 723C46D128E0B000 [2,3,4,7,11,12,13,14,18,22,23,25,26,28,32,35,37,41,42,43,49,51,52]
06-11-23 06:00:41:072:CNV: F02_PAN: 9876500000306082
06-11-23 06:00:41:073:CNV: F03_ProcessingCode: 010000
06-11-23 06:00:41:074:CNV: F04_AmountTransaction: 000000005000
06-11-23 06:00:41:075:CNV: F07_TransmissionDateTime: 1106060040
06-11-23 06:00:41:077:CNV: F11_SystemTraceAuditNumber: 000004
06-11-23 06:00:41:077:CNV: F12_DateTimeLocalTransaction: 231106
06-11-23 06:00:41:078:CNV: F13_DateLocalTxn: 1106
06-11-23 06:00:41:079:CNV: F14_DateExpiration: 3012
06-11-23 06:00:41:080:CNV: F18_MerchantType: 5961
06-11-23 06:00:41:081:CNV: F22_POSDataCode: 020
06-11-23 06:00:41:082:CNV: F23_CardSequenceNumber: 000
06-11-23 06:00:41:083:CNV: F25_MessageReasonCode: 00
06-11-23 06:00:41:083:CNV: F26_CardAcceptorBusinessCode: 53
06-11-23 06:00:41:084:CNV: F28_DateReconciliation: 000000000
06-11-23 06:00:41:086:CNV:F32_AcquiringInstitutionIdentificationCo: 27610000001
06-11-23 06:00:41:086:CNV: F35_Track2Data: 9876500000306082=30121011123123000
06-11-23 06:00:41:087:CNV: F37_RetrievalReferenceNumber: 004030000000
06-11-23 06:00:41:091:CNV: F41_CardAcceptorTerminalIdentification: 20390059
06-11-23 06:00:41:092:CNV: F42_CardAcceptorIdentificationCode: 111120000012000
06-11-23 06:00:41:093:CNV: F43_CardAcceptorNameLocation: contact@neaPay.comAlmere-AmsterdamNeth
06-11-23 06:00:41:094:CNV: F49_CurrencyCodeTransaction: 566
06-11-23 06:00:41:095:CNV: F51_CurrencyCodeCardholderBilling: 566
06-11-23 06:00:41:095:CNV: F52_PINData: FEE8CA6A604F09F0
06-10-21 06:00:41:096:- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Basic functionality
The way the ISO8583 Converter to JSON works in its basic configuration is to map each ISO 8583 field to a JSON field.
Usually customers want that neapay handles all ISO8583-related data and pre-builds the response message to the acquirer.
Therefore, we compose the reponse message and we convert the response to the HTTP host.
06-10-21 06:00:41:163:CNV: Converted JSON:
[
{
"name": "MessageType",
"value": "0110"
},
{
"name": "Bitmap",
"value": "723040012EE08400"
},
{
"name": "F02_PAN",
"value": "9876500000306082"
},
{
"name": "F03_ProcessingCode",
"value": "010000"
},
{
"name": "F04_AmountTransaction",
"value": "000000005000"
},
{
"name": "F07_TransmissionDateTime",
"value": "1106060041"
},
{
"name": "F11_SystemTraceAuditNumber",
"value": "000004"
},
{
"name": "F12_DateTimeLocalTransaction",
"value": "231106"
},
{
"name": "F18_MerchantType",
"value": "5961"
},
{
"name": "F32_AcquiringInstitutionIdentificationCode",
"value": "27610000001"
},
{
"name": "F35_Track2Data",
"value": "9876500000306082=30121011123123000"
},
{
"name": "F37_RetrievalReferenceNumber",
"value": "004030000000"
},
{
"name": "F38_ApprovalCode",
"value": "594919"
},
{
"name": "F39_ActionCode",
"value": "00"
},
{
"name": "F41_CardAcceptorTerminalIdentification",
"value": "20390059"
},
{
"name": "F42_CardAcceptorIdentificationCode",
"value": "111120000012000"
},
{
"name": "F43_CardAcceptorNameLocation",
"value": "contact@neaPay.comAlmere-AmsterdamNeth"
},
{
"name": "F49_CurrencyCodeTransaction",
"value": "566"
},
{
"name": "F54_AdditionalAmounts",
"value": "0002504C000055102.020001504+000006030701"
}
]
SQL Converter wrote this SQL record to reports//SQLFile-2311060550.sql
INSERT INTO transaction_table
( MessageType,
Bitmap,
F02_PAN,
F03_ProcessingCode,
F04_AmountTransaction,
F07_TransmissionDateTime,
F11_SystemTraceAuditNumber,
F12_DateTimeLocalTransaction,
F18_MerchantType,
F32_AcquiringInstitutionIdentificationCode,
F35_Track2Data,
F37_RetrievalReferenceNumber,
F38_ApprovalCode,
F39_ActionCode,
F41_CardAcceptorTerminalIdentification,
F42_CardAcceptorIdentificationCode,
F43_CardAcceptorNameLocation,
F49_CurrencyCodeTransaction,
F54_AdditionalAmounts)
VALUES
( '0110',
'723040012EE08400',
'9876500000306082',
'010000',
'000000005000',
'1106060041',
'000004',
'231106',
'5961',
'27610000001',
'9876500000306082=30121011123123000',
'004030000000',
'594919',
'00',
'20390059',
'111120000012000',
'contact@neaPay.comAlmere-AmsterdamNeth',
'566',
'0002504C000055102.020001504+000006030701')
XML Converter wrote this XML record to reports//XMLFile-2311060550.XML
MessageType
0110
Bitmap
<bitmap_position>1
723040012EE08400
<F02_PAN>
F02_PAN
<bitmap_position>2
9876500000306082
<F03_ProcessingCode>
F03_ProcessingCode
<bitmap_position>3
010000
<F04_AmountTransaction>
F04_AmountTransaction
<bitmap_position>4
000000005000
<F07_TransmissionDateTime>
F07_TransmissionDateTime
<bitmap_position>7
1106060041
<F11_SystemTraceAuditNumber>
F11_SystemTraceAuditNumber
<bitmap_position>11
000004
<F12_DateTimeLocalTransaction>
F12_DateTimeLocalTransaction
<bitmap_position>12
231106
<F18_MerchantType>
F18_MerchantType
<bitmap_position>18
5961
<F32_AcquiringInstitutionIdentificationCode>
F32_AcquiringInstitutionIdentificationCode
<bitmap_position>32
27610000001
<F35_Track2Data>
F35_Track2Data
<bitmap_position>35
9876500000306082=30121011123123000
<F37_RetrievalReferenceNumber>
F37_RetrievalReferenceNumber
<bitmap_position>37
004030000000
<F38_ApprovalCode>
F38_ApprovalCode
<bitmap_position>38
594919
<F39_ActionCode>
F39_ActionCode
<bitmap_position>39
00
<F41_CardAcceptorTerminalIdentification>
F41_CardAcceptorTerminalIdentification
<bitmap_position>41
20390059
<F42_CardAcceptorIdentificationCode>
F42_CardAcceptorIdentificationCode
<bitmap_position>42
111120000012000
<F43_CardAcceptorNameLocation>
F43_CardAcceptorNameLocation
<bitmap_position>43
contact@neaPay.comAlmere-AmsterdamNeth
<F49_CurrencyCodeTransaction>
F49_CurrencyCodeTransaction
<bitmap_position>49
566
<F54_AdditionalAmounts>
F54_AdditionalAmounts
<bitmap_position>54
0002504C000055102.020001504+000006030701
Standard behaviour of the converter
06-10-21 06:00:41:425:CNV: Rcv Data:[{"name":"MessageType","value":"0110"},{"name":"Bitmap","value":"723040012EE08400"},{"name":"F02_PAN","value":"9876500000306082"},{"name":"F03_ProcessingCode","value":"010000"},{"name":"F04_AmountTransaction","value":"000000005000"},{"name":"F07_TransmissionDateTime","value":"1106060041"},{"name":"F11_SystemTraceAuditNumber","value":"000004"},{"name":"F12_DateTimeLocalTransaction","value":"231106"},{"name":"F18_MerchantType","value":"5961"},{"name":"F32_AcquiringInstitutionIdentificationCode","value":"27610000001"},{"name":"F35_Track2Data","value":"9876500000306082=30121011123123000"},{"name":"F37_RetrievalReferenceNumber","value":"004030000000"},{"name":"F38_ApprovalCode","value":"594919"},{"name":"F39_ActionCode","value":"00"},{"name":"F41_CardAcceptorTerminalIdentification","value":"20390059"},{"name":"F42_CardAcceptorIdentificationCode","value":"111120000012000"},{"name":"F43_CardAcceptorNameLocation","value":"contact@neaPay.comAlmere-AmsterdamNeth"},{"name":"F49_CurrencyCodeTransaction","value":"566"},{"name":"F54_AdditionalAmounts","value":"0002504C000055102.020001504+000006030701"}]
The Issuing host has the ultimate saying and can alter the fields in any way, even add or remove fields.
Our converter takes care of all the logic, but offers the host the power to change anything, if the host chooses to.
The host can reply with all the fields, no fileds, some fields, or just with an empty 200 HTTP response, and the neapay converter will send the response to the ISO8583 host.
06-10-21 06:00:41:444:CNV: Message response sent by Converter
06-10-21 06:00:41:450:- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
06-10-21 06:00:41:450:CNV: MessageType: 0110
06-10-21 06:00:41:451:CNV: Bitmap: 723040012EE08400 [2,3,4,7,11,12,18,32,35,37,38,39,41,42,43,49,54]
06-10-21 06:00:41:452:CNV: F02_PAN: 9876500000306082
06-10-21 06:00:41:453:CNV: F03_ProcessingCode: 010000
06-10-21 06:00:41:453:CNV: F04_AmountTransaction: 000000005000
06-10-21 06:00:41:454:CNV: F07_TransmissionDateTime: 1106060041
06-10-21 06:00:41:455:CNV: F11_SystemTraceAuditNumber: 000004
06-10-21 06:00:41:456:CNV: F12_DateTimeLocalTransaction: 231106
06-10-21 06:00:41:456:CNV: F18_MerchantType: 5961
06-10-21 06:00:41:457:CNV:F32_AcquiringInstitutionIdentificationCo: 27610000001
06-10-21 06:00:41:458:CNV: F35_Track2Data: 9876500000306082=30121011123123000
06-10-21 06:00:41:459:CNV: F37_RetrievalReferenceNumber: 004030000000
06-10-21 06:00:41:459:CNV: F38_ApprovalCode: 594919
06-10-21 06:00:41:460:CNV: F39_ActionCode: 00
06-10-21 06:00:41:463:CNV: F41_CardAcceptorTerminalIdentification: 20390059
06-10-21 06:00:41:464:CNV: F42_CardAcceptorIdentificationCode: 111120000012000
06-10-21 06:00:41:465:CNV: F43_CardAcceptorNameLocation: contact@neaPay.comAlmere-AmsterdamNeth
06-10-21 06:00:41:466:CNV: F49_CurrencyCodeTransaction: 566
06-10-21 06:00:41:467:CNV: F54_AdditionalAmounts: 0002504C000055102.020001504+000006030701
06-10-21 06:00:41:468:- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A sample run of an ISO8583 acquirer simulator, an ISO8583 to HTTP/JSON converter, and a HTTP Host server
A sample decline of the HTTP host
In this example of an Authorization in ISO8583-87 format, the host, which only receives a JSON of the response data, has decided to decline a transaction that the converter has decided to approve.
Therefore, the converter sends back a decline response to the transaction.
The converter can do all MAC, EMV, key exchnages and PIN verification, and the host can receive only transactions that have passed pre-screeening.