“Is this person allowed to see this?” sounds simple until trials, rebills, cancellations, refunds and chargebacks arrive. A clear state model, changed only by verified billing events, prevents both lost revenue and angry members.
The states
| State | Typical access | Entered when |
|---|---|---|
| Trial | Limited or full, until trial end | Provider confirms trial sign-up |
| Active | Full | Provider confirms initial payment or rebill |
| Cancelled (paid through) | Full until period end | Member cancels; no further rebills |
| Rebill failed (grace) | Your choice: full, limited or none | Provider reports a declined rebill |
| Expired | None | Period ended without renewal |
| Refunded / charged back | None, often flagged | Provider reports refund or chargeback |
Drive states from verified events
The browser redirect after payment is a convenience, not proof. Access should change only when the provider’s server-to-server notification arrives and is verified (signature, source or a confirming API call, depending on the provider).
Make events idempotent
Providers retry notifications. Store each event’s unique identifier and ignore duplicates, so a retried rebill does not extend access twice or credit tokens twice.
Handle out-of-order events
A cancellation can arrive after an expiry, or a refund after a rebill. Each event should carry its own timestamp, and state changes should be computed from the full history rather than “last event wins”.
Keep a history
Store every event and every state change. When a member asks why they lost access, support should see the answer in one screen.
Try the states in the Membership demo.