Best way to calculate price on pre-check out screen (STRIPE)

Users of my app are purchasing items and paying by how many items they are purchasing.

For example each item should cost

$1 if order total is under 100
$.70 if order total is over 100 under 300
$.50 if order total is over 300

There is an input on the screen where the user inputs the quantity. I can do the math if its just price per item, like insert dynamic data (=input value x .04 ) for example… but how do I calculate the sliding scale?

Ideally, stripe would take care of this with their subscriptions… BUT then the user is on a subscription plan paying monthly/yearly… these are 1 off purchases.

Thoughts are appreciated!

This sounds like a job for the Expression element from the Toolbox plugin. You could do an if statement that returns a final number.

For example, here is one I use:

if ("Split options (rev)'s value"=== "Split a dollar amount")  {Math.abs( Revenue split amount's value)
} else {Math.abs( Popup Rev split's split_from_distro's amount * Input Split percentage's value
)}

You can insert dynamic values where needed.

1 Like

thanks

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