S
docs.syncra.money
API ReferenceMerchant APIApi referenceDeals

Amend a live deal's fiat amount (operator)

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.

POST/api/v1/p2p/merchant/deals/{deal_id}/amount

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.

Authorization

MerchantToken MerchantSignature
X-Merchant-Token<token>

64-character hex public merchant token assigned during onboarding.

In: header

X-Signature<token>

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

Path Parameters

deal_id*string

Deal UUID.

Formatuuid

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/497f6eca-6276-4993-bfeb-53cbbbba6f08/amount" \  -H "Content-Type: application/json" \  -d '{    "amount_fiat": 0,    "reason": "string",    "idempotency_key": "0cd90e5a-2c03-4ab6-81a8-d48818026e58"  }'
{  "deal": {    "deal_id": "2fa5b64f-5b72-4263-958e-07b76f41abe3",    "status": "INITIALIZED",    "amount": 0,    "currency": "string",    "created_at": "2019-08-24T14:15:22Z",    "client_id": "string",    "deal_type": "PAYIN",    "updated_at": "2019-08-24T14:15:22Z",    "payment_url": "http://example.com",    "target_requisite": "string"  }}
{  "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"    }  ]}
Empty