NNO Billing Service API
Billing, subscriptions, payments, and usage metering for the NNO platform.
Get active subscription for a platform
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/subscription?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X POST "https://billing.svc.nno.app/api/billing/subscription"{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X POST "https://billing.svc.nno.app/api/billing/subscription/cancel"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Upgrade or downgrade subscription tier
Request Body
application/json
"starter" | "growth" | "scale"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/api/billing/subscription/change-tier" \ -H "Content-Type: application/json" \ -d '{ "tier": "starter" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Preview proration before changing tier
Query Parameters
"starter" | "growth" | "scale"Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/subscription/proration-preview?tier=starter"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get current usage snapshot
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/usage/current?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get paginated usage history
Query Parameters
251 <= value <= 100Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/usage/history"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List distinct tenant IDs with usage data
Query Parameters
251 <= value <= 100Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/usage/entities"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List invoices (cursor-paginated)
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/invoices?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get a single Stripe invoice with line items
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/invoices/string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List payment methods for the platform's customer
Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/payment-methods"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Create a Stripe SetupIntent for payment method collection
Response Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/api/billing/setup-intent"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Create a Stripe Customer Portal session
Request Body
application/json
uriResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/api/billing/portal" \ -H "Content-Type: application/json" \ -d '{ "returnUrl": "http://example.com" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get a single invoice with line items
Path Parameters
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/invoices/string?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get daily usage time-series
Query Parameters
1 <= length^\d{4}-\d{2}-\d{2}$^\d{4}-\d{2}-\d{2}$Response Body
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/usage/daily?platformId=string&from=string&to=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get active usage alerts
Query Parameters
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://billing.svc.nno.app/api/billing/usage/alerts?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get active subscription for a platform
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/subscription?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X POST "https://billing.svc.nno.app/subscription"{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X POST "https://billing.svc.nno.app/subscription/cancel"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Upgrade or downgrade subscription tier
Request Body
application/json
"starter" | "growth" | "scale"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/subscription/change-tier" \ -H "Content-Type: application/json" \ -d '{ "tier": "starter" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Preview proration before changing tier
Query Parameters
"starter" | "growth" | "scale"Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/subscription/proration-preview?tier=starter"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get current usage snapshot
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/usage/current?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get paginated usage history
Query Parameters
251 <= value <= 100Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/usage/history"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List distinct tenant IDs with usage data
Query Parameters
251 <= value <= 100Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/usage/entities"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List invoices (cursor-paginated)
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/invoices?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get a single Stripe invoice with line items
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/invoices/string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List payment methods for the platform's customer
Response Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/payment-methods"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Create a Stripe SetupIntent for payment method collection
Response Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/setup-intent"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Create a Stripe Customer Portal session
Request Body
application/json
uriResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/portal" \ -H "Content-Type: application/json" \ -d '{ "returnUrl": "http://example.com" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get a single invoice with line items
Path Parameters
Query Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://billing.svc.nno.app/invoices/string?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get daily usage time-series
Query Parameters
1 <= length^\d{4}-\d{2}-\d{2}$^\d{4}-\d{2}-\d{2}$Response Body
application/json
application/json
curl -X GET "https://billing.svc.nno.app/usage/daily?platformId=string&from=string&to=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get active usage alerts
Query Parameters
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://billing.svc.nno.app/usage/alerts?platformId=string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Apply a credit to a customer
Request Body
application/json
1 <= length0 < value"usd"3 <= length <= 31 <= lengthResponse Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/operator/credits" \ -H "Content-Type: application/json" \ -d '{ "customerId": "string", "amount": 0, "description": "string" }'nullnullnullGenerate and finalize an invoice for a customer
Request Body
application/json
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/operator/invoices/generate" \ -H "Content-Type: application/json" \ -d '{ "customerId": "string" }'nullnullnullOverride subscription plan tier or trial end
Path Parameters
Request Body
application/json
Response Body
application/json
application/json
application/json
curl -X PATCH "https://billing.svc.nno.app/operator/subscriptions/string/override" \ -H "Content-Type: application/json" \ -d '{}'nullnullnullStart a trial for a subscription
Path Parameters
Request Body
application/json
0 < value <= 365Response Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/operator/subscriptions/string/trial" \ -H "Content-Type: application/json" \ -d '{ "trialDays": 365 }'nullnullnullcurl -X GET "https://billing.svc.nno.app/operator/overview"nullnullcurl -X GET "https://billing.svc.nno.app/plans"[
null
]Create a Stripe customer
Request Body
application/json
emailResponse Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/customers" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X GET "https://billing.svc.nno.app/customers/string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Update a Stripe customer
Path Parameters
Request Body
application/json
emailResponse Body
application/json
application/json
application/json
curl -X PATCH "https://billing.svc.nno.app/customers/string" \ -H "Content-Type: application/json" \ -d '{}'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List subscriptions for a customer
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://billing.svc.nno.app/customers/string/subscriptions"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}List payment methods for a customer
Path Parameters
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://billing.svc.nno.app/customers/string/payment-methods"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Get the default payment method for a customer
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://billing.svc.nno.app/customers/string/payment-methods/default"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Create a Stripe subscription
Request Body
application/json
1 <= length1 <= length1 <= length0 < valueResponse Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/subscriptions" \ -H "Content-Type: application/json" \ -d '{ "userId": "string", "priceId": "string", "paymentMethodId": "string" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X GET "https://billing.svc.nno.app/subscriptions/string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Update a subscription
Path Parameters
Request Body
application/json
1 <= length0 < value1 <= lengthResponse Body
application/json
application/json
application/json
curl -X PATCH "https://billing.svc.nno.app/subscriptions/string" \ -H "Content-Type: application/json" \ -d '{}'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Cancel a subscription
Path Parameters
Query Parameters
Response Body
application/json
application/json
curl -X DELETE "https://billing.svc.nno.app/subscriptions/string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Attach a payment method to a customer
Path Parameters
Request Body
application/json
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/payment-methods/string/attach" \ -H "Content-Type: application/json" \ -d '{ "customerId": "string" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X POST "https://billing.svc.nno.app/payment-methods/string/detach"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}curl -X GET "https://billing.svc.nno.app/payment-methods/string"null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}Set a payment method as default
Path Parameters
Request Body
application/json
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X POST "https://billing.svc.nno.app/payment-methods/string/set-default" \ -H "Content-Type: application/json" \ -d '{ "customerId": "string" }'null{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": null
}
}