Skip to main content

Clients and Ease of Use

The primary clients for accessing P2P Protocol are the p2p.me and coins.me Progressive Web Apps (PWAs). These browser-based applications provide seamless access across devices with integrated wallet functionality powered by thirdweb.
Getting Started:
  • On-ramps: As simple as buying stablecoins via a fiat transfer
  • Off-ramps: Just as reliable through a stablecoin deposit to the in-app wallet
  • Cross-platform: Works on desktop, mobile, and tablet browsers
  • No installation: Access directly through web browser
  • Integrated wallets: Built-in wallet functionality, no external wallet required
Of course, these PWAs are not the only way to access P2P Protocol. Any entity can create and distribute a functional UI client for the Protocol to conduct fully decentralized on/off-ramp transactions.

p2p.me

The primary reference implementation of the P2P Protocol client: Features:
  • Full protocol functionality
  • Order creation and management
  • Reputation dashboard
  • Transaction history
  • Dispute filing and tracking
  • Multi-rail support
Target Users:
  • Power users familiar with crypto
  • Merchants and liquidity providers
  • Developers testing integrations
  • Users who want maximum control

coins.me

Coins.me is one of the two primary PWAs for accessing P2P Protocol, alongside p2p.me. As a consumer-focused application, it provides a streamlined interface for everyday users. Fees, routing, and features remain protocol-governed to encourage a healthy multi-client ecosystem. Features:
  • Simplified user interface
  • Guided onboarding flow
  • One-tap buy/sell
  • Beginner-friendly design
  • Educational content
  • Customer support integration
Target Users:
  • Crypto newcomers
  • Casual users
  • People seeking simplicity
  • Mobile-first users
Credible Neutrality:Both p2p.me and coins.me access the same protocol with the same rules, fees, and functionality. Neither has privileged access or special treatment. This ensures fair competition and user choice.

Multi-Client Ecosystem

The protocol encourages a diverse client ecosystem:

Why Multiple Clients Matter

User Choice

Different users have different needs. Some want simplicity, others want features. Multiple clients serve different preferences.

Innovation

Client competition drives UI/UX innovation. Each client can experiment with features while using the same underlying protocol.

Decentralization

No single client controls access. If one client fails or acts maliciously, users can switch to alternatives.

Specialization

Clients can specialize for specific use cases: merchants, remittances, B2B, regional markets, etc.

Building Your Own Client

Anyone can build a protocol client: Requirements:
  • Use official SDK (see below)
  • Follow protocol rules (enforced by smart contracts)
  • No special permission needed
  • Open source encouraged but not required
Capabilities:
  • Full protocol access
  • Custom UI/UX
  • Additional features (analytics, charts, alerts)
  • Integration with other services
  • White-label solutions
Reference Implementations:Both p2p.me and coins.me are open source. Developers can fork them as starting points or learn from the code:
  • GitHub: github.com/p2p-protocol
  • Documentation: Comprehensive guides for client development
  • Community: Discord and forums for developer support

Client-Side SDKs (B2B Integration)

The P2P Protocol SDK lets developers integrate the protocol to on/off-ramp users directly into their platform. Essentially, the SDKs enable the B2B layer for prospective Web2/Web3 apps and websites to access and integrate P2P Protocol directly into their service, thus enabling consumer micropayments in crypto among other possible use cases.

SDK Overview

Supported Platforms:
  • JavaScript/TypeScript (browser and Node.js)
  • React SDK with hooks
  • React Native for mobile apps
  • Python (coming soon)
  • Go (coming soon)
Core Functionality:
import { P2PProtocol } from '@p2p/sdk';

const p2p = new P2PProtocol({
  network: 'base',
  apiKey: 'your-api-key'
});

// Create a buy order
const order = await p2p.createOrder({
  type: 'BUY',
  amount: 100,
  currency: 'USD',
  rail: 'WIRE'
});

// Monitor order status
p2p.on('order:matched', (orderId) => {
  console.log('Order matched:', orderId);
});

p2p.on('order:completed', (orderId) => {
  console.log('Order completed:', orderId);
});

SDK Features

Capabilities:
  • Create buy/sell orders
  • Cancel orders
  • Query order status
  • Track order history
  • Handle disputes
Example:
// Create order
const order = await p2p.orders.create({
  type: 'BUY',
  amount: 500,
  currency: 'INR',
  rail: 'UPI'
});

// Get order status
const status = await p2p.orders.get(order.id);

// List user's orders
const orders = await p2p.orders.list({
  status: 'COMPLETED',
  limit: 10
});
Capabilities:
  • Query user reputation
  • Get transaction limits
  • View reputation breakdown
  • Track reputation changes
Example:
// Get user reputation
const reputation = await p2p.reputation.get();

console.log('RP Score:', reputation.score);
console.log('Max Transaction:', reputation.limits.max);
console.log('Fee Tier:', reputation.feeTier);

// Get reputation history
const history = await p2p.reputation.history();
Capabilities:
  • Initiate ZK-KYC verification
  • Check verification status
  • Get verification requirements
  • Submit proofs
Example:
// Start verification
const verification = await p2p.verification.start({
  type: 'GOVERNMENT_ID',
  tier: 2
});

// Submit proof
await p2p.verification.submitProof({
  verificationId: verification.id,
  proof: zkProof
});

// Check status
const status = await p2p.verification.status(verification.id);
Capabilities:
  • Get current prices
  • Request quotes
  • Monitor price changes
  • Access historical prices
Example:
// Get current price
const price = await p2p.pricing.get('USD', 'USDC');

// Request quote for specific amount
const quote = await p2p.pricing.quote({
  from: 'USD',
  to: 'USDC',
  amount: 1000,
  rail: 'WIRE'
});

console.log('Rate:', quote.rate);
console.log('Fee:', quote.fee);
console.log('Total:', quote.total);
console.log('Expires:', quote.expiresAt);
Capabilities:
  • Receive real-time order updates
  • Get notified of disputes
  • Monitor reputation changes
  • Track payment confirmations
Example:
// Configure webhooks
await p2p.webhooks.create({
  url: 'https://yourdomain.com/webhook',
  events: [
    'order.matched',
    'order.completed',
    'order.disputed',
    'reputation.updated'
  ]
});

// Webhook payload example
{
  "event": "order.completed",
  "orderId": "ord_123abc",
  "timestamp": "2026-03-05T10:30:00Z",
  "data": {
    "amount": 100,
    "currency": "USD",
    "status": "SETTLED"
  }
}

B2B Use Cases

E-Commerce Integration

Allow customers to pay with crypto, automatically converted from fiat via P2P Protocol at checkout.

Remittance Services

Build remittance apps using the protocol for fiat-to-crypto-to-fiat transfers across borders.

Payroll Solutions

Pay contractors or employees in crypto, they off-ramp to local fiat automatically.

Gaming Platforms

Enable players to cash out gaming earnings to local currency seamlessly.

Marketplace Settlements

Settle marketplace vendors in their preferred currency using protocol infrastructure.

Subscription Services

Collect payments in local currencies, receive stablecoins via the protocol.

SDK Installation

NPM:
npm install @p2p/sdk
Yarn:
yarn add @p2p/sdk
CDN (browser):
<script src="https://cdn.p2p.me/sdk/v1/p2p.min.js"></script>

Authentication

API Key Management:Developers need API keys for SDK access:
  1. Sign up at developers.p2p.me
  2. Create a project
  3. Generate API keys (separate keys for test/production)
  4. Configure allowed domains for browser usage
  5. Set webhook URLs
Security:
  • Never expose API keys in client-side code
  • Use environment variables
  • Rotate keys periodically
  • Revoke compromised keys immediately

React SDK Example

For React applications, the SDK provides convenient hooks:
import { useP2P, useOrder, useReputation } from '@p2p/react';

function BuyButton() {
  const { createOrder } = useP2P();
  const { reputation } = useReputation();
  
  const handleBuy = async () => {
    const order = await createOrder({
      type: 'BUY',
      amount: 100,
      currency: 'USD'
    });
    
    // Navigate to order page
    router.push(`/orders/${order.id}`);
  };
  
  return (
    <div>
      <p>Your limit: ${reputation?.limits.max}</p>
      <button onClick={handleBuy}>Buy USDC</button>
    </div>
  );
}

function OrderTracker({ orderId }) {
  const { order, loading } = useOrder(orderId);
  
  if (loading) return <Spinner />;
  
  return (
    <div>
      <h2>Order Status: {order.status}</h2>
      <p>Amount: {order.amount} {order.currency}</p>
      <OrderProgress order={order} />
    </div>
  );
}

Developer Resources

Documentation

API Reference

Complete API documentation with examples for all SDK methods.developers.p2p.me/api

Tutorials

Step-by-step guides for common integration scenarios.developers.p2p.me/tutorials

Sample Apps

Full sample applications demonstrating SDK usage.github.com/p2p-protocol/examples

SDKs & Tools

Download SDKs, CLI tools, and development utilities.developers.p2p.me/sdks

Developer Support

  • Discord: Real-time chat with dev community
  • Forum: Long-form technical discussions
  • Office Hours: Weekly video sessions with protocol engineers
  • Bug Reports: GitHub issues for SDK bugs
  • Feature Requests: Protocol improvement proposals

Testnet

Development Environment:Full testnet available for development:
  • Network: Base Sepolia testnet
  • Faucet: Get test USDC and ETH
  • Mock merchants: Simulated merchants for testing
  • Instant settlement: No real fiat transfers
  • Reset: Can reset test account anytime
Access: testnet.p2p.me

Integration Best Practices

Production Considerations:
  1. Error Handling: Always handle SDK errors gracefully
  2. Status Polling: Don’t poll too frequently (max once per 5 seconds)
  3. Webhooks: Use webhooks instead of polling when possible
  4. User Experience: Keep users informed of order status
  5. Compliance: Ensure your integration meets local regulations
  6. Testing: Thoroughly test on testnet before production
  7. Monitoring: Monitor API usage and errors
  8. Rate Limits: Respect API rate limits

Rate Limits

API Rate Limits:
  • Standard: 100 requests/minute
  • Authenticated: 1000 requests/minute
  • Webhook delivery: Best effort, exponential backoff on failures
Exceeding Limits:
  • HTTP 429 status code
  • Retry-After header indicates wait time
  • Contact support for higher limits if needed

White-Label Solutions

For businesses wanting fully branded experiences:
  • Custom UI: Build your own interface using the SDK
  • Branded domains: Use your own domain
  • Custom branding: Your logos, colors, messaging
  • Same protocol: Access full protocol functionality
  • Support: We can assist with integration
Interested in white-label or custom integrations? Contact [email protected]

Build docs developers (and LLMs) love