Build subscription businesses with mobile money across Africa. RESTful APIs, webhooks, and SDKs for every platform.
Simple, intuitive APIs that get you up and running fast
View Full API Referenceconst subscription = await mernphis.subscriptions.create({
customerId: "cus_123456",
planId: "plan_premium",
billingCycle: "monthly",
trialDays: 14
});
console.log(subscription.id); // sub_789012Official libraries in your favorite language
Use Mernphis APIs to build platforms that transform traditional businesses (barbershops, restaurants, salons) into subscription businesses
Build a SaaS platform for local service businesses. Use Mernphis APIs to power subscription billing, mobile money payments, and customer management for barbershops, salons, gyms, and more.
Create vertical SaaS for specific industries. Build a "Car Wash Management System" or "Restaurant Membership Platform" powered by Mernphis subscription APIs.
// Create subscription plan for "Monthly Grooming Package"
const plan = await mernphis.plans.create({
name: "Monthly Grooming Package",
amount: 5000, // 5,000 TZS
currency: "TZS",
interval: "month",
features: ["Unlimited haircuts", "Free beard trim", "Priority booking"]
});
// Subscribe customer
const subscription = await mernphis.subscriptions.create({
customerId: "cus_barber_client_001",
planId: plan.id,
paymentMethod: "mobile_money",
mobileNumber: "+255712345678"
});
// Listen for payment events
mernphis.webhooks.on('subscription.payment_succeeded', (event) => {
// Send access code to customer
// Update your app's membership status
console.log(`Payment successful for ${event.customerId}`);
});This simple integration lets you build a subscription platform for any traditional business. Mernphis handles billing, mobile money, reminders, and revenue tracking β you focus on the industry-specific features.
Common questions about building with Mernphis APIs
Yes! Mernphis APIs handle mobile money integration with M-Pesa, MTN Mobile Money, Airtel Money, and other providers across 10+ African countries. You make one API call to create a subscription, and Mernphis handles the payment gateway integration, USSD prompts, and payment reconciliation. No need to integrate with multiple payment providers separately.
Absolutely! Many developers use Mernphis to power multi-tenant subscription platforms. Each of your business clients gets their own Mernphis workspace (or you manage everything under one workspace with customer segmentation). Use the Mernphis API to create subscriptions, process payments, and track revenue for each of your clients. Perfect for building white-label subscription solutions.
Mernphis provides official SDKs for JavaScript/TypeScript, Python, Ruby, Swift, and Kotlin. The Mernphis API is REST-based with standard JSON responses, so you can use it with any programming language that makes HTTP requests. Whether you're building with Node.js, Django, Rails, React Native, or Flutter, Mernphis works seamlessly.
Mernphis sends webhook notifications to your server when subscription events occur (payment succeeded, subscription renewed, payment failed, etc.). You register a webhook URL in your Mernphis dashboard, and we POST event data to that endpoint in real-time. Use webhooks to update your database, send notifications to users, or trigger other workflows. All webhook payloads include a signature for security verification.
Yes! Mernphis APIs are perfect for mobile apps. Use our Swift SDK for iOS apps or Kotlin SDK for Android apps. Build native mobile experiences where users can subscribe, manage their subscriptions, update payment methods, and receive push notifications β all powered by Mernphis backend APIs handling the subscription billing and mobile money payments.
Yes! Mernphis APIs support usage-based billing for metered services. Send usage data to Mernphis throughout the billing cycle, and we calculate the bill based on consumption. Perfect for WiFi businesses (billing per GB), API services (billing per request), or utility companies (billing per unit consumed). Combine subscription fees with usage charges using the Mernphis API.
Mernphis provides a complete test mode environment. Toggle between test and live mode in your dashboard, and use test API keys to make API calls without processing real payments. In test mode, you can simulate successful payments, failed payments, subscription renewals, and more. Perfect for development and QA testing before launching your subscription product.
Mernphis API rate limits depend on your plan. Free tier allows 100 requests per minute, which is plenty for most applications. Growth and Enterprise plans have higher limits (1,000+ requests per minute). If you're building a high-traffic application, contact our team to discuss custom rate limits. Mernphis APIs are designed to scale with your business.