Daily deal turnover (cabinet chart)
One aggregate row per (UTC day × deal_type × currency) over a bounded date window, summed from the same UNION ALL surface as the listing (orders `amount` for PAYIN, payouts `amount_fiat` for PAYOUT). `date_from`/`date_to` are REQUIRED RFC3339; the window is capped at 92 days (InvalidArgument beyond). Deals that never happened are excluded (orders EXPIRED/SPAM_REJECTED, payouts FAILED/EXPIRED). Rows are ordered by (date ASC, deal_type ASC, currency ASC); days without deals are absent.
/api/v1/p2p/merchant/deals/turnoverOne aggregate row per (UTC day × deal_type × currency) over a bounded
date window, summed from the same UNION ALL surface as the listing
(orders amount for PAYIN, payouts amount_fiat for PAYOUT).
date_from/date_to are REQUIRED RFC3339; the window is capped at
92 days (InvalidArgument beyond). Deals that never happened are
excluded (orders EXPIRED/SPAM_REJECTED, payouts FAILED/EXPIRED).
Rows are ordered by (date ASC, deal_type ASC, currency ASC); days
without deals are absent.
Authorization
MerchantToken MerchantSignature 64-character hex public merchant token assigned during onboarding.
In: header
Stripe-style HMAC-SHA256 signature.
Format: t=<unix_seconds>,v1=<hex_hmac_sha256>
where hex_hmac = HMAC-SHA256(webhook_secret, "<unix_seconds>.<raw_body>").
Replay window: 5 minutes (60s future drift tolerated).
In: header
Query Parameters
Window start (RFC3339, inclusive).
date-timeWindow end (RFC3339, inclusive; not earlier than date_from).
date-timeOptional direction filter; empty = both.
Value in
- "PAYIN"
- "PAYOUT"
Response Body
application/json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/v1/p2p/merchant/deals/turnover?date_from=2019-08-24T14%3A15%3A22Z&date_to=2019-08-24T14%3A15%3A22Z"{ "data": [ { "date": "2026-08-23", "deal_type": "PAYIN", "amount_minor": "100000", "currency": "RUB" }, { "date": "2026-08-23", "deal_type": "PAYOUT", "amount_minor": "96971", "currency": "RUB" } ], "next_page_token": ""}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "instance": "../dictionary", "errors": [ { "field": "amount", "message": "must be greater than 0", "code": "POSITIVE_REQUIRED" } ]}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "instance": "../dictionary", "errors": [ { "field": "amount", "message": "must be greater than 0", "code": "POSITIVE_REQUIRED" } ]}Export deals as CSV (canonical path) GET
Renders the merchant's deals — PayIn (orders) AND PayOut (payouts), UNION by the ListMerchantDeals canon — as an RFC 4180 CSV document. Filters match the listing one-to-one; no pagination (capped at 10 000 data rows, `truncated: true` when hit). `Accept: text/csv` returns the raw document with `Content-Disposition: attachment; filename="deals-YYYYMMDD.csv"`; any other Accept gets the JSON envelope (`csv`/`file_name`/`row_count`/`truncated`). The legacy mirror `GET /api/v1/p2p/deals/export` (no /merchant prefix) keeps working for wire-compat and is deprecated — build new integrations on this canonical path.
Retrieve a deal by ID GET
Returns the details of a single deal scoped to the merchant.