Struct Field53A

Source
pub struct Field53A {
    pub account_line_indicator: Option<String>,
    pub account_number: Option<String>,
    pub bic: String,
}
Expand description

§Field 53A: Sender’s Correspondent

§Overview

Field 53A identifies the sender’s correspondent institution in SWIFT payment messages. This field specifies the financial institution that acts as a correspondent for the message sender, facilitating the payment routing and settlement process. The correspondent relationship is crucial for cross-border payments and correspondent banking arrangements.

§Format Specification

Format: [/1!c][/34x]4!a2!a2!c[3!c]

  • 1!c: 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

CHASUS33XXX
││││││││└┴┴─ Branch Code (3 characters, optional)
││││││└┴──── Location Code (2 characters)
││││└┴────── Country Code (2 letters)
└┴┴┴──────── Bank Code (4 letters)

§Field Components

  • Account Line Indicator: Optional qualifier for account type or purpose
  • Account Number: Correspondent account number for settlement
  • BIC: Bank Identifier Code of the correspondent institution

§Usage Context

Field 53A 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

  • Correspondent banking: Identifying correspondent bank relationships
  • Payment routing: Providing routing instructions for payment processing
  • Settlement: Facilitating settlement through correspondent accounts
  • Risk management: Managing correspondent banking exposure and limits
  • Compliance: Meeting regulatory requirements for correspondent relationships

§Examples

:53A:CHASUS33XXX
└─── JPMorgan Chase New York as correspondent

:53A:/C/1234567890
DEUTDEFFXXX
└─── Deutsche Bank with checking account 1234567890

:53A:/N/LORO12345678901234567890
BNPAFRPPXXX
└─── BNP Paribas with nostro account identifier

:53A:/V/VOSTRO001234567890123456
ABCDEFGHJKL
└─── Correspondent with vostro account reference

§Account Line Indicators

Common account line indicators for correspondent relationships:

  • C: Correspondent account (checking)
  • D: Deposit account
  • L: Loan account
  • N: Nostro account (our account with them)
  • S: Settlement account
  • V: Vostro account (their account with us)

§BIC Components Analysis

§Bank Code (Characters 1-4)

  • Must be 4 alphabetic characters
  • Identifies the specific financial institution
  • Assigned by SWIFT registration authority

§Country Code (Characters 5-6)

  • Must be valid ISO 3166-1 alpha-2 country code
  • Identifies the country of the institution
  • Must match BIC registration country

§Location Code (Characters 7-8)

  • Alphanumeric characters identifying location within country
  • Often represents city or administrative division
  • Used for routing within correspondent networks

§Branch Code (Characters 9-11)

  • Optional 3-character branch identifier
  • Identifies specific branch or department
  • XXX indicates head office if present

§Validation Rules

  1. BIC format: Must be valid 8 or 11 character BIC
  2. BIC structure: 4!a2!a2!c[3!c] format required
  3. Account line indicator: If present, exactly 1 character
  4. Account number: If present, max 34 characters
  5. 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 53A is conditional based on message type (Error: C53)

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 Field53A

Source

pub fn new( account_line_indicator: Option<String>, account_number: Option<String>, bic: impl Into<String>, ) -> Result<Self, ParseError>

Create a new Field53A with validation

Source

pub fn account_line_indicator(&self) -> Option<&str>

Get the account line indicator

Source

pub fn account_number(&self) -> Option<&str>

Get the account number

Source

pub fn bic(&self) -> &str

Get the BIC code

Source

pub fn is_full_bic(&self) -> bool

Check if this is a full BIC (11 characters) or short BIC (8 characters)

Source

pub fn bank_code(&self) -> &str

Get the bank code (first 4 characters of BIC)

Source

pub fn country_code(&self) -> &str

Get the country code (characters 5-6 of BIC)

Source

pub fn location_code(&self) -> &str

Get the location code (characters 7-8 of BIC)

Source

pub fn branch_code(&self) -> Option<&str>

Get the branch code (characters 9-11 of BIC, if present)

Source

pub fn description(&self) -> String

Get human-readable description

Trait Implementations§

Source§

impl Clone for Field53A

Source§

fn clone(&self) -> Field53A

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 Field53A

Source§

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

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

impl<'de> Deserialize<'de> for Field53A

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 Display for Field53A

Source§

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

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

impl PartialEq for Field53A

Source§

fn eq(&self, other: &Field53A) -> 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 Field53A

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 SwiftField for Field53A

Source§

fn parse(value: &str) -> Result<Self, ParseError>

Parse field value from string representation
Source§

fn to_swift_string(&self) -> String

Convert field back to SWIFT string format
Source§

fn validate(&self) -> ValidationResult

Validate field according to SWIFT format rules
Source§

fn format_spec() -> &'static str

Get field format specification
Source§

impl StructuralPartialEq for Field53A

Auto Trait Implementations§

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> 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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,