Easily Enforce Usage Limits with Schematic

Ryan from Schematic demos how to add usage limits to a Spotify search app. He creates a feature flag for "Song Searches," sets a quota of three searches per day for free users, and shows how the app tracks usage and disables the search button when the limit hits.
Chapters
Hi, I'm Ryan, a developer at Schematic, and I want to show you how easy it is to use Schematic to track features and how much they're being used in your app, as well as make sure that any usage limits you have are enforced so that customers are paying you for the value you're providing them. Here's a simple demo app that allows people to easily and quickly search for songs in Spotify. We want to make it so that users can only do 3 searches a day on the free tier. So how would we do that? First, in Schematic, we would create a new feature and we'd call it Song Searches. We would make this an event-based feature. Then we'd give it a flag called Song Searches. And then finally, we'd give it an event name. And this is the name, you know, anytime that event happens that we'll be tracking, we'll call it Song Search. Next, we're going to add this feature to one of our plans. We're going to add this to our free plan. And we're going to say that users on this plan get 3 per day. Now in our code, we're going to grab this entitlement from schematic called song searches, and we're going to pull out a couple of values. We're going to pull out the current usage, the allocation of that usage, as well as whether the user has exceeded their limit or should be allowed to do more of these searches. Now to actually track Each one of these events in our search function, we're just gonna send a track event to Schematic, and we're gonna say that this was a song search event. Now, if we go back to our app and we click search, what's cool is that this event is actually being sent to Schematic, and we can see that in the events tab. This was a song search event. We can see that it was sent, and then we attributed it correctly with the company and user who did this search. And finally, we can do two things to make this experience a little better. First, we'll show the current usage and allocation to the user, as well as that we will disable the button if, if this entitlement is telling us that the user is already above their limit. Putting it all together, we can see that the search button is now disabled because the user is at their limit. And that's all it takes to use Schematic to track feature usage and enforce limits so that users are paying for the services you're providing. Thanks.
More from Fynn

Schematic at Operators Guild Demo Day 2026: How to bill for AI credits without a surprise bill

Should you move to usage-based pricing because AI is compressing your margins?

Why raising prices every year backfires (a pricing leader on the Mastercard quota model)







