Struct Field71F

Source
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

  1. Currency format: Must be exactly 3 alphabetic characters
  2. Currency validity: Must be valid ISO 4217 currency code
  3. Amount format: Must follow SWIFT decimal format with comma
  4. Amount range: Must be non-negative
  5. Length limits: Total field length within SWIFT limits
  6. 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

Source

pub fn new(currency: impl Into<String>, amount: f64) -> Result<Self, ParseError>

Create a new Field71F with validation

Source

pub fn from_raw( currency: impl Into<String>, raw_amount: impl Into<String>, ) -> Result<Self, ParseError>

Create from raw amount string

Source

pub fn currency(&self) -> &str

Get the currency code

Source

pub fn amount(&self) -> f64

Get the charge amount

Source

pub fn raw_amount(&self) -> &str

Get the raw amount string

Source

pub fn format_amount(amount: f64) -> String

Format amount for SWIFT output (with comma as decimal separator)

Source

pub fn description(&self) -> String

Get human-readable description

Trait Implementations§

Source§

impl Clone for Field71F

Source§

fn clone(&self) -> Field71F

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 Field71F

Source§

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

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

impl<'de> Deserialize<'de> for Field71F

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 Field71F

Source§

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

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

impl PartialEq for Field71F

Source§

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

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 Field71F

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 StructuralPartialEq for Field71F

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