Message formats
Every switch speaks ISO 8583, but each writes it its own way: plain text or packed digits, ASCII or EBCDIC, a two-byte or four-digit length in front. A message format tells SwitchProof how your switch does it. Get it right once, and every test uses it.
Start with a real message. Ask for one request from your switch's trace or log, as hex. With it you can check a format before anything is sent: SwitchProof reads it field by field and shows where it stops.
The built-in formats
| Format | For |
|---|---|
| FLEXCUBE | The Oracle FLEXCUBE ATM/POS switch interface (ISO 8583:1987). Checked byte for byte against the FLEXCUBE switch and used on bank UAT. |
| ISO 1987 | The 1987 standard dictionary. Every field that is set is sent. |
| ISO 1993 | The 1993 standard: message types 1xxx, function codes, 3-digit action codes. |
| ISO 2003 | Message types 2xxx on the 1993 field layout. |
All four write plain text with a binary bitmap. If your switch does too and its fields match, pick one for your target and you're done.
Making your own format
In the console, open Target (top right), then New format under the format list.
- Start from the built-in format closest to your switch, and give it a name.
- How your switch writes messages: the settings below. Leave a setting alone if you're not sure.
- Check with a message from your switch: paste the hex. Each field shows what it reads as. Where reading stops, the field is marked with the reason and other formats to try. Change formats until every field reads, then Save format.
See what SwitchProof sends shows a sample balance inquiry in your format, part by part, to hold against your switch's specification. Nothing is sent to a switch from this dialog. Saving your own formats is part of the Team plan.
How your switch writes messages
| Setting | Choices | What it means |
|---|---|---|
| Text | ASCII, EBCDIC | The character set of text fields. EBCDIC is used by mainframe hosts; code pages cp037 (default), cp500 and cp1047 are under More settings. |
| Numbers | Text, Packed | Numeric fields as one character per digit, or two digits per byte (BCD). 12345 packed is 01 23 45. |
| Field lengths | Text, Packed, Binary | The length in front of a variable field. A card number of 16 digits: text 3136, packed 16, binary 10. |
| Bitmap | Binary, Hex | 8 bytes for each half of the bitmap, or 16 hex characters. |
| Message length | 2 bytes, 4 digits, Packed, 4 bytes | The length sent in front of every message. Most switches use 2 bytes. |
| Header | hex, or text: and characters | Bytes your switch expects before the message type, such as a TPDU 6000030000, or text:ISO016000010. |
More settings
| Message type | 4 characters, or packed into 2 bytes. |
| Odd packed digits | An odd number of digits gets a leading 0 (most switches) or a trailing F. Track data always gets a trailing F. |
| Reply header to skip | Bytes in front of the reply's message type that SwitchProof ignores. |
| Trailer | Hex sent after the message, such as 03. |
| Length counts itself | The message length includes its own bytes. |
Field formats
A field's format is its kind and its length, such as LL:19. In the check table you can type a new one over any field.
| Kind | Is | Example |
|---|---|---|
N | Fixed digits, padded with zeros on the left | F3 N:6 |
AN | Fixed text, padded with spaces on the right | F41 AN:8 |
AMT | C or D, then digits | F28 AMT:9 |
LL LLL LLLL | Variable text with a 2, 3 or 4 digit length | F48 LLL:999 |
LLN LLLN | Variable digits: packed when the format packs numbers | F2 LLN:19 |
LLZ LLLZ | Track data, digits and =: packed with D for = | F35 LLZ:37 |
B | Fixed binary, length in bytes | F52 B:8 |
LLB LLLB | Variable binary, length in bytes | F55 LLLB:255 |
One field can differ from the rest of the format: N:12:text keeps an amount as text in a format that packs numbers, N:12:bcd packs it in one that doesn't, and :left or :right sets where an odd number of packed digits is padded.
Chip data (F55) is shown as its EMV tags when the message is checked.
When a message doesn't read
- A text field shows odd characters (marked amber): it is probably packed or binary on your switch. Try
LLNfor digits,LLZfor track data. - "Length is not a number" on a field: the field before it is usually a different size, so reading started in the wrong place. Try the formats offered for both.
- "Cut short": a field is longer in the format than in the message, or the numbers aren't packed the same way.
- Bytes left after the last field: a field is shorter in the format than on your switch.
- The bitmap lists fields the format doesn't know: add them with a kind and length.
Fix the first marked field first: the ones after it are read from wherever it ended.
Formats as files
Each format you save is a file in the profiles folder of SwitchProof's data folder (%USERPROFILE%\SwitchProof\profiles), so it can be copied to another PC. A file with a mistake is named under the format list with what is wrong.
{
"id": "bank-x",
"name": "Bank X switch",
"base": "iso-87",
"wire": { "numbers": "bcd", "lengths": "bcd", "lengthHeader": "binary2", "header": "6000030000" },
"fields": { "2": "LLN:19", "35": "LLZ:37", "48": "LLL:999" },
"messages": { "0200": "2 3 4 7 11 12 13 22 25 35 37 41 42 49 52" },
"approved": ["00"],
"procCodes": { "REFUND": "200000" }
}
messages limits a message type to the fields listed; without it, every field that is set is sent. approved lists the response codes that mean approved. procCodes sets your switch's processing code for a transaction type.
Help
Stuck on a format? Send the hex of one message, with card numbers replaced, to support@switchproof.online.