Munim Technologies

API reference

Every Munim Billing REST endpoint, with its parameters and what it returns.

Basics

Livehttps://billing-api.munimtech.com
Testhttps://billing-sandbox-api.munimtech.com
AuthAuthorization: Bearer mb_…_sk_…
FormatJSON in and out. Only GET and POST (updates and deletes are POSTs).
MoneyIntegers in cents. USD only.
TimeUnix milliseconds.
IdsPrefixed: pro_, pri_, chk_, ctm_, txn_, sub_, po_, evt_, whk_, ent_, app_, ssub_, prj_, rpt_, int_, pex_, pq_, sel_.
ListsNewest first, limit 1–100 (default 25) and cursor; they return { object: "list", data, has_more, next_cursor }.
Errors{ error: { type, message, param? } }. See Errors.

Examples use the test API. The munim-billing SDK has a method for most endpoints (listed with each), and every MCP tool calls one of these routes.

Sign-up and sign-in

No key needed. These make a key.

POST/v1/sandbox

Makes a new test account instantly, with no sign-up. Test API only.

Body
namestring
Business or app name shown on the checkout.
Returns{ object: "sandbox", api_key, claim_url, expires_at, api_base, mcp_url, account, next_steps }
KeyNone needed
MCP toolcreate_sandbox
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/sandbox

POST/v1/auth/start

Emails a 6-digit code to the person (an account is made if they don't have one).

Body
emailstringrequired
The person's email address.
Returns{ ok: true, email, next }
KeyNone needed
MCP toolsign_in
Example
curl https://billing-sandbox-api.munimtech.com/v1/auth/start \
  -H "Content-Type: application/json" \
  -d '{"email": "…"}'

POST/v1/auth/verify

Checks the code and returns a new secret key (on live, a test key too). Shown once.

Body
emailstringrequired
Same email as /v1/auth/start.
codestringrequired
The 6-digit code from the email.
accountstring
sel_… to pick one of several accounts (default: the one used last).
key_namestring
A name for the key.
Returns{ object: "sign_in", role, api_key, api_key_id, test_api_key, api_base, mcp_url, account }
KeyNone needed
MCP toolverify_sign_in
Example
curl https://billing-sandbox-api.munimtech.com/v1/auth/verify \
  -H "Content-Type: application/json" \
  -d '{"email": "…", "code": "…"}'

Account

GET/v1/account

The account and its setup checklist (setup.steps: what's done, what's next, which call does it).

ReturnsAccount
KeyAny key, including read-only
MCP toolget_account
Example
curl https://billing-sandbox-api.munimtech.com/v1/account \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/account

Sets the business details shown on checkouts and card statements.

Body
namestring
Business or app name.
support_emailstring
Where customers can get help.
websitestring
https://…
statement_namestring
Up to 22 letters, numbers, spaces, dots, dashes; shown after 'MUNIM* ' on card statements.
ReturnsAccount
KeyFull access
MCP toolupdate_account
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/account \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/account/claim

Sandboxes: emails a code to the person who should own it.

Body
emailstringrequired
The person's email address.
Returns{ ok: true, email }
KeyFull access
MCP toolclaim_sandbox
Example
curl https://billing-sandbox-api.munimtech.com/v1/account/claim \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "…"}'

POST/v1/account/claim/verify

Checks the code; the sandbox then belongs to that email and no longer expires.

Body
emailstringrequired
Same email as /v1/account/claim.
codestringrequired
The 6-digit code from the email.
ReturnsAccount
KeyFull access
MCP toolverify_claim
Example
curl https://billing-sandbox-api.munimtech.com/v1/account/claim/verify \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "…", "code": "…"}'

POST/v1/account/claim_link

A fresh claim_url for an unclaimed sandbox (older links stop working).

Returns{ claim_url }
KeyFull access
MCP toolget_claim_link
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/account/claim_link \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/checkout_settings

The hosted checkout's template, brand color, logo, theme and corners.

ReturnsCheckout settings
KeyAny key, including read-only
MCP toolget_checkout_settings
Example
curl https://billing-sandbox-api.munimtech.com/v1/checkout_settings \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/checkout_settings

Changes how the hosted checkout looks.

Body
templatestring
sheet (mobile sheet), split (desktop two-column) or compact (embeds).
brand_colorstring
#RRGGBB for buttons.
logo_urlstring
https:// logo, shown when a product has no image (null clears).
themestring
auto, light or dark.
cornersstring
rounded, sharp or pill.
ReturnsCheckout settings
KeyFull access
MCP toolupdate_checkout_settings
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/checkout_settings \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Products

The Product object
{
  "id": "pro_…",
  "object": "product",
  "name": "Pro",
  "description": null,
  "image_url": null,
  "tax_code": "txcd_10103001",
  "project_id": null,
  "status": "active",
  "metadata": {},
  "created_at": 1764460800000
}

POST/v1/products

Creates a product.

Body
namestringrequired
Product name shown on the checkout.
descriptionstring
Shown under the name.
image_urlstring
https:// image.
tax_codestring
Stripe Tax code (default txcd_10103001, SaaS for business).
project_idstring
prj_… the app or website it belongs to.
metadataobject
Your own key/value strings (up to 20 keys).
ReturnsProduct
KeyFull access
SDKmunim.products.create
MCP toolcreate_product
Example
curl https://billing-sandbox-api.munimtech.com/v1/products \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "…"}'

GET/v1/products

Products, newest first.

Query parameters
project_idstring
prj_… to filter by.
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: Product[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.products.list
MCP toollist_products
Example
curl https://billing-sandbox-api.munimtech.com/v1/products \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/products/:id

One product.

ReturnsProduct
KeyAny key, including read-only
SDKmunim.products.retrieve
Example
curl https://billing-sandbox-api.munimtech.com/v1/products/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/products/:id

Changes a product. status archived hides it from new checkouts; a new project_id moves its past sales too.

Body
namestring
New name.
descriptionstring | null
New description.
image_urlstring | null
https:// image.
tax_codestring | null
Stripe Tax code.
project_idstring | null
Moves it to another project; null clears.
statusstring
active or archived.
metadataobject
Your own key/value strings (up to 20 keys).
ReturnsProduct
KeyFull access
SDKmunim.products.update
MCP toolupdate_product
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/products/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Prices

The Price object
{
  "id": "pri_…",
  "object": "price",
  "product_id": "pro_…",
  "description": "Monthly",
  "unit_amount": 999,
  "currency": "usd",
  "type": "recurring",
  "interval": "month",
  "interval_count": 1,
  "trial_days": 7,
  "status": "active",
  "metadata": {},
  "created_at": 1764460800000
}

POST/v1/prices

Creates a price for a product. Its amount can't change later.

Body
product_idstringrequired
pro_…
unit_amountintegerrequired
Cents, at least 50 (999 = $9.99).
currencystringrequired
Only usd.
typestringrequired
one_time or recurring.
intervalstring
Recurring: day, week, month or year.
interval_countinteger
Bill every N intervals (default 1).
trial_daysinteger
Free trial days for recurring prices.
descriptionstring
e.g. 'Monthly'.
metadataobject
Your own key/value strings (up to 20 keys).
ReturnsPrice
KeyFull access
SDKmunim.prices.create
MCP toolcreate_price
Example
curl https://billing-sandbox-api.munimtech.com/v1/prices \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "…", "unit_amount": 0, "currency": "…", "type": "…"}'

GET/v1/prices

Prices, newest first.

Query parameters
product_idstring
pro_… to filter by.
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: Price[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.prices.list
MCP toollist_prices
Example
curl https://billing-sandbox-api.munimtech.com/v1/prices \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/prices/:id

One price.

ReturnsPrice
KeyAny key, including read-only
SDKmunim.prices.retrieve
Example
curl https://billing-sandbox-api.munimtech.com/v1/prices/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/prices/:id

Changes a price's description, status or metadata (not its amount).

Body
descriptionstring | null
New description.
statusstring
active or archived.
metadataobject
Your own key/value strings (up to 20 keys).
ReturnsPrice
KeyFull access
SDKmunim.prices.update
MCP toolupdate_price
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/prices/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Checkouts

The Checkout object
{
  "id": "chk_…",
  "object": "checkout",
  "project_id": null,
  "status": "completed",
  "url": "https://billing-api.munimtech.com/checkout/chk_…",
  "price_id": "pri_…",
  "product_id": "pro_…",
  "quantity": 1,
  "amount_subtotal": 999,
  "amount_tax": 0,
  "amount_total": 999,
  "currency": "usd",
  "mode": "subscription",
  "template": null,
  "customer_id": "ctm_…",
  "customer_email": "[email protected]",
  "app_user_id": "user_123",
  "success_url": "https://example.com/billing/done",
  "cancel_url": null,
  "transaction_id": "txn_…",
  "subscription_id": "sub_…",
  "metadata": {},
  "expires_at": 1764547200000,
  "created_at": 1764460800000
}

POST/v1/checkouts

A hosted checkout page for one price. Send the customer to its url.

Body
price_idstring
pri_… (required unless pricing_quote_id is given).
pricing_quote_idstring
pq_… from POST /v1/pricing/quote: sells at the price Munim Autopilot Pricing picked.
quantityinteger
Default 1.
customer_emailstring
Prefills the email.
customer_idstring
ctm_… of an existing customer.
app_user_idstring
Your own user id, to link the purchase to entitlements.
success_urlstring
https:// or myapp:// URL to go to after paying (checkout_id is appended).
cancel_urlstring
Where the back / cancel link goes.
templatestring
sheet, split or compact (default: the account's).
metadataobject
Your own key/value strings (up to 20 keys).
ReturnsCheckout
KeyFull access
SDKmunim.checkouts.create
MCP toolcreate_checkout
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/checkouts \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/checkouts

Checkouts, newest first: open ones still waiting for a buyer, completed ones (with their transaction or subscription) and expired ones.

Query parameters
statusstring
open, completed or expired.
project_idstring
prj_…
customer_idstring
ctm_…
app_user_idstring
Your user id, as passed when creating it.
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: Checkout[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.checkouts.list
MCP toollist_checkouts
Example
curl https://billing-sandbox-api.munimtech.com/v1/checkouts \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/checkouts/:id

A checkout's status (open, completed, expired) and the transaction or subscription it made.

ReturnsCheckout
KeyAny key, including read-only
SDKmunim.checkouts.retrieve
MCP toolget_checkout
Example
curl https://billing-sandbox-api.munimtech.com/v1/checkouts/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Customers

The Customer object
{
  "id": "ctm_…",
  "object": "customer",
  "email": "[email protected]",
  "name": "Jane Doe",
  "metadata": {},
  "created_at": 1764460800000
}

GET/v1/customers

Customers, newest first.

Query parameters
emailstring
Exact email to look up.
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: Customer[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.customers.list
MCP toollist_customers
Example
curl https://billing-sandbox-api.munimtech.com/v1/customers \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/customers/:id

One customer.

ReturnsCustomer
KeyAny key, including read-only
SDKmunim.customers.retrieve
Example
curl https://billing-sandbox-api.munimtech.com/v1/customers/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Transactions

The Transaction object
{
  "id": "txn_…",
  "object": "transaction",
  "status": "completed",
  "kind": "new",
  "processor": "stripe",
  "payment_method": "card",
  "project_id": null,
  "customer_id": "ctm_…",
  "checkout_id": "chk_…",
  "subscription_id": "sub_…",
  "product_id": "pro_…",
  "price_id": "pri_…",
  "pricing_quote_id": null,
  "amount": 999,
  "currency": "usd",
  "tax": 0,
  "fee": 100,
  "net": 899,
  "refunded_amount": 0,
  "metadata": {},
  "created_at": 1764460800000
}

GET/v1/transactions

Payments, newest first, with Munim's fee and your net for each.

Query parameters
customer_idstring
ctm_… to filter by.
subscription_idstring
sub_… to filter by.
project_idstring
prj_… to filter by.
includestring
customer_email adds each one's customer email.
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: Transaction[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.transactions.list
MCP toollist_transactions
Example
curl https://billing-sandbox-api.munimtech.com/v1/transactions \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/transactions/:id

One payment.

ReturnsTransaction
KeyAny key, including read-only
SDKmunim.transactions.retrieve
MCP toolget_transaction
Example
curl https://billing-sandbox-api.munimtech.com/v1/transactions/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/transactions/:id/refund

Refunds a payment, all of it or part. In live mode this returns real money.

Body
amountinteger
Cents to refund (default: everything not yet refunded).
ReturnsTransaction
KeyFull access
SDKmunim.transactions.refund
MCP toolrefund_transaction
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/transactions/{id}/refund \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Subscriptions

The Subscription object
{
  "id": "sub_…",
  "object": "subscription",
  "status": "active",
  "processor": "stripe",
  "project_id": null,
  "customer_id": "ctm_…",
  "product_id": "pro_…",
  "price_id": "pri_…",
  "quantity": 1,
  "current_period_start": 1764460800000,
  "current_period_end": 1767139200000,
  "cancel_at_period_end": false,
  "canceled_at": null,
  "checkout_id": "chk_…",
  "metadata": {},
  "created_at": 1764460800000
}

GET/v1/subscriptions

Subscriptions, newest first.

Query parameters
customer_idstring
ctm_… to filter by.
statusstring
incomplete, trialing, active, past_due, paused or canceled.
project_idstring
prj_… to filter by.
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: Subscription[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.subscriptions.list
MCP toollist_subscriptions
Example
curl https://billing-sandbox-api.munimtech.com/v1/subscriptions \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/subscriptions/:id

One subscription.

ReturnsSubscription
KeyAny key, including read-only
SDKmunim.subscriptions.retrieve
MCP toolget_subscription
Example
curl https://billing-sandbox-api.munimtech.com/v1/subscriptions/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/subscriptions/:id/cancel

Cancels at the end of the paid period (default), or right away.

Body
at_period_endboolean
false cancels now (default true).
ReturnsSubscription
KeyFull access
SDKmunim.subscriptions.cancel
MCP toolcancel_subscription
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/subscriptions/{id}/cancel \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/subscriptions/:id/manage_url

A Munim-hosted page where the customer can see and cancel their subscription.

Returns{ url, expires_at }
KeyFull access
SDKmunim.subscriptions.manageUrl
MCP toolget_subscription_manage_url
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/subscriptions/{id}/manage_url \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Balance and payouts

The Payout object
{
  "id": "po_…",
  "object": "payout",
  "amount": 182400,
  "currency": "usd",
  "method": "stripe",
  "status": "paid",
  "failure_reason": null,
  "created_at": 1764547200000,
  "paid_at": 1764633600000
}

GET/v1/balance

Earnings available to pay out, still in the 7-day hold, and paid out so far (cents).

Returns{ object: "balance", currency, available, pending, paid_out }
KeyAny key, including read-only
SDKmunim.balance.retrieve
MCP toolget_balance
Example
curl https://billing-sandbox-api.munimtech.com/v1/balance \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/payouts

Payouts: monthly, on the 1st, to your bank.

Query parameters
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: Payout[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.payouts.list
MCP toollist_payouts
Example
curl https://billing-sandbox-api.munimtech.com/v1/payouts \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Webhook endpoints

GET/v1/webhook_endpoints

Webhook endpoints and their recent deliveries.

Returns{ object: "list", data: WebhookEndpoint[], has_more, next_cursor }
KeyAny key, including read-only
MCP toollist_webhook_endpoints
Example
curl https://billing-sandbox-api.munimtech.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/webhook_endpoints

Adds an endpoint. Returns its signing secret (whsec_…) once.

Body
urlstringrequired
https:// URL on your server.
eventsstring[]
Event types to send (default: all).
project_idstring
Only this project's events (plus account-wide ones).
Returns{ id, url, events, project_id, secret, created_at }
KeyFull access
MCP toolcreate_webhook_endpoint
Example
curl https://billing-sandbox-api.munimtech.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "…"}'

POST/v1/webhook_endpoints/:id/delete

Stops sending events to an endpoint.

Returns{ ok: true }
KeyFull access
MCP tooldelete_webhook_endpoint
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/webhook_endpoints/{id}/delete \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/webhook_endpoints/:id/test

Sends a ping event; check the endpoint list for the delivery's result.

Returns{ ok: true }
KeyFull access
MCP toolsend_test_webhook
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/webhook_endpoints/{id}/test \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Events

The Event object
{
  "id": "evt_…",
  "object": "event",
  "type": "subscription.canceled",
  "created_at": 1764460800000,
  "project_id": null,
  "data": { "object": { "id": "sub_…", "object": "subscription", "status": "canceled", … } }
}

GET/v1/events

Everything that happened, as webhooks send it. With after, the events since, oldest first.

Query parameters
afterstring
'start', or the next_cursor / an event id from last time.
typestring
Comma-separated event types to include.
project_idstring
prj_… to filter by.
limitinteger
1–100 (default 50).
cursorstring
Without after: newest first, paged with next_cursor.
Returns{ object: "list", data: Event[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.events.list / events.since
MCP toollist_events
Example
curl https://billing-sandbox-api.munimtech.com/v1/events \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/events/:id

One event.

ReturnsEvent
KeyAny key, including read-only
SDKmunim.events.retrieve
Example
curl https://billing-sandbox-api.munimtech.com/v1/events/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Entitlements and subscribers

The Entitlement object
{
  "id": "ent_…",
  "object": "entitlement",
  "identifier": "pro",
  "description": "Everything in Pro",
  "product_ids": ["pro_…", "com.acme.notes.pro.monthly"],
  "created_at": 1764460800000
}

GET/v1/entitlements

Entitlements (like 'pro') and the products that grant them.

Returns{ object: "list", data: Entitlement[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.entitlements.list
MCP toollist_entitlements
Example
curl https://billing-sandbox-api.munimtech.com/v1/entitlements \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/entitlements

Creates an entitlement: a feature a purchase unlocks.

Body
identifierstringrequired
Lowercase id, e.g. 'pro' (a–z, 0–9, _ - .; up to 40).
descriptionstring
What it unlocks.
product_idsstring[]
pro_… ids and/or store product ids.
ReturnsEntitlement
KeyFull access
MCP toolcreate_entitlement
Example
curl https://billing-sandbox-api.munimtech.com/v1/entitlements \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"identifier": "…"}'

POST/v1/entitlements/:id

Changes an entitlement's description or products (its identifier can't change).

Body
descriptionstring
New description.
product_idsstring[]
Replaces the list.
ReturnsEntitlement
KeyFull access
MCP toolupdate_entitlement
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/entitlements/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/entitlements/:id/delete

Removes an entitlement.

Returns{ ok: true }
KeyFull access
MCP tooldelete_entitlement
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/entitlements/{id}/delete \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/subscribers/:app_user_id

One of your users, by your own id: active entitlements across web, App Store and Google Play.

Returns{ object: "subscriber", app_user_id, customer_id, entitlements, store_subscriptions, subscriptions }
KeyAny key, including read-only
SDKmunim.subscribers.retrieve
MCP toolget_subscriber
Example
curl https://billing-sandbox-api.munimtech.com/v1/subscribers/{app_user_id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

App Store and Google Play

The StoreSubscription object
{
  "id": "ssub_…",
  "object": "store_subscription",
  "platform": "apple",
  "app_user_id": "user_123",
  "product_id": "com.acme.notes.pro.monthly",
  "status": "active",
  "will_renew": true,
  "expires_at": 1767139200000,
  "environment": "production",
  "country": "US",
  "price_amount": 999,
  "currency": "usd",
  "created_at": 1764460800000,
  "updated_at": 1764460800000
}

POST/v1/receipts/apple

Verifies an App Store purchase with Apple and attaches it to your user.

Body
app_user_idstringrequired
Your user id.
transaction_idstring
StoreKit 2 transaction id…
signed_transactionstring
…or its signed JWS.
app_identifierstring
Bundle id, when you have more than one Apple app.
importboolean
true for a purchase made before the app was connected.
ReturnsStoreSubscription
KeyFull access
SDKmunim.receipts.apple
Example
curl https://billing-sandbox-api.munimtech.com/v1/receipts/apple \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"app_user_id": "…"}'

POST/v1/receipts/google

Verifies a Google Play purchase with Google and attaches it to your user.

Body
app_user_idstringrequired
Your user id.
product_idstringrequired
The Play product id.
purchase_tokenstringrequired
From Play Billing.
typestring
subscription or one_time.
app_identifierstring
Package name, when you have more than one Android app.
importboolean
true for a purchase made before the app was connected.
ReturnsStoreSubscription
KeyFull access
SDKmunim.receipts.google
Example
curl https://billing-sandbox-api.munimtech.com/v1/receipts/google \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"app_user_id": "…", "product_id": "…", "purchase_token": "…"}'

GET/v1/store_subscriptions

App Store and Google Play subscriptions Munim tracks, newest first.

Query parameters
app_user_idstring
Only this user's.
limitinteger
Page size, 1–100 (default 25).
cursorstring
next_cursor from the previous page.
Returns{ object: "list", data: StoreSubscription[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.storeSubscriptions.list
MCP toollist_store_subscriptions
Example
curl https://billing-sandbox-api.munimtech.com/v1/store_subscriptions \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/store_apps

Your App Store and Google Play apps, each with its setup checklist.

Returns{ object: "list", data: StoreApp[], has_more, next_cursor }
KeyAny key, including read-only
MCP toollist_store_apps
Example
curl https://billing-sandbox-api.munimtech.com/v1/store_apps \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/store_apps

Connects an iOS or Android app and sets it up: checks the keys, imports the product ids into an entitlement, and points the store's notifications at Munim.

Body
platformstringrequired
apple or google.
app_identifierstringrequired
iOS bundle id or Android package name.
apple_issuer_idstring
Apple: issuer ID.
apple_key_idstring
Apple: In-App Purchase key ID (10 characters).
apple_private_keystring
Apple: the In-App Purchase key's .p8 contents.
asc_key_idstring
Apple, optional: App Store Connect API key ID (App Manager role).
asc_private_keystring
Apple, optional: that key's .p8 contents.
google_service_account_jsonstring
Google: the service account's JSON key.
google_pubsub_topicstring
Google, optional: projects/<project>/topics/<name> Play Console already publishes to.
forward_urlstring
Optional https URL Munim passes each store notification on to.
app_namestring
Optional name to show.
entitlementstring
Entitlement to add the imported products to (default 'pro').
notificationsstring
auto (default) sets the store's notifications up; manual leaves them alone.
product_idsstring[]
Apple without an App Store Connect API key: the app's product ids.
ReturnsStoreApp (with setup.ready and setup.next_steps)
KeyFull access
MCP toolconnect_store_app
Example
curl https://billing-sandbox-api.munimtech.com/v1/store_apps \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform": "…", "app_identifier": "…"}'

POST/v1/store_apps/:id

Changes a store app's keys, App Store Connect key, forward_url ("" stops forwarding) or name. New keys are checked and setup runs again.

Body
apple_issuer_idstring
Apple: issuer ID.
apple_key_idstring
Apple: In-App Purchase key ID.
apple_private_keystring
Apple: .p8 contents.
asc_key_idstring
Apple: App Store Connect API key ID.
asc_private_keystring
Apple: App Store Connect API key .p8 contents.
google_service_account_jsonstring
Google: service account JSON.
forward_urlstring
https URL to pass notifications on to, or "" to stop.
app_namestring
Name to show.
ReturnsStoreApp
KeyFull access
MCP toolupdate_store_app
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/store_apps/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/store_apps/:id/setup

Re-checks the keys, re-imports products and sets up notifications again.

Body
entitlementstring
Entitlement to add the products to (default 'pro').
notificationsstring
auto (default) or manual.
google_pubsub_topicstring
Google, optional: existing topic Play Console publishes to.
ReturnsStoreApp
KeyFull access
MCP toolrun_store_app_setup
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/store_apps/{id}/setup \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/store_apps/:id/test_notification

Has the store send a test notification, waits a few seconds, and says whether it arrived.

Returns{ sent, delivered, detail }
KeyFull access
MCP toolsend_store_test_notification
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/store_apps/{id}/test_notification \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/store_apps/:id/delete

Stops tracking an app (its store subscriptions stay).

Returns{ ok: true }
KeyFull access
MCP tooldelete_store_app
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/store_apps/{id}/delete \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/store_fees

This month's tracked revenue and fee estimate (free up to $2,500 a month, then 1%), and past months.

ReturnsStore fees
KeyAny key, including read-only
MCP toolget_store_fees
Example
curl https://billing-sandbox-api.munimtech.com/v1/store_fees \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Projects

GET/v1/projects

Your apps and websites, with product and store app counts.

Returns{ object: "list", data: Project[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.projects.list
MCP toollist_projects
Example
curl https://billing-sandbox-api.munimtech.com/v1/projects \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/projects

Creates a project.

Body
namestringrequired
Name, e.g. the app's name.
kindstring
website, ios, android, desktop, game or other.
urlstring
https:// address.
icon_urlstring
https:// icon.
colorstring
#rrggbb for charts.
metadataobject
Your own key/value strings (up to 20 keys).
ReturnsProject
KeyFull access
SDKmunim.projects.create
MCP toolcreate_project
Example
curl https://billing-sandbox-api.munimtech.com/v1/projects \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "…"}'

GET/v1/projects/:id

One project.

ReturnsProject
KeyAny key, including read-only
SDKmunim.projects.retrieve
Example
curl https://billing-sandbox-api.munimtech.com/v1/projects/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/projects/:id

Changes a project.

Body
namestring
New name.
kindstring
website, ios, android, desktop, game or other.
urlstring | null
https:// address.
icon_urlstring | null
https:// icon.
colorstring | null
#rrggbb.
statusstring
active or archived.
metadataobject
Your own key/value strings (up to 20 keys).
ReturnsProject
KeyFull access
SDKmunim.projects.update
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/projects/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/projects/:id/assign

Moves products or store apps into the project. Their past sales move with them, in the background.

Body
product_idsstring[]
pro_… ids.
store_app_idsstring[]
app_… ids.
Returns{ project, moved: { products, store_apps } }
KeyFull access
SDKmunim.projects.assign
MCP toolassign_to_project
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/projects/{id}/assign \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Exports and reports

GET/v1/exports

Every dataset with its columns, filters and statuses.

Returns{ datasets: [{ id, name, description, columns, filters, statuses? }] }
KeyAny key, including read-only
SDKmunim.exports.list
Example
curl https://billing-sandbox-api.munimtech.com/v1/exports \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/exports/:dataset(.csv|.json|.ndjson)

The file itself, up to 50,000 rows. Datasets: transactions, subscriptions, customers, payouts, balance, products.

Query parameters
formatstring
csv (default), json or ndjson, if the path has no extension.
fromstring
YYYY-MM-DD (UTC), an ISO time or ms; inclusive.
tostring
YYYY-MM-DD (UTC), an ISO time or ms; inclusive.
project_idstring
prj_… to filter by.
statusstring
Only rows with this status.
sourcestring
web, store or all (transactions and subscriptions).
columnsstring
Comma-separated column keys, in order.
ReturnsThe file (text/csv, application/json or application/x-ndjson)
KeyAny key, including read-only
SDKmunim.exports.download
Example
curl https://billing-sandbox-api.munimtech.com/v1/exports/{dataset}.csv \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/reports

Builds an export in the background (up to 250,000 rows), kept 7 days. Read-only keys may call it.

Body
datasetstringrequired
transactions, subscriptions, customers, payouts, balance or products.
formatstring
csv (default), json or ndjson.
fromstring
YYYY-MM-DD (UTC), inclusive.
tostring
YYYY-MM-DD (UTC), inclusive.
project_idstring
prj_… to filter by.
statusstring
Only rows with this status.
sourcestring
web, store or all.
columnsstring[]
Column keys to include, in order.
ReturnsReport
KeyAny key, including read-only
SDKmunim.reports.create
MCP toolcreate_report
Example
curl https://billing-sandbox-api.munimtech.com/v1/reports \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dataset": "…"}'

GET/v1/reports

Your reports.

Returns{ object: "list", data: Report[], has_more, next_cursor }
KeyAny key, including read-only
SDKmunim.reports.list
Example
curl https://billing-sandbox-api.munimtech.com/v1/reports \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/reports/:id

A report's status, row count and (when ready) download_url.

ReturnsReport
KeyAny key, including read-only
SDKmunim.reports.retrieve
MCP toolget_report
Example
curl https://billing-sandbox-api.munimtech.com/v1/reports/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/report_schedules

Scheduled exports.

Returns{ object: "list", data: ReportSchedule[], has_more, next_cursor }
KeyAny key, including read-only
Example
curl https://billing-sandbox-api.munimtech.com/v1/report_schedules \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/report_schedules

Emails a report for the day, week or month that just ended. Up to 20.

Body
datasetstringrequired
As for reports.
frequencystringrequired
daily, weekly or monthly.
emailsstring[]
Up to 10 addresses.
namestring
A label.
format, project_id, status, source, columns—
As for reports.
Returns{ id, object: "report_schedule", name, dataset, format, frequency, project_id, columns, emails, last_run_at, next_run_at, created_at }
KeyFull access
Example
curl https://billing-sandbox-api.munimtech.com/v1/report_schedules \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dataset": "…", "frequency": "…"}'

POST/v1/report_schedules/:id/delete

Removes a schedule.

Returns{ ok: true }
KeyFull access
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/report_schedules/{id}/delete \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

Munim Autopilot Pricing

Turn Munim Autopilot Pricing on in the dashboard first; until then these return 403.

GET/v1/pricing

Whether it's on, its fee (fee_bps) and your experiments.

Returns{ enabled, fee_bps, experiments, … }
KeyAny key, including read-only
Example
curl https://billing-sandbox-api.munimtech.com/v1/pricing \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/pricing/experiments

Creates an experiment (a draft) over 2–6 of a product's prices.

Body
product_idstringrequired
pro_…
price_idsstring[]required
2 to 6 active prices with the same billing period; the first is the control.
segment_bystring[]
channel, platform, region, country, new_vs_returning, daypart, or signal:<name>.
objectivestring
revenue (default) or ltv.
sticky_daysinteger
1–90 (default 30).
store_product_idsobject
{ price_id: { apple, google } } store products for each price.
namestring
A label.
ReturnsExperiment
KeyFull access
Example
curl https://billing-sandbox-api.munimtech.com/v1/pricing/experiments \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "…", "price_ids": []}'

POST/v1/pricing/experiments/:id

Renames it, starts, pauses or ends it, or changes segments and objective before it starts.

Body
namestring
A label.
statusstring
running, paused or ended (ended can't restart).
segment_by, objective, sticky_days—
As above; only before it starts.
ReturnsExperiment
KeyFull access
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/pricing/experiments/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

GET/v1/pricing/experiments/:id/results

Each price's quotes, sales, revenue per visitor and chance of being best, overall and per segment, with a recommendation.

ReturnsResults
KeyAny key, including read-only
SDKmunim.pricing.results
MCP toolget_pricing_results
Example
curl https://billing-sandbox-api.munimtech.com/v1/pricing/experiments/{id}/results \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/pricing/experiments/:id/insights

A short written summary of what the test found.

Returns{ insights, generated_at }
KeyFull access
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/pricing/experiments/{id}/insights \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/pricing/quote

Picks which price to show this buyer. Pass the id as pricing_quote_id when creating the checkout.

Body
product_idstringrequired
pro_… with a running experiment.
app_user_idstring
Your user id (keeps their price the same).
anonymous_idstring
A stable id for a signed-out visitor.
customer_idstring
ctm_…
countrystring
Two-letter country code.
platformstring
web, ios, android, desktop or other.
channelstring
web or store (default: store for ios/android).
local_hourinteger
The buyer's local hour, 0–23.
Returns{ id, object: "pricing_quote", experiment_id, arm_id, product_id, price_id, unit_amount, currency, interval, store_product_id, segment, disclosure, expires_at }
KeyFull access
SDKmunim.pricing.quote
MCP toolget_pricing_quote
Example
curl https://billing-sandbox-api.munimtech.com/v1/pricing/quote \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "…"}'

POST/v1/pricing/signals

Your own attributes about a user, usable as signal:<name> segments.

Body
app_user_idstring
Your user id…
anonymous_idstring
…or a signed-out visitor's id.
attributesobjectrequired
Up to 10 short values (plan, engagement, cohort). Protected traits are refused.
Returns{ ok: true, attributes }
KeyFull access
SDKmunim.pricing.signals
Example
curl https://billing-sandbox-api.munimtech.com/v1/pricing/signals \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"attributes": {}}'

Database syncs

Connecting and changing a sync needs a full-access key.

The Integration object
{
  "id": "int_…",
  "object": "integration",
  "provider": "supabase",
  "name": "Supabase",
  "project_id": null,
  "status": "active",
  "target": { "label": "abcdefghijklmnopqrst", "url": null },
  "counts": { "transactions": 1840, "subscriptions": 312, "subscribers": 297 },
  "backfill": { "done": true, "synced": 2449 },
  "pending": 0,
  "last_synced_at": 1764460800000,
  "last_error": null,
  "created_at": 1764460800000
}

GET/v1/integrations

Your syncs, plus every provider's credential fields and setup files.

Returns{ providers, data: Integration[] }
KeyAny key, including read-only
SDKmunim.integrations.list
MCP toollist_integrations
Example
curl https://billing-sandbox-api.munimtech.com/v1/integrations \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/integrations

Keeps munim_transactions, munim_subscriptions and munim_subscribers up to date in your database.

Body
providerstringrequired
convex, supabase, neon, turso, d1 or endpoint.
credentialsobjectrequired
convex { deploy_key, url? } · supabase { access_token, project_ref } · neon { connection_string } · turso { url, auth_token } · d1 { account_id, database_id, api_token } · endpoint { url }. Sealed at rest; never shown again.
project_idstring
Only this project's rows (default: everything).
namestring
A label for it.
ReturnsIntegration (endpoint: with signing_secret, once)
KeyFull access
SDKmunim.integrations.create
MCP toolconnect_integration
Example
curl https://billing-sandbox-api.munimtech.com/v1/integrations \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider": "…", "credentials": {}}'

GET/v1/integrations/:id

One sync: status, rows synced, pending changes, last error.

ReturnsIntegration
KeyAny key, including read-only
SDKmunim.integrations.retrieve
MCP toolget_integration
Example
curl https://billing-sandbox-api.munimtech.com/v1/integrations/{id} \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/integrations/:id/test

Checks Munim can reach the database and the tables or sync function are there.

Returns{ ok, message }
KeyFull access
SDKmunim.integrations.test
MCP tooltest_integration
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/integrations/{id}/test \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/integrations/:id/resync

Sends every row again from the start (upserts, so nothing duplicates).

ReturnsIntegration
KeyFull access
SDKmunim.integrations.resync
MCP toolresync_integration
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/integrations/{id}/resync \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/integrations/:id/pause

Stops writing; changes keep collecting.

ReturnsIntegration
KeyFull access
SDKmunim.integrations.pause
MCP toolpause_integration
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/integrations/{id}/pause \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/integrations/:id/resume

Starts writing again, with everything that changed while paused.

ReturnsIntegration
KeyFull access
SDKmunim.integrations.resume
MCP toolresume_integration
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/integrations/{id}/resume \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/integrations/:id/rotate_secret

Custom endpoints: a new whsec_… secret, returned once. The old one stops working at once.

Returns{ id, signing_secret }
KeyFull access
SDKmunim.integrations.rotateSecret
MCP toolrotate_integration_secret
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/integrations/{id}/rotate_secret \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"

POST/v1/integrations/:id/delete

Stops syncing and forgets the credentials. Tables and rows stay.

Returns{ ok: true }
KeyFull access
SDKmunim.integrations.delete
MCP tooldelete_integration
Example
curl -X POST https://billing-sandbox-api.munimtech.com/v1/integrations/{id}/delete \
  -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"