Bank transactions (410)
Browse code 410 (BrowseCode::BankTransactions, “Bankkaart”): the transaction lines of one bank book per statement, with the start and closing balance of the statement.
Twinfield documentation: Browse data.
equal('fin.trs.head.bankcode', $book): the bank book is required. Without it Twinfield answers with a server error. The criterion is not a column: usefin.trs.head.code.fin.trs.head.stmnumberis the statement number,startvalueandclosevaluethe balance before and after the statement.equal('fin.trs.head.status', 'normal'): provisional and final. Without it you also get the drafts, with number-1.
Criteria: period, bank book, number, statement number, general ledger account, amount and status. See browse-definitions/410.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/410.xml), with the label for a Dutch user, the data type and the values of a field with a fixed list (browsefields.xml). A field that is not visible is meant as criterion: asking for it as column can give a server error. Twinfield does not apply the proposed values: send every criterion you need.
| Field | Label | Type | Visible | Criterion |
|---|---|---|---|---|
fin.trs.head.yearperiod |
Periode | string | yes | between (proposed $DEFAULT$ … $DEFAULT$) |
fin.trs.head.bankcode |
Bank | special | no | equal |
fin.trs.head.code |
Bank | string | yes | |
fin.trs.head.shortname |
Naam | string | yes | |
fin.trs.head.number |
Boekst.nr. | decimal | yes | between |
fin.trs.head.stmnumber |
Afschriftnr. | long | yes | between |
fin.trs.line.dim1 |
Grootboek | string | yes | equal |
fin.trs.line.dim1name |
Naam | string | yes | |
fin.trs.head.curcode |
Valuta | string | no | |
fin.trs.line.valuesigned |
Bedrag | value | no | |
fin.trs.line.basevaluesigned |
Euro | value | yes | between |
fin.trs.line.repvaluesigned |
– | value | no | |
fin.trs.head.startvalue |
Vorig saldo | value | yes | |
fin.trs.head.closevalue |
Eindsaldo | value | yes | |
fin.trs.head.status |
Status | special: draft, temporary, final, inuse, normal |
yes | equal (proposed normal) |
fin.trs.head.banktype |
Banktype | special: bank, cashbook |
no |
$twinfield = Example::twinfield();
$book = $argv[1] ?? 'BNK';$year = (int) ($argv[2] ?? Example::lastYear($twinfield));
$query = $twinfield->browse(BrowseCode::BankTransactions) ->columns( 'fin.trs.head.code', 'fin.trs.head.stmnumber', 'fin.trs.head.startvalue', 'fin.trs.head.closevalue', 'fin.trs.head.number', 'fin.trs.line.dim1', 'fin.trs.line.dim1name', 'fin.trs.line.basevaluesigned', ) ->between('fin.trs.head.yearperiod', sprintf('%d/00', $year), sprintf('%d/55', $year)) ->equal('fin.trs.head.bankcode', $book) ->equal('fin.trs.head.status', 'normal');
$result = $query->get();
echo count($result), ' line(s) of bank book ', $book, ' in ', $year, PHP_EOL;
foreach ($result as $index => $row) { echo sprintf( '[%d/%d] %s statement %d (%s to %s), %d line %d: %s %s %s', $index + 1, count($result), $row->string('fin.trs.head.code'), $row->int('fin.trs.head.stmnumber'), $row->amount('fin.trs.head.startvalue'), $row->amount('fin.trs.head.closevalue'), $row->int('fin.trs.head.number'), $row->transactionLine?->line, $row->string('fin.trs.line.dim1'), $row->nullableString('fin.trs.line.dim1name') ?? '', $row->amount('fin.trs.line.basevaluesigned'), ), PHP_EOL;}php examples/browse-data/410-bank-transactions/example.php # bank book BNK, the last yearphp examples/browse-data/410-bank-transactions/example.php ING 2026 # bank book ING in 2026Add TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
2 line(s) of bank book BNK in 2026[1/2] BNK statement 245 (1000.00 to 1108.90), 202600046 line 1: 1100 Bank 121.00[2/2] BNK statement 245 (1000.00 to 1108.90), 202600046 line 2: 1300 Debiteuren -121.00What the SDK sends to Twinfield and what Twinfield sends back, for a call like the one in this example. The responses come from the tests, with example data.
Compose the browse request and send it
Section titled “Compose the browse request and send it”Twinfield documentation: Browse data: Compose the browse request and send it.
$twinfield->browse(BrowseCode::BankTransactions) ->columns( 'fin.trs.head.code', 'fin.trs.head.stmnumber', 'fin.trs.head.startvalue', 'fin.trs.head.closevalue', 'fin.trs.head.number', 'fin.trs.line.dim1', 'fin.trs.line.dim1name', 'fin.trs.line.basevaluesigned', ) ->between('fin.trs.head.yearperiod', '2026/00', '2026/55') ->equal('fin.trs.head.bankcode', 'BNK') ->equal('fin.trs.head.status', 'normal') ->get();The SDK sends this XML as xmlRequest of ProcessXmlString to processxml.asmx:
<columns code="410" optimize="true"> <column> <field>fin.trs.head.code</field> <visible>true</visible> </column> <column> <field>fin.trs.head.stmnumber</field> <visible>true</visible> </column> <column> <field>fin.trs.head.startvalue</field> <visible>true</visible> </column> <column> <field>fin.trs.head.closevalue</field> <visible>true</visible> </column> <column> <field>fin.trs.head.number</field> <visible>true</visible> </column> <column> <field>fin.trs.line.dim1</field> <visible>true</visible> </column> <column> <field>fin.trs.line.dim1name</field> <visible>true</visible> </column> <column> <field>fin.trs.line.basevaluesigned</field> <visible>true</visible> </column> <column> <field>fin.trs.head.yearperiod</field> <operator>between</operator> <from>2026/00</from> <to>2026/55</to> </column> <column> <field>fin.trs.head.bankcode</field> <operator>equal</operator> <from>BNK</from> </column> <column> <field>fin.trs.head.status</field> <operator>equal</operator> <from>normal</from> </column></columns>Twinfield answers with this XML in ProcessXmlStringResult:
<browse result="1" first="1" last="2" total="2"> <th> <td label="" hideforuser="false" type="String">fin.trs.head.code</td> <td label="" hideforuser="false" type="Number">fin.trs.head.stmnumber</td> <td label="" hideforuser="false" type="Value">fin.trs.head.startvalue</td> <td label="" hideforuser="false" type="Value">fin.trs.head.closevalue</td> <td label="" hideforuser="false" type="Decimal">fin.trs.head.number</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim1</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim1name</td> <td label="" hideforuser="false" type="Value">fin.trs.line.basevaluesigned</td> </th> <tr> <td>BNK</td> <td>245</td> <td>1000.00</td> <td>1108.90</td> <td>202600046</td> <td>1100</td> <td>Bank</td> <td>121.00</td> <key> <office>1000</office> <code>BNK</code> <number>202600046</number> <line>1</line> </key> </tr> <tr> <td>BNK</td> <td>245</td> <td>1000.00</td> <td>1108.90</td> <td>202600046</td> <td>1300</td> <td>Debiteuren</td> <td>-121.00</td> <key> <office>1000</office> <code>BNK</code> <number>202600046</number> <line>2</line> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/410-bank-transactions/example.php on GitHub.
Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.