agent never finalized the draft invoice: customer was never billed
Fixes draft invoices that sit unfinalized so the customer is never billed. Use when revenue is missing because invoices stayed in draft, or when the agent creates invoices but never finalizes them. Not for intentionally held drafts or provider auto-finalization setups.
Fixing "agent never finalized the draft invoice: customer was never billed"
TL;DR
Finalize the invoice in the same flow that creates it, or give every draft a time-to-live with an alert. A draft is not a bill. Sweep for drafts older than a few hours daily until the flow is fixed.
agent never finalized the draft invoice: customer was never billedSteps
Change the create flow to finalize immediately after creation unless there is an explicit hold reason recorded. Expected: New invoices leave draft status in the same run that creates them.
If you need a review step, add a draft TTL: any draft older than 24 hours alerts and auto-escalates. Expected: Forgotten drafts surface within a day.
Run a one-time sweep now: list all draft invoices older than 24 hours, verify each is still valid, then finalize or void. Expected: The backlog of unbilled drafts is cleared.
Add a daily reconciliation: expected billable events versus finalized invoices. Expected: A gap between work done and invoices sent is visible the next morning.
Prevention
Draft-then-finalize as two separate agent steps is the hazard: the second step gets skipped when the run ends, errors, or moves on. Either finalize inline or make the draft itself an expiring, alarming object. Never let "I will finalize it later" be a plan.
Detection
Sweep drafts by age daily. Compare usage or order records against finalized invoices for the period; unbilled activity points at stuck drafts. Alert when a draft's age passes the TTL.
Recovery
Review each stale draft: if the charge is still valid, finalize it now and notify the customer; if the window passed or the details changed, void it and create a fresh invoice. For large backlogs, prioritize by amount and age, and tell affected customers what happened.
When this applies
- Customers were never billed because invoices stayed in draft
- The agent's flow creates invoices in one step and finalizes in another
- Draft invoices accumulate with no owner
When it doesn't
- Drafts are intentionally held for review on a schedule (but they still need a TTL)
- The provider auto-finalizes on a schedule you configured
- The invoice was voided on purpose
Compatibility
Stripe API (draft versus open invoice states, finalize endpoint), Adyen (invoice draft states), PayPal REST API v2 (draft invoices requiring send). Any provider with a distinct draft state.
draft invoice never sent so customer never paid
invoices stuck in draft status for weeks
agent created the invoice but skipped finalizing it
Why it happens
Creating a draft feels like progress, so the agent reports success and moves on. Finalization is a separate call that looks optional, and nothing in the flow complains when it never happens. The money simply never gets asked for.
Edge cases
- Drafts edited after creation: re-validate line items before finalizing a stale draft
- Auto-finalize schedules: if the provider finalizes on a timer, make sure the agent is not also finalizing and double-sending
- Voided-then-recreated drafts: void the stale draft so it does not get finalized by a sweep later
Provenance
Resolved from the public thread: https://vectle.com/posts/pstQu00g-GKzpOdAFufroUAQ