Pricing model - Pre purchase volume based with Stripe

I haven’t been able to find any good guidance on how to setup a pre-purchase volume based pricing. The idea being that a user can perform a certain number of actions for a certain price, and if they want more, they can purchase more.

I did a project previously where the fitness club owner wants to implement a system for users to purchase credits in order to their classes.

The credits in my case may correspond to your user’s ability to perform a certain number of actions.

You can create a field in your User data called “Credit” , or create a new Data type called “Credit”, to keep track of your credit balance.
And then deduct the “Credit” field whenever the action is taken.

I also created another Data type called “Transaction Record” .
And then created a workflow that adds a “Transaction Record” containing information of the transaction every time the credit is added or deducted.

This is useful for traceability purpose when there are disputes or the accounts need to be audited.

This is just my experience and I am sure there are other ways of doing this.

Hope this helps.

Thanks! Thats helpful. Can I ask how you managed the Stripe/purchase flow. Was it just a regular “product purchase” of x credits and then you tracked the total on the Bubble side?

I suggest you set up a Stripe webhook that trigger a backend workflow when the payment is processed successfully.

This way, the Credit will not be updated if there is an invalid credit card or other issues, and this also help to enable automated top-up of credits in the future

So the process can be : Standard “product purchase”=> Stripe process payment and trigger webhook => Bubble Backend workflow is notified of successul payment and update credit

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.