Zum Inhalt springen

Match a payment of the bank statement (Zahlung, Bankumsatz) to the invoice it pays, or link it otherwise: Offene Posten (posts the payment Buchung), a payment recorded before (no second Buchung), a transfer between own Bankkonten, or a Beleg not booked yet (captured with the Bankkonto as the way).

POST
/v1/commands/bank_transaction.assign
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/v1/commands/bank_transaction.assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "dry_run": false, "origin": { "display_name": "example", "id": "example", "kind": "example" }, "payload": { "bank_transaction_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "customer_paid_on": null, "difference": null, "erfassung": null, "fixkosten_lauf_id": null, "posten": null, "provider_payments": null, "receipt_day": null, "transfer_bank_transaction_id": null, "zahlung_buchung_id": null }, "rationale": "example" }'
Idempotency-Key
string

A repeated key returns the first result without running the Command again.

Decuma-Mandant
string format: uuid

The Mandant a session acts on; an API-Schlüssel is bound to its own.

Media typeapplication/json
object
dry_run

Dry run: the checks of executing, then the handler in a transaction that is always rolled back; nothing is logged, sent or kept. The answer is then a BefehlPruefung (as command.check) with the handler’s result as output, not the result below.

boolean
origin

Who or what a call comes from beyond its Actor, set by the caller (an automation, an integration): stored and hashed with the log entry, shown and filtered in the Verlauf.

object
display_name
required

The name a person reads in the Verlauf, 1 to 120 characters.

string
id
required

The caller’s own id of it, 1 to 200 characters.

string
kind
required

What kind of caller, 1 to 40 of a-z, 0-9 and _ (for example automation, integration).

string
payload
object
bank_transaction_id
required
string format: uuid
customer_paid_on

A payout of a payment provider: the day the customers’ payments arrived there by its report.

string | null format: date
difference
Any of:
One of:
string
Allowed values: rest_offen
erfassung
Any of:
object
amendment_received_on

Set by incoming_invoice.receive_amendment when the correction does not work back: the day it arrived, from which the Vorsteuer counts.

string | null format: date
beleg_id

The document; or eigenbeleg for an entry without one.

string | null format: uuid
belegdaten
required

The Belegdaten as a person or a caller types them.

object
belegart
Any of:
One of:
string
Allowed values: rechnung kleinbetragsrechnung fahrausweis vertrag sonstiges eigenbeleg lohnsteuerbescheinigung
belegdatum
string | null format: date
brutto

The gross total of the Beleg.

string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
currency

ISO 4217 code of every amount of the Beleg; absent is EUR. The capture converts each line with the BMF monthly rate before any sum.

string | null
empfaenger

The recipient’s name.

string | null
issuer
string | null
issuer_country

State of the issuer’s address, ISO alpha-2.

string | null
issuer_postal_address

Full address of the issuer.

string | null
issuer_steuernummer

The issuer’s Steuernummer.

string | null
issuer_ust_idnr

The issuer’s USt-IdNr.; one without the format of its member state is a warning, never a refusal.

string | null
leistung

Quantity and kind of the goods, or extent and kind of the service.

string | null
leistungsdatum
string | null format: date
positions

The itemised positions of the Beleg (each dish and drink of a restaurant bill); absent keeps those of the record before.

Array<object> | null

One itemised position as the person states it.

object
brutto
string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
drink

True when the position is a drink or anything but a dish, false when it is a dish.

boolean | null
steuersatz
string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
text
required
string
prepaid_credit

Credit taxed with its purchase; leistungsdatum: the day credited, if known.

boolean | null
received_latest

Instead of the day of receipt, when it is not known: the latest provable one.

Any of:

The latest provable day an invoice was in possession, with its evidence.

object
evidence
required

What shows the recipient’s possession; a direct debit or card charge of the supplier is none (the supplier writes its text).

One of:
string
Allowed values: email_time receipt_stamp portal_log
latest_confirmed

Confirms this day where several periods of one year are possible.

boolean
on
required
string format: date
reference
required

Where the evidence is found.

string
rechnung_erhalten_am

Vorsteuer: the day the invoice reached the Unternehmer, needed where invoice date and Eingang in Decuma lie in different months.

string | null format: date
rechnungsnummer
string | null
recipient_postal_address

The recipient’s address.

string | null
recipient_ust_idnr

The number printed as the recipient’s (USt-IdNr. or Steuernummer).

string | null
rows
Array<object>
default:
object
brutto
string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
category
string | null
cost_center_id

The Kostenstelle of the line.

string | null format: uuid
delivered_on

Goods over a period: the day delivered.

string | null format: date
foreign_vat

A foreign VAT the issuer shows on an invoice whose tax the recipient owes (§ 13b UStG): never Vorsteuer; the base of the line is asked.

string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
is_service

A service over a period: its last day counts.

boolean | null
leistungsdatum

A line performed on a day of its own; default the Leistungsdatum of the Beleg.

string | null format: date
mitbenutzung

Also used privately (an Einzelunternehmer only).

Any of:
object
assignment

For an object: ganz, anteilig or keine.

Any of:

The assignment of an object used partly privately to the business.

One of:

Wholly to the business: full Vorsteuer, the private use is an unentgeltliche Wertabgabe.

string
Allowed value: ganz
entgelt

A Personengesellschaft: the Gesellschafter pays for the use.

boolean
erstmals_verwendet

Wholly assigned: the day of the first use (default the Leistungsdatum).

string | null format: date
gesellschafter_id

A Personengesellschaft: the Gesellschafter who uses privately (gesellschafter.list).

string | null format: uuid
kind
required

What is used partly privately.

One of:

A service or a consumable (telephone contract, electricity, fuel): only the business share is supplied for the business.

string
Allowed value: laufend
months

Wholly assigned: the months the cost is spread over, as confirmed (Berichtigungszeitraum, at most 60).

integer | null format: uint32
natuerliche_person

A Personengesellschaft: whether that Gesellschafter is a natürliche Person.

boolean | null
unternehmensanteil
required

Business use in percent.

string | number
/^-?\d+(\.\d+)?([eE]\d+)?$/
netto
string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
partly_deductible

The Vorsteuer is only partly deductible (the purchase also serves tax-free turnover without deduction): refused until the deductible amount is decided.

boolean
steuer

The tax as the invoice shows it. Absent: computed per line to the cent, with a warning above the small-amount limit.

string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
steuersatz

Percent; required where the Kategorie has a key per rate.

string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
steuerschluessel

Profi-Ansicht: overrides the Kategorie’s key (same direction).

string | null
supply_from

The period of the line; default day: its last one.

string | null format: date
supply_to
string | null format: date
trip_documented

With vehicle: the business trip is documented (date, destination, occasion, km).

boolean
vehicle

A running cost of a vehicle (fuel): whose it is.

Any of:

Whose vehicle a fuel or vehicle cost is for.

One of:

A vehicle of the business.

string
Allowed value: company
wirtschaftsgut

The purchase of a movable asset: booked by its cost and the choice of the year (expense, GWG, Sammelposten, Anlagenverzeichnis).

Any of:
object
gehoert_zu

Not usable on its own: the Anlage it belongs to (its nachträgliche Anschaffungskosten).

string | null format: uuid
invoice_tax

Line without a rate: the tax the invoice shows.

string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
kind

The kind (asset.kinds): decides Konto, balance sheet item and Abschreibung.

string | null
land_purchase

Land: what the notarised contract says.

Any of:
string
Allowed values: taxed_by_option no_option whole_business incidental_cost
restnutzungsdauer

With gehoert_zu: that Anlage’s remaining useful life at the start of the year (R 7.4 Abs. 9 EStR).

integer | null format: uint32
selbstaendig_nutzbar
required

Usable on its own (§ 6 Abs. 2 Satz 2 EStG); else part of the Anlage in gehoert_zu.

boolean
useful_life_years

Useful life in years, required for a kind without years (§ 7 Abs. 1 EStG).

integer | null format: uint32
skonto

The agreed cash discount of the invoice (Zahlungsbedingung).

Any of:

The agreed cash discount: prozent of the gross amount when paid within tage days of the Belegdatum (no tage: the terms state no period).

object
percent
required
string | number
/^-?\d+(\.\d+)?([eE]\d+)?$/
tage
integer | null format: int64
supply_from

The period printed; default Leistungsdatum: its last day.

string | null format: date
supply_precision

As printed; default days.

Any of:

What the Beleg prints as the time of the supply: the calendar month (its last day is computed) or days.

string
Allowed values: month days
supply_sections

Sections under one total.

Array<object>
object
first_day
required
string format: date
last_day
required
string format: date
supply_to
string | null format: date
whole_month

Month printed: true all of it, false one day (leistungsdatum).

boolean | null
betrieb_id
string | null format: uuid
bewirtung

Occasion and participants of a Bewirtung (Kategorie bewirtung); stored with the Buchung.

Any of:
object
occasion
required
string
only_drinks

The person states that only drinks were served: a 2026 Beleg at 19 percent alone is then no case of Speisen at the wrong rate.

boolean
participants
required
Array<string>
business_partner_id

The Kunde or Lieferant of the Buchung, optional.

string | null format: uuid
case_id
string | null format: uuid
deducted_on_invoice

The gross the invoice itself deducts as paid in advance (BT-113), if any.

string | number | null
/^-?\d+(\.\d+)?([eE]\d+)?$/
e_rechnung_weg

An invoice that should have been an e-invoice: the way the Vorsteuer rests on (BMF vom 15.10.2024, Rn. 58 or 59); without it a capture with Vorsteuer is refused.

Any of:

The way the person names for Vorsteuer from an invoice that should have been an e-invoice (BMF vom 15.10.2024, Rn. 58 and 59; the third way, the corrected e-invoice, is auf_berichtigung_warten).

One of:

The material conditions of the deduction are proven otherwise (Rn. 58).

string
Allowed value: objektiver_nachweis
eigenbeleg
Any of:
object
empfaenger
required

Who received the payment.

string
rationale
required

Why no document from outside exists.

string
zweck
required

What it was for.

string
gesellschafter_id

Personengesellschaft, privat ausgelegt: the Gesellschafter who paid, and the answer to “Wird der Betrag erstattet?” (false: Einlage; true is refused).

string | null format: uuid
gift

A gift (Kategorie geschenk): its recipient, or the mark of low-value give-aways booked together; stored with the Buchung for the Freigrenze per recipient.

Any of:
object
recipient
string
""
scatter_items
boolean
input_tax_share

How much of the tax you owe is deducted, when asked.

Any of:

How far the tax of a supply the Mandant owes is deducted (the Merkmal of the single supply).

string
Allowed values: full partial none
not_paid_before

Not the invoice of an expense booked before it, when asked.

boolean
paid

Without it the Buchung is booked as noch offen, with a warning.

Any of:

“Wie bezahlt?”: the counter-account of the Buchung.

One of:
string
Allowed values: bank bar
prepaid_period

Paid before a supply in a later month: the Vorsteuer’s period (payment’s or supply’s); asked when absent.

Any of:

The period of the Vorsteuer of a Beleg paid before its supply in a later month.

One of:

With payment and Beleg.

string
Allowed value: payment
prepayment_for

A supplier’s Anzahlungsrechnung (before the supply): what was ordered; booked on the Anzahlung Konto of that kind.

Any of:

What a supplier’s Anzahlungsrechnung bills in advance; it decides the Konto the Anzahlung stands on until the supply: never the expense Konto of the Kategorie.

One of:
string
Allowed values: building machinery equipment
prepayments

The own Anzahlungen (Buchungen of their Anzahlungsrechnungen) a supplier’s Endrechnung settles; empty: no payment made before belongs to it. Asked when absent.

Array<string> | null
refund

Money back from the issuer, or back to the customer (a refund, a credit note): the Buchung has the opposite sign.

boolean
refunded
boolean | null
refunded_on

With erstattung: the day the money went back, which decides the period of the change of the base; asked when absent.

string | null format: date
self_billing_tax

A self-billing credit note that shows more tax than you owe: object, or declare the excess in Kennzahl 69 (a Kleinunternehmer can only object); asked when absent.

Any of:

The person’s choice on a self-billing credit note that shows more tax than the Mandant owes.

One of:

The Mandant objects: the credit note loses the effect of an invoice (§ 14 Abs. 2 Satz 6 UStG); the supply is booked with the tax owed, nothing in Kennzahl 69.

string
Allowed value: object
text
string | null
typical_work_clothing

Clothing (Kategorie kleidung): the person’s answer whether it is typical work clothing that cannot be worn privately; without it the capture asks.

boolean | null
wait_for_amendment

Waiting for the corrected invoice (a mandatory detail lacks): booked gross, without Vorsteuer, in no Voranmeldung, until incoming_invoice.receive_amendment.

boolean
fixkosten_lauf_id

An expected expense of a recurring expense (Fixkosten): books its rate, once.

string | null format: uuid
posten
Array<string> | null
provider_payments

The same: the payments recorded before (payment.record, weg payment_provider) it carries.

Array<string> | null
receipt_day

The same, when the contract leaves the day open: the day a person states.

string | null format: date
transfer_bank_transaction_id
string | null format: uuid
zahlung_buchung_id
string | null format: uuid
rationale

Why the Actor issues this; stored in the Command-Log.

string

Result

Media typeapplication/json
object
bank_transaction_id
required
string format: uuid
buchung_id
required
string format: uuid
difference

The difference to the Posten the Buchung booked (an exchange difference, a bank fee, a Skonto); none when the payment settles the Posten exactly or the rest stays open.

Any of:
object
amount
required
string | number
/^-?\d+(\.\d+)?([eE]\d+)?$/
kind
required
One of:
string
Allowed values: rest_offen
konto
required

The Konto of the difference (the first line booked for it).

string
posten
required
Array<object>
object
amount
required
string | number
/^-?\d+(\.\d+)?([eE]\d+)?$/
open_item_id
required
string format: uuid
remainder
required
string | number
/^-?\d+(\.\d+)?([eE]\d+)?$/

Example

{
"difference": {
"kind": "rest_offen"
}
}

Problem

Media typeapplication/problem+json
object
code
required
string
Allowed values: validation not_authenticated not_allowed needs_human second_factor_required unknown_command idempotency_conflict not_found conflict busy internal
detail

What is wrong.

string
next_command

The Command the next step names, whatever the language of next_step.

string | null
next_step

What to do next.

string
retry_payload

Fields that complete the refused call when the refusal carries a proposal: merged into its payload, the same call goes through.

object | null
status
required
integer
title
required
string
type
required
string

Example

{
"code": "validation"
}