Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tptompkins's avatar

Volume based pricing model

How difficult would it be to implement a volume based pricing model with Spark? I'm thinking along the lines of how Mailgun does their pricing: http://www.mailgun.com/pricing

0 likes
4 replies
tptompkins's avatar

Thanks @christopher - I did have a look at that earlier and it looks like that functionality is used to restrict which plans you're allowed to switch to given the resources that you have used. Although very similar, that appears to be different conceptually from billing a user based on the number of resources they have used (ie. 19 used ToDos vs 84 used ToDos at $x.xx per ToDo).

EventFellows's avatar

Stripes Invoice Item is probably not what you are looking for.

Check out the subscription quantity on the Cashier documentation. That is intended for volume of something. See here: https://laravel.com/docs/5.2/billing#subscription-quantity

Invoice Items (you read about it on the Stripe documentation) are intended for add-on to a normal subscrition.

Easier to understand with an example:

  • you have a subscription page where users can download stock photos (5$ to be a member and 1$ per photo downloaded)
  • they can also book 24h email support for 10$ per month

For the setup you would

  • make a subscription for the membership of 5$
  • use quantity for the photo downloads
  • and charge for the email support as an invoice item

That is how it is meant to be used. Pay attention with the Invoice Items, there are 2 ways to set them up - with an extra invoice OR to be charged with the next invoice

2 likes

Please or to participate in this conversation.