# InvoiceService.calculateAmountOwed REST equivalent

**URL:** <https://integration.keap.com/t/invoiceservice-calculateamountowed-rest-equivalent/94174>\
**Category:** API Q&A\
**Created:** [October 5, 2026, 11:41am UTC](https://integration.keap.com/t/invoiceservice-calculateamountowed-rest-equivalent/94174 "2026-10-05T11:41:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuga\_Ego](https://avatars.discourse-cdn.com/v4/letter/y/ec9cab/32.png) [@Yuga\_Ego](https://integration.keap.com/u/Yuga_Ego)\
**Post date:** [October 5, 2026, 11:41am UTC](https://integration.keap.com/t/invoiceservice-calculateamountowed-rest-equivalent/94174/1 "2026-10-05T11:41:58Z")

</div>

With REST API, do we load order by invoice\_id and then calculate difference between order total\_due and total\_paid to retrieve the value equal to XML-RPC InvoiceService.calculateAmountOwed?

---

<div class="post-metadata">

**Author:** ![Tom\_Scott](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/tom_scott/32/14748_2.png) [@Tom\_Scott](https://integration.keap.com/u/Tom_Scott)\
**Post date:** [October 5, 2026, 5:10pm UTC](https://integration.keap.com/t/invoiceservice-calculateamountowed-rest-equivalent/94174/2 "2026-10-05T17:10:18Z")

</div>

total\_due should be the remaining balance owed

 ![image](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/a/aecd9251181897ea60ac6d0f4ab02bd56de6db44.png)

---

<div class="post-metadata">

**Author:** ![Yuga\_Ego](https://avatars.discourse-cdn.com/v4/letter/y/ec9cab/32.png) [@Yuga\_Ego](https://integration.keap.com/u/Yuga_Ego)\
**Post date:** [October 7, 2026, 7:40am UTC](https://integration.keap.com/t/invoiceservice-calculateamountowed-rest-equivalent/94174/3 "2026-10-07T07:40:31Z")

</div>

It is not.

```auto
<methodCall>
<methodName>InvoiceService.calculateAmountOwed</methodName>
<params>
<param>
<value><int>6287</int></value>
</param>
</params>
</methodCall>
<methodResponse><params><param><value><double>9.85</double></value></param></params></methodResponse>

```

```auto
GET /crm/rest/v2/orders?filter=invoice_id%3D%3D6287&page_size=1&order_by=id%20asc

"id": "6287"

      "total_paid": {
        "amount": 1500,
        "currency_code": "USD",
        "formatted_amount": "$15.00"
      },
      "total_due": {
        "amount": 2485,
        "currency_code": "USD",
        "formatted_amount": "$24.85"
      },

```

---

<div class="post-metadata">

**Author:** ![Tom\_Scott](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/tom_scott/32/14748_2.png) [@Tom\_Scott](https://integration.keap.com/u/Tom_Scott)\
**Post date:** [October 7, 2026, 4:46pm UTC](https://integration.keap.com/t/invoiceservice-calculateamountowed-rest-equivalent/94174/4 "2026-10-07T16:46:03Z")

</div>

Okay, that would look to be a documentation issue then, I’ll get a ticket in to clarify it

---

<div class="post-metadata">

**Author:** ![Tom\_Scott](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/tom_scott/32/14748_2.png) [@Tom\_Scott](https://integration.keap.com/u/Tom_Scott)\
**Post date:** [October 7, 2026, 10:27pm UTC](https://integration.keap.com/t/invoiceservice-calculateamountowed-rest-equivalent/94174/5 "2026-10-07T22:27:17Z")

</div>

These are the revised property documentation, which will go out with the next release:

```auto
total - The full amount of the order (the sum of all order items, including any discounts,
 taxes and shipping). This value does not change as payments are made or as payment
 plan installments come due. The remaining balance of the order can be calculated as total

total_paid - The sum of all payments applied to the order, regardless of whether the order
 has a payment plan.

total_due - The portion of the order total that has come due, before any payments are
 subtracted. This is not the current balance. Without a payment plan, this is equal to total.
 With a payment plan, this is the sum of the payment plan installments whose due date has
 passed (never more than total), as of the last time the order amounts were recalculated.
 The amount currently owed (past due) can be calculated as total_due - total_paid.
 Omitted when zero.

```
