SwitchProof

Message formats

How SwitchProof writes and reads your switch's messages

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

FormatFor
FLEXCUBEThe Oracle FLEXCUBE ATM/POS switch interface (ISO 8583:1987). Checked byte for byte against the FLEXCUBE switch and used on bank UAT.
ISO 1987The 1987 standard dictionary. Every field that is set is sent.
ISO 1993The 1993 standard: message types 1xxx, function codes, 3-digit action codes.
ISO 2003Message 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.

  1. Start from the built-in format closest to your switch, and give it a name.
  2. How your switch writes messages: the settings below. Leave a setting alone if you're not sure.
  3. 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

SettingChoicesWhat it means
TextASCII, EBCDICThe character set of text fields. EBCDIC is used by mainframe hosts; code pages cp037 (default), cp500 and cp1047 are under More settings.
NumbersText, PackedNumeric fields as one character per digit, or two digits per byte (BCD). 12345 packed is 01 23 45.
Field lengthsText, Packed, BinaryThe length in front of a variable field. A card number of 16 digits: text 3136, packed 16, binary 10.
BitmapBinary, Hex8 bytes for each half of the bitmap, or 16 hex characters.
Message length2 bytes, 4 digits, Packed, 4 bytesThe length sent in front of every message. Most switches use 2 bytes.
Headerhex, or text: and charactersBytes your switch expects before the message type, such as a TPDU 6000030000, or text:ISO016000010.

More settings

Message type4 characters, or packed into 2 bytes.
Odd packed digitsAn odd number of digits gets a leading 0 (most switches) or a trailing F. Track data always gets a trailing F.
Reply header to skipBytes in front of the reply's message type that SwitchProof ignores.
TrailerHex sent after the message, such as 03.
Length counts itselfThe 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.

KindIsExample
NFixed digits, padded with zeros on the leftF3 N:6
ANFixed text, padded with spaces on the rightF41 AN:8
AMTC or D, then digitsF28 AMT:9
LL LLL LLLLVariable text with a 2, 3 or 4 digit lengthF48 LLL:999
LLN LLLNVariable digits: packed when the format packs numbersF2 LLN:19
LLZ LLLZTrack data, digits and =: packed with D for =F35 LLZ:37
BFixed binary, length in bytesF52 B:8
LLB LLLBVariable binary, length in bytesF55 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

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.