Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Total Money Amount Must Be Greater Than 1 #269

Open
jpnoe opened this issue Aug 11, 2021 · 1 comment
Open

ERROR: Total Money Amount Must Be Greater Than 1 #269

jpnoe opened this issue Aug 11, 2021 · 1 comment

Comments

@jpnoe
Copy link

jpnoe commented Aug 11, 2021

{"errors": [{
"category": "INVALID_REQUEST_ERROR",
"code":"VALUE_TOO_LOW",
"detail":"order.total_money.amount must be greater than 1.",
"field":"order.total_money.amount"
}]}

This occurs every time I try the base example CURL request from the API explorer for checkout api. I'm running the following request:

curl https://connect.squareupsandbox.com/v2/locations/LXXN2DAV5SQKY/checkouts
-H 'Authorization: Bearer EAAAEFpHnWhYlFNso_ogOvxCIjm_jNUUeCngffKLbLBk8DKeVy2sf9jtgZ8hh4zw'
-H 'Content-Type: application/json'
-d '{
"idempotency_key": "f0e3dc80-5f6d-4105-81e4-eefaebd7b81d",
"order": {
"idempotency_key": "c7030981-0607-4865-a69c-996f5e3ebe9d",
"order": {
"location_id": "LXXN2DAV5SQKY",
"line_items": [
{
"quantity": "2",
"name": "Marketing Analytics",
"base_price_money": {
"amount": 900,
"currency": "USD"
}
}
]
}
}
}'

@arseniigorkin
Copy link

Hi!
According to the https://developer.squareup.com/reference/square/objects/OrderLineItem#definition__property-total_money this is a r/o param and therefore must be automatically computed by the Square. But.. it seems their API explorer fails to do so. I think it is better to try the request on your own side from your terminal or a script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants