Analytics
Read-only reporting endpoints that aggregate real transaction, fee, order, and checkout data into the metrics that power the merchant dashboard: revenue, platform fees, payment-rail breakdown, revenue time series, conversion rate, store order stats, and top products.
Every Analytics endpoint requires a valid JWT or API key sent as Authorization: Bearer <token> — with
one exception: GET /analytics/platform-stats is public and unauthenticated (platform-wide
aggregates only, no per-merchant data). The base URL for all requests is https://gullypay.xyz/api. All
figures are computed live from the database — there is no caching layer in front of these queries.
Endpoints
/analytics/platform-statsPublic platform-wide aggregates (no auth)/analytics/merchants/:merchantId/revenueTotal revenue and transaction count (auth required)/analytics/merchants/:merchantId/feesTotal platform fees (auth required)/analytics/merchants/:merchantId/railsPayment-rail (provider) breakdown (auth required)/analytics/merchants/:merchantId/timeseriesDaily revenue time series (auth required)/analytics/merchants/:merchantId/conversionsCheckout conversion metrics (auth required)/analytics/stores/:storeId/ordersStore order count and GMV (auth required)/analytics/stores/:storeId/top-productsTop products by revenue (auth required)Platform Stats
/analytics/platform-statsPublic platform-wide aggregatesPublic — no authentication required. Returns platform-wide, non-sensitive aggregates for the
marketing landing page. Every value is computed live from real tables; there are no fabricated figures.
On a freshly provisioned platform the counts and processed volume are legitimately 0.
merchants— total merchant accounts.totalProcessedCents— sum of settled (status = 'succeeded') transaction amounts, in minor units (cents).transactions— count of settled transactions.chainsSupported— mainnet settlement chains the facilitator accepts today (Base, Ethereum, BSC, Solana). Gully Chain Testnet (chain id 485590) is extra and not counted; it shows in thenetworkslist ofGET /public/statswithenabledset by the server flag.
Merchant Revenue
/analytics/merchants/:merchantId/revenueTotal revenue and transaction countSums all transaction amounts for the merchant and counts them.
Merchant Fees
/analytics/merchants/:merchantId/feesTotal platform feesSums all fee-ledger entries for the merchant.
Payment Rail Breakdown
/analytics/merchants/:merchantId/railsPayment-rail (provider) breakdownGroups the merchant's transactions by payment provider, returning transaction count and volume per rail.
Revenue Time Series
/analytics/merchants/:merchantId/timeseriesDaily revenue time seriesReturns daily transaction volume and count over the trailing window. Pass ?days=<n> (default 30).
| Query | Type | Required | Description |
|---|---|---|---|
days | number | No | Trailing window in days (default: 30) |
Conversion Metrics
/analytics/merchants/:merchantId/conversionsCheckout conversion metricsComputes the checkout conversion rate from checkout sessions — completed sessions divided by total sessions, as a percentage.
Store Order Stats
/analytics/stores/:storeId/ordersStore order count and GMVCounts orders for the store and sums their totals (gross merchandise value).
Top Products
/analytics/stores/:storeId/top-productsTop products by revenueReturns the store's best-selling product variants by revenue, joining order items to orders. Pass
?limit=<n> (default 10).
| Query | Type | Required | Description |
|---|---|---|---|
limit | number | No | Max products to return (default: 10) |
Revenue, fee, volume, and GMV figures are integer amounts in the smallest currency unit (e.g. cents for USD), matching how transactions and orders are stored.
Next Steps
- Payments -- The transactions these metrics aggregate
- Ecommerce -- Orders and products behind store analytics
- Developer Portal -- Developer-side usage metrics