Dashboard result varying from api response for orders-api

When we check on the dashboard, it was showing 65 completed transactions, but when we query the orders from api with status completed, it’s only returning 43 orders.
Can you please explain why we are getting varying results from api compared to dashboard

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Verify the Payment
Seller Dashboard
Square Developer

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

1 Like

An order can be OPEN and paid for. Querying on COMPLETED won’t guarantee that you get all orders that are paid for. If you want all paid for orders we recommend first calling ListPayments for the time frame you want payments and pull all COMPLETED payment order_ids. Then call the orders API to get the orders. :slightly_smiling_face:

1 Like

Thanks will check the api. Also, can you help us regarding the date parameters supplied in api’s. Can you point out whether they are utc or retailer timezoned date times?

Yes, all dates returned by our APIs are in UTC time. Here’s our Working with Dates. :slightly_smiling_face:

1 Like

What about the dates that are passed as request parameters to api. Are they utc or retailer timezoned?

Everything that’s returned by our APIs is UTC. :slightly_smiling_face:

1 Like

I understand that the dates returned by the api are in utc. But now my question is about the request parameters that are sent by user along with the api. Is that in UTC or retailer timezone?

Yes, you’ll need to pass in UTC time for the sellers timezone with an offset. An offset from UTC time to indicate a time zone, such as “2013-01-15T00:00:00-08:00” (for 8 hours behind UTC time). :slightly_smiling_face:

1 Like

Hi Bryan I did, as you instructed. Called the list payments api, then took those order ids from it and use them to get the orders. I got the desired results. But when I was checking sales of one day. There are such orders that are not returned using the payment list api, but when I download the excel from transactions page. The orders are present in that excel. The transaction have negative value. They don’t show up when I call the api. Can you please help here.

Looks like the return orders are not returned by payment list api. Can you please help @Bryan-Square

Are those refunded payments? If so you can call ListPaymentRefunds for the same time frame and total all the refunds to subtract from the sales totals. :slightly_smiling_face:

1 Like

Thanks. Your replies have been helpful. I am grateful to you for providing insightful responses :blush: Thanks once again.