Billing
Get public plans (no auth required)
**Customer subscription flow — Step 1.** Returns all active plans for the project. Use a plan's _id as planId in the checkout request. No authentication required (for pricing/checkout pages).
GET
/api/billing/public/projects/{projectId}/plansSDK setup
Create a client instance. No authentication is required for this endpoint.
import { Configuration, BillingApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const billing = new BillingApi(configuration);import { Configuration, BillingApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const billing = new BillingApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await billing.getPublicPlans("proj_tN6qfQj73QVU");const { data: result } = await billing.getPublicPlans("proj_tN6qfQj73QVU");Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Public — No Auth Required
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | — |
Responses
200Public plans list
json
{
"plans": [
{
"_id": "65a1b2c3d4e5f6789012345d",
"name": "Pro Plan",
"price": 29.99,
"currency": "USD",
"interval": "month",
"features": [
"Unlimited API calls"
]
}
]
}{
"plans": [
{
"_id": "65a1b2c3d4e5f6789012345d",
"name": "Pro Plan",
"price": 29.99,
"currency": "USD",
"interval": "month",
"features": [
"Unlimited API calls"
]
}
]
}