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

# Create bank transactions in accounting

> The API calls to send the movements of your bank accounts to your end-users' accounting software with the Accounting API.

This guide explains the API calls to send the movements of an account you hold for your end-users to their accounting software, as a bank feed. For the business context (what happens to a line in the accounting software, and who configures what), read the [Bank feeds to accounting](https://docs.chift.eu/use-cases/bank-feeds-to-accounting.md) use case first.

> [!NOTE]
>
> Your end-user, or their accountant, makes the accounting choices: which bank account in their books each of your accounts feeds, and when the feed starts. You build the setup screen where they make these choices, and the logic that sends the statements.

## 1. Fetch the bank accounts

Fetch the bank accounts when the end-user connects their accounting software. Show them in your setup screen. Store the selection of the end-user for each consumer, for each of your accounts and for each currency.

Call [Get bank accounts](https://docs.chift.eu/api-reference/endpoints/accounting/get-bank-accounts.md). The list is paginated: see [Pagination](https://docs.chift.eu/unified-apis/guides/pagination.md). When the connection gives access to several folders, add `folder_id`. See [Multi-folder](https://docs.chift.eu/unified-apis/accounting/concepts/folder/multi-folder.md).

* Store the `id`. You send it as `bank_account_id` on the statement.
* Show the `account_name` and the `code`.
* Use the `iban` to suggest a match with your account. It is empty when the accounting software holds no IBAN for the bank account.
* Check the `currency`. The currency of a statement must be the currency of its bank account. Your end-user links each of your accounts, in each currency, to one bank account.

When no bank account matches, your end-user creates one in their accounting software. You can also create it from your setup screen with [Create bank account](https://docs.chift.eu/api-reference/endpoints/accounting/create-bank-account.md), when the connector supports it.

## 2. Send the statement

Create one statement for each of your accounts and for each day. Call [Create bank transactions](https://docs.chift.eu/api-reference/endpoints/accounting/create-bank-transactions.md):

`POST /consumers/{consumer_id}/accounting/bank-transactions`

### Statement fields

* `bank_statement_date`: the date of the statement (`YYYY-MM-DD`).
* `bank_account_id`: the bank account selected for this account and this currency (see [step 1](#1-fetch-the-bank-accounts)).
* `currency`: the ISO 4217 code, for example `EUR`. It must be the currency of the bank account. For another currency than the one of the folder, see [Multi-currency](https://docs.chift.eu/unified-apis/accounting/concepts/multi-currency.md).
* `external_bank_statement_id`: your identifier of the statement. Use digits only, with a maximum length of 10.
* `opening_balance`: the balance of the account before the statement. Send it on every statement. The accounting software uses it to check the balance.
* `pdf` and `pdf_name`: the PDF of the statement in base64, and its file name. The file name accepts letters, digits, `-`, `_` and spaces, and can end with `.pdf`. See [Attachments](https://docs.chift.eu/unified-apis/accounting/concepts/attachments.md).
* `items`: the lines of the statement.

### Line fields

* `amount`: the amount of the movement, including fee and tax. Send a positive amount for money received and a negative amount for money leaving the account.
* `description`: the most identifying text of the movement, such as the counterparty name or the reference of an invoice. The accounting software uses it to suggest a match during reconciliation.
* `external_transaction_id`: your identifier of the movement.
* `counterpart`: the counterparty, with `name`, `iban` and `bank_account`.
* `fee_amount`, `tax_amount`, `currency_exchange_rate` and `general_ledger_account`: optional. Each accounting software uses only the fields that it can store. Check the page of the connector.

### Check the balance before you send

Send every settled movement once, and only settled movements. A pending movement is sent after it has settled. Before you send a statement, check the balance:

```text theme={null}
opening_balance + sum of the line amounts = closing balance of your account
```

When the two do not match, a movement is missing or sent twice. Do not send the statement until you find the difference.

### Example

`POST /consumers/{consumer_id}/accounting/bank-transactions`

```json theme={null}
{
  "bank_statement_date": "2026-11-17",
  "bank_account_id": "<id of the bank account selected for this account>",
  "currency": "EUR",
  "external_bank_statement_id": "2026111701",
  "opening_balance": 10000.00,
  "items": [
    {
      "external_transaction_id": "TX-0001",
      "description": "Incoming transfer | INV-2026-0042",
      "amount": 2500.00,
      "counterpart": {
        "counterpart_type": "customer",
        "name": "<name of the payer>",
        "iban": "<IBAN of the payer>"
      }
    },
    {
      "external_transaction_id": "TX-0002",
      "description": "Account fee",
      "amount": -6.72
    },
    {
      "external_transaction_id": "TX-0003",
      "description": "Transfer to supplier | PUR-2026-0108",
      "amount": -1000.00,
      "counterpart": {
        "counterpart_type": "supplier",
        "name": "<name of the payee>"
      }
    }
  ]
}
```

The closing balance of this statement is 10,000.00 + 2,500.00 - 6.72 - 1,000.00 = 11,493.28. The values between `<` and `>` come from [step 1](#1-fetch-the-bank-accounts) and from your own data.

The response returns the `id` of the statement and the `id` of each line. Store them.

### Avoid duplicates

Add a unique `x-chift-client-requestid` header to each request. When you retry a request that already succeeded, Chift answers with a 409 error and does not create a second statement. See [Idempotency](https://docs.chift.eu/unified-apis/guides/idempotency.md).

Run your synchronization on a schedule, for example every night. Start it on the day chosen by your end-user. This day must follow the last movement already in their books. Otherwise, the same movements are booked twice.

## 3. Check the result

The Accounting API has no call to read bank statements. Check the result in the accounting software, on the bank account. The lines wait for reconciliation, and the balance of the bank account must match the balance of your account. For the errors, see [Errors](https://docs.chift.eu/home/errors.md).

Not every accounting software supports bank transactions. Check the [coverage matrix](https://docs.chift.eu/connectors/accounting/coverage.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.