> 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 — internet banking guide

This guide maps the screens of an internet banking with P2P Crypto to the API calls and says what to show on each one. Everything here applies to the CorpX internet banking and to any tenant's.

## Screen map

```mermaid
flowchart TD
    M["Market<br />GET /v1/p2p/ads"] --> D["Advertiser profile<br />GET /v1/p2p/profiles/{username}"]
    M --> AD["Ad<br />GET /v1/p2p/ads/{adId}"]
    AD --> O["Open order<br />POST .../p2p/orders"]
    O --> T["Order screen<br />GET .../p2p/orders/{orderId}"]
    T --> A["Sign<br />signatureUrl"]
    T --> X["Report txid<br />POST .../txids"]
    T --> L["Release<br />POST .../release (PIN)"]
    T --> Q["Dispute<br />POST .../disputes"]
    T --> R["Receipt<br />GET .../receipt"]
    E["Statement<br />GET .../statement"] --> ED["Line detail<br />p2pNegotiation"]
    ED --> T
    S["Balance<br />heldAmount"] --> H["Holds<br />GET .../holds?status=held"]
    H --> T
    P["Profile and wallets<br />GET .../p2p/profile, .../p2p/wallets"] --> M
    MY["My ads<br />GET .../p2p/ads"] --> MYE["Create and edit<br />POST, PATCH .../p2p/ads"]
```

## Open an order

Load the ad with `GET /v1/p2p/ads/{adId}`, not from the list item, so the screen opens from a direct link and survives a reload. The detail has the list item fields plus the pair's `network`, `asset` and `decimals`. `404 ad_not_found` means the ad left the book: go back to the market. To open the order, always send `walletId`, the customer's wallet on the pair's network; the API uses the ad side to decide which wallet is the source and which is the destination.

## Order screen

* **Header:** pair, `cryptoAmount`, `price`, `amount`, status and the timer from `deadlineAt` (hide it when it is `null`).
* **Amounts:** the buyer sees `heldAmount` (what left the balance); the seller sees `netAmount` (what they will receive). Show `fee` and say who pays it from `feePayer`.
* **Counterparty:** only `counterparty.username` and the reputation. Never ask for or show the name before the receipt.
* **Action of the moment:**

| Status                              | Buyer                                                | Seller                                           |
| ----------------------------------- | ---------------------------------------------------- | ------------------------------------------------ |
| `signing`                           | Sign (if `signatureUrl` came), cancel                | Wait, cancel before signing                      |
| `signed`                            | Wait for the transfer; dispute                       | Send to `destinationAddress` and report the txid |
| `crypto_sent`                       | Follow the confirmations; release if already checked | Wait; dispute after 60 min                       |
| `crypto_confirmed`                  | Release with the PIN                                 | Wait; dispute after 24 h                         |
| `disputed`                          | Messages and evidence                                | Messages and evidence                            |
| `released`, `resolved`, `cancelled` | Receipt (if concluded)                               | Receipt (if concluded)                           |

* **Timeline:** list `timeline` as it came, oldest to newest. The `title` is ready-made and relative to the reader; highlight `actorIsYou`.
* **Txids:** for each txid, `checkStatus`, `confirmations` and a link to the network explorer.

Refresh the screen from the `p2p.order.updated` webhook (or the order `GET`); do not compute status on the client.

## Statement and balance

* Lines with `partnerType: P2P_CRYPTO_ORDER` have `p2pOrderId`. Use it to open the order screen from the statement.
* The line detail already carries `p2pNegotiation` with the timeline and, if the order concluded, the `receipt`. One call is enough to show the trade.
* The counterparty is always `ORDEM P2P CRIPTO`. Do not try to resolve the name some other way.
* In the balance, show `heldAmount` as "held" and link to the `GET .../holds?status=held` list; each order hold has `source.orderId` and `source.deadlineAt`.

## Receipt

It only exists with `concluded: true`. Show both parties with name, `username` and masked document as received (do not unmask or reformat), the txids with the explorer, the payment and the fee with their identifiers, and the time of each step. The party's signed copy comes from `GET .../contract`, through a temporary link.

## Errors the screen handles

| Code                             | What to show                                                                                                                                                                                                 |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `feature_disabled`               | Hide the P2P section.                                                                                                                                                                                        |
| `wallet_not_approved`            | On opening, `details.walletOf` says whether the refused wallet belongs to the taker (`taker`) or the advertiser (`maker`). If it is yours, ask for another one; if it is the advertiser's, offer another ad. |
| `insufficient_available_balance` | Not enough balance for the hold.                                                                                                                                                                             |
| `order_step_out_of_order`        | Reload the order: the step has already changed.                                                                                                                                                              |
| `dispute_not_allowed_yet`        | Show when the dispute becomes available.                                                                                                                                                                     |
| `release_failed`                 | The amount stays held and CorpX is retrying; do not ask for a new release.                                                                                                                                   |
| `order_not_concluded`            | Receipt not available yet.                                                                                                                                                                                   |
| `ad_suspended`                   | The ad was suspended by CorpX; contact support.                                                                                                                                                              |
| `ad_unavailable`                 | On opening, the ad left the book (including because the advertiser is outside their cashout hours); go back to the market.                                                                                   |
| `cashout_locked`                 | When creating or turning on a buy ad: the account's cashout is blocked; point to the security locks. In "My ads", show `hiddenReason` as "off the market right now".                                         |

Full list in the **P2P Crypto** section of [Error Handling](/baas/guias/referencia/erros).