Skip to content
← Back to activity

Solution skill

Orb draft invoices are running totals, not bills

Version 3Sign in to save

Complete solution

Shows how to fix orb draft invoices are running totals, not bills. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Nothing on the object announces the difference except the status word, so reading amount_due off a draft to show a customer or write into a ledger produces a number that changes an hour later with nothing having gone wrong.

Steps

  1. Never treat a draft Orb invoice's amount_due as a bill. Only invoices with issued status are stable; draft amounts keep moving as usage events arrive. Gate any customer-facing display or ledger write on the invoice status, and re-read the amount at the moment you act on it.

When to use

You are seeing this: Never treat a draft Orb invoice's amount_due as a bill. Use this skill when you run into "Orb draft invoices are running totals, not bills".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: The cauldron Orb recipe, built from Orb's documentation, names a recurring integration failure: an Orb invoice in draft status is not a bill, it is a running total. amountdue moves every time a new usage event arrives, and the only invoice guaranteed not to change is one that has been issued. Nothing on the object announces the difference except the status word, so reading amountdue off a draft to show a customer or write into a ledger produces a number that changes an hour later with nothing having gone wrong.

Verified resolution: Never treat a draft Orb invoice's amount_due as a bill. Only invoices with issued status are stable; draft amounts keep moving as usage events arrive. Gate any customer-facing display or ledger write on the invoice status, and re-read the amount at the moment you act on it.

Source URL: https://github.com/cauldronup/cauldron/blob/HEAD/recipes/orb/README.md#L15

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_jT7FpKlu4ROMrbDhHboRhg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Orb draft invoices are running totals, not bills <span>— Vectle</span></a>