Billing & Plans
Subscription management, credit purchase, and usage tracking.
Billing & Plans
Manage subscriptions, purchase credits, and track usage across all MondialSpeech services.
Plans & Subscriptions
List Available Plans
curl -X GET https://api.mondialspeech.com/api/v1/plans \
-H "Authorization: Bearer <ACCESS_TOKEN>"Get Specific Plan
curl -X GET https://api.mondialspeech.com/api/v1/plans/{id} \
-H "Authorization: Bearer <ACCESS_TOKEN>"Subscribe to Plan
curl -X POST https://api.mondialspeech.com/api/v1/billing/subscribe \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"planId":"<PLAN_ID>"}'Cancel Subscription
curl -X POST https://api.mondialspeech.com/api/v1/billing/cancel-subscription \
-H "Authorization: Bearer <ACCESS_TOKEN>"Credit Management
Purchase Credits
curl -X POST https://api.mondialspeech.com/api/v1/billing/credits \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"tokens":50000}'Credit Packages
- Starter: 10,000 tokens - $10
- Professional: 50,000 tokens - $45
- Business: 100,000 tokens - $80
- Enterprise: 500,000 tokens - $350
Usage Tracking
Get Usage Statistics
curl -X GET https://api.mondialspeech.com/api/v1/profile/usage \
-H "Authorization: Bearer <ACCESS_TOKEN>"Response Example
{
"tokensRemaining": 45000,
"totalTokensPurchased": 100000,
"totalTokensUsed": 55000,
"usageByType": {
"tts": 30000,
"stt": 15000,
"music": 10000
},
"monthlyUsage": {
"current": 25000,
"limit": 200000,
"resetDate": "2024-02-01T00:00:00Z"
}
}Get Subscription Status
curl -X GET https://api.mondialspeech.com/api/v1/profile/subscription \
-H "Authorization: Bearer <ACCESS_TOKEN>"Plan Types
Free Plan
- Monthly tokens: 1,000
- Features: Basic TTS/STT
- Support: Community
- Price: Free
Starter Plan
- Monthly tokens: 10,000
- Features: All TTS/STT/Music
- Support: Email
- Price: $9.99/month
Professional Plan
- Monthly tokens: 50,000
- Features: All features + Projects
- Support: Priority email
- Price: $29.99/month
Business Plan
- Monthly tokens: 200,000
- Features: All features + Agents
- Support: Phone + Email
- Price: $99.99/month
Enterprise Plan
- Monthly tokens: 1,000,000
- Features: All features + Admin
- Support: Dedicated manager
- Price: Custom pricing
Agent Billing
Agent Plans
- Agent Starter: 100 minutes/month - $19.99
- Agent Professional: 500 minutes/month - $79.99
- Agent Business: 2,000 minutes/month - $249.99
- Agent Enterprise: 10,000 minutes/month - $999.99
Agent Usage Tracking
curl -X GET https://api.mondialspeech.com/api/v1/agents/{agentId}/usage \
-H "Authorization: Bearer <ACCESS_TOKEN>"Payment Methods
Stripe Integration
- Credit cards: Visa, MasterCard, American Express
- Digital wallets: Apple Pay, Google Pay
- Bank transfers: SEPA, ACH
- Cryptocurrency: Bitcoin, Ethereum (Enterprise)
Billing Cycles
- Monthly: Recurring monthly charges
- Annual: 20% discount on yearly plans
- Pay-as-you-go: Credit-based usage
Cost Estimation
TTS Costs
- Standard voices: 1 token per character
- Premium voices: 2 tokens per character
- Custom voices: 3 tokens per character
STT Costs
- Standard quality: 0.5 tokens per second
- High quality: 1 token per second
- Premium quality: 2 tokens per second
Music Costs
- Basic quality: 10 tokens per second
- High quality: 20 tokens per second
- Premium quality: 40 tokens per second
Agent Costs
- GPT-3.5-turbo: 0.1 minutes per interaction
- GPT-4: 0.5 minutes per interaction
- GPT-4o: 1 minute per interaction
Error Handling
402 Payment Required (Insufficient Tokens)
{ "error": "Insufficient tokens", "tokens_needed": 1234 }402 Payment Required (Plan Limit)
{
"error": "Plan limit reached",
"tokens_needed": 5000,
"monthly_limit": 200000,
"used_this_month": 198000
}402 Payment Required (Insufficient Minutes)
{ "error": "Insufficient agent minutes", "minutes_needed": 10 }Webhook Integration
Stripe Webhooks
# Webhook endpoint
POST /api/v1/billing/webhookWebhook Events
- payment_succeeded: Successful payment
- payment_failed: Failed payment
- subscription_created: New subscription
- subscription_cancelled: Cancelled subscription
- invoice_payment_succeeded: Invoice paid
Best Practices
Cost Optimization
- Monitor usage regularly
- Choose appropriate plans for your needs
- Use cost estimation before generation
- Optimize content for efficiency
Billing Management
- Set up alerts for low credits
- Monitor monthly usage patterns
- Plan for peak usage periods
- Review and adjust plans regularly
