A bank transfer voucher records money coming into, or going out of, a bank account against one or more customers. Incoming (TransferType 1) and outgoing (TransferType 2) transfers use the same endpoints.
Required fields
TransferType: 1 incoming, 2 outgoing. Cannot be changed after the voucher is created.
VoucherNumber: unique in the company across all bank voucher types (not only transfers), at most 20 characters. Send "Next" to generate it automatically from the "BANKAFİŞNO" series. Cannot be "Next" on update.
Date: voucher date. If a time is sent it is stored as the voucher time, otherwise the current time is used.
BankAccountCode: one of the company’s bank accounts. Every line of the voucher is recorded against this account.
Lines: at least one line.
Description and SharingCode are optional; an empty SharingCode makes the voucher visible to everyone, otherwise it must be one of the user’s sharing codes.
Unlike other modules, the exchange rate is calculated by the API from a field the integrator sends: each line carries its own ExchangeRate, and the voucher’s exchange rate is the amount-weighted average of the lines (below). The amounts themselves (line Amount) are still sent by the integrator and never changed by the API.
Lines
Each line carries the amount paid to, or received from, one customer:
CustomerCode: required, a customer you can see.
Amount: required, in the bank account’s own currency, must be greater than 0.
ExchangeRate: required (and must be greater than 0) when the bank account’s currency differs from the company’s default currency; otherwise treated as 1 even if not sent.
Description: optional, per-line description.
The voucher’s exchange rate
The response’s ExchangeRate (at the voucher level) is the amount-weighted average of the lines:
Calculated and stored with 6 decimal precision.
Customer movement override
By default, the customer’s own account receives an entry with the same amount, currency and rate as the line, in the opposite direction (debit/credit). You can instead record it in a different currency/rate with CustomerAmount, CustomerCurrencyCode and CustomerExchangeRate — send all three together (sending only one and leaving the others empty is rejected). The only requirement: both sides’ value in the default currency must be equal:
Line identity on update
The same rule as despatch lines applies: a line’s customer movement is referenced by the closed-record and payment-plan checks. The order lines are sent in determines their identity on update: the line at position i is treated as the same line that is currently at position i and is updated in place; a shorter list removes the trailing lines, a longer list adds new ones at the end.
Closed-record and payment-plan lock
There is no lock when a line’s customer, amount, currency and rate are unchanged. When they change and the line’s existing customer movement:
- has already been closed by a collection/payment (
CST_FIN_CARI_BORC_ALACAK_KARSILIKLARI), the request is rejected (8207);
- has a payment plan created for it (
CST_FIN_TAHSILAT_VE_ODEME_PLANLARI), you are asked to delete the plan first (8208).
Delete applies the same two checks to every line unconditionally (a removed line counts as changed); if any line is blocked, the whole voucher is not deleted.
Posted voucher
When IsPosted is true (the voucher has been linked to an accounting entry) it cannot be updated or deleted (8109).