question

jasonwang1024 avatar image
jasonwang1024 asked jasonwang1024 commented

Inventory API bug? Returning price incorrectly

https://apisandbox.dev.clover.com/v3/merchants/{mi...

I am calling this API to get the list of all inventory. I find that the price returned is incorrect. For example I have a item with price 5.20, but the API returns 520.
Inventory
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jasonwang1024 avatar image jasonwang1024 commented ·
Am I suppose to divide by 100 for every price returned..? That seems odd
0 Likes 0 ·

1 Answer

keithryanwong avatar image
keithryanwong Deactivated answered keithryanwong Deactivated edited
Hi @jasonwang1024,

All payment interactions are conducted in cents. You will indeed need to divide by 100 if you want to display prices. If you're wondering why, it's to avoid rounding errors.

Best,
Keith

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community