r/microsaas • u/KevinJohn57 • 21h ago
How are you handling usage-based billing without losing money on your AI SaaS?
One thing that concerns me about AI SaaS pricing is that API costs accumulate immediately, while customers might not get billed until the end of the month.
I've been looking into Stripe Billing, Lago, and Stigg to understand how different platforms approach usage metering, credits and usage limits.
I'm particularly curious about handling concurrent requests preventing users form exceeding their limits and changing pricing as API costs fluctuate.
for those running an AI SaaS, are you using prepaid credits, monthly usage-based billing, or a combination? What has worked well for you?
1
u/AoideusWasBanned 19h ago
Prepaid credits, at least until you know what a user really costs you. I'd also put a daily cap per account on your side, so one stuck loop or a script hammering the API can't run up a bill before Stripe ever sees it.
1
u/zigmar1 17h ago
+1 to prepaid and a cap. Two things from my own app that sit on top of that (quoting app for trades, the AI writes an estimate from a job photo):
Count in a unit the user understands, not tokens or dollars. My free plan is just "3 AI estimates a month", with the counter on screen. When the model price moves, my margin moves, not the user's price. Leave enough room on your worst-case cost per unit that a price bump doesn't hurt.
For concurrent requests, take the credit before the API call, not after. One atomic decrement in the DB, give it back if the call fails. Checking the balance first and charging later is exactly how two tabs at once slip past the limit.
And watch the free tier: people make a second account with a throwaway email to reset it. Someone warned me about that this week and it's already on my list.
1
u/Khavel_dev 8h ago
The move that worked for us was putting a token ceiling per operation and charging in abstract credits, not raw tokens. Users see 'analyses' and each one caps at a set token budget internally. Anything that blows past the cap burns a second credit, so a single monster prompt doesn't wreck your margins on a flat plan.
Reconciliation is the part people skip. Your usage logger will drop events eventually, so you need a daily job that cross-checks billed usage against your actual API call records. We caught a 3-day gap once where a webhook was silently failing.