pub struct Field52A {
pub account_line_indicator: Option<String>,
pub account_number: Option<String>,
pub bic: String,
}
Expand description
§Field 52A: Ordering Institution
§Overview
Field 52A identifies the ordering institution in SWIFT payment messages. This field specifies the financial institution that is acting on behalf of the ordering customer (Field 50) to initiate the payment. It represents the first institution in the payment chain and is crucial for routing, settlement, and compliance purposes.
§Format Specification
Format: [/1!a][/34x]4!a2!a2!c[3!c]
- 1!a: Optional account line indicator (1 character)
- 34x: Optional account number (up to 34 characters)
- 4!a2!a2!c[3!c]: BIC code (8 or 11 characters)
§BIC Structure
DEUTDEFF500
││││││││└┴┴─ Branch Code (3 characters, optional)
││││││└┴──── Location Code (2 characters)
││││└┴────── Country Code (2 letters)
└┴┴┴──────── Bank Code (4 letters)
§Field Components
- Account Line Indicator: Single character qualifier for account number type
- Account Number: Institution’s account number for settlement
- BIC: Bank Identifier Code uniquely identifying the institution
§Usage Context
Field 52A is used in:
- MT103: Single Customer Credit Transfer
- MT200: Financial Institution Transfer
- MT202: General Financial Institution Transfer
- MT202COV: Cover for customer credit transfer
§Business Applications
- Payment routing: Identifying the institution to route payment through
- Settlement: Providing account information for settlement processes
- Compliance: Meeting regulatory requirements for institution identification
- Correspondent banking: Managing relationships between correspondent banks
- Risk management: Assessing counterparty risk and limits
§Examples
:52A:DEUTDEFFXXX
└─── Deutsche Bank Frankfurt (no account information)
:52A:/C/1234567890
CHASUS33XXX
└─── JPMorgan Chase New York with checking account 1234567890
:52A:/A/GB12ABCD12345678901234
ABCDEFGHJKL
└─── Bank with account line indicator A and IBAN account
:52A:/S/SWIFT001234567890
BNPAFRPPXXX
└─── BNP Paribas with SWIFT account identifier
§Account Line Indicators
Common account line indicators include:
- A: Account identifier (generic)
- B: Beneficiary account
- C: Checking account
- D: Deposit account
- S: SWIFT account identifier
- T: Trust account
§Validation Rules
- BIC format: Must be valid 8 or 11 character BIC
- BIC structure: 4!a2!a2!c[3!c] format required
- Account line indicator: If present, exactly 1 character
- Account number: If present, max 34 characters
- Character validation: All components must use valid character sets
§Network Validated Rules (SWIFT Standards)
- BIC must be valid format and registered (Error: T27)
- Account line indicator must be single character (Error: T12)
- Account number cannot exceed 34 characters (Error: T15)
- BIC country code must be valid ISO country code (Error: T28)
- Characters must be from SWIFT character set (Error: T61)
- Field 52A is mandatory in most payment message types (Error: C52)
Fields§
§account_line_indicator: Option<String>
Account line indicator (optional, 1 character)
account_number: Option<String>
Account number (optional, up to 34 characters)
bic: String
BIC code (8 or 11 characters)
Implementations§
Source§impl Field52A
impl Field52A
Sourcepub fn new(
account_line_indicator: Option<String>,
account_number: Option<String>,
bic: impl Into<String>,
) -> Result<Self, ParseError>
pub fn new( account_line_indicator: Option<String>, account_number: Option<String>, bic: impl Into<String>, ) -> Result<Self, ParseError>
Create a new Field52A with validation
Sourcepub fn account_line_indicator(&self) -> Option<&str>
pub fn account_line_indicator(&self) -> Option<&str>
Get the account line indicator
Sourcepub fn account_number(&self) -> Option<&str>
pub fn account_number(&self) -> Option<&str>
Get the account number
Sourcepub fn is_full_bic(&self) -> bool
pub fn is_full_bic(&self) -> bool
Check if this is a full BIC (11 characters)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field52A
impl<'de> Deserialize<'de> for Field52A
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 SwiftField for Field52A
impl SwiftField for Field52A
Source§fn to_swift_string(&self) -> String
fn to_swift_string(&self) -> String
Convert field back to SWIFT string format
Source§fn validate(&self) -> ValidationResult
fn validate(&self) -> ValidationResult
Validate field according to SWIFT format rules
Source§fn format_spec() -> &'static str
fn format_spec() -> &'static str
Get field format specification
impl Eq for Field52A
impl StructuralPartialEq for Field52A
Auto Trait Implementations§
impl Freeze for Field52A
impl RefUnwindSafe for Field52A
impl Send for Field52A
impl Sync for Field52A
impl Unpin for Field52A
impl UnwindSafe for Field52A
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more