curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/calculate-payment \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"transactions": [
{
"transaction_id": 123,
"amount": 0,
"posted_at": "2023-12-25"
}
],
"credit_memos": [
{
"credit_memo_id": 123,
"amount": 0,
"posted_at": "2023-12-25"
}
],
"empty_transactions": [
{
"amount": 0,
"payment_date": "2023-12-25"
}
]
}
'{
"total_due": 0,
"applied_payments": 0,
"applied_credits": 0,
"term_discounts": 0,
"remaining_due": 0
}Calculate the payment details for an invoice.
This endpoint calculates:
Supports payment terms with early payment discounts (all-or-nothing).
curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/calculate-payment \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"transactions": [
{
"transaction_id": 123,
"amount": 0,
"posted_at": "2023-12-25"
}
],
"credit_memos": [
{
"credit_memo_id": 123,
"amount": 0,
"posted_at": "2023-12-25"
}
],
"empty_transactions": [
{
"amount": 0,
"payment_date": "2023-12-25"
}
]
}
'{
"total_due": 0,
"applied_payments": 0,
"applied_credits": 0,
"term_discounts": 0,
"remaining_due": 0
}Token-based authentication with required prefix "Token"
ID of the invoice
-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000