#Pranay
1 messages · Page 1 of 1 (latest)
Sure, set the billing_cycle_anchor date to be Aug 1 when you create the Subscription: https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Then you can report usage as normal from July 15 up until Aug 1
It is set to July 15 already but still, if I preview the invoice for Aug 1, the bill due is of 1 month.
I don't understand. You just said you want to bill the user from July 15- Aug 1
Yes. Please have a look at the product once - prod_OGCBILqHbPq0wc. It's a metered pricing product and price is based on the maximum usage reported during the billing period. Now if my max usage for the first month (July 15-July31) is 50 and the monthly price for this product tier is $1000, I should only be charged $500. But in my next preview invoice I can see the amount due is total $1000.
Can I see an example Subscription ID (sub_xxx)? The prod_xxx in isolation doesn't really show me anything
here you go - sub_1NTg21EA9XYdi3hmARCsZvbu
Ok, and when you say 'preview invoice' how are you generating that?
It's the next invoice that is going to be generated on Aug 1. I can see that in subscription dashboard.
I only see an upcoming invoice for $0 because there's no reported usage currently
Just added the usage. Please check
Ok, so you've added 50 units usage for the period. Can you help me understand what is unexpected about the invoice?
I'm sorry. Could you please look at this fresh subscription - sub_1NThlqEA9XYdi3hmVhhyoD2n? Here the total bill is $1,632.00 but the expected should have been about half of it. Because the billing period is Jul 14 to Aug 1
That's not how metered usage works. We bill for whatever usage you report during the period, regardless of whether it is the full month or now. It's not prorated
Yeah it's not prorating. Could you please help me how can I achieve this with the same kind of setup for products?
I don't understand what you're asking me. What you're seeing is not unexpected – that's how metered billing works
In any case, the Price you're using is not configured to charge for usage beyond 20 units: https://dashboard.stripe.com/test/prices/price_1NTfmnEA9XYdi3hmM7yDVBk1
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
In this case you applied usage of 50, so we charge a flat fee of $1632 as per the configuration
But this flat fee $1632 is per month right or I'm missing something?
It's right according to how you've setup the product yes, see the URL above
You reported 50 units of usage, so according to that we charge a flat fee of $1632
I got that and I'm really sorry I'm troubling you but for the first month I want the user to get a bill of only 1632/2 = $816.
As explained, it won't automatically do that. Metered/usage billing is not prorated according to the billing period
Instead you probably just need to apply discount/coupon to reduce the total as desired
Or just under report the usage for that shortened billing period to reflect the actual total you want to charge