Invoices
The invoices of the caller's workspace: what each one charges for each billing period, its lines, its status, and the queries that read them.
Queries
myInvoice
One of the caller's own workspace's invoices; null when it does not exist or belongs to another workspace.
myInvoice(id: ID!): BillingWorkspaceInvoiceArguments
id
ID!
The ID of the invoice to retrieve.
Output types:
myInvoices
The caller's own workspace's invoices, newest issue date first.
The workspace is not an argument. It is the one the caller's token names; a token carrying no workspace claim is refused.
Arguments
filter
BillingWorkspaceInvoiceFilter
Filtering options for the returned invoices.
orderBy
BillingInvoiceOrder
The ordering options for the returned invoices.
Input types:
Output types:
Objects
BillingWorkspaceInvoice
One of the caller's own workspace's invoices: its charge for every complete billing period of its subscriptions that no invoice covered yet, as of one pass. periodStart and periodEnd span the periods covered. The total is posted to the balance as the INVOICE entry on its statement.
status is PAID at issue when the balance covers the total, and ISSUED when the invoice opens a debt. Payments are not tied to invoices and settle the oldest invoices first; the payment that covers an invoice marks it PAID and sets paidAt. Once the grace period has passed (dueAt), the daily pass marks an unpaid one OVERDUE.
id
ID!
workspaceId
ID!
The workspace being charged: the one the token names.
invoiceNumber
String!
The number shown to people, unique across all invoices of the platform.
lineItems
The lines, in display order: per covered period, the period fees, then every metric of the plan, then the line-item submissions.
BillingWorkspaceInvoiceLineItem
One line of a workspace's invoice: a period fee, a metric's priced usage, or a line-item submission passed through. amount is quantity × unitPrice rounded half up to the minor unit, except on a line-item submission that carried its own amount.
id
ID!
description
String!
What the line charges for, ending with the billing period it belongs to, as , 2026-01-15 – 2026-02-14.
quantity
Float!
Units charged: the share of the month on a period-fee line, the aggregated usage over the included limit on a metric line, the quantity as submitted on a line-item line. metric.unit names the unit.
metric
The metric the line prices; null on a period-fee line and on a line-item submission's line.
subscriptionId
ID
The subscription the line charges for, as in mySubscriptions.
planId
ID
The plan that priced the line; the subscription's branch, when it has one, overrode this plan's fee and prices.
Inputs
BillingInvoiceOrder
Ordering options for invoices.
BillingWorkspaceInvoiceFilter
Filtering options for the caller's own invoices. Fields combine with AND.
Enums
BillingInvoiceStatus
Lifecycle of an invoice. Billing writes ISSUED, PAID and OVERDUE; DRAFT and VOID are reserved and never set.
DRAFT
Assembled but not yet issued to the customer.
ISSUED
Issued and outstanding.
PAID
Settled.
OVERDUE
Issued, past its due date, still outstanding.
VOID
Cancelled without being paid.
BillingInvoiceOrderField
Fields available for ordering invoices.
ISSUED_AT
Order by the day the invoice was issued.
Pagination types
BillingWorkspaceInvoiceConnection
A page of the caller's own workspace's invoices.
Implements: Connection
BillingWorkspaceInvoiceEdge
An edge in the BillingWorkspaceInvoice connection.
Implements: Edge
cursor
String!
An opaque cursor for this edge.
See also
Last updated
Was this helpful?