MT940

Struct MT940 

Source
pub struct MT940 {
    pub field_20: Field20,
    pub field_21: Option<Field21NoOption>,
    pub field_25: Field25AccountIdentification,
    pub field_28c: Field28C,
    pub field_60: Field60,
    pub statement_lines: Vec<MT940StatementLine>,
    pub field_62: Field62,
    pub field_64: Option<Field64>,
    pub field_65: Option<Vec<Field65>>,
    pub field_86: Option<Field86>,
}
Expand description

MT940: Customer Statement Message

§Purpose

Used to transmit detailed account statement information from an account servicing institution to the account holder. This message provides a complete transaction-by-transaction record of account activity with opening and closing balances for a specific period.

§Scope

This message is:

  • Sent by account servicing institutions to account holders
  • Used for regular account statement transmission (daily, weekly, monthly)
  • Applied to various account types including current, savings, and foreign currency accounts
  • Essential for account reconciliation and cash management
  • Part of automated statement delivery and cash management systems

§Key Features

  • Complete Transaction Detail: Full transaction-by-transaction statement
  • Balance Information: Opening and closing balances with currency consistency
  • Statement Line Details: Individual transaction entries with references and descriptions
  • Value Dating: Precise value dates for each transaction
  • Available Balance: Optional available balance information for credit management
  • Information Lines: Additional transaction details and narrative information

§Common Use Cases

  • Daily account statement delivery
  • End-of-month statement transmission
  • Real-time account activity reporting
  • Cash management system integration
  • Account reconciliation support
  • Regulatory reporting and compliance
  • Customer self-service portal integration
  • Treasury management system feeds

§Message Structure

§Header Information

  • 20: Transaction Reference (mandatory) - Unique statement reference
  • 21: Related Reference (optional) - Reference to related statement or period
  • 25: Account Identification (mandatory) - Account being reported
  • 28C: Statement Number/Sequence (mandatory) - Statement numbering
  • 60: Opening Balance (mandatory) - Starting balance for statement period

§Transaction Details

  • Statement Lines: Repetitive sequence of individual transactions
  • 62: Closing Balance (mandatory) - Ending balance for statement period
  • 64: Available Balance (optional) - Available credit or debit balance
  • 65: Forward Available Balance (optional, repetitive) - Future available balances
  • 86: Information to Account Owner (optional) - Additional statement information

§Statement Line Structure (MT940StatementLine)

Each statement line contains:

  • 61: Statement Line (optional) - Individual transaction details
  • 86: Information to Account Owner (optional) - Additional transaction information

§Field Details

§Field 60/62 - Balance Information

  • Currency: ISO 4217 3-character currency code
  • Amount: Balance amount with appropriate precision
  • Date: Balance date (YYMMDD format)
  • Credit/Debit Indicator: C (Credit) or D (Debit) balance

§Field 61 - Statement Line

  • Value Date: Date when transaction becomes effective
  • Entry Date: Date when transaction was posted (optional)
  • Credit/Debit Mark: C (Credit) or D (Debit) entry
  • Amount: Transaction amount
  • Transaction Type: SWIFT transaction type identification
  • Reference: Transaction reference number
  • Account Servicing Institution Reference: Bank’s internal reference

§Network Validation Rules

  • Currency Consistency: Opening and closing balances must use the same currency
  • Reference Format: Transaction references must follow SWIFT formatting standards
  • Required Fields: All mandatory fields must be present and properly formatted
  • Balance Logic: Closing balance should reflect opening balance plus/minus transactions
  • Date Validation: All dates must be valid and in proper sequence
  • Amount Validation: All amounts must be properly formatted with currency precision

§Processing Context

§Statement Generation

  1. Account activity accumulated over statement period
  2. Transactions sorted by value date and sequence
  3. Opening balance carried forward from previous statement
  4. MT940 generated with complete transaction detail
  5. Closing balance calculated and validated

§Cash Management Integration

  • Real-time balance updating
  • Transaction categorization and analysis
  • Cash flow forecasting input
  • Reconciliation automation
  • Exception reporting and investigation

§SRG2025 Status

  • No Structural Changes: MT940 format remains unchanged in SRG2025
  • Enhanced Validation: Additional validation for statement accuracy and completeness
  • Digital Integration: Improved support for digital banking and API integration
  • Real-time Capabilities: Enhanced support for real-time statement delivery

§Integration Considerations

  • Banking Systems: Core component of account management and customer communication
  • Cash Management: Primary input for automated cash management and forecasting
  • ERP Integration: Critical for enterprise financial management and reconciliation
  • Regulatory Reporting: Essential for compliance and audit trail requirements

§Relationship to Other Messages

  • Triggered by: MT920 (Request Message) for on-demand statement delivery
  • Complements: MT900/MT910 confirmation messages for real-time transaction notification
  • Supports: Complete account management and cash management workflows
  • Integrates with: Customer communication and digital banking platforms

Fields§

§field_20: Field20§field_21: Option<Field21NoOption>§field_25: Field25AccountIdentification§field_28c: Field28C§field_60: Field60§statement_lines: Vec<MT940StatementLine>§field_62: Field62§field_64: Option<Field64>§field_65: Option<Vec<Field65>>§field_86: Option<Field86>

Implementations§

Source§

impl MT940

Source

pub fn validate() -> &'static str

Get validation rules for this message type

Trait Implementations§

Source§

impl Clone for MT940

Source§

fn clone(&self) -> MT940

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MT940

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MT940

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for MT940

Source§

fn eq(&self, other: &MT940) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MT940

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SwiftMessageBody for MT940

Source§

fn message_type() -> &'static str

Get the message type identifier (e.g., “103”, “202”)
Source§

fn from_fields( fields: HashMap<String, Vec<(String, usize)>>, ) -> SwiftResult<Self>

Create from field map with sequential consumption tracking
Source§

fn from_fields_with_config( fields: HashMap<String, Vec<(String, usize)>>, config: &ParserConfig, ) -> Result<ParseResult<Self>, ParseError>

Create from field map with configuration for error collection
Source§

fn to_fields(&self) -> HashMap<String, Vec<String>>

Convert to field map
Source§

fn to_ordered_fields(&self) -> Vec<(String, String)>

Convert to ordered field list for MT serialization Returns fields in the correct sequence order for multi-sequence messages
Source§

fn required_fields() -> Vec<&'static str>

Get required field tags for this message type
Source§

fn optional_fields() -> Vec<&'static str>

Get optional field tags for this message type
Source§

impl StructuralPartialEq for MT940

Auto Trait Implementations§

§

impl Freeze for MT940

§

impl RefUnwindSafe for MT940

§

impl Send for MT940

§

impl Sync for MT940

§

impl Unpin for MT940

§

impl UnwindSafe for MT940

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Fake for T

Source§

fn fake<U>(&self) -> U
where Self: FakeBase<U>,

Source§

fn fake_with_rng<U, R>(&self, rng: &mut R) -> U
where R: Rng + ?Sized, Self: FakeBase<U>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,