pub struct Transaction {Show 28 fields
pub date: Date,
pub valuta_date: Option<Date>,
pub amount: Decimal,
pub currency: Currency,
pub applicant_name: Option<String>,
pub applicant_iban: Option<Iban>,
pub applicant_bic: Option<Bic>,
pub purpose: Option<String>,
pub posting_text: Option<String>,
pub customer_reference: Option<String>,
pub bank_reference: Option<String>,
pub booking_id: Option<String>,
pub gvc: Option<String>,
pub prima_nota: Option<String>,
pub purpose_code: Option<String>,
pub mandate_id: Option<String>,
pub end_to_end_id: Option<String>,
pub creditor_id: Option<String>,
pub debtor_id: Option<String>,
pub ultimate_debtor: Option<String>,
pub ultimate_creditor: Option<String>,
pub reversal: bool,
pub original_amount: Option<(Decimal, Currency)>,
pub fees: Option<(Decimal, Currency)>,
pub return_reason: Option<String>,
pub sequence_type: Option<String>,
pub raw: Value,
pub status: TransactionStatus,
}tooling only.Expand description
A parsed transaction.
A camt entry (Ntry) with several TxDtls (a batch booking) maps to
one Transaction, built from the first TxDtls: the counterparty and
purpose fields describe only that part of the batch. The amount is the
entry’s, and booking_id is the entry’s own reference.
Fields§
§date: DateBooking date (Buchungstag): the MT940 entry date, or the value date
when the bank leaves the entry date out. A pending CAMT entry with
neither date takes the day the bank made the report (CreDtTm).
valuta_date: Option<Date>Value date (Valuta, Wertstellung).
amount: DecimalSigned from the account holder’s view: negative = debit.
currency: Currency§applicant_name: Option<String>§applicant_iban: Option<Iban>§applicant_bic: Option<Bic>§purpose: Option<String>Remittance text: the SEPA SVWZ+ value of MT940 :86:, or CAMT
Ustrd (None when the entry has none; its AddtlNtryInf is the
posting_text). In MT940 without SEPA keywords, the whole :86: text. The keywords themselves and the
other SEPA fields have their own fields; MT940 keeps the joined
:86: text in raw["tag86"]. Characters are as the bank sent them.
posting_text: Option<String>Booking text (Buchungstext), e.g. “SEPA-BASISLASTSCHRIFT”.
customer_reference: Option<String>Customer reference (Kundenreferenz) from MT940 :61:; None for
“NONREF”. CAMT has no such field: always None there (the end-to-end
ID is end_to_end_id).
bank_reference: Option<String>Bank reference from :61: (after //), or CAMT AcctSvcrRef
(transaction level before entry level), if the bank sends one. Not
known to be unique: for de-duplication use booking_id.
booking_id: Option<String>The bank’s own ID of this booking, set only where the bank’s profile
(BookingIdSource) names a reference
the bank keeps unique and stable: no two transactions of a statement
share it, and the bank does not reuse it for another booking. Safe
as a key for de-duplication across fetches.
None for banks without such a reference, for every MT940 booking,
for pending bookings (whether a booking keeps its reference from
pending to booked is unverified at any bank), for an entry without
the reference, and for a reference that occurs more than once in
one statement.
gvc: Option<String>The DK business transaction code (Geschäftsvorfallcode, three
digits) at the start of :86:; 166 is a SEPA credit transfer
received.
prima_nota: Option<String>The bank’s Primanota number, subfield ?10 of :86:.
purpose_code: Option<String>ISO 20022 purpose code (e.g. SALA, IDCP): PURP+ or Purp/Cd.
mandate_id: Option<String>SEPA direct debit mandate reference (MREF+, MndtId). None for
a placeholder such as NONREF.
end_to_end_id: Option<String>SEPA end-to-end reference (EREF+, EndToEndId). None for a
placeholder such as NOTPROVIDED.
creditor_id: Option<String>SEPA creditor ID of a direct debit (CRED+ of MT940 :86:, CAMT
Cdtr/Id/PrvtId/Othr/Id). None for a placeholder.
debtor_id: Option<String>SEPA identifier of the debtor (DEBT+ of MT940 :86:, CAMT
Dbtr/Id): the originator ID of a transfer or the debtor’s own ID.
None for a placeholder.
ultimate_debtor: Option<String>The ultimate debtor (Abweichender Zahlungspflichtiger) when it
differs from the direct one: CAMT UltmtDbtr/Nm; MT940 ABWA+ of a
transfer, ABWE+ of a direct debit. For an R-transaction (return,
reversal) the original payment’s roles.
ultimate_creditor: Option<String>The ultimate creditor (Abweichender Zahlungsempfänger): CAMT
UltmtCdtr/Nm; MT940 ABWE+ of a transfer, ABWA+ of a direct
debit.
reversal: boolWhether the booking is a reversal (Storno): CAMT RvslInd true,
MT940 :61: mark RC or RD.
original_amount: Option<(Decimal, Currency)>Original amount before conversion or before a return, with its
currency (always positive): CAMT AmtDtls/InstdAmt/Amt; MT940 OAMT+,
which carries no currency, so the statement currency is used.
fees: Option<(Decimal, Currency)>Fees or compensation charged on the booking, positive: CAMT Chrgs
(TtlChrgsAndTaxAmt, else the first Rcrd/Amt); MT940 COAM+ in the
statement currency.
return_reason: Option<String>Return or rejection reason code (e.g. AC04, MD06): CAMT
RtrInf/Rsn/Cd; MT940 the code after the REJECT/RETURN marker in
SVWZ+.
sequence_type: Option<String>Direct debit sequence type (FRST, RCUR, OOFF, FNAL): CAMT
PmtTpInf/SeqTp. MT940 has no such field.
raw: Value§status: TransactionStatusWhether this transaction is booked or pending.