Back to Blog
Getting Started 8 min read Jan 15, 2025

Getting Started with the CallPayMin API

A step-by-step guide to integrating video calls, billing, and AI summaries into your application.

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 calls
  • calls:read - Read call details
  • users:manage - Create and manage users
  • billing:read - View billing information

Step 2: Install the SDK

Install our official SDK for your platform:

npm
npm install @callpaymin/sdk

Step 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 begins
  • call.ended - When a call ends
  • call.billing.charged - When billing is processed
  • summary.ready - When AI summary is available

Next Steps