Overview
The CallPayMin API enables you to add video/audio calls, per-minute billing, and AI-powered summaries to your application. This guide will walk you through the essential steps to get up and running in under 5 minutes.
Quick Start
You'll need an API key to follow along. Sign up free to get your key.
Step 1: Get Your API Key
After signing up, navigate to Settings → API Keys in your dashboard. Create a new API key with the scopes you need:
calls:create- Create new callscalls:read- Read call detailsusers:manage- Create and manage usersbilling:read- View billing information
Step 2: Install the SDK
Install our official SDK for your platform:
npm
npm install @callpaymin/sdkStep 3: Initialize the Client
JavaScript
import { CallPayMin } from '@callpaymin/sdk';
const client = new CallPayMin({
apiKey: process.env.CALLPAYMIN_API_KEY,
});Step 4: Create Your First Call
JavaScript
const call = await client.calls.create({
expertId: 'expert_123',
questerId: 'quester_456',
type: 'video',
billingMode: 'per_minute',
ratePerMinute: 2.50, // $2.50/minute
});
// Send join URLs to participants
console.log('Expert join URL:', call.expertJoinUrl);
console.log('Quester join URL:', call.questerJoinUrl);Step 5: Handle Webhooks
Set up webhooks to receive real-time notifications about call events:
call.started- When a call beginscall.ended- When a call endscall.billing.charged- When billing is processedsummary.ready- When AI summary is available