A dialect for your network's messages
A dialect describes the messages a network, processor or switch actually uses: which fields exist, how long they are, how they are encoded, and what’s inside the structured ones. This walkthrough builds one for a fictional domestic scheme, ACME, and puts it to work. Budget under an hour for your own spec.
1. Start from a built-in version
Section titled “1. Start from a built-in version”Your spec almost certainly follows ISO 8583:1987, 1993 or 2003 and changes some of it. Open Dialects, pick the version, and choose Extend this dialect. If your link is one a profile pack describes, such as Australia’s AS 2805 interchange (pack:as2805-iac), extend that one instead: it already has the fields the published specification changes. The editor opens with a working template:
id: acmename: ACME domestic schemeversion: 1extends: iso8583:1987@1fields: {}Everything you don’t mention stays as the built-in version defines it. The built-in versions are ISO 8583 as published, the same for every card: networks publish their private-field layouts only to licensees, so none ship with the Platform. A field you define replaces the built-in one for every card. To vary a field for one network’s cards, add it under networks:, as in networks: {VISA: {62: {content: ans, length: {kind: ll, max: 30}}}}.
If your team already describes the spec as a jPOS GenericPackager, use Import a jPOS packager instead. The result opens in the editor with notes on anything that didn’t carry over exactly.
2. Set the encodings
Section titled “2. Set the encodings”Most schemes change how bytes travel, not just which fields exist:
mti: bcd # ascii, ebcdic or bcdbitmap: binary # binary or hexnumeric: bcd # how digits travel: ascii, ebcdic or bcdtext: ebcdic # ascii or ebcdiclength_prefix: bcd # ascii, ebcdic, bcd or binarybcd_odd_padding: left # left (0 first), right (F last) or right-zero (0 last)A single field can differ: give it its own encoding, binary: hex, or a length.prefix.
3. Describe the fields that differ
Section titled “3. Describe the fields that differ”Write each field as the spec’s field table does:
fields: 4: name: Amount content: n length: {kind: ll, max: 12} # ACME sends the amount with a length 48: name: ACME additional data content: ans length: {kind: lll, max: 999} subfields: format: tlv lead: [{id: tcc, name: Transaction category, length: 1}] tag_length: 2 length_digits: 2 elements: "10": {name: Loyalty number} "20": {name: Recurring flag}- content:
n(digits),a,an,ans(text),b(binary, shown as hex),z(track data). - length:
fixedwith its size, orll,lll,llllwith a maximum. Lengths count digits for numbers, characters for text, and bytes for binary sent raw. - subfields:
tlv(with leading positional parts, as Mastercard’s DE 48 has),ber-tlv(EMV),fixed(positions, as field 90), orbitmapped(as Visa’s field 126). Elements can nest.
The Check panel validates as you type, against everything the dialect extends.
4. Preview a real message
Section titled “4. Preview a real message”Paste a message from your logs, a Wireshark hex dump or base64 into Preview. It’s read with the dialect exactly as written, even before you save it. A wrong length or encoding shows up as the exact byte where reading stops, which is usually enough to see which field is off. Sub-elements are listed under their field.
5. Save a version
Section titled “5. Save a version”Save version stores version 1. Versions never change: to fix something, save version 2. The dialect page shows what each version changes against the one before it, or against the built-in version it extends.
6. Use it
Section titled “6. Use it”-
A simulated host: choose the dialect in the host form. The host reads and writes with it; its encodings replace the wire format and version. Framing (length header, TPDU, message header) stays the host’s.
-
Rules by sub-element: in a host rule, one line per condition, such as
48.tcc=Rto match recurring payments, and48.20=Yunder the response fields to set a sub-element in the answer. -
Scenarios: a simulated host brings its dialect. For your own system, set it on the target, and address sub-elements by path. Paths need quotes in YAML:
target: {host: switch.bank.test, port: 8583, dialect: acme@1}steps:- name: Recurring payment carries its flag backsend: {sample: auth, paths: {"48.tcc": R, "48.10": "ABC123"}}expect: {fields: {39: "00"}, paths: {"48.20": "Y"}}save: {loyalty: "48.10"} -
The workbench: choose the dialect under Reading options to inspect, or in the builder to build, messages in it.
7. Share it
Section titled “7. Share it”Export for jPOS writes any version as a GenericPackager, noting what jPOS can’t express (network variants, sub-elements).
A header before the MTI
Section titled “A header before the MTI”Some interfaces put a header of their own between the length and the MTI. JR/T 0055, UnionPay’s domestic interchange as the People’s Bank of China publishes it, uses 46 bytes: routing ids, the switch’s batch and category bytes, and a reject code. It isn’t a field, so it isn’t in a dialect: in the host form, set Message header to JR/T 0055 and give the host’s Station id and its Peer id.
- The host answers each request with the request’s header, the ids swapped and the length set, and returns the switch’s bytes as received, as JR/T 0055 asks of an institution. Messages the host starts get a new header.
- A scenario against the host frames its requests the same way, from the other end. For a host and port target, give
message_header: jrt0055,station_idandpeer_idintarget:. - When a switch rejects a request (it sends the request back behind a second header), the step fails with the reject code and what it means: which field, and the kind of error.