Overview
CallPayMin is perfect for building expert marketplaces - platforms that connect professionals (experts) with people seeking advice (clients). This guide covers the architecture and API flows you'll need.
Marketplace Architecture
Key Components
Experts (Supply)
- • Profile & bio
- • Rate per minute
- • Availability calendar
- • Expertise categories
- • Stripe Connect account
Clients (Demand)
- • Account balance
- • Payment method
- • Booking history
- • Saved experts
Step 1: User Registration
Create users in CallPayMin when they sign up on your platform:
// When an expert signs up
const expert = await client.users.create({
externalId: 'your-db-user-id',
role: 'expert',
email: 'expert@example.com',
name: 'Dr. Jane Smith',
profile: {
title: 'Startup Advisor',
bio: '20 years experience in tech startups...',
categories: ['business', 'startups', 'fundraising'],
},
billing: {
ratePerMinute: 5.00, // $5/minute
currency: 'usd',
},
});// When a client signs up
const client = await client.users.create({
externalId: 'your-db-user-id',
role: 'quester',
email: 'client@example.com',
name: 'John Doe',
});
// Add initial balance (if Self-Managed)
// Or set up payment method (if Fully Managed)Step 2: Booking Flow
When a client wants to book a call with an expert:
// Create the call
const call = await client.calls.create({
expertId: 'expert_123',
questerId: 'client_456',
type: 'video',
scheduledAt: '2025-01-20T14:00:00Z', // Optional: for scheduled calls
billingMode: 'per_minute',
settings: {
recording: true,
aiSummary: true,
maxDuration: 60, // 60 minutes max
},
});
// Send join links
sendEmail(expert.email, {
subject: 'Upcoming Call',
joinUrl: call.expertJoinUrl,
});
sendEmail(client.email, {
subject: 'Your Call is Confirmed',
joinUrl: call.questerJoinUrl,
});Step 3: Handle Webhooks
Listen for events to update your platform in real-time:
app.post('/webhooks/callpaymin', (req, res) => {
const event = req.body;
switch (event.type) {
case 'call.started':
// Update your UI to show call is active
notifyUser(event.data.questerId, 'Call started!');
break;
case 'call.ended':
// Update call record in your database
updateCallRecord(event.data.callId, {
duration: event.data.duration,
cost: event.data.cost,
});
break;
case 'summary.ready':
// AI summary is available
const summary = event.data.summary;
sendEmail(event.data.questerId, {
subject: 'Your Call Summary',
body: summary.keyPoints,
});
break;
case 'user.balance_low':
// Prompt user to add funds
sendEmail(event.data.userId, {
subject: 'Low Balance Alert',
body: 'Add funds to continue booking calls.',
});
break;
}
res.status(200).json({ received: true });
});Revenue Model
With CallPayMin, you can implement various revenue models:
Platform Fee
Take a percentage of each call. E.g., expert charges $5/min, you keep 20% ($1/min).
Subscription
Charge experts a monthly fee for premium placement and features.
Credits
Sell credit packages at a markup. Users buy credits, you pocket the margin.
Freemium
Offer free minutes, charge for premium features like recordings or AI summaries.
Next Steps
Ready to build your marketplace? Check out the API documentation and sign up for a free account to get started.