Skip to content

Billing, pricing and budgets

Generated from the gateway schema. Do not edit.

Queries

costEstimate

What a configuration would cost per hour and per 730-hour month at the tenant's prices.

query { costEstimate(input: CostEstimateInput!): CostEstimate! }

Requires: an authenticated member of the tenant

Argument Type Description
input CostEstimateInput!

Returns: CostEstimate!

costToDate

The period (default: current month) priced from the usage ledger so far, with the budget status.

query { costToDate(period: String): CostToDate! }

Requires: an authenticated member of the tenant

Argument Type Description
period String

Returns: CostToDate!

credits

The authenticated tenant's credits, with what is left of each.

query { credits: [TenantCredit!]! }

Requires: an authenticated member of the tenant

Returns: [TenantCredit!]!

invoice

Fetch a single invoice owned by the authenticated tenant.

query { invoice(id: Int!): Invoice! }

Requires: an authenticated member of the tenant

Argument Type Description
id Int!

Returns: Invoice!

invoiceDownload

Resolve a downloadable PDF URL for one of the tenant's invoices.

query { invoiceDownload(id: Int!): InvoiceDownload! }

Requires: an authenticated member of the tenant

Argument Type Description
id Int!

Returns: InvoiceDownload!

invoices

List the authenticated tenant's invoices.

query { invoices(invoiceStatus: String, orderBy: String): InvoiceList! }

Requires: an authenticated member of the tenant

Argument Type Description
invoiceStatus String
orderBy String

Returns: InvoiceList!

ledgerInvoices

Invoices built from the usage ledger for the authenticated tenant (shadow until the cutover).

query { ledgerInvoices: [LedgerInvoice!]! }

Requires: an authenticated member of the tenant

Returns: [LedgerInvoice!]!

paymentMethod

Fetch a single saved payment method owned by the authenticated tenant.

query { paymentMethod(id: ID!): PaymentMethod! }

Requires: an authenticated member of the tenant

Argument Type Description
id ID!

Returns: PaymentMethod!

paymentMethods

List the authenticated tenant's saved payment methods.

query { paymentMethods: PaymentMethodList! }

Requires: an authenticated member of the tenant

Returns: PaymentMethodList!

priceCatalog

The price list that applies to the authenticated tenant, by sku.

query { priceCatalog(at: String): PriceCatalog! }

Requires: an authenticated member of the tenant

Argument Type Description
at String

Returns: PriceCatalog!

pricing

Fetch the pricing applicable to the authenticated tenant.

query { pricing: ProductPricing! }

Requires: an authenticated member of the tenant

Returns: ProductPricing!

usage

Aggregated usage + cost for the authenticated tenant's billing period.

query { usage: UsageSummary! }

Requires: an authenticated member of the tenant

Returns: UsageSummary!

Mutations

createPaymentMethodSetup

Begin adding a saved card for the authenticated tenant. Returns a payment provider order token the frontend feeds to the embedded card widget; on success the payment provider stores the card against the tenant's customer for future charges.

Tenant-scoped via the X-Tenant header (like the rest of the billing module); not gated by @tenantRole, which reads the JWT tenantRoles claim that is not reliably populated.

mutation { createPaymentMethodSetup: PaymentMethodSetup! }

Requires: an authenticated member of the tenant

Returns: PaymentMethodSetup!

deleteBudget

Remove the authenticated tenant's budget.

mutation { deleteBudget: Boolean! }

Requires: tenant ADMIN

Returns: Boolean!

redeemPromoCode

Redeem a promo code for a credit, once per tenant.

mutation { redeemPromoCode(code: String!): TenantCredit! }

Requires: tenant ADMIN

Argument Type Description
code String!

Returns: TenantCredit!

setBudget

Set the authenticated tenant's monthly budget.

mutation { setBudget(input: BudgetInput!): Budget! }

Requires: tenant ADMIN

Argument Type Description
input BudgetInput!

Returns: Budget!