Skip to main content

Electronic bank statements

An electronic bank statement is made up of two elements in Twinfield:

  • General information, such as bank statement date, account number, bank statement number, etc.
  • Bank statement transaction lines.

Read

Refer to Bank statements.

Create

Once a bank statement is created, it is not possible to change it.

Multiple bank statements can be created at once by enclosing them by the statements element.

Root

XML structure
<statements importduplicate="">
<statement target="">
<transactions></transactions>
</statement>
</statements>

Element name: statement

NameDescription
@importduplicateOptional attribute to indicate whether duplicates may be imported or not. If left empty, 0 is used as a default.
0 = duplicates are not imported
1 = duplicates are imported
@targetOptional attribute. Fixed value electronicstatements.
transactionsContains the bank statement transactions.

Statement

XML structure
<statement target="">
<account></account>
<iban></iban>
<date></date>
<currency></currency>
<statementnumber></statementnumber>
<code></code>
<office></office>
<startvalue></startvalue>
<closevalue></closevalue>
<sortcode></sortcode>
</statement>

Element name: statement

NameTypeDescription
accountstringAccount number. Either account or iban or code should be set.
ibanstringIBAN account number. Either account or iban or code should be set.
codecodeCode of the corresponding bank book. Either account or iban or code should be set.
datedateBank statement date. Set to the current date when left empty.
currencycodeCurrency code. Set to the currency of the corresponding bank day book when left empty.
statementnumberintegerNumber of the bank statement. When left empty, last available bank statement number increased by one.
officecodeOptional. Code of the office in which the bank statement should be imported.
startvaluemoneyOpening balance. If not provided, the opening balance will be based on the previous bank statement.
closevaluemoneyClosing balance. If not provided, the closing balance will be based on the opening balance and the total amount of the transactions.
sortcodestringSorting code. Mandatory to include if clearing code is set on the bank.

Bank statement transactions

XML structure
<transactions>
<transaction></transaction>
</transactions>

Element name: transactions

NameTypeDescription
@countintegerThe number of bank statement transactions.
transactionnodeContains information of the bank statement transaction.

Transaction

XML structure
<transaction>
<contraaccount></contraaccount>
<contraiban></contraiban>
<type></type>
<reference></reference>
<debitcredit></debitcredit>
<value></value>
<description></description>
</transaction>

Element name: transaction

NameTypeDescription
contraaccountstringContra account number in BBAN format. Either use contraaccount or contraiban or leave empty.
Attribute @name describes account holder.
contraibanstringContra account number in IBAN format. Either use contraaccount or contraiban or leave empty.
typestring(4)Transaction type code.
referencestring(40)Reference for own use.
debitcreditstringdebit = money is paid by bank
credit = money is received by bank
valuemoneyAmount of the transaction.
descriptionstring(500)Description of the transaction.
endtoendidstringPayment reference (purpose of reverse payment).
returnreasonstringDrop-out code.
dim1stringDimension 1.
Read-only attribute.
dim2stringDimension 2.
Read-only attribute.
dim3stringDimension 3.
Read-only attribute.
dim4stringDimension 4.
Read-only attribute.

XML Example

<statement target="electronicstatements">
<iban>NL91ABNA0417164300</iban>
<date>20211108</date>
<currency>EUR</currency>
<statementnumber>2</statementnumber>
<startvalue>7.68</startvalue>
<closevalue>151.18</closevalue>
<transactions>
<transaction>
<contraaccount name="Twinfield">1234567890</contraaccount>
<type>N100</type>
<reference></reference>
<debitcredit>credit</debitcredit>
<value>151.00</value>
<description>Invoice 3722838</description>
</transaction>
<transaction>
<contraiban>NL91ABNA0417164301</contraiban>
<type>N999</type>
<reference></reference>
<debitcredit>debit</debitcredit>
<value>7.50</value>
<description>Costs *300</description>
</transaction>
</transactions>
</statement>