x

API giving error when adding discount code

We use a platform called Event Espresso and have been running event registration with Square as our payment gateway. All was working well but we tried adding a discount code and now anytime any discount code is applied you get an error that says "Configuration not setup correctly. Money must be a non-negative" But clearly the discount isn't greater than the ticket price. 

Also, if we enable Paypal as the payment gateway it has no problems processing the discounted ticket. It only happens with square as the payment gateway and only when a discount is applied. Below is the API log report for reference. 
 
Application ID
sq0idp-sy3mvLc4BXWMu_VAN1GC3g
Merchant ID
ML3QKQ9DTRMSR
API
Checkout
Endpoint Name
CreateCheckout
Status
400
Path
POST /v2/locations/{location_id}/checkouts
Error Code
VALUE_TOO_LOW
Error Details
Money amount must be non-negative
Square Version
2020-08-12
User Agent
Square-PHP-SDK/6.2.0.20200812
Timestamp
7/18/2021, 4:27:52 PM CDT
Message 1 of 2
150 Views
1 REPLY 1
Square Community Moderator

Does the discount that you are trying to add to the order for the Checkout API have a " - "?
We do not allow for negative numbers when creating an order.

 

I hope this helps, @aaron3232!

 

P.S. Welcome to the Seller Community 

Valentina
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
Message 2 of 2
98 Views