Vous êtes sur la page 1sur 15

SWIFT MESSAGE STRUCTURE

2 SWIFT Message Structure
The following information has been obtained from the SWIFT User Manual. The information described refers to both the message
formats as well as the utilization of the real SWIFT communications interface. Initially, ISITC participants will utilize only the
information directly related to the SWIFT message formats.

General
SWIFT processes information (i.e., data, text, or commands) in the form of messages. SWIFT initially offers two applications -
GPA (General Purpose Application which controls how users communicate within SWIFT ) and FIN (Financial Application which
controls the user to user messaging facilities within SWIFT )- which together provide all of the messaging functions and facilities
available to users.
This chapter describes the following aspect of the messaging service:
• The types of message
• The structure of a message
• How a message is referenced
• The priorities applied to messages
• How a message is acknowledged
• Multi-section messages and reports
• Message validation
• ISITC sample message

Users should be aware that the actual appearance of a SWIFT message (whether on screen or on paper) is dependent upon how their
CBT (computer-based terminal) has been programmed and on any internal processing of SWIFT messages carried out within their
own organization.
A validation error in the application header, text or trailer block will result in a negative acknowledgment (NAK) indicating the
reason for rejection.
Each message received by the system is examined to determine whether it conforms to the format specification for that message type.
The sequence in which the various parts of a SWIFT message are validated is as follows:
1. Basic header
2. Application header
3. User header
4. Trailer(s)
5. Text
At the first validation failure, the appropriate error procedure is carried out (either session abortion or negative acknowledgment)
and no further validation is performed on the message.

9601 2­1
SWIFT MESSAGE STRUCTURE

Structure of a Message
All SWIFT messages conform to a defined block structure. Each block of a message contains data of a particular type and is used for
a particular purpose.
Each block of message begins and ends with a curly bracket (or brace) character "{" and "}" respectively. All main blocks are
numbered, and the block number followed by a colon (:) are always the first characters within any block.
A typical SWIFT user-to-user message may consist of:
{1: Basic Header Block}
{2: Application Header Block}
{3: User Header Block}
{4: Text Block}
{5: Trailers Block}
Only block 1 (the Basic Header block) is mandatory for all messages. Blocks 2-5 are optional and depend upon the nature of the
message and on the application in which the message is being sent or received.
Blocks 1,2 and 3 relate to header information, block 4 contains the text of the message, and block 5 contains trailer information.
Blocks 3,4 and 5 may contain sub-blocks (i.e., blocks within blocks) or fields delimited by field tags, depending on the nature of the
message.
At the first validation failure, the appropriate error procedure is carried out (either session abortion or negative acknowledgment)
and no further validation is performed on the message.

9601 2­2
SWIFT MESSAGE STRUCTURE

Length of a Message
The type of SWIFT message will determine the maximum length allowed for the particular message. Individual transaction
messages such as the 520 series of messages permit for a maximum message length of 2000 bytes. Statement type messages such as
the 950 or 570 series of messages permit a maximum of 10,000 bytes.

9601 2­3
SWIFT MESSAGE STRUCTURE

Presentation of a Message
Each main block is sub-divided into a number of fields and each field contains particular information (e.g., date, time, LT address,
session number, ISN, or a tag number followed by the appropriate variable content).
All fields within header blocks 1 and 2 are of fixed length and are continuous - no field separators are used.
In the case of the text of a user-to-user message, all message text within the Text block (block 4) begins with Carriage Return and
Line Feed (CrLf) and ends with CrLf followed by a hyphen (-). Each field within the text begins with a tag number followed by a
colon, followed by the appropriate variable content.
For the purpose of clarity within this manual, some message examples are shown here with each block beginning a new line and
with spaces separating the various fields within blocks. The block separators "{" and "}" are also shown. The letters a,b,c,d, etc.,
are used in these examples to identify the constituent parts of each block. An explanation of each part or field is given for each
example.

9601 2­4
SWIFT MESSAGE STRUCTURE

Basic Header Block
The basic header is given in block 1 of a SWIFT message. It is the only compulsory header and appears on all user-to-user
messages, system messages, system commands and acknowledgments. The basic header provides the fundamental referencing of a
particular message within an application session of a particular LT.
The basic header has the same format for both input and output messages. However, the information contained in the basic header is
relative to the sender when the message is input but relative to the receiver when the same message is output.
The following is an example of a basic input header, as it might appear at the beginning of a user-to-user message input within the
FIN application.
{1:F01BANKBEBBAXXX2222123456}
but for clarity we will show the components separated:
{1: F 01 BANKBEBBAXXX 2222 123456}
A B C D E F

"A"       Block Identifier
The block identifier for a basic header block is always "1:".

"B"       Application Identifier
The application identifier identifies the application within which the message is being sent or received. The available options are:
F=FIN (all user-to-user and FIN system messages)(used for ISITC)
A=GPA (most GPA system messages and commands)
L=GPA (certain GPA session control commands, e.g., LOGIN, LOGIN acknowledgments,
ABORT)
These values are automatically assigned by the SWIFT system and the user's application, all users should be aware of their existence
and significance.

"C"       Application Protocol Data Unit Identifier
The Application Protocol Data Unit (APDU) Identifier consists of two numeric characters. It identifies the type of data that is being
sent or received and, in doing so, whether the message which follows is one of the following:
• User-to-user message
• System message
• Service message, e.g., a session control command (such as SELECT)
• Logical acknowledgment (such as ACK/SAK/UAK).
Users will be primarily concerned with APDU identifier "01" (ISITC) which applies to all GPA and FIN system and user-to-user
messages. Other values include: "21" (for message acknowledgments such as ACK/NAK, UAK/UNK, "03" (a SELECT command),
"05" (a QUIT command), etc.

"D"      LT Address
This 12-character SWIFT address, given in the basic header block, is the address of the sending LT (for input messages) or of the
receiving the LT (for output messages), and includes the branch code.
In the basic header, the Logical Terminal Code within the LT address is specific to the LT that has established the session in which
the message is being transmitted (i.e. the sending LT for input messages or the receiving LT for output messages).

9601 2­5
SWIFT MESSAGE STRUCTURE

A SWIFT address or BIC can be requested for any financial institution, whether or not you are a SWIFT member participant, by
contacting SWIFT administration. The SWIFT address which will be assigned by SWIFT administration is comprised of the
following:

Bank (Financial Institution) Code 4 Characters


Country Code 2 Characters
Location Code 2 Characters
Logical Terminal Code 1 Character
Branch Code 3 Characters

"E"      Session Number
The session number identifies the session in which the message was transmitted. Within the basic header, the session number (four
digits) is the user's current GPA or FIN session number. ("0000" - ISITC)

"F"       Sequence Number (ISN or OSN)
The sequence number always consists of six digits. It is the ISN of the sender's current input session or the OSN of the receiver's
current output session. ("000001" - ISITC)

9601 2­6
SWIFT MESSAGE STRUCTURE

Application Header Block
The application header of a SWIFT message provides information about the message itself.
The application header is given in block 2 of a SWIFT message. If differs according to whether the message is a GPA or a FIN
message and whether the application header is attached to an input message or to a output message.

Application Header ­ Input 
For input messages, the application header describes the type of message, whom it is for and how it should be sent.
GPA input application headers are similar to their FIN equivalents except that GPA messages will not specify priority, delivery
monitoring, nor obsolescence period.
The following is an example of an input application header, as it might appear at the top of a user-to-user message, input within the
FIN application:
{2: I 100 BANKDEFFXXXX U 3 003}
A B C D E F G

"A"     Block Identifier
The block identifier for an application header block is always "2:".

"B"     Input/Output Identifier
The input/output identifier consists of a single letter - either "I" for an input message or "O" for an output message.

"C"     Message Type
The message type consists of three digits which define the MT number of the message being input. The example used above is for a
Customer Transfer (MT 100).

"D"     Recipient's Address
This address is the 12-character SWIFT address of the recipient of the message, but with a Logical Terminal Code of "X". If defines
the destination to which the message should be sent.
A SWIFT address which will be assigned by SWIFT administration is comprised of the following:
Bank (Financial Institution) Code 4 Characters
Country Code 2 Characters
Location Code 2 Characters
Logical Terminal Code 1 Character
Branch Code 3 Characters
The system will replace the "X" with a specific Logical Terminal Code on delivery of the message.
Institution which are not part of the SWIFT network will be assigned a Branch Code of BIC.
The branch code is mandatory and will be validated. The default of "XXX" may be used, as in the example above.

"E"     Message Priority
This character (used within FIN application headers only) defines the priority by which a message shall be delivered. The possible
values are:

9601 2­7
SWIFT MESSAGE STRUCTURE

S = System
U = Urgent
N = Normal
Message priority "S" must be used for user-to-system messages: for user-to-user messages either "U" or "N" may be used.

Application Header­Output
For output messages, the output application header defines the type of message, who sent it (and when), and when it was delivered.
GPA output application headers are similar to their FIN equivalents except that, for GPA, the message priority is not included.
The following is an example of an output application header, as it might appear at the top of a user-to-user message output within
the FIN Application:
{2: 0 100 1200 910103BANKBEBBAXXX2222123456 910103 1201 N}
A B C D E F G H

"A"      Block Identifier
The block identifier for an application header block is always "2:".

"B"      Input/Output Identifier
The input/output identifier consists of a single letter - either "I" for an input message or "O" for an output message.

"C"     Message Type
The message type consists of three digits which define the MT number of the message being output. The example used above is for a
Customer Transfer (MT 100).

"D"     Input Time
The input time (HHMM) is expressed in the sender's local time. If the message is a system message, the input time is the time the
message was generated by the system, expressed in Greenwich Mean Time. (GMT)

"E"     Message Input Reference (MIR)
Every input message is assigned a unique Message Input Reference (MIR). This is a string of 28 characters which consists of the
date the message was input (local to the sender), the sender's LT identifier and branch code, the sender's session number and sender's
ISN.
If the output message is system-generated, the system MIR will show a Pseudo-Logical Terminal (PLT) address, e.g.,
SWFTXXXXXXXX, identifying as the sender the particular suite of programs which generated the message within the system. The
date given in the system MIR is the generation date in GMT.

"F"     Output Date
The output date (YYMMDD) is the date local to the receiver.

9601 2­8
SWIFT MESSAGE STRUCTURE

"G"     Output Time
The output time (HHMM) is expressed in the receiver's local time.

"H"     Message Priority
The message priority, for FIN messages only, is repeated in the FIN output application header. ("N" - ISITC default, no priority)

9601 2­9
SWIFT MESSAGE STRUCTURE

User Header Block – Required for ISITC version control
The user header is an optional header available within the FIN application and is available for user-to-user messages only. This
header block is mandatory as it is utilized to identify the version of the message standard applicable for processing and validating the
particular message to which the header applies. It also allows a user to provide his own form of reference for a particular message.
A user header can only be assigned by the sender of a message and, if assigned, will always appear on the output message copy and
on related system messages and acknowledgments.
The user reference part of the user header may be used as one of the selection criteria in a SWIFT retrieval.
The user header appears in block 3 of a SWIFT message. If used, at least one of the two possible sub-blocks must be defined.
The following example shows the format of a user header:
{3: {113:9601} {108:abcdefgh12345678}}
A B C

"A"      Block Identifier
The block identifier for a user header block always has the value "3:".

"B"       ISITC Version Identifier
A version/release represents a snapshot in tme of the status of the development and maintenance efforts of ISITC as of a specified
date. Up to two releases per year may be approved for implementation and are identified by version control numbers. Tag 113 is
used by ISITC to identify the version of the standard that applies to the message.
Version identifiers are four digits long and identify the year the version was created (i.e. 1996 would be 96) as well as the version
number ( 01 or 02) as there are a maximum of two versions of the standard per year.

"C"       Message User Reference (MUR)
Tag 108 defines a free-format field in which users may specify their own reference of up to 16 characters of all the permitted
character set.
If an MUR is not specified, the TRN (from field 20: in the text of a user-to-user message) is automatically copied into this field, but
only on the system's storage media, and may be used for retrieval of the messages if the alphabetic characters contained in the TRN
were in uppercase. The TRN will never be output as an MUR.

9601 2­10
SWIFT MESSAGE STRUCTURE

Text Block
The text of a SWIFT message (where applicable) is given in block 4 of a SWIFT message. An example of the text block in a typical
FIN user-to-user message follows:
{4:
:20:PAYREF- TB54302
:32A:910103BEF1000000,
:50:CUSTOMER NAME
AND ADDRESS
:59:/123-456-789
BENEFICIARY NAME
AND ADDRESS
-}
In the text of user-to-user messages, CrLf is a mandatory delimiter.
In those cases where character type "a", "a", "a", or "a" is used in the field format description, the alphabetic characters must be
uppercase.
The text part of a GPA message or a FIN system message differs only in that each text field is seen as a sub-block of block 4, with
block delimiters at the beginning and end of each sub-block. For example, the text block of a Non-Delivery Warning (MT 010) may
appear as:
{4:{106:910103BANKBEBBAXXX1221654321}
{108:ABCDEF}
{431:07}
{102:BANKUS33XXXX}
{104:U}}
(Note that the text block will be transmitted as a continuous string of characters without CrLf or blank characters inserted. In the
above example, the sub-blocks have been shown on separate lines for purpose of clarity.)
All Swift Text Messages have a maximum of 35 characters per line.
In the event that the necessary information spans more than one line, the current line must end with a CrLf, and the subsequent line
must begin with the "//" continuation character.
e.g. :35B:678901234567890123456789012345CrLf
//1234567890...

9601 2­11
SWIFT MESSAGE STRUCTURE

Trailers Block

General
Trailers are added to a message for control purposes: or to indicate that special circumstances apply to the handling of the message:
or to convey special/additional information. They may be added by the user or by the system.
Trailers always appear in block 5 of a SWIFT message. Each trailer appears as a separate sub-block and is bounded by block
delimiters.
Each trailer begins with a three letter code, followed by a colon, followed by the trailer information itself.
For example, block 5 of a user-to-user message, sent with an authentication trailer and checksum trailer, may appear as:
{5:{MAC:41720873} {CHK:123456789ABC}}

9601 2­12
SWIFT MESSAGE STRUCTURE

SWIFT Character Set
CBTs communicating with SWIFT use EBCDIC code. The character set is as follows:

a bcd ef g h i jk l mn op q r s tu v wx yz
ABC DE FG HI JKLMNO PQ RSTUVWXYZ
0 123 4 5 6 7 8 9
/ - ? : ( ). , ' + {}
Cr Lf Space

All alphabetic characters in all headers, and in text of user-to-system messages, must be in upper case. The system does not
recognize lower case letters as equivalent to upper case.
Although part of the character set, the curly brackets are only permitted as delimiters and cannot be used within the text of user-to-
user messages.

9601 2­13
ISITC SAMPLE MESSAGE

The following is a sample message that identifies the contents of each block and field within a block to construct a 
valid ISITC message.

Field Field Name Content

{1:F01BSDTUS33AINV0000000001}-Basic Header Block


F Application Identifier (user-to-user
message)
01 Data Unit Identifier (user-to-user)

BSDTUS33AINV Receiving TID Receiving TID


with Branch
Code of 'INV'
indicating
Inv Manager
SWIFT format
0000 Session Number

000001 Sequence Number


{2:05211646911231FNBBUS33AINV00000000019212311646N}
0 Output Message

521 Message Type

1646 Input Time


911231FNBBUS33AINV0000000001 Message Input Reference
(Date - Sender TID - Input Session No - Input
Sequence No)

921231 Output Date

1646 Output Time

N Message Priority
{4: Start of Message Text Block
X'OD25' Carriage Return Line Feed Control Characters Actual SWIFT
Message
follows (Ref
SWIFT Message
Format)

9601
ISITC SAMPLE MESSAGE

ISITC FORMAT
SPECIFICATIONS
Message Text Blcok

:30:920116 X'OD25'

:20:5731C X'OD25'

:31P:911231PTC666666 X'OD25'

:35A:FMT83735,86 X'OD25'

:35B:/ACUS/362157F3 /ASEC/GNMA X'OD25'


/APN/1559868 X'OD25'
/AIR/9,0 X'OD25'
/AMD/160515 X'OD25'

:82D:ZBEST X'OD25'

:83C:/106843 X'OD25'

:87D:/4444 X'OD25'
AUTRANET X'OD25'

:88D:AFFILIATED ACCTS X'OD25'

:33T:USD106,210142 X'OD25'

:32B:USD89594,03 X'OD25'

:34G:USD314,01 X'OD25'

:34M:USD89305,02 X'OD25'

:72:/AORG/125000, X'OD25'
/AFCT/1,123456 X'OD25'
/APAY/PU X'OD25'
/ATXN/D X'OD25'

-} - End of Message Text Block

9601

Vous aimerez peut-être aussi