Create a PayIn deal (acquiring)
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.
/api/v1/p2p/merchant/deals/payinCreates 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.
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/payin" \ -H "Content-Type: application/json" \ -d '{ "amount": 150000, "currency": "RUB", "idempotency_key": "payin_order_12345", "payment_method_id": "550e8400-e29b-41d4-a716-446655440000" }'{ "deal": { "deal_id": "7ac148fe-1234-5678-9abc-def012345678", "status": "ESCROW_LOCKED", "amount": "150000", "currency": "RUB", "created_at": "2026-08-10T12:00:00Z", "client_id": "player_42", "deal_type": "PAYIN", "updated_at": "2026-08-10T12:00:00Z", "payment_url": "https://checkout.syncra.money/pay/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2" }}{ "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" } ]}Provision (or rotate) the merchant TRC-20 deposit address (legacy path) POST
Legacy admin-impersonation alias of the canonical `POST /api/v1/p2p/merchant/wallet/deposit-address` (same handler, same response). Lets an operator act on behalf of a merchant. With HMAC authentication the path `merchant_id` MUST match the token claims; merchant-JWT callers may only target their own merchant (IDOR guard). Claims the next BIP44 derivation index, derives the address via tron-wallet-api, and persists the address + index back to the merchant row. Previously issued addresses stay in the eternal block-polling set — deposits sent to a superseded address are still detected and credited.
Create a PayOut deal (disbursement) POST
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).