Get started
Make an account, get an API key, and take a test payment in five minutes.
How it works
- Your server creates a checkout for a price, with your secret key.
- The customer pays Munim, Inc. on the hosted checkout page.
- Munim records a transaction (and a subscription, for recurring prices), sends your webhooks, and updates the customer’s entitlements.
- Your earnings are held 7 days, then paid out on the 1st of the month to your bank.
Amounts are integers in cents, timestamps are Unix milliseconds, and the only currency is USD.
Make an account
Sign in at dashboard.billing.munimtech.com with Google, GitHub, Apple, or an email address (we send a 6-digit code). A new address gets a new account: your company, with its name and logo, and under it your projects (one per app or website) and their products. Invite teammates from the Team page.
Single sign-on. On a company email domain, the owner can connect the company’s identity provider (Okta, Microsoft Entra ID, Google Workspace, OneLogin, Auth0, or any OpenID Connect provider) under Settings. Colleagues then pick Continue with SSO, sign in at the provider and join the account. With “Require SSO” on, everyone at the domain must use it, except the owner, who can always use an emailed code in case the provider is down.
An AI agent can also make a test account for you with no sign-up, then send you a link to claim it. See Agents and MCP.
Test and live
Every account has two separate modes, each with its own API, keys and data. Nothing you make in test mode appears in live mode, so recreate products and prices with a live key when you go live.
| Test | Live | |
|---|---|---|
| Secret key | mb_test_sk_… | mb_live_sk_… |
| API | https://billing-sandbox-api.munimtech.com | https://billing-api.munimtech.com |
| Money | Nothing is charged | Real payments |
| Paying | Card 4242 4242 4242 4242, any future date, any CVC | Any real payment method |
The SDK picks the API from the key’s prefix. Sending a test key to the live API (or the other way round) fails with a 401 that says which API the key belongs to.
API keys
Create keys in the dashboard under Developers → API keys. A key is shown once. There are two kinds:
- Full access can do everything: create checkouts, refund payments, cancel subscriptions, connect databases.
- Read-only can make GET requests and build reports (
POST /v1/reports), for BI tools and syncing data out. Anything else returns 403.
Keys belong on your server, never in an app or web page. Store it as MUNIM_BILLING_SECRET_KEY and send it as a bearer token:
Authorization: Bearer mb_test_sk_…url to the client.Your first checkout in five minutes
Install the SDK
It has no dependencies and runs on Node, Bun, Deno, Cloudflare Workers, Vercel Edge and Convex actions. You can also call the REST API with any HTTP client.
Terminalnpm install munim-billingMake something to sell
Once, in the dashboard (Products) or with the API: a product and a price for it.
curl https://billing-sandbox-api.munimtech.com/v1/products \ -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "Pro"}' curl https://billing-sandbox-api.munimtech.com/v1/prices \ -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "product_id": "pro_…", "unit_amount": 999, "currency": "usd", "type": "recurring", "interval": "month" }'import { MunimBilling } from 'munim-billing' const munim = new MunimBilling(process.env.MUNIM_BILLING_SECRET_KEY!) const product = await munim.products.create({ name: 'Pro' }) const price = await munim.prices.create({ product_id: product.id, unit_amount: 999, // $9.99 currency: 'usd', type: 'recurring', interval: 'month', })Create a checkout
Per purchase, on your server. Pass your own user id as
app_user_idso the purchase counts toward that user’s entitlements.curl https://billing-sandbox-api.munimtech.com/v1/checkouts \ -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "price_id": "pri_…", "app_user_id": "user_123", "customer_email": "[email protected]", "success_url": "https://example.com/billing/done", "cancel_url": "https://example.com/pricing" }'// In a route your app calls, e.g. POST /api/checkout const checkout = await munim.checkouts.create({ price_id: price.id, app_user_id: user.id, // links the purchase to your user customer_email: user.email, success_url: 'https://example.com/billing/done', // or myapp://billing/done cancel_url: 'https://example.com/pricing', }) return Response.json({ url: checkout.url })Response{ "id": "chk_…", "object": "checkout", "status": "open", "url": "https://billing-sandbox-api.munimtech.com/checkout/chk_…", "price_id": "pri_…", "amount_total": 999, "currency": "usd", "mode": "subscription", "app_user_id": "user_123", "expires_at": 1764547200000, "...": "..." }Pay
Open
url(a redirect, the web overlay or the React Native sheet; see Checkout) and pay with4242 4242 4242 4242. The transaction shows up in the dashboard right away.Check access
Ask who has what by your own user id. With an entitlement called
pro(create it under App Store & Play, or withPOST /v1/entitlements) granted by your product:curl https://billing-sandbox-api.munimtech.com/v1/subscribers/user_123 \ -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"const subscriber = await munim.subscribers.retrieve(user.id) const isPro = subscriber.entitlements.pro?.active === trueOr get told: webhooks fire on every payment, and the database sync keeps a copy in your own tables.
Going live
- Fill in your business details in Settings (name, support email, website, card statement name).
- Create a live key, and recreate your products and prices with it.
- Connect your bank for payouts under Payouts. Only the account owner can do this. See Payouts and fees.
- Add a live webhook endpoint; it has its own signing secret.