Struct Field77B

Source
pub struct Field77B {
    pub information: Vec<String>,
    pub ordering_country: Option<String>,
    pub beneficiary_country: Option<String>,
}
Expand description

§Field 77B: Regulatory Reporting

§Overview

Field 77B contains regulatory reporting information in SWIFT payment messages, providing data required by regulatory authorities for compliance, monitoring, and statistical purposes. This field supports various regulatory requirements including anti-money laundering (AML), know your customer (KYC), foreign exchange reporting, and other jurisdiction-specific compliance obligations. The information helps authorities track cross-border payments and ensure compliance with local and international regulations.

§Format Specification

Format: 3*35x

  • 3*35x: Up to 3 lines of 35 characters each
  • Line structure: Structured regulatory codes and information
  • Character set: SWIFT character set (A-Z, 0-9, and limited special characters)
  • Line separation: Each line on separate row

§Structure

/ORDERRES/US/1234567890123456
/BENEFRES/DE/9876543210987654
/PURP/TRADE
│                              │
└──────────────────────────────┘
       Up to 35 characters per line
       Maximum 3 lines

§Field Components

  • Ordering Country: Country code of ordering customer
  • Beneficiary Country: Country code of beneficiary customer
  • Purpose Code: Transaction purpose or category
  • Regulatory Codes: Authority-specific reporting codes
  • Additional Information: Supplementary compliance data

§Usage Context

Field 77B is used in:

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

§Business Applications

  • Regulatory compliance: Meeting reporting requirements
  • AML/KYC reporting: Anti-money laundering compliance
  • Foreign exchange reporting: FX transaction monitoring
  • Statistical reporting: Economic and trade statistics
  • Sanctions screening: Compliance with sanctions regimes
  • Tax reporting: Supporting tax authority requirements

§Common Regulatory Codes

§/ORDERRES/ - Ordering Customer Residence

  • Format: /ORDERRES/CC/identifier
  • CC: ISO 3166-1 two-letter country code
  • identifier: Customer identification number
  • Purpose: Identifies ordering customer’s country of residence

§/BENEFRES/ - Beneficiary Residence

  • Format: /BENEFRES/CC/identifier
  • CC: ISO 3166-1 two-letter country code
  • identifier: Beneficiary identification number
  • Purpose: Identifies beneficiary’s country of residence

§/PURP/ - Purpose Code

  • Format: /PURP/code
  • code: Transaction purpose code
  • Examples: TRADE, SALA, PENS, DIVI, LOAN
  • Purpose: Categorizes transaction purpose

§Examples

:77B:/ORDERRES/US/1234567890
└─── US ordering customer with ID

:77B:/ORDERRES/DE/9876543210
/BENEFRES/GB/5555666677
/PURP/TRADE
└─── Complete regulatory reporting with purpose

:77B:/BENEFRES/JP/1111222233
/PURP/SALA
└─── Japanese beneficiary for salary payment

:77B:/ORDERRES/CH/7777888899
/BENEFRES/FR/4444555566
└─── Cross-border payment reporting

§Purpose Codes

  • TRADE: Trade-related payments
  • SALA: Salary and wage payments
  • PENS: Pension payments
  • DIVI: Dividend payments
  • LOAN: Loan-related payments
  • RENT: Rental payments
  • ROYALTY: Royalty payments
  • FEES: Professional fees
  • INSUR: Insurance payments
  • INVEST: Investment-related payments

§Country Code Guidelines

  • ISO 3166-1: Must use standard two-letter country codes
  • Active codes: Should use currently valid country codes
  • Residence: Based on customer’s country of residence
  • Jurisdiction: May differ from bank location
  • Compliance: Must align with regulatory requirements

§Validation Rules

  1. Line count: Maximum 3 lines
  2. Line length: Maximum 35 characters per line
  3. Character set: SWIFT character set only
  4. Country codes: Must be valid ISO 3166-1 codes
  5. Format structure: Must follow structured format
  6. Content validation: Codes must be meaningful
  7. Regulatory compliance: Must meet jurisdiction requirements

§Network Validated Rules (SWIFT Standards)

  • Maximum 3 lines allowed (Error: T26)
  • Each line maximum 35 characters (Error: T50)
  • Must use SWIFT character set only (Error: T61)
  • Country codes must be valid (Error: T52)
  • Format must follow regulatory structure (Error: T77)
  • Purpose codes should be recognized (Warning: W77)
  • Field required for certain jurisdictions (Error: M77)

Fields§

§information: Vec<String>

Regulatory reporting information lines (up to 3 lines of 35 characters each)

§ordering_country: Option<String>

Ordering country code

§beneficiary_country: Option<String>

Beneficiary country code

Implementations§

Source§

impl Field77B

Source

pub fn new(information: Vec<String>) -> Result<Self, ParseError>

Create a new Field77B with validation

Source

pub fn from_string(content: impl Into<String>) -> Result<Self, ParseError>

Create from a single string, splitting on newlines

Source

pub fn information(&self) -> &[String]

Get the information lines

Source

pub fn line_count(&self) -> usize

Get the number of lines

Source

pub fn line(&self, index: usize) -> Option<&str>

Get a specific line by index

Source

pub fn add_line(&mut self, line: String) -> Result<(), ParseError>

Add a line of information

Source

pub fn has_ordering_country(&self) -> bool

Check if this contains ordering country information

Source

pub fn has_beneficiary_country(&self) -> bool

Check if this contains beneficiary country information

Source

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

Extract ordering country code if present

Source

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

Extract beneficiary country code if present

Source

pub fn description(&self) -> String

Get human-readable description

Trait Implementations§

Source§

impl Clone for Field77B

Source§

fn clone(&self) -> Field77B

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 Field77B

Source§

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

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

impl<'de> Deserialize<'de> for Field77B

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 Field77B

Source§

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

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

impl PartialEq for Field77B

Source§

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

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 Field77B

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 Field77B

Source§

impl StructuralPartialEq for Field77B

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