OptionalcatchOptionalgenerateInjected id generator; defaults to crypto.randomUUID.
OptionalnowInjected clock (ms since epoch) for tests.
OptionalonObservability: fired on every lifecycle transition. Errors are swallowed. Delivery is at-least-once: concurrent chargeDueSubscriptions runs converge on charges at the PSP (deterministic idempotency keys) but may each emit the same transition — dedupe on (subscription.id, type, currentPeriodEnd), never on occurredAt (it differs per delivery), if exactly-once matters to the host.
OptionalretryDunning policy: hours to wait before each renewal retry. The Nth failure schedules a retry after retryDelaysHours[N-1]; failing with the schedule exhausted cancels the subscription. Default [24, 72] (3 attempts total).
How many overdue periods one chargeDueSubscriptions run may collect per subscription. Default 1 — a long-dead cron must not surprise-charge a customer several periods in one instant.