List merchant deals
Returns deals for the merchant with filtering by type, status and date. The listing is a UNION of PayIn (`p2p_orders`) and PayOut (`p2p_payouts`) records in one chronological list. Pagination is keyset-based via `page_token`. The scope is always derived from the signed merchant token (claims-win); any `merchant_id` request field is advisory and silently ignored.
/api/v1/p2p/merchant/dealsReturns deals for the merchant with filtering by type, status and date.
The listing is a UNION of PayIn (p2p_orders) and PayOut
(p2p_payouts) records in one chronological list. Pagination is
keyset-based via page_token. The scope is always derived from the
signed merchant token (claims-win); any merchant_id request field
is advisory and silently ignored.
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
Filter by deal direction.
Value in
- "PAYIN"
- "PAYOUT"
Filter by one or more deal statuses (OrderStatus for PayIn, PayOutStatus for PayOut — the UNION listing accepts both sets).
Only deals created at or after this timestamp (RFC 3339, inclusive).
date-timeOnly deals created at or before this timestamp (RFC 3339, inclusive).
date-timeMaximum number of results to return (deals listing semantics: default 50, max 250). The compact listings (callbacks, passes, appeals, deposits, withdrawals) use default 20 / max 100 — see the per-endpoint parameter overrides.
int321 <= value <= 25050Opaque pagination token returned by the previous page.
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/p2p/merchant/deals"{ "data": [ { "deal_id": "7ac148fe-1234-5678-9abc-def012345678", "status": "COMPLETED", "amount": "150000", "currency": "RUB", "created_at": "2026-08-10T12:00:00Z", "client_id": "player_42", "deal_type": "PAYIN", "updated_at": "2026-08-10T12:10:00Z", "payment_url": "https://checkout.syncra.money/pay/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2" }, { "deal_id": "8bd2590f-2345-6789-abcd-ef1234567890", "status": "MATCHED", "amount": "500000", "currency": "RUB", "created_at": "2026-08-10T12:05:00Z", "client_id": "player_43", "deal_type": "PAYOUT", "updated_at": "2026-08-10T12:05:00Z", "target_requisite": "2202201234567890" } ], "next_page_token": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wOC0xMFQxMjowNTowMFoifQ=="}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "instance": "../dictionary", "errors": [ { "field": "amount", "message": "must be greater than 0", "code": "POSITIVE_REQUIRED" } ]}Amend a live deal's fiat amount (operator) POST
Changes the fiat amount of a deal that has not reached `PAYMENT_VERIFIED` yet (`INITIALIZED`, `ESCROW_LOCKED`, `PAYMENT_NOTIFIED`, `SOFT_DISPUTED` — Stripe PaymentIntent canon: the amount is mutable until authorization). Atomic in one transaction: the USDT equivalent is re-quoted at the deal's own fixed rate, every escrow hold (order-level and per-match) is recreated for the new sum, an append-only audit row is written and the `deal.amount_changed` webhook event (V2 only) is staged. Idempotent by `idempotency_key` (same key + same amount → replay; same key + different amount → 409). Optimistic locking via `expected_amount_version` (If-Match): a concurrent amend refuses with 409.
Settle an EXPIRED deal's received funds as a NEW deal (operator) POST
Settle-as-received: for an EXPIRED parent deal that actually received funds (`received_amount` > 0), resolving the appeal creates a NEW COMPLETED settlement deal for the received amount at the exchange rate captured at resolve time. The expired original stays EXPIRED forever (terminal states are immutable). The settlement carries `parent_deal_id` / `origin_appeal_id`; one appeal settles at most once (UNIQUE constraint — a repeat call replays the existing settlement). Emits the regular `deal.created` … `deal.completed` webhook sequence for the settlement.