swift_mt_message/fields/
field26.rs

1use serde::{Deserialize, Serialize};
2use swift_mt_message_macros::SwiftField;
3
4///   **Field 26T: Transaction Type Code**
5///
6/// ## Purpose
7/// Specifies the type or nature of a financial transaction or instruction using standardized
8/// codes. This field enables automatic processing, routing, and categorization of transactions
9/// based on their business purpose and regulatory requirements.
10///
11/// ## Format
12/// - **Swift Format**: `3!c`
13/// - **Description**: Exactly 3 alphanumeric characters
14/// - **Character Set**: Letters and digits following Swift standards
15/// - **Code Type**: Standardized transaction type codes
16///
17/// ## Presence
18/// - **Status**: Conditional/Optional depending on message type and business requirements
19/// - **Swift Error Codes**: T50 (invalid code), T12 (format violation)
20/// - **Usage Context**: Transaction categorization and processing logic
21///
22/// ## Usage Rules
23/// - **Code Validation**: Must be valid standardized transaction type code
24/// - **Business Logic**: Determines processing rules and regulatory treatment
25/// - **Routing Decisions**: Influences message routing and handling procedures
26/// - **Compliance**: Required for certain regulatory reporting and monitoring
27///
28/// ## Network Validation Rules
29/// - **Format Validation**: Must be exactly 3 characters
30/// - **Code Registry**: Must be recognized transaction type code
31/// - **Character Set**: Only alphanumeric characters permitted
32/// - **Business Context**: Code must be appropriate for message type and context
33///
34/// ## Common Transaction Type Codes
35///
36/// ### Payment Instructions
37/// - **PAY**: Standard payment instruction
38/// - **SAL**: Salary payment
39/// - **PEN**: Pension payment
40/// - **DIV**: Dividend payment
41/// - **INT**: Interest payment
42/// - **TAX**: Tax payment
43/// - **FEE**: Fee payment
44///
45/// ### Treasury Operations
46/// - **FXD**: Foreign exchange deal
47/// - **MMD**: Money market deal
48/// - **DER**: Derivative transaction
49/// - **SEC**: Securities transaction
50/// - **COL**: Collateral transaction
51/// - **REP**: Repurchase agreement
52///
53/// ### Trade Finance
54/// - **TRD**: Trade transaction
55/// - **DOC**: Documentary transaction
56/// - **LCR**: Letter of credit
57/// - **GUA**: Guarantee
58/// - **COL**: Collection
59/// - **FIN**: Trade financing
60///
61/// ### Corporate Actions
62/// - **CAP**: Capital payment
63/// - **RIG**: Rights issue
64/// - **BON**: Bonus issue
65/// - **SPL**: Stock split
66/// - **MER**: Merger transaction
67/// - **ACQ**: Acquisition
68///
69/// ## Business Context
70/// - **Transaction Classification**: Systematic categorization of financial transactions
71/// - **Regulatory Compliance**: Meeting reporting requirements for different transaction types
72/// - **Processing Automation**: Enabling automated routing and handling based on type
73/// - **Risk Management**: Transaction type-based risk assessment and controls
74///
75/// ## Examples
76/// ```logic
77/// :26T:PAY    // Standard payment instruction
78/// :26T:SAL    // Salary payment
79/// :26T:FXD    // Foreign exchange deal
80/// :26T:DIV    // Dividend payment
81/// :26T:TRD    // Trade transaction
82/// :26T:INT    // Interest payment
83/// ```
84///
85/// ## Regional Considerations
86/// - **European Markets**: SEPA transaction type requirements
87/// - **US Markets**: ACH and Fedwire transaction classifications
88/// - **Asian Markets**: Local payment type categorizations
89/// - **Cross-Border**: International transaction type harmonization
90///
91/// ## Regulatory Impact
92/// - **Reporting Requirements**: Different codes trigger specific reporting obligations
93/// - **Monitoring Systems**: Enables automated transaction monitoring and analysis
94/// - **Compliance Checks**: Type-specific compliance validation rules
95/// - **Audit Trails**: Enhanced transaction tracking by business purpose
96///
97/// ## Error Prevention
98/// - **Code Validation**: Verify transaction type code is valid and recognized
99/// - **Context Checking**: Ensure code is appropriate for message type and business context
100/// - **Format Verification**: Confirm exactly 3 character format requirement
101/// - **Business Logic**: Validate code aligns with transaction purpose
102///
103/// ## Related Fields
104/// - **Field 23**: Instruction Code (additional transaction instructions)
105/// - **Field 70**: Remittance Information (transaction description)
106/// - **Field 72**: Sender to Receiver Information (additional details)
107/// - **Block Headers**: Message type in application header
108///
109/// ## Processing Impact
110/// - **Routing Logic**: Determines appropriate processing channels
111/// - **Validation Rules**: Triggers specific validation requirements
112/// - **STP Processing**: Enables automated straight-through processing
113/// - **Exception Handling**: Type-specific exception processing procedures
114///
115/// ## Compliance Framework
116/// - **AML Monitoring**: Enhanced monitoring for high-risk transaction types
117/// - **Sanctions Screening**: Type-specific sanctions checking requirements
118/// - **Regulatory Reporting**: Automated reporting based on transaction type
119/// - **Documentation**: Type-specific documentation and record-keeping requirements
120///
121/// ## STP Compliance
122/// - **Code Standardization**: Consistent transaction type coding for automation
123/// - **Processing Rules**: Type-based automated processing decisions
124/// - **Quality Control**: Enhanced validation for specific transaction types
125/// - **Exception Management**: Automated handling of type-specific exceptions
126///
127/// ## See Also
128/// - Swift Standards: Transaction Type Code Registry
129/// - FIN User Handbook: Transaction Classification Guidelines
130/// - Regulatory Guidelines: Transaction Type Reporting Requirements
131/// - Processing Manuals: Type-Based Transaction Handling
132///
133///   **Field 26T: Transaction Type Code Structure**
134///
135/// Contains the 3-character transaction type code for categorizing
136/// and processing financial transactions.
137#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftField)]
138pub struct Field26T {
139    /// Transaction type code
140    ///
141    /// Format: 3!c - Exactly 3 alphanumeric characters
142    /// Must be valid standardized transaction type code (PAY, SAL, FXD, etc.)
143    /// Determines transaction processing rules and regulatory treatment
144    #[component("3!c")]
145    pub type_code: String,
146}