pub struct Field71F {
pub currency: String,
pub amount: f64,
pub raw_amount: String,
}
Expand description
§Field 71F: Sender’s Charges
§Overview
Field 71F specifies the charges borne by the sender in SWIFT payment messages. This field contains the currency and amount of charges that the ordering customer or sending institution pays for processing the payment transaction. These charges are separate from the main payment amount and provide transparency in fee allocation, particularly important for correspondent banking arrangements and regulatory compliance.
§Format Specification
Format: 3!a15d
- 3!a: Currency code (3 alphabetic characters, ISO 4217)
- 15d: Amount with up to 15 digits (including decimal places)
- Decimal separator: Comma (,) as per SWIFT standards
- Amount format: No thousands separators, up to 2 decimal places
§Structure
USD25,50
│││└──┘
│││ └─ Amount (25.50)
└┴┴─── Currency (USD)
§Field Components
- Currency Code: ISO 4217 three-letter currency code
- Must be valid and recognized currency
- Alphabetic characters only
- Case-insensitive but normalized to uppercase
- Charge Amount: Monetary amount of sender’s charges
- Maximum 15 digits including decimal places
- Comma as decimal separator
- Non-negative values only
§Usage Context
Field 71F 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
- Charge transparency: Detailed fee disclosure
- Cost accounting: Accurate charge tracking
- Correspondent banking: Fee settlement between banks
- Regulatory compliance: Charge reporting requirements
- Customer billing: Separate charge invoicing
- Audit trails: Complete transaction cost records
§Examples
:71F:USD25,50
└─── USD 25.50 in sender's charges
:71F:EUR15,00
└─── EUR 15.00 in processing fees
:71F:GBP10,75
└─── GBP 10.75 in correspondent charges
:71F:CHF50,00
└─── CHF 50.00 in urgent transfer fees
:71F:JPY2500,00
└─── JPY 2,500.00 in international charges
§Charge Types
- Processing fees: Basic transaction processing charges
- Correspondent charges: Fees for correspondent bank services
- Urgent transfer fees: Premium charges for same-day processing
- Regulatory fees: Charges for compliance and reporting
- Network fees: SWIFT network usage charges
- Investigation fees: Charges for payment inquiries or investigations
§Currency Guidelines
- ISO 4217 compliance: Must use standard currency codes
- Active currencies: Should use currently active currency codes
- Major currencies: USD, EUR, GBP, JPY, CHF commonly used
- Local currencies: Domestic currency for local charges
- Consistency: Should align with payment currency where appropriate
§Amount Formatting
- Decimal places: Typically 2 decimal places for most currencies
- Japanese Yen: Usually no decimal places (whole numbers)
- Precision: Up to 15 total digits including decimals
- Range: Must be non-negative (zero or positive)
- Separator: Comma (,) for decimal separation
§Validation Rules
- Currency format: Must be exactly 3 alphabetic characters
- Currency validity: Must be valid ISO 4217 currency code
- Amount format: Must follow SWIFT decimal format with comma
- Amount range: Must be non-negative
- Length limits: Total field length within SWIFT limits
- Character validation: Only allowed characters in amount
§Network Validated Rules (SWIFT Standards)
- Currency must be valid ISO 4217 code (Error: T52)
- Amount must be properly formatted (Error: T40)
- Amount cannot be negative (Error: T13)
- Decimal separator must be comma (Error: T41)
- Maximum 15 digits in amount (Error: T50)
- Currency must be alphabetic only (Error: T15)
- Field format must comply with specification (Error: T26)
Fields§
§currency: String
Currency code (3 letters, ISO 4217)
amount: f64
Charge amount
raw_amount: String
Raw amount string as received (preserves original formatting)
Implementations§
Source§impl Field71F
impl Field71F
Sourcepub fn new(currency: impl Into<String>, amount: f64) -> Result<Self, ParseError>
pub fn new(currency: impl Into<String>, amount: f64) -> Result<Self, ParseError>
Create a new Field71F with validation
Sourcepub fn from_raw(
currency: impl Into<String>,
raw_amount: impl Into<String>,
) -> Result<Self, ParseError>
pub fn from_raw( currency: impl Into<String>, raw_amount: impl Into<String>, ) -> Result<Self, ParseError>
Create from raw amount string
Sourcepub fn raw_amount(&self) -> &str
pub fn raw_amount(&self) -> &str
Get the raw amount string
Sourcepub fn format_amount(amount: f64) -> String
pub fn format_amount(amount: f64) -> String
Format amount for SWIFT output (with comma as decimal separator)
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get human-readable description
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field71F
impl<'de> Deserialize<'de> for Field71F
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 SwiftField for Field71F
impl SwiftField for Field71F
Source§fn parse(value: &str) -> Result<Self, ParseError>
fn parse(value: &str) -> Result<Self, ParseError>
Parse field value from string representation
Source§fn to_swift_string(&self) -> String
fn to_swift_string(&self) -> String
Convert field back to SWIFT string format
Source§fn validate(&self) -> ValidationResult
fn validate(&self) -> ValidationResult
Validate field according to SWIFT format rules
Source§fn format_spec() -> &'static str
fn format_spec() -> &'static str
Get field format specification
impl StructuralPartialEq for Field71F
Auto Trait Implementations§
impl Freeze for Field71F
impl RefUnwindSafe for Field71F
impl Send for Field71F
impl Sync for Field71F
impl Unpin for Field71F
impl UnwindSafe for Field71F
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more