Mahoosuc Billing Service API
Generated from
services/billing/openapi.yaml. Runnpm run docs:generateto refresh.
|
| Field | Value |
|---|---|
| Version | 1.0.0 |
Servers
http://localhost:3120/api/v1— Development serverhttps://billing.mahoosuc.com/api/v1— Production server
Endpoints (18)
| Method | Path | Summary |
|---|---|---|
GET | /tiers | List all subscription tiers |
GET | /tiers/{code} | Get tier details by code |
GET | /tiers/{code}/limits/{product} | Get product-specific limits for a tier |
GET | /products | List all registered products |
POST | /products | Register a new product |
GET | /products/{code} | Get product details by code |
GET | /subscriptions | List user subscriptions |
POST | /subscriptions | Create a new subscription |
GET | /subscriptions/{id} | Get subscription details |
PATCH | /subscriptions/{id} | Update subscription |
DELETE | /subscriptions/{id} | Cancel subscription |
POST | /subscriptions/{id}/retry | Retry failed payment |
POST | /usage | Record usage event |
GET | /usage/current | Get current usage for a feature |
GET | /usage/history | Get usage history |
POST | /usage/check-limit | Check if usage is within limits |
GET | /usage/summary | Get usage summary for period |
POST | /webhooks/stripe | Handle Stripe webhook events |
GET /tiers
List all subscription tiers
|
Operation ID: listTiers
Tags: Tiers
GET /tiers/{code}
Get tier details by code
Returns detailed information about a specific subscription tier
Operation ID: getTier
Tags: Tiers
GET /tiers/{code}/limits/{product}
Get product-specific limits for a tier
Returns feature limits for a specific product within a subscription tier
Operation ID: getTierLimits
Tags: Tiers
GET /products
List all registered products
Returns a list of all products registered with the billing service
Operation ID: listProducts
Tags: Products
POST /products
Register a new product
|
Operation ID: registerProduct
Tags: Products
GET /products/{code}
Get product details by code
Returns detailed information about a specific product
Operation ID: getProduct
Tags: Products
GET /subscriptions
List user subscriptions
Returns all subscriptions for the authenticated user
Operation ID: listSubscriptions
Tags: Subscriptions
POST /subscriptions
Create a new subscription
|
Operation ID: createSubscription
Tags: Subscriptions
GET /subscriptions/{id}
Get subscription details
Returns detailed information about a specific subscription
Operation ID: getSubscription
Tags: Subscriptions
PATCH /subscriptions/{id}
Update subscription
|
Operation ID: updateSubscription
Tags: Subscriptions
DELETE /subscriptions/{id}
Cancel subscription
|
Operation ID: cancelSubscription
Tags: Subscriptions
POST /subscriptions/{id}/retry
Retry failed payment
Retry payment for a subscription with past_due or incomplete status
Operation ID: retrySubscriptionPayment
Tags: Subscriptions
POST /usage
Record usage event
|
Operation ID: recordUsage
Tags: Usage
GET /usage/current
Get current usage for a feature
Returns current usage count for a specific product feature
Operation ID: getCurrentUsage
Tags: Usage
GET /usage/history
Get usage history
Returns paginated usage history with optional filtering
Operation ID: getUsageHistory
Tags: Usage
POST /usage/check-limit
Check if usage is within limits
|
Operation ID: checkUsageLimit
Tags: Usage
GET /usage/summary
Get usage summary for period
Returns aggregated usage summary across all products and features
Operation ID: getUsageSummary
Tags: Usage
POST /webhooks/stripe
Handle Stripe webhook events
|
Operation ID: handleStripeWebhook
Tags: Webhooks