S
docs.syncra.money
Payments
GET/api/v1/p2p/merchant/deals/exportСтейдж

Returns the merchant's deals — PayIn (orders) AND PayOut (payouts), UNION over the ListMerchantDeals contract — as an RFC 4180 CSV document. The filters match the listing one-to-one; no pagination (a 10,000 data row limit, truncated: true when reached). Accept: text/csv returns the raw document with Content-Disposition: attachment; filename="deals-YYYYMMDD.csv"; any other Accept gets the JSON wrapper (csv/file_name/row_count/truncated). The legacy mirror GET /api/v1/p2p/deals/export (without the /merchant prefix) keeps working for wire-compat and is deprecated — build new integrations on this canonical path.

Authorization

MerchantToken MerchantSignature MerchantTimestamp
X-Merchant-Token<token>

The merchant's public token (64 hex characters), issued at onboarding.

In: header

X-Signature<token>

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

X-Timestamp<token>

Unix time of the request in seconds. Signature window: 5 minutes back / 60 seconds forward.

In: header

Query Parameters

deal_type?string

Filter by direction; empty/missing = both (UNION).

Value in

  • "PAYIN"
  • "PAYOUT"
statuses?array<string>

Repeatable DB status names (statuses=COMPLETED&statuses=EXPIRED).

created_after?string

Lower bound of created_at (RFC3339, inclusive).

Formatdate-time
created_before?string

Upper bound of created_at (RFC3339, inclusive).

Formatdate-time

Response Body

application/problem+json

application/problem+json

curl -X GET "https://example.com/api/v1/p2p/merchant/deals/export" \  -H "X-Merchant-Token: <MERCHANT_TOKEN>" \  -H "X-Timestamp: <UNIX_TIMESTAMP>" \  -H "X-Signature: t=<UNIX_TIMESTAMP>,v1=<HEX_HMAC_SHA256>"
{  "csv": "string",  "file_name": "string",  "row_count": 0,  "truncated": true}
{  "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"    }  ]}