Skip to main content

Paying an Invoice from Overpayments in the Cash Register and Bank

How to pay invoices from an overpayment in the bank or cash register via REST API?

Written by Lenka Haringerová

One of the features of ABRA Flexi is the ability to settle an invoice using overpayments in the bank or cash register.

When matching a payment to an invoice, the company is filled in, and if the payment is greater than the invoice, an overpayment remains. This can then be automatically matched to the invoice using this feature.


The uhrad-preplatky action

You can trigger settlement from overpayments using the uhrad-preplatky action on the invoice being paid:

<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana action="uhrad-preplatky">
<id>17</id>
</faktura-vydana>
</winstrom>

You can also specify the document identifier as an attribute — <faktura-vydana id="17" action="uhrad-preplatky"/> — or according to the usual rules for record identifiers, for example code:VF1-0001/2026.

ℹ️ The action works both on faktura-vydana and on faktura-prijata.


Batch call over multiple documents

The action can also be triggered in batch over a group of documents using a filter:

<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana action="uhrad-preplatky"
filter="not stavUhrK begins 'stavUhr.uhrazeno' and typDokl = 'code:INTERNET'">
</faktura-vydana>
</winstrom>

The filter shown selects unpaid invoices of the given document type. Always test the filter first with a separate GET query, so you know how many documents will be affected by the action.


Related

Did this answer your question?