hamza zahid
hamza zahid

Reputation: 1

I want to deduct payment on the basis of request used in previously subscribed subscription when user upgrades in stripe?

I am working on stripe subscriptions and have 2 packages basic(400 requests)/month and premium(800 requests)/month and charges 10$ and 20$ respectively. when a user upgrades a subscription, I want to charge a user on the basis of request used. but stripe provides prorated approach and without prorated approach. in prorated approach it calculates payment on the basis of time spent in previously subscribed subscription and remaining time in newly subscribed subscription. but I want to calculate amount to be deducted from my own calculation because it might be possible that the user used only 2 requests in the first 15 days and then upgraded the package. however, I can use usage based pricing model but in this case I have to tell stripe each time that the user requested so increment the count and also stripe has rate limiting per second. how can I achieve it? thanks

I have tried to implement it with stripe schedules

Upvotes: 0

Views: 100

Answers (1)

orakaro
orakaro

Reputation: 1981

Your best bet is the Usage based pricing model indeed. Read its Doc carefully or the Pricing Model Doc. Avoid Proration in your case, and make sure to report usage to Stripe.

Rate limiting is a different problem and you would need to deal with it regardless of APIs you are calling.

Upvotes: 0

Related Questions