Create a PayOut deal (disbursement)
Initiates a payout to the supplied target requisites. Validates the merchant balance and places a USDT hold (SELL rate) before creating the deal. Synchronous cascade auto-matching then follows: when a free trader exists the deal returns in `MATCHED`; otherwise it returns in `UNASSIGNED` and a retry worker keeps matching until the assignment SLA expires the deal (`EXPIRED`, hold released). Returns the deal with the recipient `target_requisite` populated and `currency` echoed from the request (ISO fiat currency of the payout).
/api/v1/p2p/merchant/deals/payoutInitiates a payout to the supplied target requisites. Validates the
merchant balance and places a USDT hold (SELL rate) before creating
the deal. Synchronous cascade auto-matching then follows: when a free
trader exists the deal returns in MATCHED; otherwise it returns in
UNASSIGNED and a retry worker keeps matching until the assignment
SLA expires the deal (EXPIRED, hold released).
Returns the deal with the recipient target_requisite populated and
currency echoed from the request (ISO fiat currency of the payout).
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
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/v1/p2p/merchant/deals/payout" \ -H "Content-Type: application/json" \ -d '{ "amount": 500000, "currency": "RUB", "wallet_id": "d9a8fbfc-848f-43a2-9168-911ed3a04a48", "idempotency_key": "payout_order_99812", "target_requisite": "2202201234567890", "payment_method": "card_rub" }'{ "deal": { "deal_id": "8bd2590f-2345-6789-abcd-ef1234567890", "status": "MATCHED", "amount": "500000", "currency": "RUB", "created_at": "2026-08-10T12:05:00Z", "client_id": "player_42", "deal_type": "PAYOUT", "updated_at": "2026-08-10T12:05:00Z", "target_requisite": "2202201234567890" }}{ "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" } ]}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "instance": "../dictionary", "errors": [ { "field": "amount", "message": "must be greater than 0", "code": "POSITIVE_REQUIRED" } ]}Create a PayIn deal (acquiring) POST
Creates a new incoming-payment deal with optional whitelist pass matching. Idempotent: duplicate `idempotency_key` returns the cached result. Returns the public `payment_url` the merchant should redirect the client to.
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.