Subscription Lifecycle

Subscription Lifecycle

Every subscription carries two independent state machines. They’re deliberately orthogonal — a subscription is routinely “in force” and “not yet paid” at the same time, during its grace period. That’s expected, not an error state.

1. Status — is this period in force?

Grace period expiring no longer pauses a subscription by itself — see the next diagram and the note below it.

2. Payment status — has this period been paid for?

Grace period expiring flags a subscription, it no longer pauses it automatically. When the grace period runs out unpaid, the payment status flips to OVERDUE — nothing else changes: the subscription stays ACTIVE and every scheduled wash still happens. An admin is notified with the list of everyone who just went overdue, and pausing is now their call, made from the Payments screen with one click when they decide it’s warranted. The customer’s own reminders (7 / 5 / 3 / 1 days before the due date) are unaffected by this change — they still fire exactly as before.

Pause / resume — the one contract every trigger follows

Whether a pause is customer-initiated or admin-initiated (including an admin acting on an overdue flag above), the contract is identical:

No wash is ever silently lost to a pause — it’s either restored or replaced by a makeup slot as part of the top-up. Every pause and resume, whoever triggers it, is also recorded in the subscription’s audit trail, so the admin’s wash-history view can show exactly when and by whom a subscription was paused or resumed.

Incidents — one retry, then a wash is marked Missed

If a cleaner can’t complete a wash (car not found, blocked access, weather, etc.), a makeup wash is automatically created for the next available day (skipping days that already have a wash, and never past the period’s end) — except when the customer explicitly asked to skip that day, which doesn’t trigger a retry.

That retry gets one shot. If the retry wash also can’t be completed, no second retry is created — the wash is marked Missed instead, and an admin is notified to follow up with the customer directly (and consider a pause if the customer may be away).

A wash left SCHEDULED with no cleaner activity past its operating day’s close (3 PM Cairo the following day) is automatically marked a no-show and follows the same one-retry rule.