Naijacloud
Docs

Billing

Every /v1 route for billing. This page is generated from the API's OpenAPI contract, so it always matches what the API accepts and returns.

Authentication, pagination, errors and idempotency work the same on every route. They are described once, in the API overview.

One invoice with its line items

GET /v1/invoices/{invoiceId}

Key scopes: READ and PLATFORM_API.

Path parameters

NameTypeRequiredNotes
invoiceIdstringyesThe invoice's id.

Returns

bash
curl "https://api.naijacloud.com/v1/invoices/$INVOICE_ID" \ -H "Authorization: Bearer $NC_API_KEY"

The wallet balance paid services run on, in kobo

GET /v1/workspaces/{workspaceId}/balance

Key scopes: READ and PLATFORM_API.

Path parameters

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Returns

bash
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/balance" \ -H "Authorization: Bearer $NC_API_KEY"

A workspace's monthly invoices, newest first

GET /v1/workspaces/{workspaceId}/invoices

Key scopes: READ and PLATFORM_API.

Path parameters

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Query parameters

NameTypeRequiredNotes
limitintegernoRows per page. Ignored when a cursor is given.
cursorstringnoThe nextCursor of the previous page, unchanged.

Returns

  • 200 with a page: { data: V1InvoiceView[], nextCursor }, where each item is V1InvoiceView.
bash
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/invoices" \ -H "Authorization: Bearer $NC_API_KEY"

This month's metered usage against the free allowances

GET /v1/workspaces/{workspaceId}/usage

Key scopes: READ and PLATFORM_API.

Path parameters

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Returns

bash
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/usage" \ -H "Authorization: Bearer $NC_API_KEY"

Types

V1InvoiceLineItemView

FieldTypeNotes
amountKobonumber
categoryANALYTICS, BANDWIDTH, CACHE, COMPUTE, DATABASE, EMAIL, PREVIEW, STORAGE
descriptionstring
hoursnumber
idstring

V1InvoiceView

FieldTypeNotes
codestring
creditKobonumber
debitedKobonumber
idstring
issuedAtstring (date-time)
lineItemsarray of V1InvoiceLineItemView
numberinteger
periodEndstring (date-time)
periodStartstring (date-time)
statusOPEN, PAID, VOID
totalKobonumber
unbilledKobonumber
usageKobonumber

V1WalletBalance

FieldTypeNotes
balanceMinornumber
currencystring
lowboolean
lowBalanceThresholdMinornumber

V1WorkspaceUsageMeters

FieldTypeNotes
bandwidthAllowanceBytesnumber, or null
bandwidthBytesnumber, or null
computeAllowanceHoursnumber, or null
computeHoursnumber
databaseAllowanceBytesnumber, or null
databaseBytesnumber
storageAllowanceBytesnumber, or null
storageBytesnumber