ABRA Flexi allows you to pay an invoice by mutual offsetting of liabilities.
For the given company, the system attempts to use all available liabilities whose type permits use for automated mutual offsetting to cover the payment. An invoice can also be paid only partially this way.
The uhrad-zapoctem action
The uhrad-zapoctem action performed on the invoice being paid is used for payment:
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana id="100" action="uhrad-zapoctem"/>
</winstrom>
The identifier can be specified either as an attribute (see example above) or as a separate <id> element, following the usual rules for record identifiers:
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana action="uhrad-zapoctem">
<id>code:VF1-0001/2026</id>
</faktura-vydana>
</winstrom>
ℹ️ The action works both on faktura-vydana and on faktura-prijata. If you need to create an offset manually and specify which documents should be matched, use the vzajemny-zapocet record — see Offsets in the REST API.
Batch calls over multiple documents
The action can also be invoked in batch mode over a group of documents using a filter:
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana action="uhrad-zapoctem"
filter="not stavUhrK begins 'stavUhr.uhrazeno' and typDokl = 'code:INTERNET'"/>
</winstrom>
The filter selects unpaid invoices of the given document type. Always try it first with a separate GET query, so you know how many documents the action will affect.
