> This page is for BaaS.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# P2P Crypto — disputes

When the parties do not agree, or a deadline expires mid-delivery, the order goes to `disputed` and CorpX decides. While the dispute is open, the amount stays held and no deadline runs.

## Who opens and when

`POST .../p2p/orders/{orderId}/disputes` with `reason` (`crypto_not_received`, `wrong_amount`, `release_not_done`, `other`) and an optional `description` (up to 2,000 characters).

| Who               | Order status                                | Condition                                                               |
| ----------------- | ------------------------------------------- | ----------------------------------------------------------------------- |
| Buyer             | `signed`, `crypto_sent`, `crypto_confirmed` | At any time.                                                            |
| Seller            | `crypto_sent`                               | 60 min after reporting the txid.                                        |
| Seller            | `crypto_confirmed`                          | 24 h after confirmation.                                                |
| CorpX (automatic) | `signed`                                    | Transfer deadline expired without a valid txid (`crypto_not_received`). |
| CorpX (automatic) | `crypto_sent`                               | No network confirmation in 60 min (`onchain_unconfirmed`).              |
| CorpX (automatic) | `crypto_confirmed`                          | The buyer did not release in time (`release_overdue`).                  |

Outside these conditions: `409 dispute_not_allowed_yet`. Order already in dispute: `409 dispute_already_open`. The answer is `201` with the dispute, or `202` with `status: opening` if it is still being recorded.

## Flow

```mermaid
stateDiagram-v2
    [*] --> open: party or CorpX opens
    open --> info_requested: CorpX requests information
    info_requested --> open: the party replies
    open --> decided: CorpX decides
    info_requested --> decided: CorpX decides
    decided --> [*]
```

* **Messages:** `POST .../disputes/messages` with `body` (up to 2,000 characters). When CorpX requested information, the reply from the requested party moves the dispute back to `open`.
* **Evidence:** `POST .../disputes/evidence/upload-url` returns an upload URL (PUT) for a PDF, JPEG, PNG or WebP of up to 5 MB. After the upload, `POST .../disputes/evidence` registers the file with `key`, `evidenceId`, `filename`, `contentType` and `sizeBytes`.
* The order's **price evidence** (the Binance query that locked the price, at `GET .../p2p/orders/{orderId}/price-evidence`) is already part of the analysis; it does not need to be attached.
* Once decided, messages and evidence answer `409 dispute_already_decided`.

A message with contact or off-platform payment details is flagged to CorpX.

## Decision

```mermaid
flowchart LR
    D["CorpX decides"] --> S{"Decision"}
    S -- "release_to_seller" --> R["Amount to the seller<br />and fee charged"]
    S -- "refund_buyer" --> B["Hold undone:<br />amount returns to the buyer"]
    R --> F["Order resolved<br />(concluded)"]
    B --> G["Order resolved<br />(not concluded)"]
```

The decided dispute carries `decision`, `fault` (`buyer`, `seller` or `none`) and the CorpX note. The fault counts toward reputation. On a refund to the buyer, the fee is not charged.

If the decision's transfer fails, the order stays in `disputed` with `lastError` and CorpX retries from the desk, without a new decision.

## Webhooks

* `p2p.dispute.updated` on each change (opened, information requested, reply, decided).
* `p2p.order.updated` when the order enters `disputed` and when it reaches `resolved`.