Subscription — SanadiqCloud Billing
Product version: 1.0.0+1 Last updated: 2026-08-03 Audience: Users with
billing:read(billing:updateto change)
A. Subscription Page
Path: /billing/subscription (also from the Billing hub).
Shows the active (or pending) subscription: plan, status, months, seats/employees, storage allowance, and billing timing when provided by the API.
Typical statuses you may see: active, pending, trialing, past_due, cancelled, and related values returned by the API.
B. How Pricing Works
SanadiqCloud uses plan-configured rates (not fixed named tiers). Tenants choose:
| Control | Range in the app |
|---|---|
| Duration (months) | 1–24 |
| Employees / seats | 1–500 |
| Storage (GB) | 1–1000 |
Once-per-term total (new subscription):
(rate_per_month × months)
+ (rate_per_employee × employees)
+ (max(storage_gb − free_storage_gb, 0) × rate_per_gb)
- Rates and free storage come from the active subscription plan.
- Only storage above the free allowance is billed.
- The Plans quote card and new-subscription invoices use this formula.
C. New Subscription
- If you have no operational paid path yet (or only the welcome free sub and want to purchase), open Billing > Plans.
- On a plan quote card set months, employees/seats, and storage GB.
- Review estimated total → Pay → Stripe Checkout (subscription mode).
- Return via checkout success/cancel URLs; the app confirms the session when successful (webhook may also activate).
D. Adjust (Update) Subscription
When you already have an operational subscription:
- Hub or Subscription → Update / Adjust (
/billing/subscription/adjust). - Edit months, employees, and storage within the same bounds.
- Confirm → the billing API stages increases and creates an unpaid invoice for the update charge (a delta — not a full-term recreate). Decreases are scheduled for period end at $0 with no invoice and no refund. Until an increase is paid, current limits stay in effect. Prior invoices are not recalculated or credited.
- Pay that invoice via Stripe Checkout payment mode (hub “complete payment”, invoice detail, or checkout return).
- After successful payment, staged months/employees/storage become active. Until then, current limits stay in effect. Prior invoices are not recalculated or credited.
Update charging (current behavior)
Quantity/duration updates charge a delta via calculate_subscription_update_charge. Plan-only switches (no months/employees/storage change) still use the full once-per-term custom quote.
Billable storage:
billable_gb = max(storage_gb − free_storage_gb, 0)
Remaining period fraction (for resource proration) uses current_period_start / current_period_end (or equivalents). If bounds are missing, falls back to a 30-day × current_months window.
Resource increases (employees / storage) — prorated for the remaining current period only.
Duration +months — full price for each added month (not prorated), using seats/storage after this update.
Decreases are scheduled for period end with no credit or refund. Current paid limits stay active until that date. Storage cannot be lowered below what the organization already uses in media (API rejects unsafe downgrades). See the Refund Policy.
The Plans catalog will not start a second new-subscription checkout while you are already subscribed; it directs you to Adjust instead.
E. What Is Not in the Tenant UI
- Cancel-subscription page (cancel API exists; not exposed as a merchant page)
- Renew-only form separate from Plans/Checkout (renew API exists)
- Saved payment method vault / update card UI / Customer Portal
- Automatic Past Due retry schedule as an in-app surface
- Itemized proration breakdown on Adjust (shown as invoice line items after you confirm)