
Token Fraud: The Nicest Card on the Internet Is Stealing Your Compute
A field guide to AI token fraud: what it is, how it shows up, why it happens, what it costs, and the engineering that stops it.
You’ve got pricing plans, feature tiers, maybe even usage limits. But if your infrastructure can’t enforce those in real time, it’s not built to scale. Here’s what engineering teams need to know about building entitlements that actually support modern SaaS.

How Engineering Teams Can Stay Agile as Pricing Evolves
If you're part of an engineering team at a fast-scaling SaaS company, chances are you’ve already built something to manage customer access.
Maybe it's a service that checks plan IDs.
Maybe you stitched together some logic with feature flags.
Maybe you even bolted entitlement data onto your billing provider.
And hey - it works.
Until it doesn’t.
As pricing models evolve, so do the demands on your infrastructure. Suddenly, Go-To-Market (GTM) teams want to test a usage-based add-on. Sales needs plan overrides. Product is shipping a new tier next week. And all of it? Falls on you.
This post is for teams who’ve outgrown their first version of entitlements and are wondering what comes next.
A SaaS entitlement is a rule that defines what a customer is allowed to do in your product based on their subscription plan, usage, or contract.
It answers questions like:
Think of entitlements as a contract-aware access layer. They represent the business logic of packaging, not just a technical permission check. Entitlements sit between your billing system and your application, and inform how your product behaves, in real time.
Before we get into implementation, let’s clear up some common confusion. Entitlements are often mistaken for other access mechanisms, but none of these are interchangeable.
Checking plan_id === 'pro' is a good start, and a bad finish. This approach couples pricing with logic directly in your app. The result?
Instead, treat plans as bundles of entitlements and let those entitlements drive your product behavior.
Authorization manages who can do what inside an organization.
Entitlements manage what a customer is entitled to, based on their commercial relationship.
Authorization is about security and permissions.
Entitlements are about packaging and pricing.
They’re not interchangeable and forcing one to do both gets messy fast.
Feature flags are great for managing rollout and experimentation.
But not for contract-aware access control.
While some tools (e.g., LaunchDarkly) show how flags can be repurposed for entitlements, they are ultimately limited in areas like usage limits, plan versioning, or pricing logic enforcement.
If you’re using flags to model pricing, you’re eventually going to need something more robust.
Simple yes/no access.
function canAccessFeature(entitlements, featureId) {
return !!entitlements[featureId];
}
if (!canAccessFeature(entitlements, 'advanced-dashboards')) {
// no access
}
Example: “Does the customer have access to the Audit Logs feature?”
Perfect for features that exist in a plan or not - nothing more.
Same feature, different behavior.
function getFeatureValue(entitlements, featureId, defaultValue) {
return entitlements[featureId]?.value ?? defaultValue;
}
const dataRetentionDays = getFeatureValue(entitlements, "data-retention-days", 0);
if (dataRetentionDays > 0){
// set TTL on incoming data
}
Example: Data retention = 3 days (Free) vs. 30 days (Pro)
Use these when features change across tiers, but don’t turn off entirely.
Think “5 seats included” or “100k API calls/month.”
This is where metering becomes essential. Your entitlement system needs to know how much is being used to enforce these.
function checkUsageLimit(entitlements, featureId, newUsage = 0) {
const entitlement = entitlements[featureId];
return entitlement && (entitlement.usage + newUsage <= entitlement.limit);
}
const fileSizeMb = 256;
const canUploadFile = checkUsageLimit(entitlements, "file-storage-mb", fileSizeMb);
if (canUploadFile) {
// allow to upload file
}
Enumerated values that define what subset of options a customer has.
Example: Support Entitlement = [email, chat, phone, dedicated rep]
Until now, most teams modeled this using multiple boolean flags. But native enum support gives you more structure and flexibility as these entitlements become first-class citizens.
Many teams build their own entitlement logic early on, often embedded into billing workflows or baked into the application layer.
It works… until it doesn’t.
Here’s where homegrown systems struggle:
Most critically, because your billing system isn’t built for real-time access enforcement, you end up duct-taping together multiple sources of truth, and hoping it holds.
A clean, centralized entitlement layer solves these issues and unlocks pricing velocity.
If you’re thinking about evolving your current setup, here’s what “good” looks like:

Stigg is a developer-first entitlements and metering platform that integrates cleanly into your existing stack. It gives you:
No rewrites. No spaghetti logic. Just infrastructure that makes pricing experimentation safe, fast, and scalable.
Try it in a free sandbox: https://auth.stigg.io/u/signup/
-----------------------------------------------------------------------------------------------------------------------------
What is an entitlement in SaaS?
An entitlement is a rule that defines what a customer can access or do inside your product, based on their plan or contract.
Are entitlements the same as feature flags?
No. Feature flags are for delivery and experimentation. Entitlements are for access control based on pricing and usage.
Doesn’t Stripe already handle this?
Stripe handles billing and payments. It does not manage real-time access to product features or usage enforcement. That’s where entitlements come in.
Can I just build this myself?
You can, and most teams do at first. But maintaining it as pricing gets more complex becomes expensive, fragile, and time-consuming.