Settle an EXPIRED deal's received funds as a NEW deal (operator)
Settle-as-received: for an EXPIRED parent deal that actually received funds (`received_amount` > 0), resolving the appeal creates a NEW COMPLETED settlement deal for the received amount at the exchange rate captured at resolve time. The expired original stays EXPIRED forever (terminal states are immutable). The settlement carries `parent_deal_id` / `origin_appeal_id`; one appeal settles at most once (UNIQUE constraint — a repeat call replays the existing settlement). Emits the regular `deal.created` … `deal.completed` webhook sequence for the settlement.
/api/v1/p2p/appeals/{appeal_id}/settlementSettle-as-received: for an EXPIRED parent deal that actually received
funds (received_amount > 0), resolving the appeal creates a NEW
COMPLETED settlement deal for the received amount at the exchange
rate captured at resolve time. The expired original stays EXPIRED
forever (terminal states are immutable). The settlement carries
parent_deal_id / origin_appeal_id; one appeal settles at most
once (UNIQUE constraint — a repeat call replays the existing
settlement). Emits the regular deal.created … deal.completed
webhook sequence for the settlement.
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
Path Parameters
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/appeals/497f6eca-6276-4993-bfeb-53cbbbba6f08/settlement" \ -H "Content-Type: application/json" \ -d '{ "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" } ]}List merchant deals GET
Returns deals for the merchant with filtering by type, status and date. The listing is a UNION of PayIn (`p2p_orders`) and PayOut (`p2p_payouts`) records in one chronological list. Pagination is keyset-based via `page_token`. The scope is always derived from the signed merchant token (claims-win); any `merchant_id` request field is advisory and silently ignored.
List disputes GET
Returns all merchant disputes with optional status filtering.