This service allows you to create an overpayment from a bank, cash register, or mutual offset. The overpayment is created by moving the unmatched portion of a payment into receivables or payables — depending on whether it is an incoming or outgoing payment.
As mentioned, the function for creating an overpayment is available for the banka, pokladni-pohyb, and vzajemny-zapocet records. You can find an overview of all records in the so-called evidence list.
Using the REST API, you can also pay invoices from overpayments in the bank. This may of course include overpayments created in this way. If you are interested in the procedure, please refer to our guide.
Now let's look at the overpayment creation function itself.
Input parameters:
typDokl: The document type for creating the overpayment (required). This is an identifier of a record from thetyp-pohledavkyortyp-zavazkurecords.rada: The document series for creating the overpayment (optional). If not specified, it is derived from the document type. This is an identifier of a record from therada-pohledavkyorrada-zavazkurecords.
Usage example:
<winstrom version="1.0">
<banka>
<!-- Bankovní doklad, z něhož má být přeplatek vytvořen. -->
<id>code:B+0001/2021</id>
<!-- Lze uvést další vlastnosti dokladu, jako při běžném importu. -->
<preplatek>
<typDokl>code:OST. ZÁVAZKY</typDokl>
</preplatek>
</banka>
</winstrom>
Since this was an incoming bank document, the result will be a new record in the records zavazek configured according to the liability type specified in the request body above.
<winstrom version="1.0">
<zavazek>
<id>code:ZAV0001/2021</id>
<popis>Přeplatek (B+0001/2021)</popis>
<typDokl>code:OST. ZÁVAZKY</typDokl>
<rada>code:OSTATNÍ ZÁVAZKY</rada>
<vazby>
<vazba>
<a>code:B+0001/2021</a>
<b>code:ZAV0001/2021</b>
</vazba>
</vazby>
</zavazek>
</winstrom>
Likewise, when creating an overpayment for an outgoing document, an other receivable can be created.
<winstrom version="1.0">
<banka>
<!-- Bankovní doklad, z něhož má být přeplatek vytvořen. -->
<id>code:B-0001/2022</id>
<!-- Lze uvést další vlastnosti dokladu, jako při běžném importu. -->
<preplatek>
<typDokl>code:OST. POHLEDÁVKY</typDokl>
</preplatek>
</banka>
</winstrom>
The result for the above request would look as follows:
<winstrom version="1.0">
<pohledavka>
<id>code:POH0001/2022</id>
<popis>Přeplatek (B-0001/2022)</popis>
<typDokl>code:OST. POHLEDÁVKY</typDokl>
<rada>code:OSTATNÍ POHLEDÁVKY</rada>
<vazby>
<vazba>
<a>code:B-0001/2022</a>
<b>code:POH0001/2022</b>
</vazba>
</vazby>
</pohledavka>
</winstrom>
Both the new liability and the receivable are immediately matched with the corresponding payment, meaning that neither the outgoing nor the incoming payment will appear among unmatched settling documents.
