Skip to navigation

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

MarketGET /v1/p2p/ads Advertiser profileGET /v1/p2p/profiles/{username} AdGET /v1/p2p/ads/{adId} Open orderPOST .../p2p/orders Order screenGET .../p2p/orders/{orderId} SignsignatureUrl Report txidPOST .../txids ReleasePOST .../release (PIN) DisputePOST .../disputes ReceiptGET .../receipt StatementGET .../statement Line detailp2pNegotiation BalanceheldAmount HoldsGET .../holds?status=held Profile and walletsGET .../p2p/profile, .../p2p/wallets My adsGET .../p2p/ads Create and editPOST, 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:
StatusBuyerSeller
signingSign (if signatureUrl came), cancelWait, cancel before signing
signedWait for the transfer; disputeSend to destinationAddress and report the txid
crypto_sentFollow the confirmations; release if already checkedWait; dispute after 60 min
crypto_confirmedRelease with the PINWait; dispute after 24 h
disputedMessages and evidenceMessages and evidence
released, resolved, cancelledReceipt (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

CodeWhat to show
feature_disabledHide the P2P section.
wallet_not_approvedOn 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_balanceNot enough balance for the hold.
order_step_out_of_orderReload the order: the step has already changed.
dispute_not_allowed_yetShow when the dispute becomes available.
release_failedThe amount stays held and CorpX is retrying; do not ask for a new release.
order_not_concludedReceipt not available yet.
ad_suspendedThe ad was suspended by CorpX; contact support.
ad_unavailableOn opening, the ad left the book (including because the advertiser is outside their cashout hours); go back to the market.
cashout_lockedWhen 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.