Built for developers

Launch subscription products in minutes

Build subscription businesses with mobile money across Africa. RESTful APIs, webhooks, and SDKs for every platform.

Start coding in minutes

Simple, intuitive APIs that get you up and running fast

View Full API Reference
Create a subscription
Add a new subscription for a customer
const subscription = await mernphis.subscriptions.create({
  customerId: "cus_123456",
  planId: "plan_premium",
  billingCycle: "monthly",
  trialDays: 14
});

console.log(subscription.id); // sub_789012

SDKs for every platform

Official libraries in your favorite language

JS
Available

JavaScript/TypeScript

PY
Available

Python

RB
Available

Ruby

SW
Available

Swift

KT
Available

Kotlin

FL
Coming Soon

Flutter

RESTful API
Modern, intuitive REST endpoints with comprehensive documentation
Real-time Webhooks
Get instant notifications for subscription events and changes
GraphQL Support
Flexible queries with our GraphQL API for advanced use cases
πŸ’‘ Build Transformation Solutions

Help traditional businesses add subscription revenue

Use Mernphis APIs to build platforms that transform traditional businesses (barbershops, restaurants, salons) into subscription businesses

White-Label Subscription Platform

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.

Multi-tenant architecture using Mernphis API keys
Webhook notifications for payment events
Custom branded mobile apps with Mernphis backend

Industry-Specific Solutions

Create vertical SaaS for specific industries. Build a "Car Wash Management System" or "Restaurant Membership Platform" powered by Mernphis subscription APIs.

Custom pricing tiers (Basic, Premium, Unlimited)
Usage-based billing for metered services
Mobile money integration across 10+ African countries

Example: Barbershop Subscription Platform

// 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.

Developer FAQs

Common questions about building with Mernphis APIs

Does Mernphis provide APIs for mobile money payments across Africa?

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.

Can I build a multi-tenant SaaS platform using Mernphis?

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.

What programming languages can I use with Mernphis APIs?

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.

How do Mernphis webhooks work for real-time subscription events?

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.

Can I use Mernphis APIs to build mobile apps for subscription businesses?

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.

Does Mernphis support usage-based billing via API?

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.

How do I test Mernphis APIs before going live?

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.

What's the rate limit for Mernphis APIs?

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.

Start building today

Get your API keys and integrate subscriptions in minutes

Get started free