From a846d00e60789fe2ba1a64c86df69da9a494280a Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 26 Jun 2020 18:59:18 +0530 Subject: transaction --- libeufin/iso20022.rst | 94 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 30 deletions(-) (limited to 'libeufin/iso20022.rst') diff --git a/libeufin/iso20022.rst b/libeufin/iso20022.rst index 304bd0d8..aa6df201 100644 --- a/libeufin/iso20022.rst +++ b/libeufin/iso20022.rst @@ -29,52 +29,86 @@ LibEuFin combines camt.052, camt.053 and camt.054, as they essentially have the same structure and serve the same purpose: Reporting transactions on a customer's bank account. -.. code-block:: typescript - - interface CashManagementResponseMessage { - // ISO: MessageIdentification - messageId: string; - - messageType: "report" | "statement" | "notification"; +We also flatten the hierarchy a bit and only have entries ("money movement in one go") +and transactions. - // ISO: CreationDateTime - creationDateTime: string; +.. code-block:: typescript - entries: Entry[]; + interface AccountTransactionItem { + // LibEuFin-internal identifier for the transaction + nexusTransactionId: string; - } + // Link to the entry that contains the transaction + nexusEntryId: string; - interface Entry { - transactions: Transaction[]; - } + // At least one of entryId or accountServicerRef + // must be non-null + entryId?: string; + accountServicerRef?: string; - interface Transaction { creditDebitIndicator: "credit" | "debit"; amount: string; currency: string; - - bookingDate?: string; + instructedAmountDetails?: { + amount: string; + currency: string; + currencyExchange?: { + sourceCurrency: string; + targetCurrency: string; + unitCurrency: string; + exchangeRate: string; + contractId: string; + quotationDate: string; + }; + }; + status: "booked" | "pending" | "info"; valueDate?: string; + bookingDate?: string; + mandateId?: string; + endToEndId?: string; + messageId?: string; - accountServicerRef?: string; + creditor?: Party + creditorAgent?: FinancialInstitution; + creditorAccount?: FinancialInstitution; - bankTransactionCode: BankTransactionCode; + debtor?: Party + debtorAgent?: FinancialInstitution; + debtorAccount?: FinancialInstitution; - details: TransactionDetails[]; + unstructuredRemittanceInformation?: string; + bankTransactionCode: BankTransactionCode; } - interface TransactionDetails { - creditDebitIndicator: "credit" | "debit"; - amount: string; - currency: string; - - // Referenced message ID - messageId: string; + interface Party { + name?: string; + partyType: "private" | "organization"; + otherId?: { + id: string; + schemeName?: string; + issuer?: string; + }; + } - endToEndId: string; - paymentIdentificationId?: string; + interface Account { + name?: string; + currency?: string; + otherId?: { + id: string; + schemeName?: string; + issuer?: string; + }; + } - bankTransactionCode: BankTransactionCode; + interface FinancialInstitution { + type: "financial-institution"; + name?: string; + bic?: string; + otherId?: { + id: string; + schemeName?: string; + issuer?: string; + }; } interface BankTransactionCode { -- cgit v1.2.3