Payment total from API does not match dashboard report

The Task

My company management want to automate the reports and display the payment data, along with other key indicators in a custom dashboard for executives. Currently, our reports are just a large spreadsheet with graphs that admins have to build manually.

Our admins will get a report from Square by log in to the dashboard and export a CSV then add the numbers to the company report. This report takes too much time and is not accurate on a daily basis. Hence the request to automate the retrieval of data from Square.

The Problem

We have pulled all payments for a given week, starting Monday and 12am (T00:00:00) ending Sunday at 11:59 (T23:59:59). Then compared them to a report in the Square dashboard for the same time period. The totals do not match. For every time period the numbers are off by hundreds of dollars.

We are using the Payments API to request all payments within the time frame

https://connect.squareup.com/v2/payments?begin_time=2024-03-17T00:00:00+06:00&end_time=2024-03-24T23:59:59+06:00

Then we get the refunds processed within that same time period

https://connect.squareup.com/v2/refunds?begin_time=2024-03-17T00:00:00+06:00&end_time=2024-03-24T23:59:59+06:00

After adding up all the payment totals, adding the fees, and adding the refunds we get totally different numbers.

The Questions

Why are the numbers from the API different from the numbers from the API?

Are there other sources in the API we can use to get more accurate total sales for a given day/week/month that match the dashboard numbers?

How are the Square dashboard report numbers calculated? What data sources are they using that the API does not have access to?

There used to be a Reports API for Square that essentially negated this problem. I could pull data from the same report using that API that matched the data users would see on the web interface. Why can’t we do that now?

Why doesn’t Square allow custom user created reports to be emailed on user determined timelines from the web interface?

As far as we can tell, the only way to schedule a report is to go to Account & Settings → Business Information → Email Notifications. The only option is clicking one checkbox titled “Monthly and annual sales summaries”. Which is basically useless for timely reporting.

I’m not sure what other information I can give. Please let me know whet we can do to get accurate data from the API.

: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:
https://developer.squareup.com/docs/devtools/seller-dashboard

Additional Documentation

Invoices API Overview
Developer Dashboard
Pay or Refund Invoices

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.

This isn’t uncommon. The Payments API will show all the payments based on your begin and end time when the payment was created on our servers. However the Dashboard may be showing payments that were completed in offline mode based on the order.tender.created_at timestamp.

Unfortunately, we don’t have documentation on how the Square Dashboard reports are calculated with our APIs nor is there a Reporting API to get this data. However they do use the Orders, Payments, Catalog, Inventory and Customers API to build the various reports based on your needs. :slightly_smiling_face:

This is very frustrating. You’re basically telling me that we cannot get accurate payment data from the API or the Dashboard. Are either of them correct?

I’ve never worked with financial transaction system that can’t give accurate, reliable, and verifiable data. We are working with accountants who are verifying these numbers. How does Square justify providing this poor service?

If the dashboard is to be the authoritative source then Square needs to provide a way for companies to get that exact data through the API.

If the API is correct then Square needs to update their dashboard calculations to match the numbers we get from the API.

I cant go to my executive board and say, “Here’s the income numbers for the week. They may, or may not be accurate because Square gives us unreliable data and they really don’t care about delivering accurate numbers”.

You can get all the data that’s reported in the Dashboard. However you have to be aware of all the different scenarios in regards to how they’re shown in the Dashboard. Do you have any examples of payments that you expected to see in the report but weren’t included in the API? :slightly_smiling_face:

We will be doing an audit of the API data and the the dashboard data to find out what’s missing.