libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 3e11aa831c75819a7e26e5255c6141b860d50c72
parent c7bd6b10e09154a8ee0c71ca00ad701c7ba3d4a9
Author: Antoine A <>
Date:   Fri, 24 Apr 2026 10:37:59 +0200

ebics: pain022 parser

Diffstat:
Msrc/bin/iso20022-codegen.rs | 13+++++--------
Msrc/iso20022/camt.rs | 4++--
Dsrc/iso20022/external_code.rs | 1374-------------------------------------------------------------------------------
Msrc/iso20022/hac.rs | 28+++++++++++++---------------
Msrc/iso20022/mod.rs | 9+++++----
Asrc/iso20022/pain002.rs | 249+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/iso20022/status_code.rs | 1374+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 1648 insertions(+), 1403 deletions(-)

diff --git a/src/bin/iso20022-codegen.rs b/src/bin/iso20022-codegen.rs @@ -90,16 +90,13 @@ use taler_enum_meta::EnumMeta; .to_string(); for (set, enum_name) in [ - ("ExternalStatusReason1Code", "ExternalStatusReasonCode"), - ( - "ExternalPaymentGroupStatus1Code", - "ExternalPaymentGroupStatusCode", - ), + ("ExternalStatusReason1Code", "StatusReason"), + ("ExternalPaymentGroupStatus1Code", "PaymentGroupStatus"), ( "ExternalPaymentTransactionStatus1Code", - "ExternalPaymentTransactionStatusCode", + "PaymentTransactionStatus", ), - ("ExternalReturnReason1Code", "ExternalReturnReasonCode"), + ("ExternalReturnReason1Code", "ReturnReason"), ] { let set = code_sets.get_mut(set).unwrap(); set.sort_unstable_by_key(|(code, _, _)| code.clone()); @@ -119,7 +116,7 @@ use taler_enum_meta::EnumMeta; } writeln!(&mut out, "}}").unwrap(); } - std::fs::write("src/iso20022/external_code.rs", out).unwrap(); + std::fs::write("src/iso20022/status_code.rs", out).unwrap(); } pub async fn iso20022codegen_bank_transaction_code() { diff --git a/src/iso20022/camt.rs b/src/iso20022/camt.rs @@ -34,7 +34,7 @@ use crate::{ iso20022::{ ChargeBearer, bank_tx_code::{BankTxDomainCode, BankTxFamilyCode, BankTxSubFamilyCode}, - external_code::ExternalReturnReasonCode, + status_code::ReturnReason, }, model::{BatchId, InId, InTx, OutBatch, OutId, OutReversal, OutTx, Tx}, xml::{self, Xml, XmlAccess as _}, @@ -206,7 +206,7 @@ fn wire_transfer_subject(n: Xml) -> xml::Result<Option<Box<str>>> { fn return_reason(n: Xml) -> xml::Result<Box<str>> { let mut buf = String::new(); if let Some(n) = n.opt("RtrInf")? { - let code: ExternalReturnReasonCode = n.one("Rsn").one("Cd").parse()?; + let code: ReturnReason = n.one("Rsn").one("Cd").parse()?; write!(&mut buf, "{code} '{}'", code.description()).unwrap(); let mut infos = n.many("AddtlInf"); diff --git a/src/iso20022/external_code.rs b/src/iso20022/external_code.rs @@ -1,1374 +0,0 @@ -/* -* This file is part of LibEuFin. -* Copyright (C) 2026 Taler Systems S.A. - -* LibEuFin is free software; you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation; either version 3, or -* (at your option) any later version. - -* LibEuFin is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General -* Public License for more details. - -* You should have received a copy of the GNU Affero General Public -* License along with LibEuFin; see the file COPYING. If not, see -* <http://www.gnu.org/licenses/> -*/ - -// THIS FILE IS GENERATED, DO NOT EDIT - -use taler_enum_meta::EnumMeta; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] -#[enum_meta(DomainCode, Description, Str)] -pub enum ExternalStatusReasonCode { - /// Clearing process aborted due to timeout - #[code = "AB01"] - AbortedClearingTimeout, - /// Clearing process aborted due to a fatal error - #[code = "AB02"] - AbortedClearingFatalError, - /// Settlement aborted due to timeout - #[code = "AB03"] - AbortedSettlementTimeout, - /// Settlement process aborted due to a fatal error - #[code = "AB04"] - AbortedSettlementFatalError, - /// Transaction stopped due to timeout at the Creditor Agent - #[code = "AB05"] - TimeoutCreditorAgent, - /// Transaction stopped due to timeout at the Instructed Agent - #[code = "AB06"] - TimeoutInstructedAgent, - /// Agent of message is not online - #[code = "AB07"] - OfflineAgent, - /// Creditor Agent is not online - #[code = "AB08"] - OfflineCreditorAgent, - /// Transaction stopped due to error at the Creditor Agent - #[code = "AB09"] - ErrorCreditorAgent, - /// Transaction stopped due to error at the Instructed Agent - #[code = "AB10"] - ErrorInstructedAgent, - /// Transaction stopped due to timeout at the Debtor Agent - #[code = "AB11"] - TimeoutDebtorAgent, - /// Duplicate Concurrent Batch Sequence number– for Settlement Instructions - #[code = "AB12"] - InvalidConcurrentBatch, - /// Wrong Message Routing Type for Return-of-Funds - #[code = "AB13"] - InvalidRoutingCodeUtilised, - /// Instruction may not be placed on the Continuous Processing Line settlement processor - #[code = "AB15"] - InvalidAccountNumberForSettlementType, - /// Agreement number not valid (beneficiary) - #[code = "AB21"] - InvalidSettlementAgreementNumberSpecified, - /// Settlement Instruction does not exist - #[code = "AB26"] - InvalidBatchSettlementInstruction, - /// Account number is invalid or missing - #[code = "AC01"] - IncorrectAccountNumber, - /// Debtor account number invalid or missing - #[code = "AC02"] - InvalidDebtorAccountNumber, - /// Creditor account number invalid or missing - #[code = "AC03"] - InvalidCreditorAccountNumber, - /// Account number specified has been closed on the bank of account's books - #[code = "AC04"] - ClosedAccountNumber, - /// Debtor account number closed - #[code = "AC05"] - ClosedDebtorAccountNumber, - /// Account specified is blocked, prohibiting posting of transactions against it - #[code = "AC06"] - BlockedAccount, - /// Creditor account number closed - #[code = "AC07"] - ClosedCreditorAccountNumber, - /// Branch code is invalid or missing - #[code = "AC08"] - InvalidBranchCode, - /// Account currency is invalid or missing - #[code = "AC09"] - InvalidAccountCurrency, - /// Debtor account currency is invalid or missing - #[code = "AC10"] - InvalidDebtorAccountCurrency, - /// Creditor account currency is invalid or missing - #[code = "AC11"] - InvalidCreditorAccountCurrency, - /// Account type missing or invalid - #[code = "AC12"] - InvalidAccountType, - /// Debtor account type missing or invalid - #[code = "AC13"] - InvalidDebtorAccountType, - /// Creditor account type missing or invalid - #[code = "AC14"] - InvalidCreditorAccountType, - /// The account details for the counterparty have changed - #[code = "AC15"] - AccountDetailsChanged, - /// Credit or debit card number is invalid - #[code = "AC16"] - CardNumberInvalid, - /// Request-to-pay Expiry Date and Time has already passed - #[code = "AEXR"] - AlreadyExpiredRTP, - /// Transaction forbidden on this type of account (formerly NoAgreement) - #[code = "AG01"] - TransactionForbidden, - /// Bank Operation code specified in the message is not valid for receiver - #[code = "AG02"] - InvalidBankOperationCode, - /// Transaction type not supported/authorized on this account - #[code = "AG03"] - TransactionNotSupported, - /// Agent country code is missing or invalid - #[code = "AG04"] - InvalidAgentCountry, - /// Debtor agent country code is missing or invalid - #[code = "AG05"] - InvalidDebtorAgentCountry, - /// Creditor agent country code is missing or invalid - #[code = "AG06"] - InvalidCreditorAgentCountry, - /// Debtor account cannot be debited for a generic reason - #[code = "AG07"] - UnsuccesfulDirectDebit, - /// Transaction failed due to invalid or missing user or access right - #[code = "AG08"] - InvalidAccessRights, - /// Original payment never received - #[code = "AG09"] - PaymentNotReceived, - /// Agent of message is suspended from the Real Time Payment system - #[code = "AG10"] - AgentSuspended, - /// Creditor Agent of message is suspended from the Real Time Payment system - #[code = "AG11"] - CreditorAgentSuspended, - /// Payment orders made by transferring funds from one account to another at the same financial institution (bank or payment institution) are not allowed - #[code = "AG12"] - NotAllowedBookTransfer, - /// Returned payments derived from previously returned transactions are not allowed - #[code = "AG13"] - ForbiddenReturnPayment, - /// Agent in the payment workflow is incorrect - #[code = "AGNT"] - IncorrectAgent, - /// Request-to-pay has already been accepted by the Debtor - #[code = "ALAC"] - AlreadyAcceptedRTP, - /// Specified message amount is equal to zero - #[code = "AM01"] - ZeroAmount, - /// Specific transaction/message amount is greater than allowed maximum - #[code = "AM02"] - NotAllowedAmount, - /// Specified message amount is an non processable currency outside of existing agreement - #[code = "AM03"] - NotAllowedCurrency, - /// Amount of funds available to cover specified message amount is insufficient - #[code = "AM04"] - InsufficientFunds, - /// Duplication - #[code = "AM05"] - Duplication, - /// Specified transaction amount is less than agreed minimum - #[code = "AM06"] - TooLowAmount, - /// Amount specified in message has been blocked by regulatory authorities - #[code = "AM07"] - BlockedAmount, - /// Amount received is not the amount agreed or expected - #[code = "AM09"] - WrongAmount, - /// Sum of instructed amounts does not equal the control sum - #[code = "AM10"] - InvalidControlSum, - /// Transaction currency is invalid or missing - #[code = "AM11"] - InvalidTransactionCurrency, - /// Amount is invalid or missing - #[code = "AM12"] - InvalidAmount, - /// Transaction amount exceeds limits set by clearing system - #[code = "AM13"] - AmountExceedsClearingSystemLimit, - /// Transaction amount exceeds limits agreed between bank and client - #[code = "AM14"] - AmountExceedsAgreedLimit, - /// Transaction amount below minimum set by clearing system - #[code = "AM15"] - AmountBelowClearingSystemMinimum, - /// Control Sum at the Group level is invalid - #[code = "AM16"] - InvalidGroupControlSum, - /// Control Sum at the Payment Information level is invalid - #[code = "AM17"] - InvalidPaymentInfoControlSum, - /// Number of transactions is invalid or missing - #[code = "AM18"] - InvalidNumberOfTransactions, - /// Number of transactions at the Group level is invalid or missing - #[code = "AM19"] - InvalidGroupNumberOfTransactions, - /// Number of transactions at the Payment Information level is invalid - #[code = "AM20"] - InvalidPaymentInfoNumberOfTransactions, - /// Transaction amount exceeds limits agreed between bank and client - #[code = "AM21"] - LimitExceeded, - /// Unable to apply zero amount to designated account - #[code = "AM22"] - ZeroAmountNotApplied, - /// Transaction amount exceeds settlement limit - #[code = "AM23"] - AmountExceedsSettlementLimit, - /// Size of the attachment exceeds the allowed maximum - #[code = "AMSE"] - AttachmentMaximumSize, - /// Request To Pay has already been paid by the Debtor - #[code = "APAR"] - AlreadyPaidRTP, - /// Request-to-pay has already been refused by the Debtor - #[code = "ARFR"] - AlreadyRefusedRTP, - /// Request-to-pay has already been rejected - #[code = "ARJR"] - AlreadyRejectedRTP, - /// Attachments to the request-to-pay are not supported - #[code = "ATNS"] - AttachementsNotSupported, - /// Settlement Cycle Day and Calendar day should be the same - #[code = "BDAY"] - NotBusinessDay, - /// Identification of end customer is not consistent with associated account number - #[code = "BE01"] - InconsistenWithEndCustomer, - /// Specification of creditor's address, which is required for payment, is missing/not correct (formerly IncorrectCreditorAddress) - #[code = "BE04"] - MissingCreditorAddress, - /// Party who initiated the message is not recognised by the end customer - #[code = "BE05"] - UnrecognisedInitiatingParty, - /// End customer specified is not known at associated Sort/National Bank Code or does no longer exist in the books - #[code = "BE06"] - UnknownEndCustomer, - /// Specification of debtor's address, which is required for payment, is missing/not correct - #[code = "BE07"] - MissingDebtorAddress, - /// Debtor name is missing - #[code = "BE08"] - MissingDebtorName, - /// Country code is missing or Invalid - #[code = "BE09"] - InvalidCountry, - /// Debtor country code is missing or invalid - #[code = "BE10"] - InvalidDebtorCountry, - /// Creditor country code is missing or invalid - #[code = "BE11"] - InvalidCreditorCountry, - /// Country code of residence is missing or Invalid - #[code = "BE12"] - InvalidCountryOfResidence, - /// Country code of debtor's residence is missing or Invalid - #[code = "BE13"] - InvalidDebtorCountryOfResidence, - /// Country code of creditor's residence is missing or Invalid - #[code = "BE14"] - InvalidCreditorCountryOfResidence, - /// Identification code missing or invalid - #[code = "BE15"] - InvalidIdentificationCode, - /// Debtor or Ultimate Debtor identification code missing or invalid - #[code = "BE16"] - InvalidDebtorIdentificationCode, - /// Creditor or Ultimate Creditor identification code missing or invalid - #[code = "BE17"] - InvalidCreditorIdentificationCode, - /// Contact details missing or invalid - #[code = "BE18"] - InvalidContactDetails, - /// Charge bearer code for transaction type is invalid - #[code = "BE19"] - InvalidChargeBearerCode, - /// Name length exceeds local rules for payment type - #[code = "BE20"] - InvalidNameLength, - /// Name missing or invalid - #[code = "BE21"] - MissingName, - /// Creditor name is missing - #[code = "BE22"] - MissingCreditorName, - /// Phone number or email address, or any other proxy, used as the account proxy is unknown or invalid - #[code = "BE23"] - AccountProxyInvalid, - /// Credit transfer is not tagged as an Extended Remittance Information (ERI) transaction but contains ERI - #[code = "CERI"] - CheckERI, - /// Value in Requested Execution Date or Requested Collection Date is too far in the future - #[code = "CH03"] - RequestedExecutionDateOrRequestedCollectionDateTooFarInFuture, - /// Value in Requested Execution Date or Requested Collection Date is too far in the past - #[code = "CH04"] - RequestedExecutionDateOrRequestedCollectionDateTooFarInPast, - /// Element is not to be used at B- and C-Level - #[code = "CH07"] - ElementIsNotToBeUsedAtBandCLevel, - /// Mandate changes are not allowed - #[code = "CH09"] - MandateChangesNotAllowed, - /// Information on mandate changes are missing - #[code = "CH10"] - InformationOnMandateChangesMissing, - /// Value in Creditor Identifier is incorrect - #[code = "CH11"] - CreditorIdentifierIncorrect, - /// Creditor Identifier is ambiguous at Transaction Level - #[code = "CH12"] - CreditorIdentifierNotUnambiguouslyAtTransactionLevel, - /// Original Debtor Account is not to be used - #[code = "CH13"] - OriginalDebtorAccountIsNotToBeUsed, - /// Original Debtor Agent is not to be used - #[code = "CH14"] - OriginalDebtorAgentIsNotToBeUsed, - /// Content Remittance Information/Structured includes more than 140 characters - #[code = "CH15"] - ElementContentIncludesMoreThan140Characters, - /// Content is incorrect - #[code = "CH16"] - ElementContentFormallyIncorrect, - /// Element is not allowed - #[code = "CH17"] - ElementNotAdmitted, - /// Values in Interbank Settlement Date or Requested Collection Date will be set to the next TARGET day - #[code = "CH19"] - ValuesWillBeSetToNextTARGETday, - /// Number of decimal points not compatible with the currency - #[code = "CH20"] - DecimalPointsNotCompatibleWithCurrency, - /// Mandatory element is missing - #[code = "CH21"] - RequiredCompulsoryElementMissing, - /// SDD CORE and B2B not permitted within one message - #[code = "CH22"] - COREandB2BwithinOnemessage, - /// Related to a Charge message to convey that the code in Charge Breakdown / Type / Code is not accepted by the receiving party - #[code = "CHCO"] - UnacceptedChargeCodeType, - /// Cheque has been presented in cheque clearing and settled on the creditor’s account - #[code = "CHQC"] - ChequeSettledOnCreditorAccount, - /// Related to a Charge message to convey that the charge bearer code used in the corresponding Payment message was not debt - #[code = "CHRG"] - UnderlyingChargeBearerWasNotDebt, - /// Authorisation is cancelled - #[code = "CN01"] - AuthorisationCancelled, - /// Credit notes are not supported - #[code = "CNNS"] - CreditNotesNotSupported, - /// Creditor bank is not registered under this BIC in the CSM - #[code = "CNOR"] - CreditorBankIsNotRegistered, - /// Currency of the payment is incorrect - #[code = "CURR"] - IncorrectCurrency, - /// Cancellation requested by the Debtor - #[code = "CUST"] - RequestedByCustomer, - /// Rejection of a payment due to covering FI settlement not being received - #[code = "DC02"] - SettlementNotReceived, - /// Debtor bank is not registered under this BIC in the CSM - #[code = "DNOR"] - DebtorBankIsNotRegistered, - /// The electronic signature(s) is/are correct - #[code = "DS01"] - ElectronicSignaturesCorrect, - /// An authorized user has cancelled the order - #[code = "DS02"] - OrderCancelled, - /// The user’s attempt to cancel the order was not successful - #[code = "DS03"] - OrderNotCancelled, - /// The order was rejected by the bank side (for reasons concerning content) - #[code = "DS04"] - OrderRejected, - /// The order was correct and could be forwarded for postprocessing - #[code = "DS05"] - OrderForwardedForPostprocessing, - /// The order was transferred to VEU - #[code = "DS06"] - TransferOrder, - /// All actions concerning the order could be done by the EBICS bank server - #[code = "DS07"] - ProcessingOK, - /// The decompression of the file was not successful - #[code = "DS08"] - DecompressionError, - /// The decryption of the file was not successful - #[code = "DS09"] - DecryptionError, - /// Data signature is required - #[code = "DS0A"] - DataSignRequested, - /// Data signature for the format is not available or invalid - #[code = "DS0B"] - UnknownDataSignFormat, - /// The signer certificate is revoked - #[code = "DS0C"] - SignerCertificateRevoked, - /// The signer certificate is not valid (revoked or not active) - #[code = "DS0D"] - SignerCertificateNotValid, - /// The signer certificate is not present - #[code = "DS0E"] - IncorrectSignerCertificate, - /// The authority of the signer certification sending the certificate is unknown - #[code = "DS0F"] - SignerCertificationAuthoritySignerNotValid, - /// Signer is not allowed to sign this operation type - #[code = "DS0G"] - NotAllowedPayment, - /// Signer is not allowed to sign for this account - #[code = "DS0H"] - NotAllowedAccount, - /// The number of transaction is over the number allowed for this signer - #[code = "DS0K"] - NotAllowedNumberOfTransaction, - /// The certificate is revoked for the first signer - #[code = "DS10"] - Signer1CertificateRevoked, - /// The certificate is not valid (revoked or not active) for the first signer - #[code = "DS11"] - Signer1CertificateNotValid, - /// The certificate is not present for the first signer - #[code = "DS12"] - IncorrectSigner1Certificate, - /// The authority of signer certification sending the certificate is unknown for the first signer - #[code = "DS13"] - SignerCertificationAuthoritySigner1NotValid, - /// The user is unknown on the server - #[code = "DS14"] - UserDoesNotExist, - /// The same signature has already been sent to the bank - #[code = "DS15"] - IdenticalSignatureFound, - /// The public key version is not correct - #[code = "DS16"] - PublicKeyVersionIncorrect, - /// Order data and signatures don’t match - #[code = "DS17"] - DifferentOrderDataInSignatures, - /// File cannot be tested, the complete order has to be repeated - #[code = "DS18"] - RepeatOrder, - /// The user’s rights (concerning his signature) are insufficient to execute the order - #[code = "DS19"] - ElectronicSignatureRightsInsufficient, - /// The certificate is revoked for the second signer - #[code = "DS20"] - Signer2CertificateRevoked, - /// The certificate is not valid (revoked or not active) for the second signer - #[code = "DS21"] - Signer2CertificateNotValid, - /// The certificate is not present for the second signer - #[code = "DS22"] - IncorrectSigner2Certificate, - /// The authority of signer certification sending the certificate is unknown for the second signer - #[code = "DS23"] - SignerCertificationAuthoritySigner2NotValid, - /// Waiting time expired due to incomplete order - #[code = "DS24"] - WaitingTimeExpired, - /// The order file was deleted by the bank server - #[code = "DS25"] - OrderFileDeleted, - /// The same user has signed multiple times - #[code = "DS26"] - UserSignedMultipleTimes, - /// The user is not yet activated (technically) - #[code = "DS27"] - UserNotYetActivated, - /// Message routed to the wrong environment - #[code = "DS28"] - ReturnForTechnicalReason, - /// Invalid date (eg, wrong or missing settlement date) - #[code = "DT01"] - InvalidDate, - /// Invalid creation date and time in Group Header (eg, historic date) - #[code = "DT02"] - InvalidCreationDate, - /// Invalid non bank processing date (eg, weekend or local public holiday) - #[code = "DT03"] - InvalidNonProcessingDate, - /// Future date not supported - #[code = "DT04"] - FutureDateNotSupported, - /// Associated message, payment information block or transaction was received after agreed processing cut-off date, i - #[code = "DT05"] - InvalidCutOffDate, - /// Execution Date has been modified in order for transaction to be processed - #[code = "DT06"] - ExecutionDateChanged, - /// Message Identification is not unique - #[code = "DU01"] - DuplicateMessageID, - /// Payment Information Block is not unique - #[code = "DU02"] - DuplicatePaymentInformationID, - /// Transaction is not unique - #[code = "DU03"] - DuplicateTransaction, - /// End To End ID is not unique - #[code = "DU04"] - DuplicateEndToEndID, - /// Instruction ID is not unique - #[code = "DU05"] - DuplicateInstructionID, - /// Payment or charge is a duplicate of another payment or charge - #[code = "DUPL"] - DuplicatePaymentOrCharge, - /// Correspondent bank not possible - #[code = "ED01"] - CorrespondentBankNotPossible, - /// Balance of payments complementary info is requested - #[code = "ED03"] - BalanceInfoRequest, - /// Settlement of the transaction has failed - #[code = "ED05"] - SettlementFailed, - /// Interbank settlement system not available - #[code = "ED06"] - SettlementSystemNotAvailable, - /// Requested execution date of the payment is not accepted - #[code = "EDNA"] - ExecutionDateNotAccepted, - /// Expiry date time of the request-to-pay is too far in the future - #[code = "EDTL"] - ExpiryDateTooLong, - /// Expiry date time of the request-to-pay is already reached - #[code = "EDTR"] - ExpiryDateTimeReached, - /// Expiration of the payment authorisation due to no use for too long - #[code = "EOL1"] - EndOfLife, - /// Extended Remittance Information (ERI) option is not supported - #[code = "ERIN"] - ERIOptionNotSupported, - /// File Format incomplete or invalid - #[code = "FF01"] - InvalidFileFormat, - /// Syntax error reason is provided as narrative information in the additional reason information - #[code = "FF02"] - SyntaxError, - /// Payment Type Information is missing or invalid - #[code = "FF03"] - InvalidPaymentTypeInformation, - /// Service Level code is missing or invalid - #[code = "FF04"] - InvalidServiceLevelCode, - /// Local Instrument code is missing or invalid - #[code = "FF05"] - InvalidLocalInstrumentCode, - /// Category Purpose code is missing or invalid - #[code = "FF06"] - InvalidCategoryPurposeCode, - /// Purpose is missing or invalid - #[code = "FF07"] - InvalidPurpose, - /// End to End Id missing or invalid - #[code = "FF08"] - InvalidEndToEndId, - /// Cheque number missing or invalid - #[code = "FF09"] - InvalidChequeNumber, - /// File or transaction cannot be processed due to technical issues at the bank side - #[code = "FF10"] - BankSystemProcessingError, - /// Clearing request rejected due it being subject to an abort operation - #[code = "FF11"] - ClearingRequestAborted, - /// Original payment is not eligible to be returned given its current status - #[code = "FF12"] - OriginalTransactionNotEligibleForRequestedReturn, - /// No record of request for cancellation found - #[code = "FF13"] - RequestForCancellationNotFound, - /// Return following a cancellation request - #[code = "FOCR"] - FollowingCancellationRequest, - /// Returned as a result of fraud - #[code = "FR01"] - Fraud, - /// Cancellation requested following a transaction that was originated fraudulently - #[code = "FRAD"] - FraudulentOrigin, - /// In an FI To FI Customer Credit Transfer: The Status Originator transferred the payment to the next Agent or to a Market Infrastructure - #[code = "G000"] - PaymentTransferredAndTracked, - /// In an FI To FI Customer Credit Transfer: The Status Originator transferred the payment to the next Agent or to a Market Infrastructure - #[code = "G001"] - PaymentTransferredAndNotTracked, - /// In a FIToFI Customer Credit Transfer: Credit to the creditor’s account may not be confirmed same day - #[code = "G002"] - CreditDebitNotConfirmed, - /// In a FIToFI Customer Credit Transfer: Credit to creditor’s account is pending receipt of required documents - #[code = "G003"] - CreditPendingDocuments, - /// In a FIToFI Customer Credit Transfer: Credit to the creditor’s account is pending, status Originator is waiting for funds provided via a cover - #[code = "G004"] - CreditPendingFunds, - /// Payment has been delivered to creditor agent with service level - #[code = "G005"] - DeliveredWithServiceLevel, - /// Payment has been delivered to creditor agent without service level - #[code = "G006"] - DeliveredWIthoutServiceLevel, - /// Signature file was sent to the bank but the corresponding original file has not been sent yet - #[code = "ID01"] - CorrespondingOriginalFileStillNotSent, - /// Expiry date time of the request-to-pay is incorrect - #[code = "IEDT"] - IncorrectExpiryDateTime, - /// Payer’s activation reference is invalid - #[code = "INAR"] - InvalidActivationReference, - /// Details not valid for this field - #[code = "INDT"] - InvalidDetails, - /// Payments in instalments are not supported - #[code = "IPNS"] - InstalmentPaymentsNotSupported, - /// No initial request-to-pay has been received - #[code = "IRNR"] - InitialRTPNeverReceived, - /// Cannot schedule instruction for Night Window - #[code = "ISWS"] - InvalidSettlementWindow, - /// No Mandate - #[code = "MD01"] - NoMandate, - /// Mandate related information data required by the scheme is missing - #[code = "MD02"] - MissingMandatoryInformationInMandate, - /// Creditor or creditor's agent should not have collected the direct debit - #[code = "MD05"] - CollectionNotDue, - /// Return of funds requested by end customer - #[code = "MD06"] - RefundRequestByEndCustomer, - /// End customer is deceased - #[code = "MD07"] - EndCustomerDeceased, - /// Information missing for the field or cannot be empty - #[code = "MINF"] - MissingInformation, - /// Reason has not been specified by end customer - #[code = "MS02"] - NotSpecifiedReasonCustomerGenerated, - /// Reason has not been specified by agent - #[code = "MS03"] - NotSpecifiedReasonAgentGenerated, - /// Reason is provided as narrative information in the additional reason information - #[code = "NARR"] - Narrative, - /// Credit transfer is tagged as an Extended Remittance Information (ERI) transaction but does not contain ERI - #[code = "NERI"] - NoERI, - /// No existing agreement for receiving request-to-pay messages - #[code = "NOAR"] - NonAgreedRTP, - /// No response from Beneficiary - #[code = "NOAS"] - NoAnswerFromCustomer, - /// Customer account is not compliant with regulatory requirements, for example FICA (in South Africa) or any other regulatory requirements which render an account inactive for certain processing - #[code = "NOCM"] - NotCompliantGeneric, - /// Continuous Processing Line on Hold Instruction - #[code = "NOFR"] - OutstandingFundingForSettlement, - /// Requested payment guarantee (by Creditor) related to a request-to-pay cannot be provided - #[code = "NOPG"] - NoPaymentGuarantee, - /// Recipient side of the request-to-pay (payer or its request-to-pay service provider) is not reachable - #[code = "NRCH"] - PayerOrPayerRTPSPNotReachable, - /// Requested optional service (for example instalment payments) is not supported - #[code = "OSNS"] - OptionalServiceNotSupported, - /// Type of payment requested in the request-to-pay is not supported by the payer - #[code = "PINS"] - TypeOfPaymentInstrumentNotSupported, - /// Error code used for RTP-initiated CTR when the pacs - #[code = "PNRT"] - PaymentNotAlignedWithRTPRequest, - /// Bank identifier code specified in the message has an incorrect format (formerly IncorrectFormatForRoutingCode) - #[code = "RC01"] - BankIdentifierIncorrect, - /// Bank identifier is invalid or missing - #[code = "RC02"] - InvalidBankIdentifier, - /// Debtor bank identifier is invalid or missing - #[code = "RC03"] - InvalidDebtorBankIdentifier, - /// Creditor bank identifier is invalid or missing - #[code = "RC04"] - InvalidCreditorBankIdentifier, - /// BIC identifier is invalid or missing - #[code = "RC05"] - InvalidBICIdentifier, - /// Debtor BIC identifier is invalid or missing - #[code = "RC06"] - InvalidDebtorBICIdentifier, - /// Creditor BIC identifier is invalid or missing - #[code = "RC07"] - InvalidCreditorBICIdentifier, - /// ClearingSystemMemberidentifier is invalid or missing - #[code = "RC08"] - InvalidClearingSystemMemberIdentifier, - /// Debtor ClearingSystemMember identifier is invalid or missing - #[code = "RC09"] - InvalidDebtorClearingSystemMemberIdentifier, - /// Creditor ClearingSystemMember identifier is invalid or missing - #[code = "RC10"] - InvalidCreditorClearingSystemMemberIdentifier, - /// Intermediary Agent is invalid or missing - #[code = "RC11"] - InvalidIntermediaryAgent, - /// Creditor Scheme Id is invalid or missing - #[code = "RC12"] - MissingCreditorSchemeId, - /// Originator not active any more - #[code = "RC13"] - ParticipantNotAnActiveMemberofRTGS, - /// Settlement agreement required - #[code = "RC15"] - ParticipantNotActiveMemberSettlementType, - /// Participant blocked from SADC-RTGS - #[code = "RC16"] - ParticipantNotActiveMemberofSADCRTGS, - /// Conflict with R-Message - #[code = "RCON"] - RMessageConflict, - /// Further information regarding the intended recipient - #[code = "RECI"] - ReceiverCustomerInformation, - /// Request-to-pay has been received and can be processed further - #[code = "REPR"] - RTPReceivedCanBeProcessed, - /// Transaction reference is not unique within the message - #[code = "RF01"] - NotUniqueTransactionReference, - /// Payer did not recognize the request from Payee Participant, - #[code = "RQNR"] - RequestNotRecognized, - /// Specification of the debtor’s account or unique identification needed for reasons of regulatory requirements is insufficient or missing - #[code = "RR01"] - MissingDebtorAccountOrIdentification, - /// Specification of the debtor’s name and/or address needed for regulatory requirements is insufficient or missing - #[code = "RR02"] - MissingDebtorNameOrAddress, - /// Specification of the creditor’s name and/or address needed for regulatory requirements is insufficient or missing - #[code = "RR03"] - MissingCreditorNameOrAddress, - /// Regulatory Reason - #[code = "RR04"] - RegulatoryReason, - /// Regulatory or Central Bank Reporting information missing, incomplete or invalid - #[code = "RR05"] - RegulatoryInformationInvalid, - /// Tax information missing, incomplete or invalid - #[code = "RR06"] - TaxInformationInvalid, - /// Remittance information structure does not comply with rules for payment type - #[code = "RR07"] - RemittanceInformationInvalid, - /// Remittance information truncated to comply with rules for payment type - #[code = "RR08"] - RemittanceInformationTruncated, - /// Structured creditor reference invalid or missing - #[code = "RR09"] - InvalidStructuredCreditorReference, - /// Character set supplied not valid for the country and payment type - #[code = "RR10"] - InvalidCharacterSet, - /// Invalid or missing identification of a bank proprietary service - #[code = "RR11"] - InvalidDebtorAgentServiceID, - /// Invalid or missing identification required within a particular country or payment type - #[code = "RR12"] - InvalidPartyID, - /// Debtor does not support request-to-pay transactions - #[code = "RTNS"] - RTPNotSupportedForDebtor, - /// Return following investigation request and no remediation possible - #[code = "RUTA"] - ReturnUponUnableToApply, - /// Request for Cancellation is acknowledged following validation - #[code = "S000"] - ValidRequestForCancellationAcknowledged, - /// Unique End-to-end Transaction Reference (UETR) relating to a payment has been identified as being associated with a Request for Cancellation - #[code = "S001"] - UETRFlaggedForCancellation, - /// Unique End-to-end Transaction Reference (UETR) relating to a payment has been prevent from traveling across a messaging network - #[code = "S002"] - NetworkStopOfUETR, - /// Request for Cancellation has been forwarded to the payment processing/last payment processing agent - #[code = "S003"] - RequestForCancellationForwarded, - /// Request for Cancellation has been acknowledged as delivered to payment processing/last payment processing agent - #[code = "S004"] - RequestForCancellationDeliveryAcknowledgement, - /// Remove Concurrent Batch Processing Line on hold instruction - #[code = "SBRN"] - SettlementBatchRemovalNotification, - /// Due to specific service offered by the Debtor Agent - #[code = "SL01"] - SpecificServiceOfferedByDebtorAgent, - /// Due to specific service offered by the Creditor Agent - #[code = "SL02"] - SpecificServiceOfferedByCreditorAgent, - /// Due to a specific service offered by the clearing system - #[code = "SL03"] - ServiceofClearingSystem, - /// Whitelisting service offered by the Debtor Agent; Debtor has not included the Creditor on its “Whitelist” (yet) - #[code = "SL11"] - CreditorNotOnWhitelistOfDebtor, - /// Blacklisting service offered by the Debtor Agent; Debtor included the Creditor on his “Blacklist” - #[code = "SL12"] - CreditorOnBlacklistOfDebtor, - /// Due to Maximum allowed Direct Debit Transactions per period service offered by the Debtor Agent - #[code = "SL13"] - MaximumNumberOfDirectDebitTransactionsExceeded, - /// Due to Maximum allowed Direct Debit Transaction amount service offered by the Debtor Agent - #[code = "SL14"] - MaximumDirectDebitTransactionAmountExceeded, - /// Maximum number of credit transactions allowed by the account servicer per service period exceeded - #[code = "SL15"] - MaximumNumberOfCreditTransactionsExceeded, - /// Maximum total credit amount allowed by the account servicer per service period exceeded - #[code = "SL16"] - MaximumCreditTransactionsAmountExceeded, - /// Whitelisting service offered by payment system operator or financial institution - #[code = "SL17"] - DebtorNotOnWhitelistOfCreditorSide, - /// Blacklisting service offered by payment system operator or financial institution - #[code = "SL18"] - DebtorOnBlacklistOfCreditorSide, - /// Services are not yet rendered by the Payee Participant (Creditor) - #[code = "SNRD"] - ServiceNotRendered, - /// Identifier of the request-to-pay service provider is incorrect - #[code = "SPII"] - RTPServiceProviderIdentifierIncorrect, - /// The transmission of the file was not successful – it had to be aborted (for technical reasons) - #[code = "TA01"] - TransmissonAborted, - /// There is no data available (for download) - #[code = "TD01"] - NoDataAvailable, - /// The file cannot be read (e - #[code = "TD02"] - FileNonReadable, - /// The file format is incomplete or invalid - #[code = "TD03"] - IncorrectFileStructure, - /// Token is invalid - #[code = "TK01"] - TokenInvalid, - /// Token used for the sender does not exist - #[code = "TK02"] - SenderTokenNotFound, - /// Token used for the receiver does not exist - #[code = "TK03"] - ReceiverTokenNotFound, - /// Token required for request is missing - #[code = "TK09"] - TokenMissing, - /// Token found with counterparty mismatch - #[code = "TKCM"] - TokenCounterpartyMismatch, - /// Single Use Token already used - #[code = "TKSG"] - TokenSingleUse, - /// Token found with suspended status - #[code = "TKSP"] - TokenSuspended, - /// Token found with value limit rule violation - #[code = "TKVE"] - TokenValueLimitExceeded, - /// Token expired - #[code = "TKXP"] - TokenExpired, - /// Associated message, payment information block, or transaction was received after agreed processing cut-off time - #[code = "TM01"] - InvalidCutOffTime, - /// The (technical) transmission of the file was successful - #[code = "TS01"] - TransmissionSuccessful, - /// The order was transferred to pass by accompanying note signed by hand - #[code = "TS04"] - TransferToSignByHand, - /// Unknown Creditor - #[code = "UCRD"] - UnknownCreditor, - /// Payment is not justified - #[code = "UPAY"] - UnduePayment, -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] -#[enum_meta(DomainCode, Description, Str)] -pub enum ExternalPaymentGroupStatusCode { - /// Settlement on the creditor's account has been completed - #[code = "ACCC"] - AcceptedSettlementCompletedCreditorAccount, - /// Preceding check of technical validation was successful - #[code = "ACCP"] - AcceptedCustomerProfile, - /// Settlement on the debtor's account has been completed - #[code = "ACSC"] - AcceptedSettlementCompletedDebitorAccount, - /// All preceding checks such as technical validation and customer profile were successful and therefore the payment initiation has been accepted for execution - #[code = "ACSP"] - AcceptedSettlementInProcess, - /// Authentication and syntactical and semantical validation are successful - #[code = "ACTC"] - AcceptedTechnicalValidation, - /// Instruction is accepted but a change will be made, such as date or remittance not sent - #[code = "ACWC"] - AcceptedWithChange, - /// A number of transactions have been accepted, whereas another number of transactions have not yet achieved - #[code = "PART"] - PartiallyAccepted, - /// Payment initiation or individual transaction included in the payment initiation is pending - #[code = "PDNG"] - Pending, - /// Verification of Payee check have been applied to received transactions stating to be complete without mismatching data - #[code = "RCVC"] - ReceivedVerificationCompleted, - /// Payment initiation has been received by the receiving agent - #[code = "RCVD"] - Received, - /// Payment initiation or individual transaction included in the payment initiation has been rejected - #[code = "RJCT"] - Rejected, - /// Verification of Payee checks have been applied to received transactions stating to be complete containing mismatching data - #[code = "RVCM"] - ReceivedVerificationCompletedWithMismatches, - /// Verification of party check on transactions received is not yet completed - #[code = "RVNC"] - ReceivedVerificationNotCompleted, -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] -#[enum_meta(DomainCode, Description, Str)] -pub enum ExternalPaymentTransactionStatusCode { - /// Settlement on the creditor's account has been completed - #[code = "ACCC"] - AcceptedSettlementCompletedCreditorAccount, - /// Preceding check of technical validation was successful - #[code = "ACCP"] - AcceptedCustomerProfile, - /// Preceding check of technical validation and customer profile was successful and an automatic funds check was positive - #[code = "ACFC"] - AcceptedFundsChecked, - /// Preceding check of technical validation and customer profile was successful, and an automatic funds check was positive, but an explicit confirmation by the initiating party is outstanding - #[code = "ACFW"] - AcceptedFundsCheckedWaitingConfirmation, - /// Payment instruction to issue a cheque has been accepted, and the cheque has been issued but not yet been deposited or cleared - #[code = "ACIS"] - AcceptedandChequeIssued, - /// Status of transaction released from the Debtor Agent and accepted by the clearing - #[code = "ACPD"] - AcceptedClearingProcessed, - /// Settlement completed - #[code = "ACSC"] - AcceptedSettlementCompletedDebitorAccount, - /// All preceding checks such as technical validation and customer profile were successful and therefore the payment instruction has been accepted for execution - #[code = "ACSP"] - AcceptedSettlementInProcess, - /// Authentication and syntactical and semantical validation are successful - #[code = "ACTC"] - AcceptedTechnicalValidation, - /// Instruction is accepted but a change will be made, such as date or remittance not sent - #[code = "ACWC"] - AcceptedWithChange, - /// Payment instruction included in the credit transfer is accepted without being posted to the creditor customer’s account - #[code = "ACWP"] - AcceptedWithoutPosting, - /// Payment transaction previously reported with status 'ACWP' is blocked, for example, funds will neither be posted to the Creditor's account, nor be returned to the Debtor - #[code = "BLCK"] - Blocked, - /// Payment initiation has been successfully cancelled after having received a request for cancellation - #[code = "CANC"] - Cancelled, - /// Cash has been picked up by the Creditor - #[code = "CPUC"] - CashPickedUpByCreditor, - /// Payment initiation needs multiple authentications, where some but not yet all have been performed - #[code = "PATC"] - PartiallyAcceptedTechnicalCorrect, - /// Payment instruction is pending - #[code = "PDNG"] - Pending, - /// Request for Payment has been presented to the Debtor - #[code = "PRES"] - Presented, - /// Verification of Payee check has been applied to received transaction stating to be complete without mismatching data - #[code = "RCVC"] - ReceivedVerificationCompleted, - /// Payment instruction has been received - #[code = "RCVD"] - Received, - /// Payment instruction has been rejected - #[code = "RJCT"] - Rejected, - /// Verification of Payee checks have been applied to received transaction stating to be completed containing mismatching data - #[code = "RVCM"] - ReceivedVerificationCompletedWithMismatches, - /// Verification of Payee check has been applied to received transaction stating to be complete with data matching closely - #[code = "RVMC"] - ReceivedVerificationCompletedMatchClosely, - /// Verification of Payee check has been applied to received transaction stating to be complete with not applicable data - #[code = "RVNA"] - ReceivedVerificationCompletedNotApplicable, - /// Verification of party check on the transaction is not yet completed - #[code = "RVNC"] - ReceivedVerificationNotCompleted, - /// Verification of Payee check has been applied to received transaction stating to be complete with mismatching data - #[code = "RVNM"] - ReceivedVerificationCompletedNoMatch, -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] -#[enum_meta(DomainCode, Description, Str)] -pub enum ExternalReturnReasonCode { - /// Format of the account number specified is not correct - #[code = "AC01"] - IncorrectAccountNumber, - /// Debtor account number invalid or missing - #[code = "AC02"] - InvalidDebtorAccountNumber, - /// Wrong IBAN in SCT - #[code = "AC03"] - InvalidCreditorAccountNumber, - /// Account number specified has been closed on the bank of account's books - #[code = "AC04"] - ClosedAccountNumber, - /// Account specified is blocked, prohibiting posting of transactions against it - #[code = "AC06"] - BlockedAccount, - /// Creditor account number closed - #[code = "AC07"] - ClosedCreditorAccountNumber, - /// Debtor account type is missing or invalid - #[code = "AC13"] - InvalidDebtorAccountType, - /// An agent in the payment chain is invalid - #[code = "AC14"] - InvalidAgent, - /// Account details have changed - #[code = "AC15"] - AccountDetailsChanged, - /// Account is in sequestration - #[code = "AC16"] - AccountInSequestration, - /// Account is in liquidation - #[code = "AC17"] - AccountInLiquidation, - /// Transaction forbidden on this type of account (formerly NoAgreement) - #[code = "AG01"] - TransactionForbidden, - /// Bank Operation code specified in the message is not valid for receiver - #[code = "AG02"] - InvalidBankOperationCode, - /// Debtor account cannot be debited for a generic reason - #[code = "AG07"] - UnsuccesfulDirectDebit, - /// Agent in the payment workflow is incorrect - #[code = "AGNT"] - IncorrectAgent, - /// Specified message amount is equal to zero - #[code = "AM01"] - ZeroAmount, - /// Specific transaction/message amount is greater than allowed maximum - #[code = "AM02"] - NotAllowedAmount, - /// Specified message amount is an non processable currency outside of existing agreement - #[code = "AM03"] - NotAllowedCurrency, - /// Amount of funds available to cover specified message amount is insufficient - #[code = "AM04"] - InsufficientFunds, - /// Duplication - #[code = "AM05"] - Duplication, - /// Specified transaction amount is less than agreed minimum - #[code = "AM06"] - TooLowAmount, - /// Amount specified in message has been blocked by regulatory authorities - #[code = "AM07"] - BlockedAmount, - /// Amount received is not the amount agreed or expected - #[code = "AM09"] - WrongAmount, - /// Sum of instructed amounts does not equal the control sum - #[code = "AM10"] - InvalidControlSum, - /// Already returned original SCT - #[code = "ARDT"] - AlreadyReturnedTransaction, - /// Identification of end customer is not consistent with associated account number, organisation ID or private ID - #[code = "BE01"] - InconsistenWithEndCustomer, - /// Specification of creditor's address, which is required for payment, is missing/not correct (formerly IncorrectCreditorAddress) - #[code = "BE04"] - MissingCreditorAddress, - /// Party who initiated the message is not recognised by the end customer - #[code = "BE05"] - UnrecognisedInitiatingParty, - /// End customer specified is not known at associated Sort/National Bank Code or does no longer exist in the books - #[code = "BE06"] - UnknownEndCustomer, - /// Specification of debtor's address, which is required for payment, is missing/not correct - #[code = "BE07"] - MissingDebtorAddress, - /// Returned as a result of a bank error - #[code = "BE08"] - BankError, - /// Debtor country code is missing or invalid - #[code = "BE10"] - InvalidDebtorCountry, - /// Creditor country code is missing or invalid - #[code = "BE11"] - InvalidCreditorCountry, - /// Debtor or Ultimate Debtor identification code missing or invalid - #[code = "BE16"] - InvalidDebtorIdentificationCode, - /// Creditor or Ultimate Creditor identification code missing or invalid - #[code = "BE17"] - InvalidCreditorIdentificationCode, - /// Authorisation is cancelled - #[code = "CN01"] - AuthorisationCancelled, - /// Creditor bank is not registered under this BIC in the CSM - #[code = "CNOR"] - CreditorBankIsNotRegistered, - /// Cash not picked up by Creditor or cash could not be delivered to Creditor - #[code = "CNPC"] - CashNotPickedUp, - /// Currency of the payment is incorrect - #[code = "CURR"] - IncorrectCurrency, - /// Cancellation requested by the Debtor - #[code = "CUST"] - RequestedByCustomer, - /// Return of Covering Settlement due to the underlying Credit Transfer details not being received - #[code = "DC04"] - NoCustomerCreditTransferReceived, - /// Debtor bank is not registered under this BIC in the CSM - #[code = "DNOR"] - DebtorBankIsNotRegistered, - /// Return following technical problems resulting in erroneous transaction - #[code = "DS28"] - ReturnForTechnicalReason, - /// Invalid date (eg, wrong settlement date) - #[code = "DT01"] - InvalidDate, - /// Cheque has been issued but not deposited and is considered expired - #[code = "DT02"] - ChequeExpired, - /// Future date not supported - #[code = "DT04"] - FutureDateNotSupported, - /// Payment is a duplicate of another payment - #[code = "DUPL"] - DuplicatePayment, - /// Correspondent bank not possible - #[code = "ED01"] - CorrespondentBankNotPossible, - /// Balance of payments complementary info is requested - #[code = "ED03"] - BalanceInfoRequest, - /// Settlement of the transaction has failed - #[code = "ED05"] - SettlementFailed, - /// The card payment is fraudulent and was not processed with EMV technology for an EMV card - #[code = "EMVL"] - EMVLiabilityShift, - /// The Extended Remittance Information (ERI) option is not supported - #[code = "ERIN"] - ERIOptionNotSupported, - /// Payment Type Information is missing or invalid - #[code = "FF03"] - InvalidPaymentTypeInformation, - /// Service Level code is missing or invalid - #[code = "FF04"] - InvalidServiceLevelCode, - /// Local Instrument code is missing or invalid - #[code = "FF05"] - InvalidLocalInstrumentCode, - /// Category Purpose code is missing or invalid - #[code = "FF06"] - InvalidCategoryPurposeCode, - /// Purpose is missing or invalid - #[code = "FF07"] - InvalidPurpose, - /// Return following a cancellation request - #[code = "FOCR"] - FollowingCancellationRequest, - /// Returned as a result of fraud - #[code = "FR01"] - Fraud, - /// Final response/tracking is recalled as mandate is cancelled - #[code = "FRTR"] - FinalResponseMandateCancelled, - /// In a FIToFI Customer Credit Transfer: Credit to the creditor’s account is pending, status Originator is waiting for funds provided via a cover - #[code = "G004"] - CreditPendingFunds, - /// No Mandate - #[code = "MD01"] - NoMandate, - /// Mandate related information data required by the scheme is missing - #[code = "MD02"] - MissingMandatoryInformationInMandate, - /// Creditor or creditor's agent should not have collected the direct debit - #[code = "MD05"] - CollectionNotDue, - /// Return of funds requested by end customer - #[code = "MD06"] - RefundRequestByEndCustomer, - /// End customer is deceased - #[code = "MD07"] - EndCustomerDeceased, - /// Reason has not been specified by end customer - #[code = "MS02"] - NotSpecifiedReasonCustomerGenerated, - /// Reason has not been specified by agent - #[code = "MS03"] - NotSpecifiedReasonAgentGenerated, - /// Reason is provided as narrative information in the additional reason information - #[code = "NARR"] - Narrative, - /// No response from Beneficiary - #[code = "NOAS"] - NoAnswerFromCustomer, - /// Customer account is not compliant with regulatory requirements, for example FICA (in South Africa) or any other regulatory requirements which render an account inactive for certain processing - #[code = "NOCM"] - NotCompliant, - /// Original SCT never received - #[code = "NOOR"] - NoOriginalTransactionReceived, - /// The card payment is fraudulent (lost and stolen fraud) and was processed as EMV transaction without PIN verification - #[code = "PINL"] - PINLiabilityShift, - /// Bank Identifier code specified in the message has an incorrect format (formerly IncorrectFormatForRoutingCode) - #[code = "RC01"] - BankIdentifierIncorrect, - /// Debtor bank identifier is invalid or missing - #[code = "RC03"] - InvalidDebtorBankIdentifier, - /// Creditor bank identifier is invalid or missing - #[code = "RC04"] - InvalidCreditorBankIdentifier, - /// Incorrrect BIC of the beneficiary Bank in the SCTR - #[code = "RC07"] - InvalidCreditorBICIdentifier, - /// ClearingSystemMemberidentifier is invalid or missing - #[code = "RC08"] - InvalidClearingSystemMemberIdentifier, - /// Intermediary Agent is invalid or missing - #[code = "RC11"] - InvalidIntermediaryAgent, - /// Transaction reference is not unique within the message - #[code = "RF01"] - NotUniqueTransactionReference, - /// Specification of the debtor’s account or unique identification needed for reasons of regulatory requirements is insufficient or missing - #[code = "RR01"] - MissingDebtorAccountOrIdentification, - /// Specification of the debtor’s name and/or address needed for regulatory requirements is insufficient or missing - #[code = "RR02"] - MissingDebtorNameOrAddress, - /// Specification of the creditor’s name and/or address needed for regulatory requirements is insufficient or missing - #[code = "RR03"] - MissingCreditorNameOrAddress, - /// Regulatory Reason - #[code = "RR04"] - RegulatoryReason, - /// Regulatory or Central Bank Reporting information missing, incomplete or invalid - #[code = "RR05"] - RegulatoryInformationInvalid, - /// Tax information missing, incomplete or invalid - #[code = "RR06"] - TaxInformationInvalid, - /// Remittance information structure does not comply with rules for payment type - #[code = "RR07"] - RemittanceInformationInvalid, - /// Remittance information truncated to comply with rules for payment type - #[code = "RR08"] - RemittanceInformationTruncated, - /// Structured creditor reference invalid or missing - #[code = "RR09"] - InvalidStructuredCreditorReference, - /// Invalid or missing identification of a bank proprietary service - #[code = "RR11"] - InvalidDebtorAgentServiceIdentification, - /// Invalid or missing identification required within a particular country or payment type - #[code = "RR12"] - InvalidPartyIdentification, - /// Return following investigation request and no remediation possible - #[code = "RUTA"] - ReturnUponUnableToApply, - /// Due to specific service offered by the Debtor Agent - #[code = "SL01"] - SpecificServiceOfferedByDebtorAgent, - /// Due to specific service offered by the Creditor Agent - #[code = "SL02"] - SpecificServiceOfferedByCreditorAgent, - /// Whitelisting service offered by the Debtor Agent; Debtor has not included the Creditor on its “Whitelist” (yet) - #[code = "SL11"] - CreditorNotOnWhitelistOfDebtor, - /// Blacklisting service offered by the Debtor Agent; Debtor included the Creditor on his “Blacklist” - #[code = "SL12"] - CreditorOnBlacklistOfDebtor, - /// Due to Maximum allowed Direct Debit Transactions per period service offered by the Debtor Agent - #[code = "SL13"] - MaximumNumberOfDirectDebitTransactionsExceeded, - /// Due to Maximum allowed Direct Debit Transaction amount service offered by the Debtor Agent - #[code = "SL14"] - MaximumDirectDebitTransactionAmountExceeded, - /// Payment is stopped by account holder - #[code = "SP01"] - PaymentStopped, - /// Previously stopped by means of a stop payment advise - #[code = "SP02"] - PreviouslyStopped, - /// The card payment is returned since a cash amount rendered was not correct or goods or a service was not rendered to the customer, e - #[code = "SVNR"] - ServiceNotRendered, - /// Associated message was received after agreed processing cut-off time - #[code = "TM01"] - CutOffTime, - /// Return following direct debit being removed from tracking process - #[code = "TRAC"] - RemovedFromTracking, - /// Payment is not justified - #[code = "UPAY"] - UnduePayment, -} diff --git a/src/iso20022/hac.rs b/src/iso20022/hac.rs @@ -24,7 +24,7 @@ use jiff::Timestamp; use taler_common::types::utils::date_time_to_utc_ts; use crate::{ - iso20022::{HacAction, external_code::ExternalStatusReasonCode}, + iso20022::{HacAction, status_code::StatusReason}, xml::{self, Xml, XmlAccess}, }; @@ -32,7 +32,7 @@ use crate::{ pub struct CustomerAck { pub action: HacAction, pub order_id: Option<CompactString>, - pub code: Option<ExternalStatusReasonCode>, + pub code: Option<StatusReason>, pub info: Box<str>, pub timestamp: Timestamp, } @@ -114,19 +114,16 @@ mod test { use crate::iso20022::{ HacAction, - external_code::ExternalStatusReasonCode, hac::{CustomerAck, parse_hac}, + status_code::StatusReason, }; #[test] fn hac() { - let xml = std::fs::read_to_string("libeufin-nexus/sample/platform/hac.xml").unwrap(); - let acks = parse_hac(&xml).unwrap(); - pub fn ack( action: HacAction, order_id: Option<&str>, - code: Option<ExternalStatusReasonCode>, + code: Option<StatusReason>, info: &str, timestamp: &str, ) -> CustomerAck { @@ -139,26 +136,27 @@ mod test { } } pretty_assertions::assert_eq!( - acks, - &[ + parse_hac(&std::fs::read_to_string("libeufin-nexus/sample/platform/hac.xml").unwrap()) + .unwrap(), + [ ack( HacAction::FILE_DOWNLOAD, None, - Some(ExternalStatusReasonCode::TransmissionSuccessful), + Some(StatusReason::TransmissionSuccessful), "", "2024-09-02T15:47:30.350Z" ), ack( HacAction::FILE_UPLOAD, Some("ORDER_SUCCESS"), - Some(ExternalStatusReasonCode::TransmissionSuccessful), + Some(StatusReason::TransmissionSuccessful), "", "2024-09-02T20:48:43.153Z" ), ack( HacAction::ES_VERIFICATION, Some("ORDER_SUCCESS"), - Some(ExternalStatusReasonCode::ElectronicSignaturesCorrect), + Some(StatusReason::ElectronicSignaturesCorrect), "", "2024-09-02T20:48:43.153Z" ), @@ -172,21 +170,21 @@ mod test { ack( HacAction::FILE_DOWNLOAD, None, - Some(ExternalStatusReasonCode::NoDataAvailable), + Some(StatusReason::NoDataAvailable), "", "2024-09-02T15:47:31.754Z" ), ack( HacAction::FILE_UPLOAD, Some("ORDER_FAILURE"), - Some(ExternalStatusReasonCode::TransmissionSuccessful), + Some(StatusReason::TransmissionSuccessful), "", "2024-08-23T15:34:11.987Z" ), ack( HacAction::ES_VERIFICATION, Some("ORDER_FAILURE"), - Some(ExternalStatusReasonCode::IncorrectFileStructure), + Some(StatusReason::IncorrectFileStructure), "", "2024-08-23T15:34:13.307Z" ), diff --git a/src/iso20022/mod.rs b/src/iso20022/mod.rs @@ -21,8 +21,9 @@ use taler_enum_meta::EnumMeta; pub mod bank_tx_code; pub mod camt; -pub mod external_code; pub mod hac; +pub mod pain002; +pub mod status_code; #[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] #[enum_meta(Description, Str)] @@ -74,7 +75,7 @@ pub enum ChargeBearer { pub mod test { use tracing::info; - use crate::iso20022::{camt::parse_camt, hac::parse_hac}; + use crate::iso20022::{camt::parse_camt, hac::parse_hac, pain002::parse_pain002}; #[test] pub fn sample() { @@ -103,7 +104,7 @@ pub mod test { } else if name.contains("camt") { parse_camt(&xml).unwrap(); } else if name.contains("pain002") { - // TODO + parse_pain002(&xml).unwrap(); } else if name.contains("pain001") { // TODO } else { @@ -165,7 +166,7 @@ pub mod test { } else if path.contains("camt") { parse_camt(&xml).unwrap(); } else if path.contains("pain.002") { - // TODO + parse_pain002(&xml).unwrap(); } else if path.contains("pain.001") { // TODO } else { diff --git a/src/iso20022/pain002.rs b/src/iso20022/pain002.rs @@ -0,0 +1,249 @@ +/* +* This file is part of LibEuFin. +* Copyright (C) 2026 Taler Systems S.A. + +* LibEuFin is free software; you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation; either version 3, or +* (at your option) any later version. + +* LibEuFin is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General +* Public License for more details. + +* You should have received a copy of the GNU Affero General Public +* License along with LibEuFin; see the file COPYING. If not, see +* <http://www.gnu.org/licenses/> +*/ + +use std::fmt::{Display, Write}; + +use compact_str::CompactString; + +use crate::{ + iso20022::status_code::{PaymentGroupStatus, PaymentTransactionStatus, StatusReason}, + xml::{self, Xml, XmlAccess}, +}; + +fn fmt_msg( + f: &mut std::fmt::Formatter<'_>, + code: Option<&str>, + description: Option<&str>, + reasons: &[Reason], +) -> std::fmt::Result { + if let Some(code) = code { + write!(f, "{code}")?; + if let Some(description) = description { + write!(f, " '{description}' ")?; + } + if !reasons.is_empty() { + f.write_char(':')?; + } + } + for Reason { + code, + info: information, + } in reasons + { + f.write_char(' ')?; + if let Some(code) = code { + write!(f, "{} '{}' ", code.code(), code.description())?; + } + if !information.is_empty() { + if code.is_some() { + f.write_char(' ')?; + } + write!(f, "'{information}' ")?; + } + } + Ok(()) +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Reason { + pub code: Option<StatusReason>, + pub info: Box<str>, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TxStatus { + pub id: CompactString, + pub e2e_id: CompactString, + pub status: PaymentTransactionStatus, + pub reasons: Box<[Reason]>, +} + +impl Display for TxStatus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fmt_msg( + f, + Some(self.status.code()), + Some(self.status.description()), + &self.reasons, + ) + } +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct PmtStatus { + pub id: CompactString, + pub status: Option<PaymentGroupStatus>, + pub reasons: Box<[Reason]>, + pub txs: Box<[TxStatus]>, +} + +impl Display for PmtStatus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fmt_msg( + f, + self.status.map(|it| it.code()), + self.status.map(|it| it.description()), + &self.reasons, + ) + } +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MsgStatus { + pub id: CompactString, + pub status: Option<PaymentGroupStatus>, + pub reasons: Box<[Reason]>, + pub payments: Box<[PmtStatus]>, +} + +impl Display for MsgStatus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fmt_msg( + f, + self.status.map(|it| it.code()), + self.status.map(|it| it.description()), + &self.reasons, + ) + } +} + +/** Parse pain.002 XML file */ +pub fn parse_pain002(xml: &str) -> xml::Result<MsgStatus> { + fn reasons(x: Xml) -> xml::Result<Box<[Reason]>> { + x.many("StsRsnInf") + .map(|n| { + let code = n.opt("Rsn").one("Cd").parse()?; + let info = n.many("AddtlInf").map(Xml::text).collect(); + Ok(Reason { code, info }) + }) + .collect() + } + + return Xml::parse_str(xml, "Document", |root| { + let n = root.one("CstmrPmtStsRpt")?; + let status = n.one("OrgnlGrpInfAndSts")?; + Ok(MsgStatus { + id: status.one("OrgnlMsgId").parse()?, + status: status.opt("GrpSts").parse()?, + reasons: reasons(status)?, + payments: n + .many("OrgnlPmtInfAndSts") + .map(|n| { + Ok(PmtStatus { + id: n.one("OrgnlPmtInfId").parse()?, + status: n.opt("PmtInfSts").parse()?, + reasons: reasons(n)?, + txs: n + .many("TxInfAndSts") + .map(|n| { + Ok(TxStatus { + id: n.one("OrgnlInstrId").parse()?, + e2e_id: n.one("OrgnlEndToEndId").parse()?, + status: n.one("TxSts").parse()?, + reasons: reasons(n)?, + }) + }) + .collect::<xml::Result<_>>()?, + }) + }) + .collect::<xml::Result<_>>()?, + }) + }); +} + +#[cfg(test)] +mod test { + use crate::iso20022::{ + pain002::{MsgStatus, PmtStatus, Reason, TxStatus, parse_pain002}, + status_code::{PaymentGroupStatus, PaymentTransactionStatus, StatusReason}, + }; + + #[test] + fn pain002() { + pretty_assertions::assert_eq!( + parse_pain002(&std::fs::read_to_string("libeufin-nexus/sample/platform/pain002_part.xml").unwrap()).unwrap(), + MsgStatus { + id: "05BD4C5B4A2649B5B08F6EF6A31F197A".into(), + status: Some(PaymentGroupStatus::PartiallyAccepted), + reasons: Box::default(), + payments: Box::new([PmtStatus { + id: "NOTPROVIDED".into(), + status: Some(PaymentGroupStatus::PartiallyAccepted), + reasons: Box::new([ + Reason { + code: Some(StatusReason::ExecutionDateChanged), + info: "Due date is not a working day. Order will be executed on the next working day".into() + } + ]), + txs: Box::new([ + TxStatus { + id: "AQCXNCPWD8PHW5JTN65Y5XTF7R".into(), + e2e_id: "AQCXNCPWD8PHW5JTN65Y5XTF7R".into(), + status: PaymentTransactionStatus::Rejected, + reasons: Box::new([ + Reason { + code: Some(StatusReason::ClosedAccountNumber), + info: "Error message".into() + } + ]) + }, + TxStatus { + id: "EE9SX76FC5YSC657EK3GMVZ9TC".into(), + e2e_id: "EE9SX76FC5YSC657EK3GMVZ9TC".into(), + status: PaymentTransactionStatus::Rejected, + reasons: Box::new([ + Reason { + code: Some(StatusReason::NotSpecifiedReasonAgentGenerated), + info: "Error message".into() + } + ]) + }, + TxStatus { + id: "V5B3MXPEWES9VQW1JDRD6VAET4".into(), + e2e_id: "V5B3MXPEWES9VQW1JDRD6VAET4".into(), + status: PaymentTransactionStatus::Rejected, + reasons: Box::new([ + Reason { + code: Some(StatusReason::MissingDebtorNameOrAddress), + info: "Error message".into() + } + ]) + } + ]) + }]) + } + ); + pretty_assertions::assert_eq!( + parse_pain002( + &std::fs::read_to_string("libeufin-nexus/sample/platform/pain002_accp.xml") + .unwrap() + ) + .unwrap(), + MsgStatus { + id: "5HIS3433VVIBAANHW3GX9DR1AXRS43KZ4U".into(), + status: Some(PaymentGroupStatus::AcceptedCustomerProfile), + reasons: Box::new([Reason { + code: None, + info: "PN10630020F0297329.20251030104613.EBTUAAAC.PN1.0002372".into() + }]), + payments: Box::default() + } + ); + } +} diff --git a/src/iso20022/status_code.rs b/src/iso20022/status_code.rs @@ -0,0 +1,1374 @@ +/* +* This file is part of LibEuFin. +* Copyright (C) 2026 Taler Systems S.A. + +* LibEuFin is free software; you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation; either version 3, or +* (at your option) any later version. + +* LibEuFin is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General +* Public License for more details. + +* You should have received a copy of the GNU Affero General Public +* License along with LibEuFin; see the file COPYING. If not, see +* <http://www.gnu.org/licenses/> +*/ + +// THIS FILE IS GENERATED, DO NOT EDIT + +use taler_enum_meta::EnumMeta; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] +#[enum_meta(DomainCode, Description, Str)] +pub enum StatusReason { + /// Clearing process aborted due to timeout + #[code = "AB01"] + AbortedClearingTimeout, + /// Clearing process aborted due to a fatal error + #[code = "AB02"] + AbortedClearingFatalError, + /// Settlement aborted due to timeout + #[code = "AB03"] + AbortedSettlementTimeout, + /// Settlement process aborted due to a fatal error + #[code = "AB04"] + AbortedSettlementFatalError, + /// Transaction stopped due to timeout at the Creditor Agent + #[code = "AB05"] + TimeoutCreditorAgent, + /// Transaction stopped due to timeout at the Instructed Agent + #[code = "AB06"] + TimeoutInstructedAgent, + /// Agent of message is not online + #[code = "AB07"] + OfflineAgent, + /// Creditor Agent is not online + #[code = "AB08"] + OfflineCreditorAgent, + /// Transaction stopped due to error at the Creditor Agent + #[code = "AB09"] + ErrorCreditorAgent, + /// Transaction stopped due to error at the Instructed Agent + #[code = "AB10"] + ErrorInstructedAgent, + /// Transaction stopped due to timeout at the Debtor Agent + #[code = "AB11"] + TimeoutDebtorAgent, + /// Duplicate Concurrent Batch Sequence number– for Settlement Instructions + #[code = "AB12"] + InvalidConcurrentBatch, + /// Wrong Message Routing Type for Return-of-Funds + #[code = "AB13"] + InvalidRoutingCodeUtilised, + /// Instruction may not be placed on the Continuous Processing Line settlement processor + #[code = "AB15"] + InvalidAccountNumberForSettlementType, + /// Agreement number not valid (beneficiary) + #[code = "AB21"] + InvalidSettlementAgreementNumberSpecified, + /// Settlement Instruction does not exist + #[code = "AB26"] + InvalidBatchSettlementInstruction, + /// Account number is invalid or missing + #[code = "AC01"] + IncorrectAccountNumber, + /// Debtor account number invalid or missing + #[code = "AC02"] + InvalidDebtorAccountNumber, + /// Creditor account number invalid or missing + #[code = "AC03"] + InvalidCreditorAccountNumber, + /// Account number specified has been closed on the bank of account's books + #[code = "AC04"] + ClosedAccountNumber, + /// Debtor account number closed + #[code = "AC05"] + ClosedDebtorAccountNumber, + /// Account specified is blocked, prohibiting posting of transactions against it + #[code = "AC06"] + BlockedAccount, + /// Creditor account number closed + #[code = "AC07"] + ClosedCreditorAccountNumber, + /// Branch code is invalid or missing + #[code = "AC08"] + InvalidBranchCode, + /// Account currency is invalid or missing + #[code = "AC09"] + InvalidAccountCurrency, + /// Debtor account currency is invalid or missing + #[code = "AC10"] + InvalidDebtorAccountCurrency, + /// Creditor account currency is invalid or missing + #[code = "AC11"] + InvalidCreditorAccountCurrency, + /// Account type missing or invalid + #[code = "AC12"] + InvalidAccountType, + /// Debtor account type missing or invalid + #[code = "AC13"] + InvalidDebtorAccountType, + /// Creditor account type missing or invalid + #[code = "AC14"] + InvalidCreditorAccountType, + /// The account details for the counterparty have changed + #[code = "AC15"] + AccountDetailsChanged, + /// Credit or debit card number is invalid + #[code = "AC16"] + CardNumberInvalid, + /// Request-to-pay Expiry Date and Time has already passed + #[code = "AEXR"] + AlreadyExpiredRTP, + /// Transaction forbidden on this type of account (formerly NoAgreement) + #[code = "AG01"] + TransactionForbidden, + /// Bank Operation code specified in the message is not valid for receiver + #[code = "AG02"] + InvalidBankOperationCode, + /// Transaction type not supported/authorized on this account + #[code = "AG03"] + TransactionNotSupported, + /// Agent country code is missing or invalid + #[code = "AG04"] + InvalidAgentCountry, + /// Debtor agent country code is missing or invalid + #[code = "AG05"] + InvalidDebtorAgentCountry, + /// Creditor agent country code is missing or invalid + #[code = "AG06"] + InvalidCreditorAgentCountry, + /// Debtor account cannot be debited for a generic reason + #[code = "AG07"] + UnsuccesfulDirectDebit, + /// Transaction failed due to invalid or missing user or access right + #[code = "AG08"] + InvalidAccessRights, + /// Original payment never received + #[code = "AG09"] + PaymentNotReceived, + /// Agent of message is suspended from the Real Time Payment system + #[code = "AG10"] + AgentSuspended, + /// Creditor Agent of message is suspended from the Real Time Payment system + #[code = "AG11"] + CreditorAgentSuspended, + /// Payment orders made by transferring funds from one account to another at the same financial institution (bank or payment institution) are not allowed + #[code = "AG12"] + NotAllowedBookTransfer, + /// Returned payments derived from previously returned transactions are not allowed + #[code = "AG13"] + ForbiddenReturnPayment, + /// Agent in the payment workflow is incorrect + #[code = "AGNT"] + IncorrectAgent, + /// Request-to-pay has already been accepted by the Debtor + #[code = "ALAC"] + AlreadyAcceptedRTP, + /// Specified message amount is equal to zero + #[code = "AM01"] + ZeroAmount, + /// Specific transaction/message amount is greater than allowed maximum + #[code = "AM02"] + NotAllowedAmount, + /// Specified message amount is an non processable currency outside of existing agreement + #[code = "AM03"] + NotAllowedCurrency, + /// Amount of funds available to cover specified message amount is insufficient + #[code = "AM04"] + InsufficientFunds, + /// Duplication + #[code = "AM05"] + Duplication, + /// Specified transaction amount is less than agreed minimum + #[code = "AM06"] + TooLowAmount, + /// Amount specified in message has been blocked by regulatory authorities + #[code = "AM07"] + BlockedAmount, + /// Amount received is not the amount agreed or expected + #[code = "AM09"] + WrongAmount, + /// Sum of instructed amounts does not equal the control sum + #[code = "AM10"] + InvalidControlSum, + /// Transaction currency is invalid or missing + #[code = "AM11"] + InvalidTransactionCurrency, + /// Amount is invalid or missing + #[code = "AM12"] + InvalidAmount, + /// Transaction amount exceeds limits set by clearing system + #[code = "AM13"] + AmountExceedsClearingSystemLimit, + /// Transaction amount exceeds limits agreed between bank and client + #[code = "AM14"] + AmountExceedsAgreedLimit, + /// Transaction amount below minimum set by clearing system + #[code = "AM15"] + AmountBelowClearingSystemMinimum, + /// Control Sum at the Group level is invalid + #[code = "AM16"] + InvalidGroupControlSum, + /// Control Sum at the Payment Information level is invalid + #[code = "AM17"] + InvalidPaymentInfoControlSum, + /// Number of transactions is invalid or missing + #[code = "AM18"] + InvalidNumberOfTransactions, + /// Number of transactions at the Group level is invalid or missing + #[code = "AM19"] + InvalidGroupNumberOfTransactions, + /// Number of transactions at the Payment Information level is invalid + #[code = "AM20"] + InvalidPaymentInfoNumberOfTransactions, + /// Transaction amount exceeds limits agreed between bank and client + #[code = "AM21"] + LimitExceeded, + /// Unable to apply zero amount to designated account + #[code = "AM22"] + ZeroAmountNotApplied, + /// Transaction amount exceeds settlement limit + #[code = "AM23"] + AmountExceedsSettlementLimit, + /// Size of the attachment exceeds the allowed maximum + #[code = "AMSE"] + AttachmentMaximumSize, + /// Request To Pay has already been paid by the Debtor + #[code = "APAR"] + AlreadyPaidRTP, + /// Request-to-pay has already been refused by the Debtor + #[code = "ARFR"] + AlreadyRefusedRTP, + /// Request-to-pay has already been rejected + #[code = "ARJR"] + AlreadyRejectedRTP, + /// Attachments to the request-to-pay are not supported + #[code = "ATNS"] + AttachementsNotSupported, + /// Settlement Cycle Day and Calendar day should be the same + #[code = "BDAY"] + NotBusinessDay, + /// Identification of end customer is not consistent with associated account number + #[code = "BE01"] + InconsistenWithEndCustomer, + /// Specification of creditor's address, which is required for payment, is missing/not correct (formerly IncorrectCreditorAddress) + #[code = "BE04"] + MissingCreditorAddress, + /// Party who initiated the message is not recognised by the end customer + #[code = "BE05"] + UnrecognisedInitiatingParty, + /// End customer specified is not known at associated Sort/National Bank Code or does no longer exist in the books + #[code = "BE06"] + UnknownEndCustomer, + /// Specification of debtor's address, which is required for payment, is missing/not correct + #[code = "BE07"] + MissingDebtorAddress, + /// Debtor name is missing + #[code = "BE08"] + MissingDebtorName, + /// Country code is missing or Invalid + #[code = "BE09"] + InvalidCountry, + /// Debtor country code is missing or invalid + #[code = "BE10"] + InvalidDebtorCountry, + /// Creditor country code is missing or invalid + #[code = "BE11"] + InvalidCreditorCountry, + /// Country code of residence is missing or Invalid + #[code = "BE12"] + InvalidCountryOfResidence, + /// Country code of debtor's residence is missing or Invalid + #[code = "BE13"] + InvalidDebtorCountryOfResidence, + /// Country code of creditor's residence is missing or Invalid + #[code = "BE14"] + InvalidCreditorCountryOfResidence, + /// Identification code missing or invalid + #[code = "BE15"] + InvalidIdentificationCode, + /// Debtor or Ultimate Debtor identification code missing or invalid + #[code = "BE16"] + InvalidDebtorIdentificationCode, + /// Creditor or Ultimate Creditor identification code missing or invalid + #[code = "BE17"] + InvalidCreditorIdentificationCode, + /// Contact details missing or invalid + #[code = "BE18"] + InvalidContactDetails, + /// Charge bearer code for transaction type is invalid + #[code = "BE19"] + InvalidChargeBearerCode, + /// Name length exceeds local rules for payment type + #[code = "BE20"] + InvalidNameLength, + /// Name missing or invalid + #[code = "BE21"] + MissingName, + /// Creditor name is missing + #[code = "BE22"] + MissingCreditorName, + /// Phone number or email address, or any other proxy, used as the account proxy is unknown or invalid + #[code = "BE23"] + AccountProxyInvalid, + /// Credit transfer is not tagged as an Extended Remittance Information (ERI) transaction but contains ERI + #[code = "CERI"] + CheckERI, + /// Value in Requested Execution Date or Requested Collection Date is too far in the future + #[code = "CH03"] + RequestedExecutionDateOrRequestedCollectionDateTooFarInFuture, + /// Value in Requested Execution Date or Requested Collection Date is too far in the past + #[code = "CH04"] + RequestedExecutionDateOrRequestedCollectionDateTooFarInPast, + /// Element is not to be used at B- and C-Level + #[code = "CH07"] + ElementIsNotToBeUsedAtBandCLevel, + /// Mandate changes are not allowed + #[code = "CH09"] + MandateChangesNotAllowed, + /// Information on mandate changes are missing + #[code = "CH10"] + InformationOnMandateChangesMissing, + /// Value in Creditor Identifier is incorrect + #[code = "CH11"] + CreditorIdentifierIncorrect, + /// Creditor Identifier is ambiguous at Transaction Level + #[code = "CH12"] + CreditorIdentifierNotUnambiguouslyAtTransactionLevel, + /// Original Debtor Account is not to be used + #[code = "CH13"] + OriginalDebtorAccountIsNotToBeUsed, + /// Original Debtor Agent is not to be used + #[code = "CH14"] + OriginalDebtorAgentIsNotToBeUsed, + /// Content Remittance Information/Structured includes more than 140 characters + #[code = "CH15"] + ElementContentIncludesMoreThan140Characters, + /// Content is incorrect + #[code = "CH16"] + ElementContentFormallyIncorrect, + /// Element is not allowed + #[code = "CH17"] + ElementNotAdmitted, + /// Values in Interbank Settlement Date or Requested Collection Date will be set to the next TARGET day + #[code = "CH19"] + ValuesWillBeSetToNextTARGETday, + /// Number of decimal points not compatible with the currency + #[code = "CH20"] + DecimalPointsNotCompatibleWithCurrency, + /// Mandatory element is missing + #[code = "CH21"] + RequiredCompulsoryElementMissing, + /// SDD CORE and B2B not permitted within one message + #[code = "CH22"] + COREandB2BwithinOnemessage, + /// Related to a Charge message to convey that the code in Charge Breakdown / Type / Code is not accepted by the receiving party + #[code = "CHCO"] + UnacceptedChargeCodeType, + /// Cheque has been presented in cheque clearing and settled on the creditor’s account + #[code = "CHQC"] + ChequeSettledOnCreditorAccount, + /// Related to a Charge message to convey that the charge bearer code used in the corresponding Payment message was not debt + #[code = "CHRG"] + UnderlyingChargeBearerWasNotDebt, + /// Authorisation is cancelled + #[code = "CN01"] + AuthorisationCancelled, + /// Credit notes are not supported + #[code = "CNNS"] + CreditNotesNotSupported, + /// Creditor bank is not registered under this BIC in the CSM + #[code = "CNOR"] + CreditorBankIsNotRegistered, + /// Currency of the payment is incorrect + #[code = "CURR"] + IncorrectCurrency, + /// Cancellation requested by the Debtor + #[code = "CUST"] + RequestedByCustomer, + /// Rejection of a payment due to covering FI settlement not being received + #[code = "DC02"] + SettlementNotReceived, + /// Debtor bank is not registered under this BIC in the CSM + #[code = "DNOR"] + DebtorBankIsNotRegistered, + /// The electronic signature(s) is/are correct + #[code = "DS01"] + ElectronicSignaturesCorrect, + /// An authorized user has cancelled the order + #[code = "DS02"] + OrderCancelled, + /// The user’s attempt to cancel the order was not successful + #[code = "DS03"] + OrderNotCancelled, + /// The order was rejected by the bank side (for reasons concerning content) + #[code = "DS04"] + OrderRejected, + /// The order was correct and could be forwarded for postprocessing + #[code = "DS05"] + OrderForwardedForPostprocessing, + /// The order was transferred to VEU + #[code = "DS06"] + TransferOrder, + /// All actions concerning the order could be done by the EBICS bank server + #[code = "DS07"] + ProcessingOK, + /// The decompression of the file was not successful + #[code = "DS08"] + DecompressionError, + /// The decryption of the file was not successful + #[code = "DS09"] + DecryptionError, + /// Data signature is required + #[code = "DS0A"] + DataSignRequested, + /// Data signature for the format is not available or invalid + #[code = "DS0B"] + UnknownDataSignFormat, + /// The signer certificate is revoked + #[code = "DS0C"] + SignerCertificateRevoked, + /// The signer certificate is not valid (revoked or not active) + #[code = "DS0D"] + SignerCertificateNotValid, + /// The signer certificate is not present + #[code = "DS0E"] + IncorrectSignerCertificate, + /// The authority of the signer certification sending the certificate is unknown + #[code = "DS0F"] + SignerCertificationAuthoritySignerNotValid, + /// Signer is not allowed to sign this operation type + #[code = "DS0G"] + NotAllowedPayment, + /// Signer is not allowed to sign for this account + #[code = "DS0H"] + NotAllowedAccount, + /// The number of transaction is over the number allowed for this signer + #[code = "DS0K"] + NotAllowedNumberOfTransaction, + /// The certificate is revoked for the first signer + #[code = "DS10"] + Signer1CertificateRevoked, + /// The certificate is not valid (revoked or not active) for the first signer + #[code = "DS11"] + Signer1CertificateNotValid, + /// The certificate is not present for the first signer + #[code = "DS12"] + IncorrectSigner1Certificate, + /// The authority of signer certification sending the certificate is unknown for the first signer + #[code = "DS13"] + SignerCertificationAuthoritySigner1NotValid, + /// The user is unknown on the server + #[code = "DS14"] + UserDoesNotExist, + /// The same signature has already been sent to the bank + #[code = "DS15"] + IdenticalSignatureFound, + /// The public key version is not correct + #[code = "DS16"] + PublicKeyVersionIncorrect, + /// Order data and signatures don’t match + #[code = "DS17"] + DifferentOrderDataInSignatures, + /// File cannot be tested, the complete order has to be repeated + #[code = "DS18"] + RepeatOrder, + /// The user’s rights (concerning his signature) are insufficient to execute the order + #[code = "DS19"] + ElectronicSignatureRightsInsufficient, + /// The certificate is revoked for the second signer + #[code = "DS20"] + Signer2CertificateRevoked, + /// The certificate is not valid (revoked or not active) for the second signer + #[code = "DS21"] + Signer2CertificateNotValid, + /// The certificate is not present for the second signer + #[code = "DS22"] + IncorrectSigner2Certificate, + /// The authority of signer certification sending the certificate is unknown for the second signer + #[code = "DS23"] + SignerCertificationAuthoritySigner2NotValid, + /// Waiting time expired due to incomplete order + #[code = "DS24"] + WaitingTimeExpired, + /// The order file was deleted by the bank server + #[code = "DS25"] + OrderFileDeleted, + /// The same user has signed multiple times + #[code = "DS26"] + UserSignedMultipleTimes, + /// The user is not yet activated (technically) + #[code = "DS27"] + UserNotYetActivated, + /// Message routed to the wrong environment + #[code = "DS28"] + ReturnForTechnicalReason, + /// Invalid date (eg, wrong or missing settlement date) + #[code = "DT01"] + InvalidDate, + /// Invalid creation date and time in Group Header (eg, historic date) + #[code = "DT02"] + InvalidCreationDate, + /// Invalid non bank processing date (eg, weekend or local public holiday) + #[code = "DT03"] + InvalidNonProcessingDate, + /// Future date not supported + #[code = "DT04"] + FutureDateNotSupported, + /// Associated message, payment information block or transaction was received after agreed processing cut-off date, i + #[code = "DT05"] + InvalidCutOffDate, + /// Execution Date has been modified in order for transaction to be processed + #[code = "DT06"] + ExecutionDateChanged, + /// Message Identification is not unique + #[code = "DU01"] + DuplicateMessageID, + /// Payment Information Block is not unique + #[code = "DU02"] + DuplicatePaymentInformationID, + /// Transaction is not unique + #[code = "DU03"] + DuplicateTransaction, + /// End To End ID is not unique + #[code = "DU04"] + DuplicateEndToEndID, + /// Instruction ID is not unique + #[code = "DU05"] + DuplicateInstructionID, + /// Payment or charge is a duplicate of another payment or charge + #[code = "DUPL"] + DuplicatePaymentOrCharge, + /// Correspondent bank not possible + #[code = "ED01"] + CorrespondentBankNotPossible, + /// Balance of payments complementary info is requested + #[code = "ED03"] + BalanceInfoRequest, + /// Settlement of the transaction has failed + #[code = "ED05"] + SettlementFailed, + /// Interbank settlement system not available + #[code = "ED06"] + SettlementSystemNotAvailable, + /// Requested execution date of the payment is not accepted + #[code = "EDNA"] + ExecutionDateNotAccepted, + /// Expiry date time of the request-to-pay is too far in the future + #[code = "EDTL"] + ExpiryDateTooLong, + /// Expiry date time of the request-to-pay is already reached + #[code = "EDTR"] + ExpiryDateTimeReached, + /// Expiration of the payment authorisation due to no use for too long + #[code = "EOL1"] + EndOfLife, + /// Extended Remittance Information (ERI) option is not supported + #[code = "ERIN"] + ERIOptionNotSupported, + /// File Format incomplete or invalid + #[code = "FF01"] + InvalidFileFormat, + /// Syntax error reason is provided as narrative information in the additional reason information + #[code = "FF02"] + SyntaxError, + /// Payment Type Information is missing or invalid + #[code = "FF03"] + InvalidPaymentTypeInformation, + /// Service Level code is missing or invalid + #[code = "FF04"] + InvalidServiceLevelCode, + /// Local Instrument code is missing or invalid + #[code = "FF05"] + InvalidLocalInstrumentCode, + /// Category Purpose code is missing or invalid + #[code = "FF06"] + InvalidCategoryPurposeCode, + /// Purpose is missing or invalid + #[code = "FF07"] + InvalidPurpose, + /// End to End Id missing or invalid + #[code = "FF08"] + InvalidEndToEndId, + /// Cheque number missing or invalid + #[code = "FF09"] + InvalidChequeNumber, + /// File or transaction cannot be processed due to technical issues at the bank side + #[code = "FF10"] + BankSystemProcessingError, + /// Clearing request rejected due it being subject to an abort operation + #[code = "FF11"] + ClearingRequestAborted, + /// Original payment is not eligible to be returned given its current status + #[code = "FF12"] + OriginalTransactionNotEligibleForRequestedReturn, + /// No record of request for cancellation found + #[code = "FF13"] + RequestForCancellationNotFound, + /// Return following a cancellation request + #[code = "FOCR"] + FollowingCancellationRequest, + /// Returned as a result of fraud + #[code = "FR01"] + Fraud, + /// Cancellation requested following a transaction that was originated fraudulently + #[code = "FRAD"] + FraudulentOrigin, + /// In an FI To FI Customer Credit Transfer: The Status Originator transferred the payment to the next Agent or to a Market Infrastructure + #[code = "G000"] + PaymentTransferredAndTracked, + /// In an FI To FI Customer Credit Transfer: The Status Originator transferred the payment to the next Agent or to a Market Infrastructure + #[code = "G001"] + PaymentTransferredAndNotTracked, + /// In a FIToFI Customer Credit Transfer: Credit to the creditor’s account may not be confirmed same day + #[code = "G002"] + CreditDebitNotConfirmed, + /// In a FIToFI Customer Credit Transfer: Credit to creditor’s account is pending receipt of required documents + #[code = "G003"] + CreditPendingDocuments, + /// In a FIToFI Customer Credit Transfer: Credit to the creditor’s account is pending, status Originator is waiting for funds provided via a cover + #[code = "G004"] + CreditPendingFunds, + /// Payment has been delivered to creditor agent with service level + #[code = "G005"] + DeliveredWithServiceLevel, + /// Payment has been delivered to creditor agent without service level + #[code = "G006"] + DeliveredWIthoutServiceLevel, + /// Signature file was sent to the bank but the corresponding original file has not been sent yet + #[code = "ID01"] + CorrespondingOriginalFileStillNotSent, + /// Expiry date time of the request-to-pay is incorrect + #[code = "IEDT"] + IncorrectExpiryDateTime, + /// Payer’s activation reference is invalid + #[code = "INAR"] + InvalidActivationReference, + /// Details not valid for this field + #[code = "INDT"] + InvalidDetails, + /// Payments in instalments are not supported + #[code = "IPNS"] + InstalmentPaymentsNotSupported, + /// No initial request-to-pay has been received + #[code = "IRNR"] + InitialRTPNeverReceived, + /// Cannot schedule instruction for Night Window + #[code = "ISWS"] + InvalidSettlementWindow, + /// No Mandate + #[code = "MD01"] + NoMandate, + /// Mandate related information data required by the scheme is missing + #[code = "MD02"] + MissingMandatoryInformationInMandate, + /// Creditor or creditor's agent should not have collected the direct debit + #[code = "MD05"] + CollectionNotDue, + /// Return of funds requested by end customer + #[code = "MD06"] + RefundRequestByEndCustomer, + /// End customer is deceased + #[code = "MD07"] + EndCustomerDeceased, + /// Information missing for the field or cannot be empty + #[code = "MINF"] + MissingInformation, + /// Reason has not been specified by end customer + #[code = "MS02"] + NotSpecifiedReasonCustomerGenerated, + /// Reason has not been specified by agent + #[code = "MS03"] + NotSpecifiedReasonAgentGenerated, + /// Reason is provided as narrative information in the additional reason information + #[code = "NARR"] + Narrative, + /// Credit transfer is tagged as an Extended Remittance Information (ERI) transaction but does not contain ERI + #[code = "NERI"] + NoERI, + /// No existing agreement for receiving request-to-pay messages + #[code = "NOAR"] + NonAgreedRTP, + /// No response from Beneficiary + #[code = "NOAS"] + NoAnswerFromCustomer, + /// Customer account is not compliant with regulatory requirements, for example FICA (in South Africa) or any other regulatory requirements which render an account inactive for certain processing + #[code = "NOCM"] + NotCompliantGeneric, + /// Continuous Processing Line on Hold Instruction + #[code = "NOFR"] + OutstandingFundingForSettlement, + /// Requested payment guarantee (by Creditor) related to a request-to-pay cannot be provided + #[code = "NOPG"] + NoPaymentGuarantee, + /// Recipient side of the request-to-pay (payer or its request-to-pay service provider) is not reachable + #[code = "NRCH"] + PayerOrPayerRTPSPNotReachable, + /// Requested optional service (for example instalment payments) is not supported + #[code = "OSNS"] + OptionalServiceNotSupported, + /// Type of payment requested in the request-to-pay is not supported by the payer + #[code = "PINS"] + TypeOfPaymentInstrumentNotSupported, + /// Error code used for RTP-initiated CTR when the pacs + #[code = "PNRT"] + PaymentNotAlignedWithRTPRequest, + /// Bank identifier code specified in the message has an incorrect format (formerly IncorrectFormatForRoutingCode) + #[code = "RC01"] + BankIdentifierIncorrect, + /// Bank identifier is invalid or missing + #[code = "RC02"] + InvalidBankIdentifier, + /// Debtor bank identifier is invalid or missing + #[code = "RC03"] + InvalidDebtorBankIdentifier, + /// Creditor bank identifier is invalid or missing + #[code = "RC04"] + InvalidCreditorBankIdentifier, + /// BIC identifier is invalid or missing + #[code = "RC05"] + InvalidBICIdentifier, + /// Debtor BIC identifier is invalid or missing + #[code = "RC06"] + InvalidDebtorBICIdentifier, + /// Creditor BIC identifier is invalid or missing + #[code = "RC07"] + InvalidCreditorBICIdentifier, + /// ClearingSystemMemberidentifier is invalid or missing + #[code = "RC08"] + InvalidClearingSystemMemberIdentifier, + /// Debtor ClearingSystemMember identifier is invalid or missing + #[code = "RC09"] + InvalidDebtorClearingSystemMemberIdentifier, + /// Creditor ClearingSystemMember identifier is invalid or missing + #[code = "RC10"] + InvalidCreditorClearingSystemMemberIdentifier, + /// Intermediary Agent is invalid or missing + #[code = "RC11"] + InvalidIntermediaryAgent, + /// Creditor Scheme Id is invalid or missing + #[code = "RC12"] + MissingCreditorSchemeId, + /// Originator not active any more + #[code = "RC13"] + ParticipantNotAnActiveMemberofRTGS, + /// Settlement agreement required + #[code = "RC15"] + ParticipantNotActiveMemberSettlementType, + /// Participant blocked from SADC-RTGS + #[code = "RC16"] + ParticipantNotActiveMemberofSADCRTGS, + /// Conflict with R-Message + #[code = "RCON"] + RMessageConflict, + /// Further information regarding the intended recipient + #[code = "RECI"] + ReceiverCustomerInformation, + /// Request-to-pay has been received and can be processed further + #[code = "REPR"] + RTPReceivedCanBeProcessed, + /// Transaction reference is not unique within the message + #[code = "RF01"] + NotUniqueTransactionReference, + /// Payer did not recognize the request from Payee Participant, + #[code = "RQNR"] + RequestNotRecognized, + /// Specification of the debtor’s account or unique identification needed for reasons of regulatory requirements is insufficient or missing + #[code = "RR01"] + MissingDebtorAccountOrIdentification, + /// Specification of the debtor’s name and/or address needed for regulatory requirements is insufficient or missing + #[code = "RR02"] + MissingDebtorNameOrAddress, + /// Specification of the creditor’s name and/or address needed for regulatory requirements is insufficient or missing + #[code = "RR03"] + MissingCreditorNameOrAddress, + /// Regulatory Reason + #[code = "RR04"] + RegulatoryReason, + /// Regulatory or Central Bank Reporting information missing, incomplete or invalid + #[code = "RR05"] + RegulatoryInformationInvalid, + /// Tax information missing, incomplete or invalid + #[code = "RR06"] + TaxInformationInvalid, + /// Remittance information structure does not comply with rules for payment type + #[code = "RR07"] + RemittanceInformationInvalid, + /// Remittance information truncated to comply with rules for payment type + #[code = "RR08"] + RemittanceInformationTruncated, + /// Structured creditor reference invalid or missing + #[code = "RR09"] + InvalidStructuredCreditorReference, + /// Character set supplied not valid for the country and payment type + #[code = "RR10"] + InvalidCharacterSet, + /// Invalid or missing identification of a bank proprietary service + #[code = "RR11"] + InvalidDebtorAgentServiceID, + /// Invalid or missing identification required within a particular country or payment type + #[code = "RR12"] + InvalidPartyID, + /// Debtor does not support request-to-pay transactions + #[code = "RTNS"] + RTPNotSupportedForDebtor, + /// Return following investigation request and no remediation possible + #[code = "RUTA"] + ReturnUponUnableToApply, + /// Request for Cancellation is acknowledged following validation + #[code = "S000"] + ValidRequestForCancellationAcknowledged, + /// Unique End-to-end Transaction Reference (UETR) relating to a payment has been identified as being associated with a Request for Cancellation + #[code = "S001"] + UETRFlaggedForCancellation, + /// Unique End-to-end Transaction Reference (UETR) relating to a payment has been prevent from traveling across a messaging network + #[code = "S002"] + NetworkStopOfUETR, + /// Request for Cancellation has been forwarded to the payment processing/last payment processing agent + #[code = "S003"] + RequestForCancellationForwarded, + /// Request for Cancellation has been acknowledged as delivered to payment processing/last payment processing agent + #[code = "S004"] + RequestForCancellationDeliveryAcknowledgement, + /// Remove Concurrent Batch Processing Line on hold instruction + #[code = "SBRN"] + SettlementBatchRemovalNotification, + /// Due to specific service offered by the Debtor Agent + #[code = "SL01"] + SpecificServiceOfferedByDebtorAgent, + /// Due to specific service offered by the Creditor Agent + #[code = "SL02"] + SpecificServiceOfferedByCreditorAgent, + /// Due to a specific service offered by the clearing system + #[code = "SL03"] + ServiceofClearingSystem, + /// Whitelisting service offered by the Debtor Agent; Debtor has not included the Creditor on its “Whitelist” (yet) + #[code = "SL11"] + CreditorNotOnWhitelistOfDebtor, + /// Blacklisting service offered by the Debtor Agent; Debtor included the Creditor on his “Blacklist” + #[code = "SL12"] + CreditorOnBlacklistOfDebtor, + /// Due to Maximum allowed Direct Debit Transactions per period service offered by the Debtor Agent + #[code = "SL13"] + MaximumNumberOfDirectDebitTransactionsExceeded, + /// Due to Maximum allowed Direct Debit Transaction amount service offered by the Debtor Agent + #[code = "SL14"] + MaximumDirectDebitTransactionAmountExceeded, + /// Maximum number of credit transactions allowed by the account servicer per service period exceeded + #[code = "SL15"] + MaximumNumberOfCreditTransactionsExceeded, + /// Maximum total credit amount allowed by the account servicer per service period exceeded + #[code = "SL16"] + MaximumCreditTransactionsAmountExceeded, + /// Whitelisting service offered by payment system operator or financial institution + #[code = "SL17"] + DebtorNotOnWhitelistOfCreditorSide, + /// Blacklisting service offered by payment system operator or financial institution + #[code = "SL18"] + DebtorOnBlacklistOfCreditorSide, + /// Services are not yet rendered by the Payee Participant (Creditor) + #[code = "SNRD"] + ServiceNotRendered, + /// Identifier of the request-to-pay service provider is incorrect + #[code = "SPII"] + RTPServiceProviderIdentifierIncorrect, + /// The transmission of the file was not successful – it had to be aborted (for technical reasons) + #[code = "TA01"] + TransmissonAborted, + /// There is no data available (for download) + #[code = "TD01"] + NoDataAvailable, + /// The file cannot be read (e + #[code = "TD02"] + FileNonReadable, + /// The file format is incomplete or invalid + #[code = "TD03"] + IncorrectFileStructure, + /// Token is invalid + #[code = "TK01"] + TokenInvalid, + /// Token used for the sender does not exist + #[code = "TK02"] + SenderTokenNotFound, + /// Token used for the receiver does not exist + #[code = "TK03"] + ReceiverTokenNotFound, + /// Token required for request is missing + #[code = "TK09"] + TokenMissing, + /// Token found with counterparty mismatch + #[code = "TKCM"] + TokenCounterpartyMismatch, + /// Single Use Token already used + #[code = "TKSG"] + TokenSingleUse, + /// Token found with suspended status + #[code = "TKSP"] + TokenSuspended, + /// Token found with value limit rule violation + #[code = "TKVE"] + TokenValueLimitExceeded, + /// Token expired + #[code = "TKXP"] + TokenExpired, + /// Associated message, payment information block, or transaction was received after agreed processing cut-off time + #[code = "TM01"] + InvalidCutOffTime, + /// The (technical) transmission of the file was successful + #[code = "TS01"] + TransmissionSuccessful, + /// The order was transferred to pass by accompanying note signed by hand + #[code = "TS04"] + TransferToSignByHand, + /// Unknown Creditor + #[code = "UCRD"] + UnknownCreditor, + /// Payment is not justified + #[code = "UPAY"] + UnduePayment, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] +#[enum_meta(DomainCode, Description, Str)] +pub enum PaymentGroupStatus { + /// Settlement on the creditor's account has been completed + #[code = "ACCC"] + AcceptedSettlementCompletedCreditorAccount, + /// Preceding check of technical validation was successful + #[code = "ACCP"] + AcceptedCustomerProfile, + /// Settlement on the debtor's account has been completed + #[code = "ACSC"] + AcceptedSettlementCompletedDebitorAccount, + /// All preceding checks such as technical validation and customer profile were successful and therefore the payment initiation has been accepted for execution + #[code = "ACSP"] + AcceptedSettlementInProcess, + /// Authentication and syntactical and semantical validation are successful + #[code = "ACTC"] + AcceptedTechnicalValidation, + /// Instruction is accepted but a change will be made, such as date or remittance not sent + #[code = "ACWC"] + AcceptedWithChange, + /// A number of transactions have been accepted, whereas another number of transactions have not yet achieved + #[code = "PART"] + PartiallyAccepted, + /// Payment initiation or individual transaction included in the payment initiation is pending + #[code = "PDNG"] + Pending, + /// Verification of Payee check have been applied to received transactions stating to be complete without mismatching data + #[code = "RCVC"] + ReceivedVerificationCompleted, + /// Payment initiation has been received by the receiving agent + #[code = "RCVD"] + Received, + /// Payment initiation or individual transaction included in the payment initiation has been rejected + #[code = "RJCT"] + Rejected, + /// Verification of Payee checks have been applied to received transactions stating to be complete containing mismatching data + #[code = "RVCM"] + ReceivedVerificationCompletedWithMismatches, + /// Verification of party check on transactions received is not yet completed + #[code = "RVNC"] + ReceivedVerificationNotCompleted, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] +#[enum_meta(DomainCode, Description, Str)] +pub enum PaymentTransactionStatus { + /// Settlement on the creditor's account has been completed + #[code = "ACCC"] + AcceptedSettlementCompletedCreditorAccount, + /// Preceding check of technical validation was successful + #[code = "ACCP"] + AcceptedCustomerProfile, + /// Preceding check of technical validation and customer profile was successful and an automatic funds check was positive + #[code = "ACFC"] + AcceptedFundsChecked, + /// Preceding check of technical validation and customer profile was successful, and an automatic funds check was positive, but an explicit confirmation by the initiating party is outstanding + #[code = "ACFW"] + AcceptedFundsCheckedWaitingConfirmation, + /// Payment instruction to issue a cheque has been accepted, and the cheque has been issued but not yet been deposited or cleared + #[code = "ACIS"] + AcceptedandChequeIssued, + /// Status of transaction released from the Debtor Agent and accepted by the clearing + #[code = "ACPD"] + AcceptedClearingProcessed, + /// Settlement completed + #[code = "ACSC"] + AcceptedSettlementCompletedDebitorAccount, + /// All preceding checks such as technical validation and customer profile were successful and therefore the payment instruction has been accepted for execution + #[code = "ACSP"] + AcceptedSettlementInProcess, + /// Authentication and syntactical and semantical validation are successful + #[code = "ACTC"] + AcceptedTechnicalValidation, + /// Instruction is accepted but a change will be made, such as date or remittance not sent + #[code = "ACWC"] + AcceptedWithChange, + /// Payment instruction included in the credit transfer is accepted without being posted to the creditor customer’s account + #[code = "ACWP"] + AcceptedWithoutPosting, + /// Payment transaction previously reported with status 'ACWP' is blocked, for example, funds will neither be posted to the Creditor's account, nor be returned to the Debtor + #[code = "BLCK"] + Blocked, + /// Payment initiation has been successfully cancelled after having received a request for cancellation + #[code = "CANC"] + Cancelled, + /// Cash has been picked up by the Creditor + #[code = "CPUC"] + CashPickedUpByCreditor, + /// Payment initiation needs multiple authentications, where some but not yet all have been performed + #[code = "PATC"] + PartiallyAcceptedTechnicalCorrect, + /// Payment instruction is pending + #[code = "PDNG"] + Pending, + /// Request for Payment has been presented to the Debtor + #[code = "PRES"] + Presented, + /// Verification of Payee check has been applied to received transaction stating to be complete without mismatching data + #[code = "RCVC"] + ReceivedVerificationCompleted, + /// Payment instruction has been received + #[code = "RCVD"] + Received, + /// Payment instruction has been rejected + #[code = "RJCT"] + Rejected, + /// Verification of Payee checks have been applied to received transaction stating to be completed containing mismatching data + #[code = "RVCM"] + ReceivedVerificationCompletedWithMismatches, + /// Verification of Payee check has been applied to received transaction stating to be complete with data matching closely + #[code = "RVMC"] + ReceivedVerificationCompletedMatchClosely, + /// Verification of Payee check has been applied to received transaction stating to be complete with not applicable data + #[code = "RVNA"] + ReceivedVerificationCompletedNotApplicable, + /// Verification of party check on the transaction is not yet completed + #[code = "RVNC"] + ReceivedVerificationNotCompleted, + /// Verification of Payee check has been applied to received transaction stating to be complete with mismatching data + #[code = "RVNM"] + ReceivedVerificationCompletedNoMatch, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumMeta)] +#[enum_meta(DomainCode, Description, Str)] +pub enum ReturnReason { + /// Format of the account number specified is not correct + #[code = "AC01"] + IncorrectAccountNumber, + /// Debtor account number invalid or missing + #[code = "AC02"] + InvalidDebtorAccountNumber, + /// Wrong IBAN in SCT + #[code = "AC03"] + InvalidCreditorAccountNumber, + /// Account number specified has been closed on the bank of account's books + #[code = "AC04"] + ClosedAccountNumber, + /// Account specified is blocked, prohibiting posting of transactions against it + #[code = "AC06"] + BlockedAccount, + /// Creditor account number closed + #[code = "AC07"] + ClosedCreditorAccountNumber, + /// Debtor account type is missing or invalid + #[code = "AC13"] + InvalidDebtorAccountType, + /// An agent in the payment chain is invalid + #[code = "AC14"] + InvalidAgent, + /// Account details have changed + #[code = "AC15"] + AccountDetailsChanged, + /// Account is in sequestration + #[code = "AC16"] + AccountInSequestration, + /// Account is in liquidation + #[code = "AC17"] + AccountInLiquidation, + /// Transaction forbidden on this type of account (formerly NoAgreement) + #[code = "AG01"] + TransactionForbidden, + /// Bank Operation code specified in the message is not valid for receiver + #[code = "AG02"] + InvalidBankOperationCode, + /// Debtor account cannot be debited for a generic reason + #[code = "AG07"] + UnsuccesfulDirectDebit, + /// Agent in the payment workflow is incorrect + #[code = "AGNT"] + IncorrectAgent, + /// Specified message amount is equal to zero + #[code = "AM01"] + ZeroAmount, + /// Specific transaction/message amount is greater than allowed maximum + #[code = "AM02"] + NotAllowedAmount, + /// Specified message amount is an non processable currency outside of existing agreement + #[code = "AM03"] + NotAllowedCurrency, + /// Amount of funds available to cover specified message amount is insufficient + #[code = "AM04"] + InsufficientFunds, + /// Duplication + #[code = "AM05"] + Duplication, + /// Specified transaction amount is less than agreed minimum + #[code = "AM06"] + TooLowAmount, + /// Amount specified in message has been blocked by regulatory authorities + #[code = "AM07"] + BlockedAmount, + /// Amount received is not the amount agreed or expected + #[code = "AM09"] + WrongAmount, + /// Sum of instructed amounts does not equal the control sum + #[code = "AM10"] + InvalidControlSum, + /// Already returned original SCT + #[code = "ARDT"] + AlreadyReturnedTransaction, + /// Identification of end customer is not consistent with associated account number, organisation ID or private ID + #[code = "BE01"] + InconsistenWithEndCustomer, + /// Specification of creditor's address, which is required for payment, is missing/not correct (formerly IncorrectCreditorAddress) + #[code = "BE04"] + MissingCreditorAddress, + /// Party who initiated the message is not recognised by the end customer + #[code = "BE05"] + UnrecognisedInitiatingParty, + /// End customer specified is not known at associated Sort/National Bank Code or does no longer exist in the books + #[code = "BE06"] + UnknownEndCustomer, + /// Specification of debtor's address, which is required for payment, is missing/not correct + #[code = "BE07"] + MissingDebtorAddress, + /// Returned as a result of a bank error + #[code = "BE08"] + BankError, + /// Debtor country code is missing or invalid + #[code = "BE10"] + InvalidDebtorCountry, + /// Creditor country code is missing or invalid + #[code = "BE11"] + InvalidCreditorCountry, + /// Debtor or Ultimate Debtor identification code missing or invalid + #[code = "BE16"] + InvalidDebtorIdentificationCode, + /// Creditor or Ultimate Creditor identification code missing or invalid + #[code = "BE17"] + InvalidCreditorIdentificationCode, + /// Authorisation is cancelled + #[code = "CN01"] + AuthorisationCancelled, + /// Creditor bank is not registered under this BIC in the CSM + #[code = "CNOR"] + CreditorBankIsNotRegistered, + /// Cash not picked up by Creditor or cash could not be delivered to Creditor + #[code = "CNPC"] + CashNotPickedUp, + /// Currency of the payment is incorrect + #[code = "CURR"] + IncorrectCurrency, + /// Cancellation requested by the Debtor + #[code = "CUST"] + RequestedByCustomer, + /// Return of Covering Settlement due to the underlying Credit Transfer details not being received + #[code = "DC04"] + NoCustomerCreditTransferReceived, + /// Debtor bank is not registered under this BIC in the CSM + #[code = "DNOR"] + DebtorBankIsNotRegistered, + /// Return following technical problems resulting in erroneous transaction + #[code = "DS28"] + ReturnForTechnicalReason, + /// Invalid date (eg, wrong settlement date) + #[code = "DT01"] + InvalidDate, + /// Cheque has been issued but not deposited and is considered expired + #[code = "DT02"] + ChequeExpired, + /// Future date not supported + #[code = "DT04"] + FutureDateNotSupported, + /// Payment is a duplicate of another payment + #[code = "DUPL"] + DuplicatePayment, + /// Correspondent bank not possible + #[code = "ED01"] + CorrespondentBankNotPossible, + /// Balance of payments complementary info is requested + #[code = "ED03"] + BalanceInfoRequest, + /// Settlement of the transaction has failed + #[code = "ED05"] + SettlementFailed, + /// The card payment is fraudulent and was not processed with EMV technology for an EMV card + #[code = "EMVL"] + EMVLiabilityShift, + /// The Extended Remittance Information (ERI) option is not supported + #[code = "ERIN"] + ERIOptionNotSupported, + /// Payment Type Information is missing or invalid + #[code = "FF03"] + InvalidPaymentTypeInformation, + /// Service Level code is missing or invalid + #[code = "FF04"] + InvalidServiceLevelCode, + /// Local Instrument code is missing or invalid + #[code = "FF05"] + InvalidLocalInstrumentCode, + /// Category Purpose code is missing or invalid + #[code = "FF06"] + InvalidCategoryPurposeCode, + /// Purpose is missing or invalid + #[code = "FF07"] + InvalidPurpose, + /// Return following a cancellation request + #[code = "FOCR"] + FollowingCancellationRequest, + /// Returned as a result of fraud + #[code = "FR01"] + Fraud, + /// Final response/tracking is recalled as mandate is cancelled + #[code = "FRTR"] + FinalResponseMandateCancelled, + /// In a FIToFI Customer Credit Transfer: Credit to the creditor’s account is pending, status Originator is waiting for funds provided via a cover + #[code = "G004"] + CreditPendingFunds, + /// No Mandate + #[code = "MD01"] + NoMandate, + /// Mandate related information data required by the scheme is missing + #[code = "MD02"] + MissingMandatoryInformationInMandate, + /// Creditor or creditor's agent should not have collected the direct debit + #[code = "MD05"] + CollectionNotDue, + /// Return of funds requested by end customer + #[code = "MD06"] + RefundRequestByEndCustomer, + /// End customer is deceased + #[code = "MD07"] + EndCustomerDeceased, + /// Reason has not been specified by end customer + #[code = "MS02"] + NotSpecifiedReasonCustomerGenerated, + /// Reason has not been specified by agent + #[code = "MS03"] + NotSpecifiedReasonAgentGenerated, + /// Reason is provided as narrative information in the additional reason information + #[code = "NARR"] + Narrative, + /// No response from Beneficiary + #[code = "NOAS"] + NoAnswerFromCustomer, + /// Customer account is not compliant with regulatory requirements, for example FICA (in South Africa) or any other regulatory requirements which render an account inactive for certain processing + #[code = "NOCM"] + NotCompliant, + /// Original SCT never received + #[code = "NOOR"] + NoOriginalTransactionReceived, + /// The card payment is fraudulent (lost and stolen fraud) and was processed as EMV transaction without PIN verification + #[code = "PINL"] + PINLiabilityShift, + /// Bank Identifier code specified in the message has an incorrect format (formerly IncorrectFormatForRoutingCode) + #[code = "RC01"] + BankIdentifierIncorrect, + /// Debtor bank identifier is invalid or missing + #[code = "RC03"] + InvalidDebtorBankIdentifier, + /// Creditor bank identifier is invalid or missing + #[code = "RC04"] + InvalidCreditorBankIdentifier, + /// Incorrrect BIC of the beneficiary Bank in the SCTR + #[code = "RC07"] + InvalidCreditorBICIdentifier, + /// ClearingSystemMemberidentifier is invalid or missing + #[code = "RC08"] + InvalidClearingSystemMemberIdentifier, + /// Intermediary Agent is invalid or missing + #[code = "RC11"] + InvalidIntermediaryAgent, + /// Transaction reference is not unique within the message + #[code = "RF01"] + NotUniqueTransactionReference, + /// Specification of the debtor’s account or unique identification needed for reasons of regulatory requirements is insufficient or missing + #[code = "RR01"] + MissingDebtorAccountOrIdentification, + /// Specification of the debtor’s name and/or address needed for regulatory requirements is insufficient or missing + #[code = "RR02"] + MissingDebtorNameOrAddress, + /// Specification of the creditor’s name and/or address needed for regulatory requirements is insufficient or missing + #[code = "RR03"] + MissingCreditorNameOrAddress, + /// Regulatory Reason + #[code = "RR04"] + RegulatoryReason, + /// Regulatory or Central Bank Reporting information missing, incomplete or invalid + #[code = "RR05"] + RegulatoryInformationInvalid, + /// Tax information missing, incomplete or invalid + #[code = "RR06"] + TaxInformationInvalid, + /// Remittance information structure does not comply with rules for payment type + #[code = "RR07"] + RemittanceInformationInvalid, + /// Remittance information truncated to comply with rules for payment type + #[code = "RR08"] + RemittanceInformationTruncated, + /// Structured creditor reference invalid or missing + #[code = "RR09"] + InvalidStructuredCreditorReference, + /// Invalid or missing identification of a bank proprietary service + #[code = "RR11"] + InvalidDebtorAgentServiceIdentification, + /// Invalid or missing identification required within a particular country or payment type + #[code = "RR12"] + InvalidPartyIdentification, + /// Return following investigation request and no remediation possible + #[code = "RUTA"] + ReturnUponUnableToApply, + /// Due to specific service offered by the Debtor Agent + #[code = "SL01"] + SpecificServiceOfferedByDebtorAgent, + /// Due to specific service offered by the Creditor Agent + #[code = "SL02"] + SpecificServiceOfferedByCreditorAgent, + /// Whitelisting service offered by the Debtor Agent; Debtor has not included the Creditor on its “Whitelist” (yet) + #[code = "SL11"] + CreditorNotOnWhitelistOfDebtor, + /// Blacklisting service offered by the Debtor Agent; Debtor included the Creditor on his “Blacklist” + #[code = "SL12"] + CreditorOnBlacklistOfDebtor, + /// Due to Maximum allowed Direct Debit Transactions per period service offered by the Debtor Agent + #[code = "SL13"] + MaximumNumberOfDirectDebitTransactionsExceeded, + /// Due to Maximum allowed Direct Debit Transaction amount service offered by the Debtor Agent + #[code = "SL14"] + MaximumDirectDebitTransactionAmountExceeded, + /// Payment is stopped by account holder + #[code = "SP01"] + PaymentStopped, + /// Previously stopped by means of a stop payment advise + #[code = "SP02"] + PreviouslyStopped, + /// The card payment is returned since a cash amount rendered was not correct or goods or a service was not rendered to the customer, e + #[code = "SVNR"] + ServiceNotRendered, + /// Associated message was received after agreed processing cut-off time + #[code = "TM01"] + CutOffTime, + /// Return following direct debit being removed from tracking process + #[code = "TRAC"] + RemovedFromTracking, + /// Payment is not justified + #[code = "UPAY"] + UnduePayment, +}