#marcin_stonly

1 messages · Page 1 of 1 (latest)

storm patrolBOT
reef violet
#

Hi there!

#

Can you share the request ID (req_xxx) where you see this error? You can find it here https://dashboard.stripe.com/test/logs
Also can you share the documentation link that says that you can use negative values?

runic jolt
#

Here is the part of documentation:

#

Here's the error I get:

#

the request id is req_JJXwxuJ2laE7xj

reef violet
#

Thanks! Give me a few minutes to look into this.

runic jolt
#

sure

reef violet
#

The documentation says that amount may be negative. But in the request you shared you are using unit_amount_decimal, so it's not the same.

runic jolt
#

Sorry but I have to disagree. It says "Passing in a negative unit_amount will reduce the amount_due on the invoice."

#

And later for unit_amount_decimal it says "Same as unit_amount..."

reef violet
#

But in the request you shares you are using this parameter

runic jolt
#

yes, cause the documentation says unit_amount_decimal is the same as unity_amount. I've also tried unit_amount and got the same error.

#

So it seems like both unit_amount and unit_amount_decimal are not supporting negative values actually

reef violet
#

This is what I see in the documentation for price_data. I see no mention of negative amount:

#

Can you share the exact documentation link where you see that price_data.unit_amount_decimal can be negative?

runic jolt
#

Ok, so seems like it differs between price_data and the invoiceItem property unit_amount. My fault.

The question is how should I approach the case where I need to have a negative value for the invoice item ? Should I set it in price_details or only on the top level of the object?

reef violet
runic jolt
#

Got it. Thanks a lot for claryfing. I appreciate your help. Have a great day!