pub struct Field23E {
pub instruction_code: String,
pub additional_info: Option<String>,
}
Expand description
§Field 23E: Instruction Code
§Overview
Field 23E contains instruction codes that specify how the transaction should be processed by the receiving financial institution. These codes provide additional processing instructions beyond the basic operation code in Field 23B, enabling more granular control over payment handling, timing, and communication requirements.
§Format Specification
Format: 4!c[/30x]
- 4!c: Exactly 4 alphanumeric characters (instruction code)
- [/30x]: Optional additional information (up to 30 characters after slash)
- Character set: A-Z, 0-9 for instruction code; printable ASCII for additional info
- Case handling: Instruction codes normalized to uppercase
- Validation: Must use recognized instruction codes
§Standard Instruction Codes
The SWIFT-recognized instruction codes and their meanings:
§Payment Method Instructions
- CHQB: Pay by cheque/banker’s draft - Physical payment instrument required
- REPA: Reimbursement payment - Payment for reimbursement purposes
§Communication Instructions
- PHOB: Phone ordering customer before payment - Contact beneficiary before processing
- PHOI: Phone intermediary bank before payment - Contact intermediary institution
- PHON: Phone all parties before payment - Contact all relevant parties
- TELB: Telex beneficiary before payment - Send telex to beneficiary
- TELE: Telex all parties before payment - Send telex to all parties
- TELI: Telex intermediary bank before payment - Send telex to intermediary
§Processing Instructions
- HOLD: Hold payment until further notice - Suspend processing pending instructions
- INTC: Intracompany payment - Internal company transfer
- SDVA: Same day value - Ensure same-day value dating
§Usage Context
Field 23E is used in conjunction with Field 23B in various MT message types:
- MT103: Single Customer Credit Transfer
- MT202: General Financial Institution Transfer
- MT202COV: Cover for customer credit transfer
- MT205: Financial Institution Transfer for its Own Account
§Business Applications
- Payment timing: Control when payments are processed (SDVA, HOLD)
- Communication protocols: Specify required notifications (PHOB, TELB, etc.)
- Payment methods: Indicate specific payment instruments (CHQB)
- Risk management: Enable additional verification steps (PHON, HOLD)
- Compliance: Support regulatory and internal control requirements
- Customer service: Ensure proper communication with beneficiaries
§Business Rules and Restrictions
Field 23E usage is restricted based on the operation code in Field 23B:
§Field 23B = SPRI (Special Priority)
Only the following 23E codes are permitted:
- SDVA: Same day value
- TELB: Telex beneficiary before payment
- PHOB: Phone ordering customer before payment
- INTC: Intracompany payment
§Field 23B = SSTD or SPAY
Field 23E must not be present when 23B contains these codes.
§Other 23B Values
Any valid instruction code may be used with other operation codes.
§Validation Rules
- Instruction code: Must be exactly 4 alphanumeric characters
- Valid codes: Must be from the recognized instruction code list
- Additional info: Optional, max 30 characters if present
- Character set: Printable ASCII characters only
- Business rules: Must comply with Field 23B restrictions
- Format: Additional info must follow slash separator
§Network Validated Rules (SWIFT Standards)
- Instruction code must be exactly 4 characters (Error: T26)
- Must be a recognized instruction code (Error: T18)
- Additional information max 30 characters (Error: T13)
- Must comply with Field 23B business rules (Error: T40)
- Character set validation (Error: T61)
§Examples
:23E:CHQB
└─── Pay by cheque/banker's draft
:23E:HOLD/COMPLIANCE CHECK
└─── Hold payment with additional information
:23E:PHOB/CALL BEFORE 5PM
└─── Phone beneficiary with specific timing
:23E:SDVA
└─── Same day value dating required
Fields§
§instruction_code: String
Instruction code (exactly 4 alphanumeric characters)
Specifies the processing instruction for the transaction. Must be one of the recognized SWIFT instruction codes.
Format: Exactly 4 alphanumeric characters (A-Z, 0-9) Case handling: Automatically normalized to uppercase Validation: Must be from the standard instruction code list
§Standard Codes
"CHQB"
- Pay by cheque/banker’s draft"HOLD"
- Hold payment until further notice"INTC"
- Intracompany payment"PHOB"
- Phone ordering customer before payment"PHOI"
- Phone intermediary bank before payment"PHON"
- Phone all parties before payment"REPA"
- Reimbursement payment"SDVA"
- Same day value"TELB"
- Telex beneficiary before payment"TELE"
- Telex all parties before payment"TELI"
- Telex intermediary bank before payment
additional_info: Option<String>
Additional information (optional, up to 30 characters)
Provides supplementary details about the instruction code. This field is optional and should only be used when additional clarification or specific details are required.
Format: Up to 30 printable ASCII characters Separator: Must be preceded by “/” in SWIFT format Validation: Cannot be empty if specified
§Examples
"COMPLIANCE CHECK"
- For HOLD instructions"CALL BEFORE 5PM"
- For phone instructions"WEEKLY PAYMENT"
- For REPA instructions"URGENT PROCESSING"
- For time-sensitive instructions
Implementations§
Source§impl Field23E
impl Field23E
Sourcepub fn new(
instruction_code: impl Into<String>,
additional_info: Option<String>,
) -> Result<Self>
pub fn new( instruction_code: impl Into<String>, additional_info: Option<String>, ) -> Result<Self>
Create a new Field23E with validation
Sourcepub fn additional_info(&self) -> Option<&str>
pub fn additional_info(&self) -> Option<&str>
Get the additional information
Returns the optional additional information that provides supplementary details about the instruction.
§Returns
An optional string slice containing the additional information
§Example
let field = Field23E::new("HOLD", Some("COMPLIANCE CHECK".to_string())).unwrap();
assert_eq!(field.additional_info(), Some("COMPLIANCE CHECK"));
Sourcepub fn is_valid_code(&self) -> bool
pub fn is_valid_code(&self) -> bool
Sourcepub fn is_communication_instruction(&self) -> bool
pub fn is_communication_instruction(&self) -> bool
Check if this is a communication instruction
Determines if the instruction code requires communication with parties before processing the payment.
§Returns
true
if the instruction requires communication
§Example
let phone_instruction = Field23E::new("PHOB", None).unwrap();
assert!(phone_instruction.is_communication_instruction());
let payment_instruction = Field23E::new("CHQB", None).unwrap();
assert!(!payment_instruction.is_communication_instruction());
Sourcepub fn is_timing_instruction(&self) -> bool
pub fn is_timing_instruction(&self) -> bool
Check if this is a timing instruction
Determines if the instruction code affects the timing or scheduling of the payment processing.
§Returns
true
if the instruction affects timing
§Example
let timing_instruction = Field23E::new("SDVA", None).unwrap();
assert!(timing_instruction.is_timing_instruction());
let hold_instruction = Field23E::new("HOLD", None).unwrap();
assert!(hold_instruction.is_timing_instruction());
Sourcepub fn is_payment_method_instruction(&self) -> bool
pub fn is_payment_method_instruction(&self) -> bool
Check if this is a payment method instruction
Determines if the instruction code specifies a particular payment method or instrument.
§Returns
true
if the instruction specifies a payment method
§Example
let method_instruction = Field23E::new("CHQB", None).unwrap();
assert!(method_instruction.is_payment_method_instruction());
let reimbursement = Field23E::new("REPA", None).unwrap();
assert!(reimbursement.is_payment_method_instruction());
Sourcepub fn requires_manual_intervention(&self) -> bool
pub fn requires_manual_intervention(&self) -> bool
Check if this instruction requires manual intervention
Determines if the instruction code typically requires manual processing or intervention by bank staff.
§Returns
true
if manual intervention is likely required
§Example
let manual_instruction = Field23E::new("HOLD", None).unwrap();
assert!(manual_instruction.requires_manual_intervention());
let auto_instruction = Field23E::new("SDVA", None).unwrap();
assert!(!auto_instruction.requires_manual_intervention());
Sourcepub fn priority_impact(&self) -> i8
pub fn priority_impact(&self) -> i8
Get the processing priority impact
Returns how this instruction affects processing priority. Positive values increase priority, negative values decrease it.
§Returns
Priority adjustment (-2 to +2)
§Example
let urgent = Field23E::new("SDVA", None).unwrap();
assert_eq!(urgent.priority_impact(), 2);
let hold = Field23E::new("HOLD", None).unwrap();
assert_eq!(hold.priority_impact(), -2);
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get human-readable description of the instruction code
Returns a descriptive string explaining what this instruction code represents and its typical usage in payment processing.
§Returns
A descriptive string
§Example
let field = Field23E::new("CHQB", None).unwrap();
println!("{}", field.description());
Sourcepub fn instruction_category(&self) -> &'static str
pub fn instruction_category(&self) -> &'static str
Sourcepub fn recommends_additional_info(&self) -> bool
pub fn recommends_additional_info(&self) -> bool
Check if additional information is recommended
Determines if this instruction code typically benefits from additional information to clarify processing requirements.
§Returns
true
if additional information is recommended
§Example
let hold = Field23E::new("HOLD", None).unwrap();
assert!(hold.recommends_additional_info());
let same_day = Field23E::new("SDVA", None).unwrap();
assert!(!same_day.recommends_additional_info());
Sourcepub fn validate_with_field_23b(&self, field_23b_code: &str) -> Result<()>
pub fn validate_with_field_23b(&self, field_23b_code: &str) -> Result<()>
Validate against Field 23B business rules
Sourcepub fn comprehensive_description(&self) -> String
pub fn comprehensive_description(&self) -> String
Get comprehensive instruction details
Returns a detailed description including the instruction code, category, description, and additional information if present.
§Returns
Formatted string with comprehensive details
§Example
let field = Field23E::new("HOLD", Some("COMPLIANCE CHECK".to_string())).unwrap();
println!("{}", field.comprehensive_description());