SWIFT MT940 field
MT940 field :20: Transaction Reference Number
The first field of every MT940 and MT942: the bank’s own reference for this statement message. It identifies the message, not a transaction, despite its name.
| :20: (mandatory) | Transaction Reference Number: The sender’s reference for this statement message. |
|---|---|
| Format | 16x |
| Message | MT940 customer statement (also used by MT942 where the field exists there) |
| In camt.053 | Stmt/Id |
Format
The format is written in SWIFT notation: 16x. n digits; a capital letters; c capital letters and digits; x any character of the SWIFT set; d a decimal amount with a comma; 16x up to 16 of them; 6!n exactly 6; [ ] optional; 6*65x up to 6 lines of 65.
Annotated example
From the sample MT940 the viewer opens with “Try a sample”:
:20:STMT301P1| Part | Meaning |
|---|---|
:20: | The tag. |
STMT301P1 | The reference, up to 16 characters: here statement 301, page 1. |
Where it goes in camt.053
The MT940 Viewer and the API convert MT940 to camt.053.001.08. For this field:
| MT940 | camt.053.001.08 | Note |
|---|---|---|
| :20: Transaction Reference | Stmt/Id |
Banks build the reference however they like, so do not parse meaning out of it; use :28C: for the statement number.
The whole mapping, field by field, is in camt.053 vs MT940.
Checks the viewer runs
mt.field.required: Mandatory field missing (SWIFT MT940/MT942 field specifications)mt.field.length: Field too long (SWIFT MT940/MT942 field lengths)mt.charset: Characters outside the SWIFT set (SWIFT FIN character set X)
Worth knowing
- A statement starts at :20:. Text before the first :20: (outside a SWIFT envelope) is not part of a statement.
- Must not start or end with a slash, or contain two slashes in a row (a general rule for SWIFT reference fields).
Read :20: from a script or an AI agent
Scripts and AI agents can do the same without a browser: POST /api/v1/parse or the MCP tool parse_mt940 returns every statement as JSON: balances, each :61: split into its subfields and each :86: with its structured parts. No key is needed, and the file is processed in memory and never stored (API and MCP docs).
curl -s --data-binary @statement.sta https://iso20022-navigator.com/api/v1/parse{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "parse_mt940",
"arguments": {
"content": "<the file text>"
}
}
}