#dons
1 messages ยท Page 1 of 1 (latest)
Yep, you can model this with usage based pricing and then also include a regular recurring item for the $500 fee
So the subscription would in theory include 2 items
Thanks! I read that there is a limit on the number of products, so this would mean that if we had 1 item each for good, better, best (each recurring), and one variable item based on usage, that would count as 4 items? Sorry can't remember what the limit was but I believe it was 4
This is the docs for that model: https://stripe.com/docs/products-prices/pricing-models#flat-rate-metered-usage
Limit for what?
Are you using pricing table?
yes
Ah, don't think this will work in that case as you can't apply 2 prices to a subscription via the table
But yes there's a 3 price limit per product: https://stripe.com/docs/payments/checkout/pricing-table#limitations:~:text=Product and price limits
I probably misunderstood the limit sorry. So the pricing table would only have 3 different items (good,better,best) with their fixed rates, and then the "correction" of the bill would be variable (would not need an item on the table as this would just be applied as charge from our system), but would apply to the same client account. Would that still work?
and then the "correction" of the bill would be variable (would not need an item on the table as this would just be applied as charge from our system)
Not sure I understand this part. Are you just intended to manual amend the invoice(s) to include an additional line item before finalisation?
So we would be intending to have the API talk with our own software, where it would follow this logic:
-Is the variable usage in our website higher than the subscription on Stripe?
--If Yes, apply the variable amount (this would be either by replacing the subscription amount with the variable amount OR by adding the difference to the subscription amount)
--If No, apply the subscription amount
It would be de facto the same as how a phone contract would be, where you would pay extra on your monthly cost if you exceeded a certain threshold.
You can't really replace the subscription amount like that. You'd need to add a new line item to the invoice before its finalised to reflect the usage amount you want to bill for
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you ynnoj! Really appreciate your help with this ๐
So what you'd do is at the beginning of each billing cycle, listen for invoice.created events and then add the line item to reflect usage before finalisation and payment (1 hour after creation).
I guess in that scenario you'd be reporting the previous billing cycle usage (i.e. January usage would be paid on Feb 1)
I think that should work.. having the invoice.created event trigger a usage calculation on hour side and receive a response in the form of the line item creation. Is the 1 hour window fixed or can it be amended?
Hello ๐
Taking over as ynnoj had to step away
You can set auto_advance: false to prevent invoice from finalizing
thanks hanzo! final question (hopefully), is there a way to have multiple pricing tables in separate locations of the website? This would be for different categories of products
I haven't tested this myself but I think yes, you should be fine using multiple pricing tables on the same site.
Here's an example where it works fine
https://4242.io/pricing-table/
yepp, looks good! thanks hanzo! the help you guys provided was great and will be a big plus for me to push stripe as a proposal to the business
enjoy the rest of your week!
NP! ๐ Glad we could help
Good Luck