Struct Field58A

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

§Field 58A: Beneficiary Institution

§Overview

Field 58A identifies the beneficiary institution in SWIFT payment messages using a BIC code. This field specifies the financial institution that will receive the funds on behalf of the beneficiary customer. The beneficiary institution is the final institution in the payment chain that will credit the beneficiary’s account with the transferred funds.

§Format Specification

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

  • 34x: Optional account number (up to 34 characters)
  • 4!a2!a2!c[3!c]: BIC code (8 or 11 characters)
    • 4!a: Bank code (4 alphabetic characters)
    • 2!a: Country code (2 alphabetic characters, ISO 3166-1)
    • 2!c: Location code (2 alphanumeric characters)
    • 3!c: Optional branch code (3 alphanumeric characters)

§Structure

/1234567890123456789012345678901234
CHASUS33XXX
│       │││
│       │└┴┴ Branch code (optional, XXX)
│       └┴── Location code (2 chars, 33)
│     └┴──── Country code (2 chars, US)
│ └┴┴┴────── Bank code (4 chars, CHAS)
└─────────── Account number (optional)

§Field Components

  • Account Number: Institution’s account for beneficiary funds (optional)
  • BIC Code: Business Identifier Code for beneficiary institution identification
  • Bank Code: 4-letter code identifying the beneficiary bank
  • Country Code: 2-letter ISO country code
  • Location Code: 2-character location identifier
  • Branch Code: 3-character branch identifier (optional)

§Usage Context

Field 58A is used in:

  • MT202: General Financial Institution Transfer
  • MT202COV: Cover for customer credit transfer
  • MT205: Financial Institution Transfer for its own account
  • MT103: Single Customer Credit Transfer (institutional beneficiary)
  • MT200: Financial Institution Transfer

§Business Applications

  • Final settlement: Identifying the institution that will receive funds
  • Beneficiary banking: Establishing the beneficiary’s banking relationship
  • Account crediting: Directing funds to the correct institution for crediting
  • Cross-border payments: Facilitating international transfers to beneficiaries
  • Correspondent banking: Managing final leg of correspondent banking chains
  • Regulatory compliance: Meeting beneficiary identification requirements
  • Risk management: Identifying final counterparty in payment chain

§Examples

:58A:CHASUS33
└─── JPMorgan Chase Bank, New York (beneficiary institution)

:58A:/BENEFICIARY123456789012345678901234
DEUTDEFF500
└─── Deutsche Bank AG, Frankfurt with beneficiary account

:58A:BARCGB22
└─── Barclays Bank PLC, London (8-character BIC)

:58A:/FINAL001
BNPAFRPP
└─── BNP Paribas, Paris with final settlement account

§BIC Code Structure

  • 8-character BIC: BANKCCLL (Bank-Country-Location)
  • 11-character BIC: BANKCCLLBBB (Bank-Country-Location-Branch)
  • Bank Code: 4 letters identifying the institution
  • Country Code: 2 letters (ISO 3166-1 alpha-2)
  • Location Code: 2 alphanumeric characters
  • Branch Code: 3 alphanumeric characters (optional)

§Account Number Guidelines

  • Format: Up to 34 alphanumeric characters
  • Content: Beneficiary institution’s account number or identifier
  • Usage: When specific account designation is required for settlement
  • Omission: When only institution identification is needed
  • Purpose: Facilitates direct settlement to specific account

§Payment Chain Context

In the payment chain hierarchy:

  • Field 50: Ordering Customer (originator)
  • Field 52A/D: Ordering Institution (sender’s bank)
  • Field 53A/B/D: Sender’s Correspondent (intermediate institution)
  • Field 54A/B/D: Receiver’s Correspondent (intermediate institution)
  • Field 55A/B/D: Third Reimbursement Institution (intermediate institution)
  • Field 56A/C/D: Intermediary Institution (intermediate institution)
  • Field 57A/B/C/D: Account With Institution (final institution)
  • Field 58A/D: Beneficiary Institution (final beneficiary bank)
  • Field 59: Beneficiary Customer (final recipient)

§Validation Rules

  1. BIC format: Must be valid 8 or 11 character BIC code
  2. Bank code: Must be 4 alphabetic characters
  3. Country code: Must be 2 alphabetic characters
  4. Location code: Must be 2 alphanumeric characters
  5. Branch code: Must be 3 alphanumeric characters (if present)
  6. Account number: Maximum 34 characters (if present)
  7. Character validation: All components must be printable ASCII

§Network Validated Rules (SWIFT Standards)

  • BIC must be valid and registered in SWIFT network (Error: T10)
  • BIC format must comply with ISO 13616 standards (Error: T11)
  • Account number cannot exceed 34 characters (Error: T14)
  • Bank code must be alphabetic only (Error: T15)
  • Country code must be valid ISO 3166-1 code (Error: T16)
  • Location code must be alphanumeric (Error: T17)
  • Branch code must be alphanumeric if present (Error: T18)
  • Field 58A alternative to 58D (Error: C58)
  • Institution must be capable of receiving funds (Error: C59)

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 Field58A

Source

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

Create a new Field58A 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 component of the BIC

Source

pub fn country_code(&self) -> &str

Get the country code component of the BIC

Source

pub fn location_code(&self) -> &str

Get the location code component of the BIC

Source

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

Get the branch code component of the BIC (if present)

Source

pub fn description(&self) -> String

Get human-readable description

Source

pub fn is_major_financial_center(&self) -> bool

Check if this institution is in a major financial center

Source

pub fn is_retail_bank(&self) -> bool

Check if this is a retail banking institution

Source

pub fn supports_real_time_payments(&self) -> bool

Check if this institution supports real-time payments

Source

pub fn regulatory_jurisdiction(&self) -> &'static str

Get the regulatory jurisdiction for this institution

Trait Implementations§

Source§

impl Clone for Field58A

Source§

fn clone(&self) -> Field58A

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 Field58A

Source§

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

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

impl<'de> Deserialize<'de> for Field58A

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 Field58A

Source§

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

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

impl PartialEq for Field58A

Source§

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

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 Field58A

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 Eq for Field58A

Source§

impl StructuralPartialEq for Field58A

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>,