Installments

Manage invoice payment installments.


Payment installments for invoices. Optional file - only needed if you manage installment-based payments.

Dependency: Requires Invoices to be uploaded first.

⚠️ Important: When uploading installments for an invoice, include ALL installments (1..n) for that invoice in the same file. A partial file is accepted, but leaves the invoice wrong: sequences that are absent stay in place and still take part in the split, using their previous amount as the weight.

Endpoint

POST /full-csv-integration/upload-installments

  • Form Field: installmentsFile

Required Fields

FieldTypeDescriptionValidations
erp_invoice_idStringInvoice ID in ERPCannot be empty. Must exist in Invoices — see below
sequenceIntegerInstallment sequence numberInteger greater than or equal to 1 and contiguous (1, 2, 3…). With gaps the upload is rejected
due_dateDateInstallment due dateYYYY-MM-DD format; other formats are rejected. It must carry a value: an empty date makes processing of the whole file fail
amountFloatInstallment amountDecimal number greater than 0

Optional Fields

FieldTypeDescriptionDefault
statusStringInstallment status. Accepts pending, paid or partial, matched case-insensitively. An unrecognised value is not an error: it becomes pending on create and keeps the current status on update. The default applies on create onlypending

How the amount is used

amount works as a weight, not as a final amount: after the upload, Fibek distributes the invoice’s balance (outstanding amount plus applied payments) across the installments in proportion to the amounts you sent. If the installments do not add up to the invoice’s balance, the stored amounts will not be the ones in your file.

Sequences

  • Each invoice’s sequences must run from 1 to n with no gaps. If there are gaps, the upload is rejected with an error naming the invoice and the sequences found.
  • An upload does not delete the installments that are no longer in the file: if the invoice had 1, 2 and 3 and you now send only 1 and 2, installment 3 still exists. Removing it has to be done from the platform.

⚠️ Rows referencing an invoice that does not exist: they are dropped while the file is processed and this is not reflected in the response, which had already confirmed the upload. If no invoice in the file exists, nothing is processed. Upload Invoices first.

Example CSV

erp_invoice_id,sequence,due_date,amount,status
INV001,1,2024-02-15,500000.00,paid
INV001,2,2024-03-15,500000.00,pending
INV002,1,2024-02-20,500000.00,pending