Use case
The company would like to add a payment transaction to the invoice.
A user needs to add the payment transaction manually if the invoice has been paid elsewhere and the invoice cannot be updated automatically from the reference payments received from the bank, for example in case of cash payment.
Used endpoints
The ID of the invoice should be stored or searched using GET /invoices endpoint.
The payment transaction can be added to the invoice by using PUT/invoices/{invoiceId}/paymentevents/markpaid endpoint. The transactions will not be able to be added if the status of the invoice is UNFINISHED.
{
"paymentDate": "2020-11-11",
"amount": 120,
"currency": "EUR",
"description": "Paid in cash",
"paymentMethodType": "CASH"
}
PaymentDate cannot be within a closed financial year or tracking period. Currency must be the same as the accounting currency in Procountor. PaymentMethodType is the informative field and will not affect anything. The informal additional information can be entered to the description.
Other information
If the total sum of the payment transactions on the invoice is other than the sum of the invoice, the status of the invoice will be Partly paid (PARTLY_PAID). When the invoice’s open sum is zero, the status of the invoice will change to Marked paid (MARKED_PAID).
Sales invoice’s payment transactions are showing in invoice’s Special situations view in Procountor's user interface. Transactions are listed on the Payment transactions section.
Fiscal years and tracking periods are available via Procountor API
- GET /fiscalyears
Procountor does not store a total sum information for invoices. When the total sum is needed, it should be calculated from the invoice rows.
- GET /invoices/{invoiceId}
Existing payment transactions for the invoice are available via Procountor API
- GET /invoices/{invoiceId}/paymentevents