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
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 fromdeadlineAt(hide it when it isnull). - Amounts: the buyer sees
heldAmount(what left the balance); the seller seesnetAmount(what they will receive). Showfeeand say who pays it fromfeePayer. - Counterparty: only
counterparty.usernameand the reputation. Never ask for or show the name before the receipt. - Action of the moment:
- Timeline: list
timelineas it came, oldest to newest. Thetitleis ready-made and relative to the reader; highlightactorIsYou. - Txids: for each txid,
checkStatus,confirmationsand 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_ORDERhavep2pOrderId. Use it to open the order screen from the statement. - The line detail already carries
p2pNegotiationwith the timeline and, if the order concluded, thereceipt. 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
heldAmountas “held” and link to theGET .../holds?status=heldlist; each order hold hassource.orderIdandsource.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
Full list in the P2P Crypto section of Error Handling.