Preventing a negative result

Hello, :slight_smile:
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

Thank you so much George, but the message from Stripe remains the same…

What API call are you making to Stripe? Share the action here and we’ll be able to help.

These ones :slight_smile: so nice thanks !!


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.