swift_mt_message/messages/
mt900.rs

1use crate::fields::*;
2use serde::{Deserialize, Serialize};
3use swift_mt_message_macros::{SwiftMessage, serde_swift_fields};
4
5/// MT900: Confirmation of Debit
6///
7/// ## Purpose
8/// Used to confirm that a debit entry has been posted to an account. This message serves
9/// as notification to the account holder that their account has been debited with the
10/// specified amount and provides details of the transaction.
11///
12/// ## Scope
13/// This message is:
14/// - Sent by the account servicing institution to the account holder
15/// - Used to confirm that a debit has been processed and posted
16/// - Applied to various types of debits including transfers, fees, and other charges
17/// - Essential for account reconciliation and transaction tracking
18/// - Part of the cash management and liquidity monitoring process
19///
20/// ## Key Features
21/// - **Debit Confirmation**: Official confirmation that account has been debited
22/// - **Transaction Details**: Complete information about the debit transaction
23/// - **Timing Information**: Optional date/time indication for processing details
24/// - **Reference Tracking**: Links to original payment instructions or requests
25/// - **Account Identification**: Clear identification of the debited account
26/// - **Ordering Institution**: Optional details about the institution that initiated the debit
27///
28/// ## Common Use Cases
29/// - Confirming payment transfers from customer accounts
30/// - Notifying of fee debits and charges
31/// - Confirming investment transfers and settlements
32/// - Trade settlement confirmations
33/// - Standing order execution confirmations
34/// - Direct debit processing confirmations
35/// - Foreign exchange transaction confirmations
36/// - Account closure and transfer confirmations
37///
38/// ## Field Structure
39/// - **20**: Transaction Reference (mandatory) - Unique reference for this confirmation
40/// - **21**: Related Reference (mandatory) - Reference to original transaction/instruction
41/// - **25**: Account Identification (mandatory) - Account that has been debited
42/// - **13D**: Date/Time Indication (optional) - Processing timing details
43/// - **32A**: Value Date/Currency/Amount (mandatory) - Debit details
44/// - **52**: Ordering Institution (optional) - Institution that initiated the debit
45/// - **72**: Sender to Receiver Information (optional) - Additional transaction details
46///
47/// ## Processing Context
48/// ### Debit Processing Workflow
49/// 1. Original payment instruction received (e.g., MT103, MT202)
50/// 2. Account debited by servicing institution
51/// 3. MT900 sent to confirm debit execution
52/// 4. Account holder updates records based on confirmation
53///
54/// ### Account Management
55/// - Real-time account balance updates
56/// - Transaction history maintenance
57/// - Reconciliation support
58/// - Liquidity monitoring
59///
60/// ## Network Validation Rules
61/// - **Reference Format**: Transaction references must follow SWIFT standards
62/// - **Amount Validation**: Debit amounts must be positive
63/// - **Account Validation**: Account identification must be valid and properly formatted
64/// - **Date Validation**: Date/time indications must be valid when present
65/// - **Currency Validation**: Currency codes must be valid ISO 4217 codes
66///
67/// ## SRG2025 Status
68/// - **No Structural Changes**: MT900 format remains unchanged in SRG2025
69/// - **Enhanced Validation**: Additional validation rules for improved accuracy
70/// - **Digital Integration**: Better integration with digital banking platforms
71/// - **Real-time Processing**: Enhanced support for real-time transaction confirmation
72///
73/// ## Integration Considerations
74/// - **Banking Systems**: Direct integration with core banking systems
75/// - **Cash Management**: Part of comprehensive cash management solutions
76/// - **Reconciliation**: Essential input for automated reconciliation processes
77/// - **Reporting**: Key component of transaction reporting and audit trails
78///
79/// ## Relationship to Other Messages
80/// - **Responds to**: MT103, MT202, MT205 and other payment instructions
81/// - **Complements**: MT910 (Confirmation of Credit) for complete transaction lifecycle
82/// - **Supports**: Cash management and account reconciliation processes
83/// - **Integrates with**: Statement messages (MT940, MT950) for comprehensive account reporting
84
85#[serde_swift_fields]
86#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftMessage)]
87pub struct MT900 {
88    #[field("20")]
89    pub field_20: Field20,
90
91    #[field("21")]
92    pub field_21: Field21NoOption,
93
94    #[field("25")]
95    pub field_25: Field25AccountIdentification,
96
97    #[field("13D")]
98    pub field_13d: Option<Field13D>,
99
100    #[field("32A")]
101    pub field_32a: Field32A,
102
103    #[field("52")]
104    pub field_52: Option<Field52OrderingInstitution>,
105
106    #[field("72")]
107    pub field_72: Option<Field72>,
108}