PayFanout API reference
    Preparing search index...

    Class InMemorySubscriptionStore

    Dev/test/demo store. NOT for production — it forgets everything on restart.

    Implements

    Index
    • Optional scale path for chargeDueSubscriptions: return records that are due — active/trialing with currentPeriodEnd <= dueBefore, or past_due with nextRetryAt <= dueBefore — never canceled or paused ones, in a stable order, at most limit of them. Leave out records that only resolvePendingRenewal moves on: those with a pendingRenewal, or whose renewalAttempt for the current period holds a frozen replay. The cron does nothing for them, and a full batch of them would hold back every due record after it. Push the predicate into a database index; the manager pages until a short batch and still re-checks due-ness per record, so this filter is an optimization, not a trust boundary. Without it the manager falls back to per-status list() scans.

      Parameters

      • input: { dueBefore: string; limit?: number }

      Returns Promise<SubscriptionRecord[]>