Billing errors
How the Billing operations use the shared error codes: what a missing entity returns, which fields a Billing error has, and the errors of the my* operations.
The Billing operations return errors in the shared Navixy GraphQL API format, using the same codes as every other product. Consult this page if you call the Billing my* operations for your workspace: the operations named with the prefix my, such as mySubscribe and myBalance, that read or change the data of the workspace named by your token. It covers where Billing differs from the other products in the use of shared codes. For the response structure, the full list of codes, and general scenarios, see Error handling.
Missing entities
Billing never returns NOT_FOUND. A missing entity is reported in one of 2 ways, depending on where the ID appears.
A query by ID returns null, with no entry in errors: node(id:) returns null for a submission of another workspace, and myInvoice returns null for an invoice that doesn't exist or belongs to another workspace. myBalance never returns null. When a workspace has no balance, the first read opens one at zero.
A mutation that names an entity that doesn't exist returns VALIDATION_ERROR. The entity and the ID are in detail, and there is no field, because a rule of the service rejected the reference rather than the input parsing. Send mySubscribe with a plan ID that Billing doesn't know, and the response will be:
{
"errors": [{
"message": "Plan not found: 019a6b2f-793e-807b-8001-42504c4e0009",
"path": ["billing", "mySubscribe"],
"extensions": {
"type": "https://api.navixy.com/errors/validation",
"title": "Validation Error",
"status": 400,
"detail": "Plan not found: 019a6b2f-793e-807b-8001-42504c4e0009",
"instance": "/graphql",
"code": "VALIDATION_ERROR",
"traceId": "0af7651916cd43dd8448eb211c80319c",
"timestamp": "2026-09-28T10:45:00Z"
}
}],
"data": { "billing": { "mySubscribe": null } }
}The name in the message is the entity, Plan, not the GraphQL type BillingAvailablePlan.
How to handle a missing entity
Treat null from a query and VALIDATION_ERROR with "not found" in detail from a mutation the same way: the entity isn't available to your token. For a plan, read myAvailablePlans again and send an ID from one of its rows. For an invoice, read myInvoices again and take the id from it.
IDs of the wrong type
Every Billing ID names its entity type. A plan ID sent where a branch ID belongs, or a UUID that Billing didn't issue, is refused before any lookup, with VALIDATION_ERROR and field naming the input field, for example, input.planId. Read field to find the argument to fix. The IDs you send to mySubscribe come from myAvailablePlans, so send planId and branchId as they came, each in its own field.
Fields of a Billing error
A Billing error has the standard fields of Error handling, with 2 differences:
fieldis present when the input itself failed, such as a malformed ID, and absent when a Billing rule rejected the request, such as a plan that the workspace may not take or a product that an active subscription already covers. Branch oncode, and readdetailfor the reason.entityTypeandentityIdare never present on a Billing error.
Errors of the my* operations
The my* operations return these codes:
PERMISSION_DENIED
The token has no workspace_id claim, or the claim isn't a workspace ID. The my* operations read only that claim and don't fall back to your memberships. Or the roles the token carries give no access to the Billing product; the message is then Access Denied.
Request a token issued for the workspace. See How the API chooses your workspace and Roles and products.
VALIDATION_ERROR
The plan or the branch isn't one that myAvailablePlans offers the workspace, the branch belongs to another plan, or an active subscription already covers a product of the plan.
Read myAvailablePlans and mySubscriptions again. To cancel or move a subscription, contact Navixy at [email protected].
VALIDATION_ERROR
An ID is malformed or of the wrong type, first is above 100, or, on mySubscribe, the workspace_id claim names a workspace that this deployment doesn't have.
Read field and detail.
RATE_LIMITED
More than 100 requests in 60 seconds from one user, the subject of the token, or from one client address when the requests carry no token.
Wait for the seconds in the Retry-After header, then retry. See Limits.
A request without a workspace claim returns this error on every Billing field it selects:
How to handle a missing workspace claim
Request a token issued for the workspace whose billing you read.
See also
Error handling: Learn the error structure, every code, and the common scenarios across the API.
Choosing a plan and subscribing: Subscribe a workspace to a plan and handle the errors of mySubscribe.
Reading balance and statement: Read a balance and its statement.
Reading invoices: Read a workspace's invoices and handle a
nullinvoice.Authentication: Learn how the token names the workspace that every operation acts in.
Last updated
Was this helpful?