question

adityaer avatar image
adityaer asked cladius commented

Best way to get closeout totals (net) - for last 5 days

I am trying to get NET closeout totals for last 5 days.
I know reports can be generated, but I need the numeric values. Is there an API or a convenient SDK feature, that can return totals per day (at closeout) ?

The other option - i see is : Look at each order, addup line items, tax, tips, refunds etc - for EACH order, then total them - for EACH day.

Any guidance on this is appreciated.

Orders
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

sam avatar image
sam Deactivated answered cladius commented

You will need to implement the calculation on your end as you've noted.

If all you require is the NET closeout, you should be able to add up all "total" from GET /orders, which accounts for tax, modifications, refunds, etc. Tips will have to be calculated separately.

If you need more detailed information and decide to expand multiple fields, the request can become costly very quickly. If you feel your app will hit our request rate limit (50/sec per app, 15/sec per token), consider using our bulk exporter. https://github.com/clover/export-api-...

4 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.

adityaer avatar image adityaer commented ·

Thanks for the response.

As my requirements refined, there is a subtle variation what I require. I need to find order totals - only for - card processing (i.e. Credit and Debit cards used). I don't care about Tips or the Overall closeout amount. Just need overall card processing amount (5 day history).

In that case, what part of the Orders response - should I look to sum up ? orders -> authorizations -> amount ?

0 Likes 0 ·
sam avatar image sam commented ·

@adityaer, you'd look for the credit/debit card tenders in the payments expansion: https://apisandbox.dev.clover.com:443/v3/merchants/{mid}/orders/?expand=payments

0 Likes 0 ·
cladius avatar image cladius commented ·

Thanks for the suggestion. However, there might be 2 closeouts in a day OR 1 closeout in 2 days. In such cases simply totalling the order amounts will not match correctly with the closeout information. Is there any solution for this?

0 Likes 0 ·
sam avatar image sam commented ·

https://apisandbox.dev.clover.com:443/v3/merchants/{mid}/payments?expand=cardTransaction The "State" = "CLOSED" corresponds with a completely closedout payment. Adding all payment total with tender type credit/debit that has "State" = "CLOSED" should return all payments that's been closed. When a payment was closedout is not available via API.

-1 Like -1 ·

Welcome to the
Clover Developer Community