Postman collection
Payments Write

pixiCreateBankline

Creates a new bank header together with a single bank line (bank transaction) and returns the keys of both new records.

Imports a single bank transaction into Pixi, for example for later matching against Aufträge or Rechnungen.

Steps:

  1. Determines the database (home) currency via pixi.GetDatabaseCurrency(). This is the currency whose code matches the setting HomeCurrency and that is marked as parent currency.
  2. If SourceType is NULL or empty, it is set to API.
  3. Inserts a new record into BankHeader with SourceType, the current server time as BankImportDate and BankFileName.
  4. Inserts one record into BankLines that references the new header:
    • BankDate = BankDate.
    • BookDate = month and day of BankDate as a four-character string MMDD (e.g. 0315).
    • BusinessCode is always 051.
    • BankCode = BLZ, AccountNr, CustomerName, BankText01–BankText03, ParsedBIC = BIC, ParsedIBAN = IBAN, AccountingBankAccount.
    • CurrencyId = CurrencyId, or the database currency if CurrencyId is not given.
  5. Returns one row with the new BankHeaderKey and BanklineKey.

Every call creates its own bank header; several lines cannot be added to an existing header with this call.

Notes

  • No explicit transaction is used. If the insert into BankLines fails, the already inserted BankHeader record remains without lines.
  • No validation is performed: duplicates are not detected, IBAN/BIC are not checked, and the amount sign is taken as passed.
  • BankFileName, BankDate, BankAmount, BankText01–BankText03, BLZ, AccountNr and CustomerName have no default value and must be present in the request (they may be empty or NULL as far as the table allows).
  • If BankDate is NULL, BookDate is also NULL.
  • If no currency matching the HomeCurrency setting is found and CurrencyId is not passed, CurrencyId is stored as NULL.
  • BLZ and AccountNr are char parameters and are padded with spaces; SourceType is limited to 3 characters.
  • BanklineKey comes from SCOPE_IDENTITY() and is therefore returned as a decimal value.

Tables used

BankHeader · Write BankLines · Write Currency · Read Settings · Read
SQL object:
dbo.pipiCreateBankline
Updated at 2026-10-30