Coddingpro
Deprixa Plus - The Ultimate Courier & Logistics SaaS Platform

Deprixa Plus — SaaS Billing Module · 8.6 Plan Limits Enforcement

The SaasUsageService validates resource consumption before each operation. When a limit is reached, the operation is blocked with a clear error message showing current usage versus the plan limit.

How Limits Are Checked

ResourceHow It Is Measured
ShipmentsCount of shipments created this billing cycle vs max_shipments
UsersCount of active users in the organization vs max_users
BranchesCount of branches in the organization vs max_branches
StorageScan of the organization's directory size vs storage_gb
API CallsDaily counter vs api_calls_daily

Limit Reached Behavior

When a limit is reached, the operation is blocked and the user sees an error message such as: "Shipment limit reached: 500 / 500. Upgrade your plan to continue."

Subscription Status Middleware

The CheckSubscriptionStatus middleware enforces access control based on subscription state. Organizations in read_only or suspended status have all write operations (POST, PUT, PATCH, DELETE) blocked at the middleware level, regardless of individual resource limits.

SCREENSHOT — Limit reached error message shown when creating a shipment