v1

latestOpenAPI 3.0.32026-07-26362271803.3 KB
Accounts Receivable

Calculate Invoice Payment

Calculate the payment details for an invoice.

    This endpoint calculates:
    - Total amount due on the invoice
    - Applied payments (existing + proposed)
    - Applied credits (existing + proposed credit memos)
    - Payment term discounts (based on payment dates) - ALL OR NOTHING: discount only applies if paying full invoice
    - Remaining balance due

    Supports payment terms with early payment discounts (all-or-nothing).
    
post/coa/api/v1/invoice/{invoice_id}/calculate-payment

Path parameters

invoice_idinteger required

ID of the invoice

Request body

Response

total_duenumber double required
applied_paymentsnumber double required
applied_creditsnumber double required
applied_withholdingnumber double required
term_discountsnumber double required
remaining_duenumber double required