Бұл құжат қазір тек English тілінде қолжетімді. Аудармалар дайын болған кезде жарияланады.
Metrics
GET /metrics — attributed users, current-month revenue, pending payouts.
Request
GET /api/v1/reseller/metrics
Authorization: Bearer rsk_<key>
200 OK
{
"users_attributed": 432,
"revenue_current_month": [
{ "currency": "RUB", "amount_cents": 12874500 },
{ "currency": "USD", "amount_cents": 4200 }
],
"pending_payouts": [
{ "currency": "RUB", "amount_cents": 3862350 }
]
}
users_attributed— how many accounts are attributed to you in total.revenue_current_month— successful payments by your customers since the start of the current calendar month, one entry per currency, in minor units (kopecks for RUB, cents for USD).pending_payouts— the same across payout rows still inpending.
An empty list is an answer, not an error: no money in that currency yet.
Why a list and not a number
Because roubles and dollars do not add up, and that is exactly what we used to do — one field, everything summed, labelled USD. For a partner on a rouble price list the figure came out roughly ninety times too large. Add within a currency; never across.
Requires the metrics:read scope.
Limitations
- No per-plan breakdown and no churn here. Trends and the per-customer view live in the dashboard; the chart plots one currency at a time (by default the one you took the most money in,
?currency=switches it). - Values are computed against the database on each call; there is no cache on our side. Poll no more than once every few minutes.