Overview

This guide covers proven integration patterns, architectural best practices, and common implementation approaches for Request Network. Whether you’re building a simple invoicing system or a complex multi-tenant platform, these patterns will help you implement robust, scalable payment infrastructure.

Common Integration Architectures

Server-Side Integration Pattern

Recommended for production applications requiring security and control.
Server-Side Flow:
Frontend β†’ Backend API β†’ Request Network β†’ Blockchain
     ↓
Webhook Handler ← Request Network ← Payment Confirmation
     ↓
Business Logic β†’ Database β†’ Frontend Updates
Benefits:
  • Secure API key management
  • Centralized business logic
  • Reliable webhook handling
  • Scalable architecture

Client-Side Integration Pattern

Suitable for simple applications and rapid prototyping.
Client-Side Flow:
Frontend App β†’ Request Network SDK β†’ Blockchain
     ↓
Payment Widget β†’ Wallet Connection β†’ Transaction
     ↓
Confirmation β†’ Frontend Updates β†’ Backend Sync
Benefits:
  • Faster development
  • Reduced backend complexity
  • Real-time user feedback
  • Lower infrastructure costs

E-commerce Integration Patterns

Shopify Integration

Connect Request Network with Shopify for crypto payment acceptance.

WooCommerce Integration

Enable crypto payments in WordPress/WooCommerce stores.

SaaS & Subscription Patterns

Multi-Tenant SaaS Architecture

Scale Request Network for multiple customers in a SaaS platform.
Isolation Strategy:
  • Separate API keys per tenant
  • Namespace separation for requests
  • Isolated webhook endpoints
  • Tenant-specific fee structures
// Tenant-aware request creation
async function createTenantRequest(tenantId, requestData) {
  const tenantConfig = await getTenantConfig(tenantId);
  
  const request = await requestNetwork.createRequest({
    ...requestData,
    contentData: {
      ...requestData.contentData,
      tenantId,
      tenantDomain: tenantConfig.domain
    },
    paymentNetwork: {
      id: 'erc20-fee-proxy-contract',
      parameters: {
        paymentAddress: tenantConfig.walletAddress,
        feeAddress: platformFeeAddress,
        feeAmount: tenantConfig.platformFeePercentage
      }
    }
  }, {
    apiKey: tenantConfig.requestNetworkApiKey
  });
  
  return request;
}

Enterprise Integration Patterns

ERP System Integration

Connect Request Network with enterprise resource planning systems.

Development Best Practices

Error Handling Strategies

class RequestNetworkClient {
  async createRequestWithRetry(requestData, maxRetries = 3) {
    let lastError;
    
    for (let attempt = 1; attempt <= maxRetries; attempt++) {
      try {
        return await requestNetwork.createRequest(requestData);
      } catch (error) {
        lastError = error;
        
        // Don't retry on permanent errors
        if (error.code === 'INVALID_REQUEST' || error.code === 'UNAUTHORIZED') {
          throw error;
        }
        
        // Exponential backoff
        const delay = Math.pow(2, attempt) * 1000;
        await new Promise(resolve => setTimeout(resolve, delay));
        
        console.log(`Request creation attempt ${attempt} failed, retrying...`);
      }
    }
    
    throw lastError;
  }
}

Performance Optimization

Cache Request Data:
// Redis caching for request data
const redis = new Redis(process.env.REDIS_URL);

async function getCachedRequest(requestId) {
  const cacheKey = `request:${requestId}`;
  const cached = await redis.get(cacheKey);
  
  if (cached) {
    return JSON.parse(cached);
  }
  
  const request = await requestNetwork.getRequest(requestId);
  await redis.setex(cacheKey, 300, JSON.stringify(request)); // 5 min cache
  
  return request;
}

What’s Next?