
Connect your Stripe. Draw your access rules. We enforce credits for your users.
You build the product. You keep Stripe. UsageGate is the control plane where you define who gets AI credits and features — then watch what your customers do in real time.
// You don't track balances yourself.
// UsageGate does — from your rules + your Stripe.
const gate = new GateClient(process.env.USAGEGATE_KEY!);
if (await gate.canAccess(customerId, "ai_credits")) {
await gate.consume(customerId, "ai_credits", 1);
return runModel();
}Built for SaaS founders
You are the customer of UsageGate — not your end users.
1. Connect your Stripe
Point webhooks at UsageGate. When someone pays you, we refresh their grants from your rules — no invoice parsing in your app.
2. Draw your rules
Graph: Plan → Feature → Limit. Starter gets 50 AI credits; Pro gets 500 + PDF export. You edit the graph; we enforce it.
3. Watch your users
See balances, burns, denials, and activity for the people inside your product. You observe; UsageGate decides access.
Drop-in enforcement
One SDK call instead of billing glue.
Keep Stripe Checkout / Customer Portal as you like. UsageGate only owns entitlements and metering — answered in milliseconds with fail-open defaults so your app stays up.
import { GateClient } from "@usagegate0/sdk";
const gate = new GateClient(process.env.USAGEGATE_KEY!, {
failOpen: true,
});
export async function POST(req: Request) {
const userId = await getUserId(req);
if (!(await gate.canAccess(userId, "ai_credits"))) {
return new Response("upgrade required", { status: 402 });
}
await gate.consume(userId, "ai_credits", 1);
// ... run the feature
}Your workspace is ready.
Rules graph, end-user activity, Stripe connection — all yours to configure.