billing
Check subscription status (public)
Check whether a customer (by email) has an active subscription for the project. Public; no auth required.
GET
/api/billing/public/projects/{projectId}/subscriptionAuthentication
Public — No Auth Required
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | Project ID (MongoDB ObjectId) for the billing project. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Customer email to check subscription for |
SDK setup
Create a client instance. No authentication is required for this endpoint.
import { MudbaseClient } from "mudbase";
const client = new MudbaseClient();import { MudbaseClient } from "mudbase";
const client = new MudbaseClient();Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const result = await client.billing.checkSubscription({
projectId: "proj_I4Vr6dSxzPGL"
});const result = await client.billing.checkSubscription({
projectId: "proj_I4Vr6dSxzPGL"
});Try It Live
Test 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
Responses
200Subscription status
json
{
"hasSubscription": true,
"subscription": {
"status": "active",
"plan": "65a1b2c3d4e5f6789012345d"
}
}{
"hasSubscription": true,
"subscription": {
"status": "active",
"plan": "65a1b2c3d4e5f6789012345d"
}
}401Authentication required or invalid token.
403Access denied or insufficient permissions.
Errors
| Code | Meaning |
|---|---|
401 | Authentication required or invalid token. |
403 | Access denied or insufficient permissions. |