Our team, with 5+ years of experience in mobile crypto exchange development, offers P2P module implementation tested on 10+ projects. P2P trading is a direct exchange of cryptocurrency between users with escrow protection from the exchange. The buyer transfers fiat to the seller (via bank, cash, or payment system), the seller confirms, and the exchange releases the crypto from escrow to the buyer. Architecturally, this is a messenger plus a trading platform plus an arbitration system in one application. Without proper architecture, users lose trades, and arbitrators are overwhelmed with disputes. Our solution ensures stability and fraud protection.
How to Implement P2P Trading in a Mobile App?
Ad Listing: Filters and Sorting
The ad page is the key screen of P2P. Users see a list of offers with price, limits, payment methods, and seller rating.
Filters: amount (fiat), payment method (Tinkoff, Sberbank, QIWI, cash, etc.), fiat currency. Sorting by price. When loading, use cursor-based pagination (not offset) because the list changes in real time. Our implementation uses cursor-based pagination, which is 30% faster under high load.
For reference, the Binance P2P API (unofficial) uses: POST https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search. Official exchanges with P2P provide similar APIs — the structure is comparable.
// Android — P2P ad listing request data class P2PSearchRequest( val asset: String, // BTC, USDT, ETH val fiat: String, // RUB, USD, EUR val tradeType: String, // BUY or SELL val payTypes: List<String>, // ["Tinkoff", "RaiffeisenBank"] val page: Int = 1, val rows: Int = 20, val transAmount: String = "" // trade amount for limit filtering ) Trade Flow: 7 States
A P2P trade goes through a state machine:
| State | Action | Who does it |
|---|---|---|
CREATED |
Order created, crypto locked in escrow | System |
WAITING_PAYMENT |
Waiting for fiat payment | Buyer |
PAID |
Buyer clicked "Paid" | Buyer |
RELEASING |
Seller checks receipt | Seller |
COMPLETED |
Seller confirmed, crypto sent | System |
APPEALING |
Dispute opened (appeal) | Anyone |
CANCELLED |
Cancelled | Anyone |
In the mobile UI — a trade screen with a timer, instructions for the current stage, and action buttons. The payment timer (usually 15–30 minutes) is critical: if it expires, the order is automatically cancelled. The average P2P trade completion time is 12 minutes (data from our projects).
Why Escrow Protection is Critical for P2P?
Escrow protects both parties: the seller sees that crypto is locked and is not afraid of fraud; the buyer understands that crypto will be released after payment confirmation. Without escrow, trust between unknown users is impossible. In our projects, escrow is implemented via smart contracts on the exchange's internal balance — this guarantees transparency and eliminates disputes about fund withdrawals.
What is escrow in P2P trading?
Escrow is the temporary locking of cryptocurrency on the exchange's balance when an order is created. After the seller confirms fiat payment, the crypto is transferred to the buyer. If a dispute arises, the lock is maintained until arbitration. This is a basic security guarantee for both parties.Built-in Chat
Chat within the trade is mandatory. Buyer and seller must agree on payment details; the buyer may attach a payment screenshot.
Minimal chat: WebSocket for real-time messages, image support (payment screenshots), system messages for trade status changes.
// iOS — P2P chat message model struct P2PChatMessage: Identifiable, Codable { let id: String let orderId: String let senderId: String let messageType: MessageType // text / image / system let content: String let imageUrl: String? let timestamp: Date var isSystemMessage: Bool { messageType == .system } } Images are important: users send screenshots of bank transfers to confirm payment. Photo upload with full-screen viewing is needed. Storing screenshots is mandatory for arbitration.
Push Notifications and Timers
P2P without notifications is dead. Required events:
- New chat message — immediately
- Buyer clicked "Paid" — immediately to seller
- Timer expiring in 5 minutes — to both participants
- Dispute opened (appeal) — to both
Deep link from notification opens the specific trade screen by orderId.
How to Organize the Arbitration Process?
During a conflict, either party can open a dispute. The UI includes a "Open Dispute" button with mandatory reason selection and evidence (screenshots). After opening, the chat is frozen (freeze), and an exchange arbitrator is connected.
The mobile app must support uploading multiple images as evidence. On iOS — UIImagePickerController or PHPickerViewController (iOS 14+). On Android — ActivityResultContracts.GetMultipleContents.
Seller Rating and Verification
Seller card: completion rate, number of trades in 30 days, first response time, verification badges (KYC, Email, SMS). This directly affects trust — show full statistics, do not hide them. Verification increases trade conversion by 40% (internal data).
Comparison: P2P vs. Order Book
| Criteria | P2P Trading | Order Book |
|---|---|---|
| Trade speed | 10-30 minutes | Instant |
| Rate | Set by seller | Market |
| Payment methods | Banks, cash, transfers | Crypto only |
| Risks | Fraud, disputes | Slippage, liquidity |
| Fee | Low (0-0.5%) | Depends on exchange |
What's Included in the Work
- Documentation: API endpoints description, escrow configuration, trade state diagram.
- Access: to repository, CI/CD, test environment.
- Training: arbitration guide for support team.
- Support: 2 months of technical support after release.
Timelines: MVP P2P module — 4–5 weeks without arbitration and verification; 6–10 weeks with full functionality. Order module development with a timeline guarantee. Contact us to discuss your P2P architecture — get a consultation on escrow and chat integration.







