﻿# How an AI invoice reminder worker checks that a balance is still due

Build a B2B invoicing worker that checks the live invoice, handles delayed payment events, and holds reminders when amounts or recipients need review.

Author: Retrivium team
Updated: 2026-11-08
Canonical URL: https://retrivium.ai/journal/startup-worker-invoice-reminder-live-state/
Language: en

A digital accounts receivable worker can remove repetitive work from a small B2B finance team by preparing routine invoice reminders. Its critical responsibility is to contact the correct account about an actual open balance. A payment, credit or cancellation may arrive after the reminder was prepared, so approval and release need separate checks.

## Read live invoice state

Stripe documents states including draft, open, paid, void and uncollectible. Before release, read the current invoice and match it to the correct business entity and customer. Use the remaining balance returned by the billing system. A statement generated yesterday may show a different amount from the live invoice after a partial payment. [Stripe invoicing lifecycle](https://docs.stripe.com/invoicing/overview).

## Reconcile delayed and out-of-order events

Stripe documents retries and says webhook ordering is not guaranteed. Keep processed event identifiers and read the invoice again before allowing a scheduled reminder. A failed payment event delivered after a success deserves reconciliation rather than immediate outreach. If a separate accounting system holds a credit, load its state according to the finance team’s rules. [Stripe webhook delivery and event ordering](https://docs.stripe.com/webhooks).

## Handle disputes and alternative contacts

For example, a customer disputes one line of an open invoice and asks that further communication go to a new contact. Put the account into a review queue with the relevant invoice and note. Let the responsible employee confirm the contact and permitted scope before any message about the disputed balance is sent.

## Close the loop after delivery

Bind the reviewed notice to the invoice revision, amount, destination and scheduled send window. Record delivery failure or success separately from invoice state. An email delivery confirmation says nothing about payment. A customer reply should create a linked work item, and a payment should cancel any future reminders for the cleared balance.

## Measure accuracy and operator work

Start with one invoice cohort and compare preparation time, outdated-balance holds, incorrect reminders and operator review minutes. Include messages canceled after payment and late-dispute cases. Report payment collection separately. It can depend on credit terms, seasonality and client issues the worker has no authority to resolve on its own.

## Related reading

- [Stripe webhook retries receive a new signing timestamp](/journal/guide-stripe-webhook-signing-time-retry/)
- [Stripe snapshot webhooks: endpoint version and request version are separate](/journal/guide-stripe-snapshot-webhook-api-version/)
