Skip to content
← Blog

Designing a credit system that doesn't feel like a casino

3 min read

Every image QuickStaging generates costs me money, roughly $0.13 at the high-quality setting. So it charges in credits: one credit, one image. Credits are also how a lot of AI products end up feeling like slot machines. You pay, you pull, you hope, and when the result is bad you pay again.

I wanted the opposite, and it came down to four rules.

1. You never pay for my failure

If generation fails, the credit comes back. That sounds simple, but "fails" comes in a few shapes, and each one needs its own path.

  • Permanent errors, like bad input or a rejected request, refund straight away.
  • A capacity error means the model provider is busy. The job keeps the credit and retries after 2, 5, 12, 30 and 60 minutes, and if all of that fails, the credit is refunded.
  • Stuck jobs get caught by a scheduled job. Anything still processing after 15 minutes is marked as timed out, and every credit it claimed goes back.
  • If an automated quality check flags a bad result, that's refunded too. The user keeps the image anyway.

There's also a manual refund button for ten minutes after a result, once a day.

2. All or nothing

A staging job can make one to three variants, each a credit. If you ask for three and have two, it doesn't make two and surprise you. The claim either takes all three credits or none.

3. Credits don't expire

Credits used to freeze when a plan ended, and I removed that. Expiry makes people feel robbed and doesn't get them using the product any more often. Purchased and monthly credits now never expire. The one exception is the Listing Pass, which is sold as a 30-day product, and its clock starts on the first photo rather than on purchase day.

4. Fixing should be cheaper than starting over

When a staged room is 90% right, the worst option is to roll the whole photo again. Fix area lets an agent paint the region that's wrong and describe the change. It's still a credit, but it's one credit aimed at the problem instead of a fresh gamble on the whole image.

The bugs

The bugs that taught me the most were all about doing something twice.

The payment provider can send the same webhook more than once, and early on that could credit a purchase twice. The fix is a database row written before anything else, with a unique index on the provider's transaction ID, so the second webhook hits the index and stops.

Refunds could double up from the other side. The refund route only updates a record if it isn't already refunded, and above that line in the code there's a comment calling it "the ONLY thing standing between a double-click and a double refund". I left it there on purpose.

Then there was the cheaper pack that wasn't. At one point the 90-credit pack cost more per credit than the 60-credit monthly plan, so subscribing and cancelling straight away was the better deal. People found that out. The pack is 100 credits now.

Pricing I tried

The prices moved several times, and every move came from looking at what people actually used.

People who bought the $18 / 30-credit pack used about 35% of it, which led to a $10 Solo plan with 20 credits. Monthly allowances sat unused and got cancelled, so I made the Listing Pass: $19 for 25 photos, for one listing.

Today the pricing page offers just three things: a 100-credit pack, a 60-credit monthly plan and the Listing Pass. The other tiers still work for people who bought them. They just aren't for sale.

Every price clears at least a 55% gross margin. That's the one number I didn't move.