#Mathankumar-billing
1 messages · Page 1 of 1 (latest)
👋 Happy to help
You can use List all subscription item period summaries to retrieve usage records: https://stripe.com/docs/api/usage_records/subscription_item_summary_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It gives one total cycle data but I need data every day data?
Stripe doesn't have an API for that. I'd suggest storing daily usage records at your end
Okay, it only gives total cycle usage, right?
Yup, you're right
what's the question?
I send records to stripe it to calculate billing based on the records (in usage-based billing), In my scenerio make billing with maximum quantity per day
for example, if there are 30 days period(cycle) I don't need to make a bill with all data, I just need to make a bill with only which day is a maximum quantity between that 30 days period cross amount
I see! When you create a Graduate Pricing, you can set the maximum amount to $0 per unit after the maximum quantity
For example,
- First 10 unit is $5 each
- From 11 unit onwards, it'll be $0 each
- When the usage is 8 units, it'll be $40.
- When the usage is 11 units, it'll be keep at $50 max
Okay but it's not my question I will explain in detail, for example, I send quantity for every one hour and stripe takes and calculate billing for every data but In my scenario. for example 1st hour => 2quantity, 2nd hour => 4quantity, 3rd hour => 1quantity in this stage I just need a bill that maximum quantity "4" x amount I don't want to calculate every data ** x** amount
So. the total quantity of these 3 hours is 7, but you only want to charge the amount of max quantity of 4 in this case?
Yes
Is your price a daily or monthly price?
After checking, it's not possible to do this since this is running a monthly cycle and the pricing model is based on monthly usage. I'd recommend calculating the usage and submit the maximum units at the end of each day
In my own logic, right !