tierrun / tier-vercel-openai

This project generates marketing content using OpenAI, implements metered pricing model, checks for feature access based on their current subscription, reports usage of a feature, manages subscription and more using Tier.
https://tier-vercel-openai.vercel.app
MIT License
335 stars 49 forks source link

Quota/limits don't appear to be enforced #16

Closed Benmidi closed 10 months ago

Benmidi commented 11 months ago

Describe the bug Quotas not honored, at least in Test Mode on Stripe.

To Reproduce Steps to reproduce the behavior:

  1. Select either plan.
  2. Generate up to the Quota
  3. Attempt to generate more copy beyond the quota

Observed behavior I can continue generating copy indefinitely and some times when I navigate to billing then back to generate it resets the quota to 0 until I preform a refresh.

Expected behavior Some kind of message or paywall preventing the user from continuing to generate marketing copy. Also, seeing overages in the billing section of the site.

Desktop (please complete the following information):

Additional context I haven't modified anything yet, just deployed through Vercel, to this domain: https://numbluck.vercel.app/

Benmidi commented 11 months ago

Also, switched Stripe from test mode to live and it didn't help prevent "free" overages

Benmidi commented 10 months ago

Ah, I actually see the charges occurring on an invoice in Stripe, didn't realized they're not processed until the next billing cycle. Cheers for the template!