Hello,
We would like the result of this calculation never to be negative. Could you please help us to find out how to do this?
Many thanks !!
Uploading: Capture d’écran 2024-09-04 à 16.22.52.png…
If when it’s negative, you want the result to be zero (rather than it’s inverse positive), then:
Calculation < - range - > 0 : max will work. This returns the largest value (either the calculation’s result, or zero). As zero is always > negative number, the minimum this expression will return is 0.
3 Likes
Thank you very much! The formatting works, but Stripe sends an error message and payment is not possible.
It needs to be an integer, so :rounded to 0 is needed
What API call are you making to Stripe? Share the action here and we’ll be able to help.
You’re missing :rounded to 0 in the line_items parameter with the price.
You can not checkout on Stripe for less than 0.50 USD. Value needs to be greater than 50 as Stripe expects cents.