> 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 — crypto transfer and verification

The seller sends the crypto from their wallet to `destinationAddress` (the buyer's wallet chosen on opening) and reports the transaction hash. CorpX checks it on the network and unlocks the next step.

## Report the txid

`POST .../p2p/orders/{orderId}/txids` with `{ "txid": "..." }`. Seller only, and only in `signed` or `crypto_sent`.

| Error                         | When                                          |
| ----------------------------- | --------------------------------------------- |
| `403 order_role_not_allowed`  | The caller is the buyer.                      |
| `422 txid_invalid_format`     | The format does not match the pair's network. |
| `409 order_step_out_of_order` | The order is not waiting for a txid.          |
| `422 txid_limit_reached`      | The order already has two txids.              |
| `409 txid_already_used`       | The txid was already used in another order.   |

Up to **two txids** per order: a partial transfer can be completed by a second one.

## What CorpX checks

```mermaid
flowchart TD
    T["Reported txid"] --> S["Transaction risk screening"]
    T --> N["Network read"]
    N --> D{"Destination = destinationAddress?<br />Right token and network?"}
    D -- "no" --> I["invalid"]
    D -- "yes" --> V{"Amount ≥ cryptoAmount<br />(adding up the txids)?"}
    V -- "not yet" --> P["partial"]
    V -- "yes" --> C{"Confirmations ≥ pair minimum?"}
    C -- "no" --> W["pending (waiting)"]
    C -- "yes" --> R{"Screening approved?"}
    S --> R
    R -- "yes" --> OK["confirmed"]
    R -- "rejected" --> I
    R -- "under review" --> W
```

A txid only becomes `confirmed` with the network confirmed **and** the screening approved; a rejected screening makes the txid `invalid`.

Each txid shows `checkStatus` (`pending`, `partial`, `confirmed`, `invalid`), `onchainStatus`, `screeningStatus`, `confirmations` and `amount` (the amount seen on the network). Each change triggers `p2p.order.txid.checked`.

## Results

| Result                                        | What happens                                                                                  |
| --------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Amount confirmed                              | Order `crypto_confirmed`; the release deadline starts (`releaseDeadlineAt`, 24 h by default). |
| All txids invalid, seller deadline still open | Order goes back to `signed`; the seller can report another txid.                              |
| All txids invalid, seller deadline expired    | Automatic dispute (`crypto_not_received`).                                                    |
| Network does not confirm in 60 min            | Automatic dispute (`onchain_unconfirmed`).                                                    |

## Release

`POST .../p2p/orders/{orderId}/release` with the transaction PIN. Buyer only, and only after the txid is reported (`409 order_step_out_of_order` before that).

* In `crypto_confirmed`, release is the normal path.
* In `crypto_sent`, the buyer can release before the confirmations if they already checked the wallet themselves. Releasing is final.
* On release, CorpX transfers the held amount to the seller (`p2p-{orderId}`) and charges the fee to whoever pays it (`fee-p2p-{orderId}`).
* If the transfer fails, the answer is `422 release_failed` and the amount stays held. CorpX follows up and retries from the desk.
* Without a release by `releaseDeadlineAt`, the order goes to dispute (`release_overdue`).