> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.noyax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bank Transfer Vouchers

> Fields, exchange rate calculation, the customer movement override and the closed-record rules for incoming/outgoing EFT-transfer vouchers.

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.

| Operation      | Endpoint                                                                                  |
| -------------- | ----------------------------------------------------------------------------------------- |
| List           | [`GET /finance/bank-transfers`](/en/v1/finance/bank-transfers/list)                       |
| Get            | [`GET /finance/bank-transfers/{bankTransferId}`](/en/v1/finance/bank-transfers/get)       |
| Create         | [`POST /finance/bank-transfers`](/en/v1/finance/bank-transfers/create)                    |
| Update         | [`PUT /finance/bank-transfers/{bankTransferId}`](/en/v1/finance/bank-transfers/update)    |
| Partial update | [`PATCH /finance/bank-transfers/{bankTransferId}`](/en/v1/finance/bank-transfers/patch)   |
| Delete         | [`DELETE /finance/bank-transfers/{bankTransferId}`](/en/v1/finance/bank-transfers/delete) |

## 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](/en/v1/finance/bank-accounts/list). **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](/en/v1/guides/sharing-codes).

<Warning>
  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.
</Warning>

## Lines

Each line carries the amount paid to, or received from, one customer:

* `CustomerCode`: required, a [customer you can see](/en/v1/customers/overview).
* `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:

```
ExchangeRate = sum(Line.Amount x Line.ExchangeRate) / sum(Line.Amount)
```

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:

```
CustomerAmount x CustomerExchangeRate = Amount x ExchangeRate
```

## 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, the request is rejected (`8207`);
* has a **payment plan** created for it, 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`).
