# Analytics

> Your sellers' volume, the commission you kept, what you stand to lose and what your sellers were paid, in the Dashboard and through the API.

How much did your sellers sell, how much did you keep, how much could come back to you, and how much
did Wajub pay them? **Sync, Analytics** in the Dashboard and `GET /sync/metrics` answer with the
same figures, for a period compared with the period of the same length just before.

## Where the figures come from

Nothing is estimated: each amount is a line Wajub wrote when the money moved.

| Figure                             | Counted from                                                                                                            | Placed in the period by |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| Volume, a seller's sale            | A payment made with `X-Sync` on one of your accounts, `succeeded`, `refunded` or `partially_refunded`, its gross amount | When it was credited    |
| Volume, a part of a shared payment | A part passed to its seller; a part still waiting does not count                                                        | When it was passed on   |
| Commission taken                   | The commission of the sale, of the part, or the one a Relay seller's due recorded                                       | When it was taken       |
| Commission returned                | Given back on a refund or a lost dispute                                                                                | When it was given back  |
| Forgone                            | What your policy asked to give back, less what your balance allowed                                                     | When it was given back  |
| Net commission                     | Taken less returned                                                                                                     |                         |
| Take rate                          | Net commission over the volume of the same currency, in percent                                                         |                         |
| Paid out                           | Wajub's payouts to your sellers that succeeded                                                                          | Their value date        |

- **Currencies are never added together.** Every figure is per currency. The headline figures are in
  the currency with the most volume over the period (`currency`).
- A commission can be in another currency than its sale: it counts in its own currency, and the take
  rate only compares amounts of the same currency.
- A refund of a Relay sale reduces the seller's due and comes out of your balance: no commission
  "returned" line is written for it, so none is counted.
- **Active sellers** are the accounts with at least one sale or part in the period. The **dispute
  rate** is the disputes opened in the period on your sellers' sales over the period's sales made
  with `X-Sync`: a shared payment's disputes are yours.

## What you see

| Block             | Says                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Volume            | By currency and by mode (`direct`, `lite`, `relay`), sales, average sale, the share that came through shared payments                                                                                                                                                                                                                                                                                                                                |
| Commission        | Taken, returned, forgone, net, take rate, by mode                                                                                                                                                                                                                                                                                                                                                                                                    |
| Exposure and risk | Your [payout cap](https://docs.wajub.com/sync/payouts#your-exposure-cap) used, your sellers' reserves (the Lite reserve, and the [card reserve](https://docs.wajub.com/sync/payouts#the-card-reserve) of your Lite and Relay sellers' card sales), the sales [held until delivery](https://docs.wajub.com/sync/holds) and those released on their own within 7 days, the refunds you covered and what came back, your sellers by [risk level](https://docs.wajub.com/sync/seller-risk) and frozen, the disputes running and the dispute rate |
| Payouts           | Paid in the period, on their way, owed to your Relay sellers, on your Lite sellers' balances, and the sellers whose payouts are held, by reason                                                                                                                                                                                                                                                                                                      |
| Sellers           | The first ten by volume, by net commission, and the ten riskiest                                                                                                                                                                                                                                                                                                                                                                                     |

In the Dashboard, the period is 7, 30 or 90 days, 12 months, or days you pick, in your browser's
days; the chart shows the previous period dotted. Members who can see payouts open it. When the
figures cannot be read for a moment, the page says so, with **Retry**.

## Through the API

```bash title="The last 90 days"
curl "https://api.wajub.com/sync/metrics?period=90d" \
  -H "Authorization: sk.xxxxxxxxxxxxxxxx…"
```

| Rule      |                                                                                                                                                                                                                                                                                                                                                                                        |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Key       | Your own, never with `X-Sync` (`403`). Sync on your plan, otherwise `403 feature_not_in_plan`                                                                                                                                                                                                                                                                                          |
| `period`  | `7d`, `30d` (default), `90d` or `12m` (365 days, the chart by month). Another value: `422`                                                                                                                                                                                                                                                                                             |
| Days      | UTC, today included                                                                                                                                                                                                                                                                                                                                                                    |
| Sandbox   | A test key reads the sandbox: `sandbox: true`, `risk.exposure` is empty, and your Lite sellers' sandbox balances are all `lite_available` (`lite_pending` is 0)                                                                                                                                                                                                                        |
| Freshness | What happened over the period (sales, commission, payouts made, disputes opened, covers) counts everything up to `as_of`, usually a minute or two before the call. What stands now (reserves, held sales, open disputes, payouts on their way, what your sellers are owed and hold, exposure) is read when the figures are worked out. Either way, the answer is kept for five minutes |
| Limit     | 10 calls a minute per platform and environment, on top of your plan's limit: `429` past it                                                                                                                                                                                                                                                                                             |

```json title="Response · 200 OK, shortened"
{
"data": {
  "period": { "start": "2026-10-22T00:00:00+00:00", "end": "2026-11-20T23:59:59+00:00", "previous_start": "2026-09-22T00:00:00+00:00", "days": 30 },
  "sandbox": false,
  "as_of": "2026-11-20T23:58:00+00:00",
  "currency": "XAF",
  "volume": {
    "active_sellers": 4,
    "previous_active_sellers": 1,
    "currencies": [
      { "currency": "XAF", "amount": 49000, "previous_amount": 4000, "change_percent": 1125, "sales": 5, "average": 9800, "shared_amount": 6000, "shared_percent": 12.24 }
    ]
  },
  "commission": [
    { "currency": "XAF", "taken": 2450, "returned": 300, "forgone": 70, "net": 2150, "take_rate": 4.39 }
  ],
  "risk": {
    "reserve": [ { "currency": "XAF", "held": 4000, "next_release_at": "2026-11-30T10:00:00+00:00", "card": { "held": 1500, "sales": 3, "next_release_at": "2027-02-18T10:00:00+00:00" } } ],
    "sellers": { "scored": 3, "elevated": 1, "high": 1, "frozen": 1, "high_not_frozen": 1 },
    "disputes": { "open": 1, "opened": 1, "sales": 4, "rate": 25 }
  },
  "payouts": {
    "currencies": [ { "currency": "XAF", "paid": 11000, "payouts": 2, "in_flight": 2000, "relay_payable": 7600, "lite_available": 12000 } ],
    "held": [ { "reason": "frozen", "sellers": 1 } ]
  },
  "sellers": { "currency": "XAF", "by_volume": [], "by_commission": [], "by_risk": [] }
}
}
```

Amounts are in major units; percentages out of 100 with two decimals, `change_percent` with one. A
percentage is `null` when there is nothing to compare: a previous period at zero, no volume, no
sale. `payouts.held[].reason` is `frozen`, `new_seller`, `exposure_cap`, `approval_withdrawn`,
`insufficient_balance` or `identity_required`. In `sellers`, `connected: false` marks an account
disconnected or deleted since, and `risk_score` is `null` for a seller never scored. In
`risk.reserve`, `held` and `next_release_at` include the card reserve, and `card` gives it on its
own: what your sellers' card sales keep, how many sales, and its next release.
[The full response](https://docs.wajub.com/api/subaccounts/metrics)

### Call it in the background

Any period answers quickly, but call this route from a scheduled job of yours, every five minutes at
most, and keep the answer on your side: not at every page view.

| Answer                                       | When                                                                                       | What to do                               |
| -------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------- |
| `429` with `error_code: metrics_busy`        | Another call is working out the same figures, and they were not ready within a few seconds | Retry after `Retry-After`                |
| `429` without `error_code`                   | More than 10 calls in a minute                                                             | Wait for the next minute                 |
| `503` with `error_code: metrics_unavailable` | The period's figures cannot be read for a moment                                           | Retry after `Retry-After`, not in a loop |
| `503` with `error_code: metrics_timeout`     | The figures could not be worked out in time                                                | Retry later, or ask for a shorter period |

A `503` is never a partial answer: the figures you get are always complete up to `as_of`.

- [Reports and statements](https://docs.wajub.com/sync/reports): The same ledger, line by line, as CSV, Excel or PDF.
- [Seller risk](https://docs.wajub.com/sync/seller-risk): Score, new sellers' delay and freezing.
- [Read your platform's figures](https://docs.wajub.com/api/subaccounts/metrics): The endpoint specification.
