Data Types & Models

All API responses include standard versioning metadata (apiVersion, timestamp).

API Response Formats

Transfer Response

interface TransferResponse {
  success: boolean;
  message: string;
  transaction: string;         // Actual blockchain transaction hash
  networkName: string;
  x402Data: X402Data;
  apiVersion: string;
  timestamp: string;
}

PayGate Response

interface PayGate {
  id: number;
  shortCode: string;
  target: string;  // targetUrl or originalFilename
  method: string;  // Single method (e.g., "GET") or comma-separated (e.g., "GET,POST,PUT")
  resourceType: "url" | "file";
  accessUrl: string;
  uploadUrl?: string;  // For file paygates only
  price: string;
  type: "credit" | "subscription";
  credits: number;
  network: string;          // Blockchain network ("base-sepolia" or "base")
  isEnabled: boolean;
  requireAuth: boolean;
  headerAuthMode: "hmac" | "plaintext";
  assumeValid: boolean;     // Skip blockchain verification after facilitator settlement
  customHeaders?: {[key: string]: string};  // Custom headers forwarded with requests
  title: string;
  description: string;
  coverUrl?: string;
  attemptCount: number;
  paymentCount: number;
  accessCount: number;
  createdAt: string;
  updatedAt: string;
  isPremium?: boolean;      // Premium PayGate indicator
  expiresAt?: string;       // Expiration date for premium PayGates
}

Update PayGate Request

Premium PayGate Request

Premium PayGate Response

Premium Extension Response

Transaction History

Network Configuration

Last updated