Skip to main content
POST
/
document-payments
Create document payment
curl --request POST \
  --url https://app.fintoro.sk/api/public/v1/document-payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "documentType": "invoice",
  "documentId": 301,
  "currencyId": 1,
  "currencyRate": 1,
  "paymentDate": "2026-03-07",
  "paymentMethodId": 1,
  "amount": 15.5
}
'
{
  "id": 801,
  "documentType": "invoice",
  "documentId": 301,
  "paymentMethod": {
    "id": 1,
    "name": "Bank transfer"
  },
  "currency": {
    "id": 1,
    "symbol": "EUR",
    "name": "Euro",
    "mark": "€"
  },
  "paymentDate": "2026-03-07",
  "amount": 15.5,
  "currencyRate": 1,
  "receiptInvoice": {
    "id": 301,
    "uuid": "6b1b8c9e-66e6-4fb5-b2db-6d7c7f0f8f19",
    "type": "invoice",
    "number": "20260001",
    "clientId": 101,
    "client": {
      "name": "Acme s.r.o.",
      "type": "company",
      "subjectId": "12345678",
      "taxId": "2020123456",
      "vatId": "SK2020123456",
      "isVatPayer": true,
      "email": "billing@acme.test",
      "street": "Main Street 1",
      "city": "Bratislava",
      "zip": "81101",
      "countryId": 703,
      "country": {
        "id": 703,
        "name": "Slovakia",
        "code": "SK",
        "eu": true
      },
      "hasDeliveryAddress": true,
      "deliveryStreet": "Warehouse 9",
      "deliveryCity": "Kosice",
      "deliveryZip": "04001",
      "deliveryCountryId": 703,
      "deliveryCountry": {
        "id": 703,
        "name": "Slovakia",
        "code": "SK",
        "eu": true
      }
    },
    "issueDate": "2026-03-03",
    "dueDate": "2026-03-17",
    "deliveryDate": "2026-03-03",
    "currency": {
      "id": 1,
      "symbol": "EUR",
      "name": "Euro",
      "mark": "€"
    },
    "total": 200,
    "totalWithVat": 240,
    "toBePaid": 240,
    "status": "unpaid",
    "hasVat": true
  }
}

Authorizations

Authorization
string
header
required

Bearer token created for a specific company in Integrations → API.

Headers

Idempotency-Key
string

Optional request identifier for safe retries. Use a unique value for each create request you want to retry safely.

Example:

"invoice-create-2026-03-03-001"

Body

application/json

Payload used to create a document payment. Only invoice, proforma, and credit-note documents are supported, and the target document must be available in the token scope.

documentType
enum<string>
required

Type of the document you are paying.

Available options:
invoice,
proforma,
credit-note
Example:

"invoice"

documentId
integer
required

ID of the document you are paying.

Example:

301

currencyId
integer

Optional currency ID from the currency reference table. If omitted, the source document currency is used.

Example:

1

currencyRate
number<float>

Exchange rate of the payment currency against EUR. If omitted, the system derives it from the final paymentDate using the previous day's rate. If provided for a currency other than EUR, the override value is used as-is. If the final payment currency is EUR, the backend always stores 1.0.

Example:

1

paymentDate
string<date>

Payment date in Y-m-d format. If omitted, today's date is used.

Example:

"2026-03-07"

paymentMethodId
integer

Optional payment method ID from the payment method reference table. If omitted, the source document payment method is used.

Example:

1

amount
number<float>

Payment amount in the payment currency. If omitted, the current remaining toBePaid amount from the source document is used. This derived amount is available only when the source document has a non-zero toBePaid; otherwise the endpoint returns 422. If sent explicitly, it can have at most 2 decimal places, its magnitude must not exceed the current toBePaid, and it must keep the same sign. The backend also accepts negative amounts, for example when settling a credit note.

Must be a multiple of 0.01
Example:

15.5

Response

Document payment created.

One payment of a public document.

id
integer

Internal payment ID.

Example:

801

documentType
enum<string>

Type of the document this payment belongs to.

Available options:
invoice,
proforma,
credit-note
Example:

"invoice"

documentId
integer

ID of the document this payment belongs to.

Example:

301

paymentMethod
object

Used payment method as a nested lookup object.

currency
object

Payment currency as a nested lookup object.

paymentDate
string<date>

Payment date in Y-m-d format.

Example:

"2026-03-07"

amount
number<float>

Payment amount in the payment currency.

Example:

15.5

currencyRate
number<float>

Exchange rate of the payment currency against EUR. If the payment currency is EUR, the backend always returns 1.0.

Example:

1

receiptInvoice
object

Preview of the linked payment receipt invoice, when it exists.