sven-bo
Member
When fetching daily stats via `POST /api/v2/getdashboardstats` with a custom date range (single day), the `total_net_revenue` field in the response does not match the "Revenue Monthly Stats" shown on the Pabbly Payments dashboard.
However, if I manually compute net revenue as `total_sales_amount - total_refund_amount` from the same API response, the numbers match the dashboard exactly.
Steps to reproduce:
1. Call `POST /api/v2/getdashboardstats` for each day of a given month (e.g. `start_date` = `end_date` = single day)
2. Sum up `total_net_revenue` across all days in that month
3. Compare to the "Revenue Monthly Stats" on the Pabbly Payments dashboard
Expected: The summed `total_net_revenue` should match the dashboard.
Actual: The API sum is consistently higher than the dashboard. The discrepancy varies by month, sometimes off by a few dollars, sometimes by hundreds.
Workaround: Compute net revenue as `total_sales_amount - total_refund_amount` instead of using `total_net_revenue`. This matches the dashboard values perfectly across all months tested.
I've verified this across multiple months going back over a year, the pattern is consistent.
The `total_sales_amount` and `total_refund_amount` fields are correct; only `total_net_revenue` is off.
Is this a known issue? Thanks!
However, if I manually compute net revenue as `total_sales_amount - total_refund_amount` from the same API response, the numbers match the dashboard exactly.
Steps to reproduce:
1. Call `POST /api/v2/getdashboardstats` for each day of a given month (e.g. `start_date` = `end_date` = single day)
2. Sum up `total_net_revenue` across all days in that month
3. Compare to the "Revenue Monthly Stats" on the Pabbly Payments dashboard
Expected: The summed `total_net_revenue` should match the dashboard.
Actual: The API sum is consistently higher than the dashboard. The discrepancy varies by month, sometimes off by a few dollars, sometimes by hundreds.
Workaround: Compute net revenue as `total_sales_amount - total_refund_amount` instead of using `total_net_revenue`. This matches the dashboard values perfectly across all months tested.
I've verified this across multiple months going back over a year, the pattern is consistent.
The `total_sales_amount` and `total_refund_amount` fields are correct; only `total_net_revenue` is off.
Is this a known issue? Thanks!