Struct Field50A

Source
pub struct Field50A {
    pub account: Option<String>,
    pub bic: String,
}
Expand description

§Field 50: Ordering Customer

§Overview

Field 50 identifies the ordering customer (originator) of a SWIFT payment message. This field is crucial for identifying the party who initiated the payment instruction and is used for compliance, audit, and customer relationship purposes. The field supports multiple format options (A, F, K) to accommodate different identification methods and regulatory requirements.

§Format Specification

Field 50 supports three format options:

§Option A (50A): BIC-based Identification

Format: [/account]BIC

  • account: Optional account number (max 34 characters, preceded by /)
  • BIC: Bank Identifier Code (8 or 11 characters)
  • Structure: Account and BIC on separate lines if account present

§Option F (50F): Party Identifier with Name/Address

Format: party_identifier + 4*35x

  • party_identifier: Unique party identifier (max 35 characters)
  • name_and_address: Up to 4 lines of 35 characters each
  • Usage: For structured party identification with full name/address

§Option K (50K): Name and Address Only

Format: 4*35x

  • name_and_address: Up to 4 lines of 35 characters each
  • Usage: Simple name/address format without structured identifiers
  • Most common: Default option when no BIC or party ID available

§Usage Context

Field 50 is mandatory in most SWIFT payment messages:

  • MT103: Single Customer Credit Transfer
  • MT200: Financial Institution Transfer
  • MT202: General Financial Institution Transfer
  • MT202COV: Cover for customer credit transfer

§Regulatory Applications

  • AML/KYC: Customer identification for anti-money laundering compliance
  • Sanctions screening: Identifying parties for sanctions compliance
  • FATCA/CRS: Tax reporting requirements
  • Audit trails: Maintaining originator information for investigations
  • Customer due diligence: Enhanced due diligence requirements

§Examples

:50A:/1234567890
DEUTDEFFXXX
└─── Customer with account 1234567890 at Deutsche Bank Frankfurt

:50A:CHASUS33XXX
└─── Customer identified by BIC only (JPMorgan Chase New York)

:50F:PARTY123456789
JOHN DOE ENTERPRISES
123 BUSINESS AVENUE
NEW YORK NY 10001
UNITED STATES
└─── Customer with party identifier and full address

:50K:ACME CORPORATION
456 INDUSTRIAL DRIVE
CHICAGO IL 60601
UNITED STATES
└─── Customer with name and address only

§Option Selection Guidelines

  • Use 50A when: Customer has account at known financial institution with BIC
  • Use 50F when: Structured party identification required (regulatory compliance)
  • Use 50K when: Simple name/address sufficient, no structured ID available
  • Preference order: 50A > 50F > 50K (from most to least structured)

§Validation Rules

§Option A (50A):

  1. BIC validation: Must be valid 8 or 11 character BIC format
  2. Account format: If present, max 34 characters, must start with /
  3. BIC structure: 4!a2!a2!c[3!c] format required

§Option F (50F):

  1. Party identifier: Cannot be empty, max 35 characters
  2. Address lines: Minimum 1, maximum 4 lines
  3. Line length: Each line max 35 characters
  4. Character set: Printable ASCII characters only

§Option K (50K):

  1. Address lines: Minimum 1, maximum 4 lines
  2. Line length: Each line max 35 characters
  3. Character set: Printable ASCII characters only
  4. Content validation: Must contain meaningful customer information

§Network Validated Rules (SWIFT Standards)

  • Field 50 is mandatory in customer payment messages (Error: C23)
  • BIC in option A must be valid format (Error: T27)
  • Account number cannot exceed 34 characters (Error: T15)
  • Name/address lines cannot exceed 35 characters each (Error: T14)
  • Maximum 4 name/address lines allowed (Error: T16)
  • Characters must be from SWIFT character set (Error: T61)

Fields§

§account: Option<String>

Optional account number (starting with /)

§bic: String

BIC code

Implementations§

Source§

impl Field50A

Source

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

Create a new Field50A with validation

Source

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

Get the account number

Source

pub fn bic(&self) -> &str

Get the BIC code

Trait Implementations§

Source§

impl Clone for Field50A

Source§

fn clone(&self) -> Field50A

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 Field50A

Source§

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

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

impl<'de> Deserialize<'de> for Field50A

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 Field50A

Source§

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

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

impl PartialEq for Field50A

Source§

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

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 Field50A

Source§

fn parse(content: &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 Field50A

Source§

impl StructuralPartialEq for Field50A

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