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
- Line count: Maximum 3 lines
- Line length: Maximum 35 characters per line
- Character set: SWIFT character set only
- Country codes: Must be valid ISO 3166-1 codes
- Format structure: Must follow structured format
- Content validation: Codes must be meaningful
- 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
impl Field77B
Sourcepub fn new(information: Vec<String>) -> Result<Self, ParseError>
pub fn new(information: Vec<String>) -> Result<Self, ParseError>
Create a new Field77B with validation
Sourcepub fn from_string(content: impl Into<String>) -> Result<Self, ParseError>
pub fn from_string(content: impl Into<String>) -> Result<Self, ParseError>
Create from a single string, splitting on newlines
Sourcepub fn information(&self) -> &[String]
pub fn information(&self) -> &[String]
Get the information lines
Sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Get the number of lines
Sourcepub fn has_ordering_country(&self) -> bool
pub fn has_ordering_country(&self) -> bool
Check if this contains ordering country information
Sourcepub fn has_beneficiary_country(&self) -> bool
pub fn has_beneficiary_country(&self) -> bool
Check if this contains beneficiary country information
Sourcepub fn ordering_country(&self) -> Option<&str>
pub fn ordering_country(&self) -> Option<&str>
Extract ordering country code if present
Sourcepub fn beneficiary_country(&self) -> Option<&str>
pub fn beneficiary_country(&self) -> Option<&str>
Extract beneficiary country code if present
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get human-readable description