Skip to main content

Direct Debit Order

How to create a direct debit via the REST API?

Written by Lenka Haringerová

A direct debit order can be created via the REST API with a simple call to the PUT or POST method on a specific bank account.


Calling method

URL

Description

/c/{firma}/bankovni-ucet/{id}/prikaz-k-inkasu

For the given bank account, creates a direct debit order from all documents that are still unpaid.

/c/{firma}/bankovni-ucet/{id}/prikaz-k-inkasu?splatnost=2014-10-14&datVystOd=2014-09-01&datVystDo=2014-09-30

For the given bank account, creates a direct debit order with the specified due date from all documents that are still unpaid within the given period.


Inputs

Processing of the request is governed by the following parameters:

Parameter

Type

Description

Default value

splatnost

date yyyy-mm-dd

Due date of the order.

next business day

datVystOd

date yyyy-mm-dd

Issue date of the oldest document to be paid.

unlimited

datVystDo

date yyyy-mm-dd

Issue date of the newest document to be paid.

current date

ℹ️ Dates here are entered in ISO format yyyy-mm-dd — note that bank and cash books, on the other hand, use the format d.M.yyyy.


Which documents are included

The direct debit order being created includes documents that meet the following conditions:

  • the document is an issued invoice or a receivable with a positive (non-zero) value,

  • the document is a received invoice or a liability with a negative (non-zero) value,

  • it is not an advance tax document,

  • the document's payment method is "bank transfer",

  • the document has a bank connection (account number) filled in,

  • the document's currency matches the account's currency,

  • the document has not yet been paid in full (it may be partially paid),

  • the document does not yet appear on a direct debit order,

  • the document does not have a payment ban set (received invoice),

  • the document is approved for payment, if a signature is required before issuing the payment order,

  • the document's issue date meets the specified criteria (see parameters datVystOd and datVystDo).


Outputs

Successful processing of the request can return the following statuses:

Status

Meaning

200

No suitable documents were found for creating the order.

201

The direct debit order was created; the URL is provided in the Location header.

⚠️ Therefore, status 200 does not mean that the order was created — you can tell whether the order was created by 201 and the Location header. The GET method at this address returns 405 Method Not Allowed.


Related

Did this answer your question?