How Strent works
In short: Stripe tells Strent that something changed, Strent reads the customer’s current state from Stripe, and your app asks Strent.
Charges your customers
Stripe
Your plans and prices, its payment page (Checkout), and its plan management page (Customer Portal) stay in your Stripe account.
Keeps track of what is active
Strent
Receives Stripe's messages about every change (webhooks) and answers your app's access checks. You write no webhook code.
Decides what they can use
Your application
Your code maps each user to a Stripe customer and each plan to what it unlocks.
Each webhook triggers a fresh read
Section titled “Each webhook triggers a fresh read”Stripe sends a webhook, a short message to your project’s Strent address, whenever a customer is created, or a subscription or a scheduled plan change starts, changes, or ends. Webhooks can arrive late, twice, or out of order, so Strent does not take a message’s contents as the truth. It records the message, then reads the customer’s current subscriptions from Stripe.
Stripe sends a webhook → Strent records it → Strent reads the customer's current subscriptions from Stripe → Strent replaces its saved copy of that customer → your app's checks read the new copyBecause every message ends in a fresh read, the order in which messages arrive does not change the result.
Two saved copies for two jobs
Section titled “Two saved copies for two jobs”Strent saves two views of each customer:
- A detailed one, for billing pages and support: the subscriptions that give access, the ones Stripe keeps that give no access right now (
unpaid,paused,incomplete), which can give access again once paid or resumed, depending on their status, each subscription’s items (the prices it charges), and plan changes already scheduled in Stripe. - A small one with only the subscriptions that give access, which answers the checks your app makes on every request.
activeItems.list and the SDK checks built on it, including entitlements, read the small one. customers.retrieveBillingState reads the detailed one.
Active means a Stripe status
Section titled “Active means a Stripe status”A subscription gives access while Stripe marks it:
active: in good standing. This is a subscription status, not proof that an invoice was paid.trialing: in a free trial.past_due: the latest payment failed.
past_due keeps access for as long as Stripe reports it. Your Stripe account’s settings for failed payments decide how long that is: after its retries end, Stripe cancels the subscription, marks it unpaid, or leaves it past_due. unpaid and canceled subscriptions give no access.
Dates on a subscription, such as the end of its billing period, explain it; they do not end access on their own. A subscription set to cancel at the end of its period (cancel_at_period_end = true) keeps access until Stripe actually ends it.
Entitlements resolve in your app
Section titled “Entitlements resolve in your app”An entitlement is something a plan grants, such as a feature or a limit. You declare them in your code, and the SDK combines them with the customer’s active products when your app asks:
customer active products (from Strent) + the entitlements mapping in your code → entitlement valuesThe mapping is keyed by product, not price, so monthly and yearly prices for the same product grant the same entitlements. Changing what a plan grants is a code change; Strent stores no mapping.