How to recover missed invoices after an infrastructure outage

Last updated: June 25, 2026

If your Lago cluster was down during a billing window, for example because Redis was unavailable, the hourly billing scheduler may have failed to bill subscriptions that were due during the outage. The result is missing invoices and the webhooks they would have triggered. This affects any plan, billed pay in advance or pay in arrears. Recovery depends on whether each invoice stalled mid-generation or was never created, so confirm that first.

How to confirm the cause

Check the affected customers' invoices for the missed window:

  • An invoice exists but is stuck generating. Billing started but did not finish. Lago re-attempts these automatically: a scheduled retry runs roughly hourly and re-enqueues any subscription invoice stuck generating for more than a day. Wait for it. A manual replay will not recover a stalled invoice.

  • No invoice exists for the period. Billing never ran for that subscription. This is the case that needs a manual replay.

How to resolve the issue

Manual replay needs a Rails console on a pod with database access, so it applies to self-hosted deployments. On Lago Cloud, contact support with the affected organization and the missed window, and the team will run it for you.

  1. Open a Rails console. The clock-worker pod is convenient, but any pod with Rails and database access works.

  2. Run the billing service for the missed window, replacing the timestamp with the exact datetime that was missed:

Subscriptions::OrganizationBillingService.call(
  organization:,
  billing_at: Time.parse("YYYY-MM-DD HH:MM:SS")
)

This is the same service the scheduler runs hourly. It replays billing for every subscription due at that time, including invoice creation and webhook dispatch.

Re-running with the correct date is safe: the service skips any subscription that already has a recurring invoice dated the same day, so it will not create duplicates. The real risk is a wrong timestamp, which bills the wrong subscriptions with misaligned periods. Confirm the exact datetime before running.


This article reflects guidance drawn from customer case resolutions. It is not officially supported documentation and may not apply to all situations.