question

jasonwang1024 avatar image
jasonwang1024 asked keithryanwong Deactivated edited

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
3 comments
10 |2000

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

Dan avatar image Dan commented ·
This is definitely not a bug :D
1 Like 1 ·
jasonwang1024 avatar image jasonwang1024 Dan commented ·

Hey Dan, what results do you get back? Could you guess why my numbers are off?

0 Likes 0 ·
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