/api/v1/p2p/merchant/deals/{deal_id}/cancelСтейджExplicitly cancels a deposit (PayIn) deal before the payment is
verified. Allowed only from INITIALIZED, ESCROW_LOCKED, or
PAYMENT_NOTIFIED; escrow holds are released automatically, the
fee breakdown is zeroed, and matches are marked FAILED. Cancelling
an already-CANCELLED deal again returns it unchanged (idempotent).
Clients cancel via the public checkout endpoint
POST /api/v1/p2p/checkout/{hash}/cancel.
Authorization
MerchantToken MerchantSignature MerchantTimestamp The merchant's public token (64 hex characters), issued at onboarding.
In: header
HMAC-SHA256 signature (a single scheme for all endpoints).
Format: t=<unix_seconds>,v1=<hex_hmac_sha256>
where hex_hmac = HMAC-SHA256(webhook_secret, "<unix_seconds>.<raw_body>").
Replay window: 5 minutes (a 60-second drift into the future is allowed).
In: header
Unix time of the request in seconds. Signature window: 5 minutes back / 60 seconds forward.
In: header
Path Parameters
The deal UUID.
uuidRequest 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/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel" \ -H "X-Merchant-Token: <MERCHANT_TOKEN>" \ -H "X-Timestamp: <UNIX_TIMESTAMP>" \ -H "X-Signature: t=<UNIX_TIMESTAMP>,v1=<HEX_HMAC_SHA256>" \ -H "Content-Type: application/json" \ -d '{}'{ "deal": { "deal_id": "7ac148fe-1234-5678-9abc-def012345678", "status": "CANCELLED", "amount": "150000", "currency": "RUB", "created_at": "2026-08-10T12:00:00Z", "client_id": "player_42", "deal_type": "PAYIN", "updated_at": "2026-08-10T12:04:10Z" }}{ "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" } ]}Retrieve a deal by ID GET GET
Returns the details of a single deal within the merchant scope.
List merchant deals GET GET
Returns the merchant's deals filtered by type, status, and date. The listing is a UNION of PayIn (`p2p_orders`) and PayOut (`p2p_payouts`) records in a single chronological list. Keyset-based pagination via `page_token`. The scope is always derived from the signed merchant token (claims take priority); the `merchant_id` request field is informational and silently ignored.