An issued or received invoice can be paid in cash via XML — Flexi will automatically create the corresponding cash receipt document. This is handled by the nested element <hotovostni-uhrada>.
Basic call
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana>
<!-- uhrazovaný doklad; může být i "faktura-prijata" -->
<id>code:FAKTURA1</id>
<!-- lze normálně uvést další vlastnosti dokladu jako při běžném importu -->
<hotovostni-uhrada>
<pokladna>code:POKLADNA KČ</pokladna> <!-- povinné -->
<typDokl>code:STANDARD</typDokl> <!-- povinné: typ vytvářeného pokladního dokladu -->
<uhrazujiciDokl>code:UHRADA1</uhrazujiciDokl> <!-- nepovinné -->
<kurzKDatuUhrady>true</kurzKDatuUhrady> <!-- nepovinné: true = kurz k datu úhrady, jinak kurz z uhrazované faktury -->
<castka>1000</castka>
<datumUhrady>2026-01-01</datumUhrady>
</hotovostni-uhrada>
</faktura-vydana>
</winstrom>
🚨 The elements <pokladna> and <typDokl> are required. Without them, the call will fail with error 400, code nestedObjectRequired: "Element [pokladna] is required inside element [hotovostni-uhrada]."
Element overview
Element | Requirement | Meaning |
| required | The cash register in which the payment document will be created. |
| required | The type of the cash receipt document being created. |
| depends on mode | The amount being paid. Required in mode |
| optional | Payment mode, see below. If not specified, |
| optional | Identifier of the payment document, see below. |
| optional | Payment date in |
| optional |
|
| optional | Custom exchange rate. Both must always be provided together, see below. |
| optional | The document series of the cash receipt document being created. By default, it is taken from the selected document type, or from the selected cash register. |
Payment mode
The <rezim> tag can be used to control the cash payment mode. If the tag is not specified or is empty, mode vychozi applies.
Value | Behavior |
| Behavior depends on whether the amount is specified. If the amount is specified and equals the total document amount, a full payment occurs. If it doesn't match, a partial payment occurs. If the amount is not specified, it is determined from the document being paid, and the document is fully paid. |
| The amount is not specified (if it is, it is ignored). The document is paid in full, and the resulting amount is rounded according to the settings of the payment method or document type. The rounding difference is posted to internal documents — rounding is applied only for the domestic currency. |
| The amount must always be specified. If it does not equal the total amount, the difference is posted to internal documents. Otherwise, the document is considered fully paid and no difference is posted. |
⚠️ Mode rozdilZauctovat without the element <castka> returns 400 elementRequired: "Element 'castka' must be specified." An invalid mode value returns 400 elementInvalidValue.
Custom exchange rate
You can also directly impose an exchange rate and exchange amount on the cash payment. If you fill in the exchange rate, you must also fill in the exchange amount — it cannot be done without it.
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana>
<id>code:FAKTURA_1</id>
<hotovostni-uhrada>
<pokladna>code:POKLADNA EUR</pokladna>
<!-- není povinný; pokud by nebyl vyplněn, použije se kurz převzatý z uhrazované faktury -->
<kurz>25</kurz>
<kurzMnozstvi>1</kurzMnozstvi>
<typDokl>code:STANDARD</typDokl>
<castka>1000</castka>
<datumUhrady>2026-12-03</datumUhrady>
</hotovostni-uhrada>
</faktura-vydana>
</winstrom>
Payment document identifier
The ID of the payment cash receipt document (tag <uhrazujiciDokl>) can be specified according to the standard rules and works as follows:
New payment — if not specified, a new cash receipt document is always created; so if you import the XML twice, two payments will be created. If it is specified and a document with the given ID does not exist, it will be created.
Update — if the document already exists, it must be paying the given invoice (otherwise it is an error). This means that the payment will only be updated with the available amount on the payment document. Other payment parameters are ignored.
Document series
The <hotovostni-uhrada> tag can also specify the document series for the cash receipt document being created. This is not mandatory and is by default taken from the selected document type, or from the selected cash register.
<rada>code:POKLADNA+</rada>
ℹ️ The <zbytek> parameter is not used for cash payments — Flexi creates the payment document itself, so a difference between amounts cannot arise; you control the payment amount using the elements <castka> and <rezim>. A description of the values of the zbytek parameter can be found in the article Payment matching, where this parameter is specified in the <sparovani> element.
