question

mkonnekt avatar image
mkonnekt asked Dan answered

Is there a way to send percentages with decimals in serviceCharge API?

I am trying to send serviceCharge on a Clover order using the API - https://www.clover.com/api_docs#!/ord...

However, I want to get a confirmation on how I should send a charge of 10.35% on an order of $99.99 using this API. Should I send 1035 in the API "percentage" or just 10 because the API accepts only long data type for percentage?

10 |2000

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

1 Answer

Dan avatar image
Dan answered

You should send the API percentage as 10.

Currently, service charges are whole percents only. Setting percentage to 1 corresponds with 1%, 21 would be 21%, and so on. Fractional service charges (e.g. 12.5%) are a common request and should be implemented in Q1 2016; you would send your percentage as 1000 or 1035, depending on if you want 10.00% or 10.35%.

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