Skip to content

Billing and usage types

GraphQL schema reference · API guide · SDKs · Types of Billing and usage

object

A single balance transaction (top-up, usage deduction, refund, etc.).

  • id: ID! — Unique transaction identifier.
  • tenantId: String! — Owning tenant identifier.
  • amountCents: Int! — Amount in cents (positive = credit, negative = debit).
  • balanceAfterCents: Int! — Balance after this transaction.
  • transactionType: String! — Transaction type: topup, usage, refund, adjustment.
  • description: String — Human-readable description.
  • referenceId: String — Reference to related object (crypto payment, usage record, etc.).
  • referenceType: String — Type of the referenced object.
  • createdAt: Time! (Time) — When the transaction occurred.

object

Balance transaction connection for pagination.

object

object

Structured billing address for invoices.

  • street: String! — Street address line 1.
  • city: String! — City name.
  • state: String — State or province.
  • postalCode: String! — Postal or ZIP code.
  • country: String! — ISO 3166-1 alpha-2 country code.

input_object

Input for billing address.

  • street: String! — Street address line 1.
  • city: String! — City name.
  • state: String — State or province.
  • postalCode: String! — Postal or ZIP code.
  • country: String! — ISO 3166-1 alpha-2 country code.

object

Billing details for a tenant. These are optional for Free and small simplified top-ups, and required when paid postpaid collection or a full invoice needs them.

  • email: String — Billing contact email.
  • name: String — Customer legal or person name shown on full invoices.
  • company: String — Company name for invoices.
  • vatNumber: String — VAT number (EU format: XX123456789).
  • address: BillingAddress (BillingAddress) — Structured billing address.
  • isComplete: Boolean! — True if all full-invoice fields are present (legal name + email + address).
  • updatedAt: Time (Time) — When billing details were last updated.
  • presentmentCurrency: Currency (Currency) — Currency the tenant is invoiced and charged in (EUR, USD, GBP), derived from the billing address country. It cannot change while a provider subscription, an open invoice, or a card first payment started in the last day exists.

object

Contractual and enforced properties of a billing tier. Usage limits are entitlements, not features.

  • supportLevel: String! — Support level (community, email, priority, dedicated).
  • sla: Boolean! — Whether SLA guarantees apply.
  • processingCustomizable: Boolean! — Whether the tenant may override the tier’s processing profiles.

object

  • currentTier: BillingTier (BillingTier)
  • subscription: TenantSubscription (TenantSubscription)
  • billingStatus: String!
  • paymentMethods: [PaymentMethod!]! (PaymentMethod) — Invoice payment methods currently configured for this tenant.
  • collectionReady: Boolean! — True only after a reusable postpaid provider subscription or mandate is confirmed.
  • collectionProvider: String — Confirmed postpaid collection provider, when ready.
  • setupProviders: [String!]! — Fully configured providers that can start postpaid setup.
  • recentPayments: [InvoicePayment!]! (InvoicePayment) — Recent invoice payments, newest first. Retry or resume through createPayment on the invoice.
  • nextBillingDate: Time (Time)
  • trialEndsAt: Time (Time)
  • outstandingAmount: Float!
  • currency: String!
  • liveUsage: LiveUsageSummary! (LiveUsageSummary)
  • invoicePreview: Invoice (Invoice)

object

A subscription tier defining pricing rules, entitlements, and features. Tenants subscribe to a tier which determines their billing and capabilities.

  • id: ID! — Unique tier identifier.
  • tierName: String! — Internal tier name (payg, free, supporter, developer, production, enterprise).
  • tierLevel: Int! — Numeric ordering of tiers; 0 = payg (prepaid), 1 = free, 5 = enterprise. Used to compare upgrade vs downgrade direction.
  • displayName: String! — User-facing tier name.
  • description: String — Tier description for marketing.
  • basePrice: Float! — Base monthly price.
  • currency: String! — Currency code (USD, EUR, etc.).
  • billingPeriod: String! — Billing period (monthly, yearly).
  • features: BillingFeatures! (BillingFeatures) — Feature flags for this tier.
  • pricingRules: [PricingRule!]! (PricingRule) — Priced behaviors per meter (rating engine input).
  • entitlements: [EntitlementEntry!]! (EntitlementEntry) — Non-billing grants (e.g. recording_retention_days). Values are JSON-encoded strings.
  • supportLevel: String — Support level included (community, email, priority, dedicated).
  • slaLevel: String — SLA guarantee level for enterprise tiers.
  • meteringEnabled: Boolean! — Whether usage metering is enabled for this tier.
  • isEnterprise: Boolean! — Whether this is an enterprise tier with custom terms.

enum

Card payment provider for top-ups.

  • STRIPE — Stripe checkout.
  • MOLLIE — Mollie checkout.

object

Result from creating a card top-up checkout session.

  • topupId: ID! — Internal top-up ID for tracking.
  • checkoutUrl: String! — URL to redirect user for checkout.
  • expiresAt: Time! (Time) — When the checkout session expires.
  • amountCents: Int! — Amount charged, in cents of currency.
  • currency: Currency! (Currency) — Tenant presentment currency the checkout charges in (EUR, USD, GBP).
  • conversion: CurrencyConversion (CurrencyConversion) — EUR amount the top-up credits, locked at the ECB rate when the checkout was created.

object

Result of a postpaid tier change. Either appliedTier is set (immediate upgrade) or pendingTier + effectiveAt are set (scheduled downgrade at period end).

  • success: Boolean! — Whether the request was accepted.
  • message: String! — Human-readable status message.
  • appliedTier: BillingTier (BillingTier) — Set on immediate upgrade — the new active tier.
  • pendingTier: BillingTier (BillingTier) — Set on scheduled downgrade — the staged target tier.
  • effectiveAt: Time (Time) — When a scheduled downgrade will take effect.

union

object

  • resourceType: String!
  • cost: Float!

object

  • countryCode: String!
  • viewerCount: Int!
  • viewerHours: Float!
  • egressGb: Float!

input_object

Input for creating a card-based prepaid balance top-up.

  • amountCents: Int! — Amount to charge, in cents of the tenant’s presentment currency. Minimum 500 cents; maximum 10,000,000 cents.
  • provider: CardPaymentProvider! (CardPaymentProvider) — Payment provider to use.
  • successUrl: String! — URL to redirect after successful payment.
  • cancelUrl: String! — URL to redirect if user cancels.
  • billingEmail: String — Optional billing email for invoice.
  • billingName: String — Optional billing name for invoice.
  • billingCompany: String — Optional company name for invoice.
  • billingVatNumber: String — Optional VAT number for invoice.

input_object

Input for creating a crypto top-up deposit address.

  • amountCents: Int! — Amount in cents of the tenant’s presentment currency. Minimum 1 cent; maximum 10,000,000 cents.
  • asset: CryptoAsset! (CryptoAsset) — Crypto asset to receive (ETH or USDC; LPT not yet supported).

input_object

  • invoiceId: ID!
  • method: PaymentMethod! (PaymentMethod)
  • returnUrl: String

union

enum

Supported crypto assets for top-up (ETH network only).

  • ETH — Native Ethereum
  • USDC — USDC stablecoin (ERC-20)
  • LPT — Livepeer Token (ERC-20). Currently reserved — prepaid top-ups gated until a non-Chainlink price source is wired.

object

Result from creating a crypto top-up. The price is locked at this response. Send exactly expectedAmountToken of asset to depositAddress; on confirmation, the balance is credited at quotedPriceUsd regardless of price drift inside the address TTL.

  • topupId: ID! — Internal top-up ID for tracking/polling.
  • depositAddress: String! — HD-derived Ethereum address to send funds to.
  • asset: CryptoAsset! (CryptoAsset) — Asset to send (ETH or USDC).
  • assetSymbol: String! — Human-readable asset symbol (“ETH” | “USDC”).
  • expectedAmountCents: Int! — Echo of input amountCents, in cents of the tenant’s presentment currency.
  • expiresAt: Time! (Time) — When this deposit address expires (24 hours from creation).
  • expectedAmountBaseUnits: String! — Token base units to send (decimal string; wei for 18-decimal assets).
  • expectedAmountToken: String! — Human-friendly decimal of expectedAmountBaseUnits, e.g. “0.01515”.
  • quotedPriceUsd: String! — Locked USD price per 1 whole token, e.g. “3300.45”.
  • quoteSource: String! — Source of the price quote (“chainlink” | “one_to_one”).
  • quotedAt: Time! (Time) — When the price was locked.
  • network: String! — Network the deposit address lives on (“ethereum” | “arbitrum” | “base”).
  • conversion: CurrencyConversion (CurrencyConversion) — Presentment amount and the EUR credit it converts to, locked with the quote.

object

Status of a crypto top-up (for polling). status cycles: pending → confirming → completed (or expired).

  • id: ID! — Top-up ID.
  • depositAddress: String! — Deposit address.
  • asset: CryptoAsset! (CryptoAsset) — Asset being received.
  • status: String! — Current status: pending, confirming, completed, expired.
  • txHash: String — Blockchain transaction hash (when detected).
  • confirmations: Int! — Number of block confirmations.
  • receivedAmountBaseUnits: String — Amount received in token base units (decimal string).
  • receivedAmountToken: String — Human-friendly decimal of receivedAmountBaseUnits.
  • creditedAmountCents: Int — Amount credited to balance in creditedAmountCurrency cents.
  • creditedAmountCurrency: String — Ledger currency of the credit, EUR.
  • quoteSource: String — Source of the locked price quote (“chainlink” | “one_to_one”).
  • network: String — Network the deposit address lives on.
  • expiresAt: Time! (Time) — When the deposit address expires.
  • detectedAt: Time (Time) — When payment was first detected on-chain.
  • completedAt: Time (Time) — When balance was credited.
  • conversion: CurrencyConversion (CurrencyConversion) — Presentment amount and the EUR credit it converts to, locked with the quote.

scalar

object

Conversion of a payment into the EUR prepaid ledger and invoice currency. EUR amounts use the identity rate.

  • originalAmountCents: Int! — Amount charged, in cents of originalCurrency.
  • originalCurrency: Currency! (Currency) — Currency charged (EUR, USD, GBP).
  • eurAmountCents: Int! — EUR cents credited or applied.
  • unitsPerEur: String! — Units of originalCurrency one euro buys, as a decimal string (“1” for EUR).
  • source: String! — Rate source: identity (EUR), ecb (ECB reference rate), or legacy_quote (USD rate quoted before ECB rates were stored).
  • referenceDate: String! — ECB reference date of the rate (YYYY-MM-DD).

object

A key-value entitlement entry. Values are JSON-encoded for type flexibility.

  • key: String!
  • value: String!

object

A billing invoice for a subscription period. Includes base subscription and metered usage charges. Amounts are computed in EUR; a finalized invoice is presented and charged in the tenant’s presentment currency at the ECB rate of its finalization date.

  • id: ID! — Unique invoice identifier.
  • amount: Money! (Money) — Total amount due in EUR (after credits applied).
  • baseAmount: Money! (Money) — Base subscription amount in EUR.
  • meteredAmount: Money! (Money) — Metered usage charges in EUR (net; 0 while usage is waived during beta).
  • grossMeteredAmount: Money! (Money) — Unwaived metered total — what usage would have cost. Equals meteredAmount when usage is not waived; the would-have-cost figure when it is.
  • prepaidCreditApplied: Money! (Money) — Prepaid balance credit applied to this invoice, in EUR.
  • currency: Currency! (Currency) — Currency of the amounts above, EUR.
  • presentmentAmountCents: Int — Total charged, in cents of presentmentCurrency. Null until the invoice is finalized.
  • presentmentCurrency: String — Currency the invoice is presented and charged in (EUR, USD, GBP). Empty until the invoice is finalized.
  • presentmentUnitsPerEur: String — Units of presentmentCurrency one euro buys at finalization, as a decimal string. Empty until the invoice is finalized.
  • presentmentReferenceDate: String — ECB reference date of the presentment rate (YYYY-MM-DD). Empty until the invoice is finalized.
  • finalizedAt: Time (Time) — When the invoice was finalized and its presentment amount fixed.
  • status: InvoiceStatus! (InvoiceStatus) — Invoice status (draft, open, paid, void).
  • dueDate: Time! (Time) — Payment due date.
  • paidAt: Time (Time) — When payment was received.
  • createdAt: Time! (Time) — When the invoice was created.
  • updatedAt: Time! (Time) — When the invoice was last updated.
  • periodStart: Time (Time) — Billing period start date.
  • periodEnd: Time (Time) — Billing period end date.
  • usageDetails: JSON (JSON) — Detailed usage breakdown (JSON).
  • lineItems: [LineItem!]! (LineItem) — Individual line items on the invoice.

object

  • cursor: String!
  • node: Invoice! (Invoice)

object

A tenant-visible invoice payment record. Provider secrets and raw payloads are never exposed.

  • id: ID!
  • invoiceId: ID!
  • method: String!
  • amount: Money! (Money)
  • currency: Currency! (Currency)
  • status: String!
  • confirmedAt: Time (Time)
  • createdAt: Time! (Time)
  • updatedAt: Time! (Time)
  • conversion: CurrencyConversion (CurrencyConversion) — Amount charged and the EUR amount applied to the invoice, at the ECB rate of payment creation.

object

object

enum

Invoice lifecycle status.

  • DRAFT — Invoice being prepared, not yet sent.
  • PENDING — Invoice sent, awaiting payment.
  • PAID — Invoice paid in full.
  • OVERDUE — Payment past due date.
  • FAILED — Payment processing failed.
  • MANUAL_REVIEW — Invoice requires operator review and cannot be paid.
  • CANCELLED — Invoice cancelled.

object

object

A single line item on an invoice or usage preview, produced by the rating engine. Decimal quantities are strings to preserve precision.

  • lineKey: String! — Stable identity: ‘base_subscription’, ‘meter:<name>:<cluster_id>:<yyyymm>’.
  • meter: String! — Meter name; empty for base_subscription.
  • description: String! — Description of the charge.
  • quantity: String! — Total quantity used (decimal as string).
  • includedQuantity: String! — Free quantity (decimal as string).
  • billableQuantity: String! — Billable quantity (decimal as string).
  • unitPrice: String! — Price per unit (decimal as string).
  • total: String! — Total for this line item (= billableQuantity * unitPrice), decimal as string.
  • currency: String! — Currency (ISO 4217).
  • clusterId: String — Cluster id this line was attributed to; null for tenant-scoped lines (base_subscription).
  • clusterName: String — Display name of the cluster, joined from Quartermaster at read time. Null when clusterId is null.
  • clusterKind: String — platform_official | tenant_private | third_party_marketplace; null when clusterId is null.
  • pricingSource: String! — Why the line was priced as it was: tier, cluster_metered, cluster_monthly, cluster_custom, free_unmetered, self_hosted, included_subscription.
  • pricingLabel: String! — Human-readable label of pricingSource (e.g. ‘Self-hosted (no charge)’, ‘Marketplace metered’). Empty when not populated by the gateway.
  • unit: String! — Canonical quantity unit.
  • dimensions: JSON! (JSON) — Bounded pricing dimensions such as codec, rendition, backend, or model.

object

  • tenantId: String
  • periodStart: Time (Time)
  • periodEnd: Time (Time)
  • streamHours: Float!
  • egressGb: Float!
  • peakBandwidthMbps: Float!
  • displayStorageGb: Float!
  • livepeerH264Seconds: Float!
  • livepeerVp9Seconds: Float!
  • livepeerAv1Seconds: Float!
  • livepeerHevcSeconds: Float!
  • nativeAvH264Seconds: Float!
  • nativeAvVp9Seconds: Float!
  • nativeAvAv1Seconds: Float!
  • nativeAvHevcSeconds: Float!
  • nativeAvAacSeconds: Float!
  • nativeAvOpusSeconds: Float!
  • totalStreams: Int!
  • totalViewers: Int!
  • viewerHours: Float!
  • maxViewers: Int!
  • uniqueUsers: Int!
  • livepeerSegmentCount: Int!
  • livepeerUniqueStreams: Int!
  • nativeAvSegmentCount: Int!
  • nativeAvUniqueStreams: Int!
  • uniqueCountries: Int!
  • uniqueCities: Int!
  • geoBreakdown: [CountryMetrics!]! (CountryMetrics)
  • clipsCreated: Int!
  • clipsDeleted: Int!
  • dvrCreated: Int!
  • dvrDeleted: Int!
  • vodCreated: Int!
  • vodDeleted: Int!
  • clipBytes: Int!
  • dvrBytes: Int!
  • vodBytes: Int!
  • frozenClipBytes: Int!
  • frozenDvrBytes: Int!
  • frozenVodBytes: Int!
  • syncedArtifactCount: Int!
  • syncedArtifactBytes: Int!

object

Mollie First Payment - redirect URL for initial payment that creates a mandate.

  • paymentId: ID! — Mollie payment ID (tr_xxx).
  • customerId: String! — Mollie customer ID (cst_xxx).
  • paymentUrl: String! — URL to redirect user to for payment.

union

object

Mollie Mandate - recurring payment authorization for a customer.

  • mandateId: ID! — Mollie mandate ID (mdt_xxx).
  • customerId: String! — Mollie customer ID (cst_xxx).
  • status: String! — Mandate status (valid, pending, invalid, revoked).
  • method: String! — Mandate method (directdebit, creditcard, ideal).
  • details: JSON (JSON) — Mandate details (bank/card info).
  • createdAt: Time (Time) — Mandate creation timestamp.

object

Mollie Subscription - recurring subscription created after mandate is valid.

  • subscriptionId: ID! — Mollie subscription ID (sub_xxx).
  • status: String! — Subscription status (active, pending, etc.).
  • nextPaymentDate: String — Next payment date (ISO 8601).

union

scalar

object

  • id: ID!
  • paymentUrl: String
  • walletAddress: String
  • amount: Money! (Money)
  • currency: Currency! (Currency)
  • method: PaymentMethod! (PaymentMethod)
  • status: PaymentStatus! (PaymentStatus)
  • expiresAt: Time (Time)
  • qrCode: String
  • expectedAmountBaseUnits: String
  • expectedAmountToken: String
  • quotedPriceUsd: String
  • quoteSource: String
  • assetSymbol: String
  • network: String
  • quotedAt: Time (Time)
  • createdAt: Time! (Time)
  • conversion: CurrencyConversion (CurrencyConversion) — Amount charged and the EUR amount applied to the invoice, at the ECB rate of payment creation.

enum

Supported payment methods.

  • CARD — Credit/debit card via the configured card provider.
  • CRYPTO_ETH — Ethereum invoice payment.
  • CRYPTO_USDC — USDC invoice payment.

enum

Payment processing status.

  • PENDING — Payment initiated, awaiting confirmation.
  • CONFIRMED — Payment successfully processed.
  • FAILED — Payment failed or declined.

object

Prepaid balance for wallet-based accounts. Wallet-only accounts MUST use prepaid billing (balance-based, pay first).

  • id: ID! — Unique balance record identifier.
  • tenantId: String! — Owning tenant identifier.
  • balanceCents: Int! — Settled ledger balance in cents before active usage reservations.
  • reservedBalanceCents: Int! — Active in-flight usage reservations in cents.
  • availableBalanceCents: Int! — Spendable balance after active reservations (balanceCents - reservedBalanceCents).
  • currency: String! — Ledger currency, always EUR.
  • lowBalanceThresholdCents: Int! — Alert threshold in cents.
  • isLowBalance: Boolean! — True if available balance is below threshold.
  • drainRateCentsPerHour: Int! — Estimated spend rate in cents per hour (based on last hour’s usage).
  • createdAt: Time! (Time) — When the balance was created.
  • updatedAt: Time! (Time) — When the balance was last updated.

object

A pricing rule: how a meter rates to money. Decimal fields are strings to preserve precision.

  • meter: String! — Canonical meter name (for example delivered_minutes, storage_gb_seconds_cold, media_seconds, or a marketplace-defined meter).
  • model: String! — Pricing model (tiered_graduated, all_usage, dimensioned).
  • currency: String! — Currency (ISO 4217).
  • includedQuantity: String! — Free quantity included before billing kicks in.
  • unitPrice: String! — Price per unit (decimal as string).
  • configJson: String! — Model-specific config (for example dimension selector rates); JSON-encoded.

object

Successful promotion to postpaid billing.

  • success: Boolean! — Whether the promotion succeeded.
  • message: String! — Human-readable status message.
  • newBillingModel: String! — The new billing model (postpaid).
  • creditBalanceCents: Int! — Prepaid balance carried forward as credit (in cents).
  • subscriptionId: ID! — The new subscription ID.

union

union

object

Stripe Billing Portal Session - redirect URL for subscription management.

  • portalUrl: String! — URL to redirect user to for billing management.

union

object

Stripe Checkout Session - redirect URL for hosted checkout.

  • sessionId: ID! — Stripe Checkout Session ID (cs_xxx).
  • checkoutUrl: String! — URL to redirect user to for checkout.

union

object

  • id: ID!
  • tenantId: ID!
  • tierId: String!
  • status: String!
  • billingEmail: String!
  • startedAt: Time! (Time)
  • trialEndsAt: Time (Time)
  • nextBillingDate: Time (Time)
  • cancelledAt: Time (Time)
  • customFeatures: BillingFeatures (BillingFeatures)
  • pricingOverrides: [PricingRule!]! (PricingRule)
  • entitlementOverrides: [EntitlementEntry!]! (EntitlementEntry)
  • paymentMethod: String
  • billingModel: String!
  • pendingTier: BillingTier (BillingTier)
  • pendingEffectiveAt: Time (Time)
  • pendingReason: String
  • presentmentCurrency: Currency! (Currency) — Currency the tenant is invoiced and charged in (EUR, USD, GBP), derived from the billing country. The prepaid ledger is always EUR.
  • createdAt: Time! (Time)
  • updatedAt: Time! (Time)

object

  • billingPeriod: String!
  • usage: [UsageEntry!]! (UsageEntry)
  • costs: [CostEntry!]! (CostEntry)
  • totalCost: Float!
  • currency: String!
  • lineItems: [LineItem!]! (LineItem) — Rated line items for the period (rating engine output).
  • baseAmount: String! — Decimal-string base subscription portion.
  • usageAmount: String! — Decimal-string metered portion.

input_object

Input for updating billing details.

  • email: String — Billing contact email.
  • name: String — Customer legal or person name shown on full invoices.
  • company: String — Company name for invoices.
  • vatNumber: String — VAT number (EU format: XX123456789).
  • address: BillingAddressInput (BillingAddressInput) — Structured billing address.

object

  • usageType: String!
  • periodStart: Time (Time)
  • periodEnd: Time (Time)
  • usageValue: Float!
  • granularity: String!

object

  • resourceType: String!
  • amount: Float!

object

  • id: ID!
  • clusterId: String
  • clusterName: String
  • usageType: String!
  • unit: String! — Canonical physical unit for usageValue.
  • dimensions: JSON! (JSON) — Bounded dimensions that distinguish records for the same meter.
  • usageValue: Float!
  • createdAt: Time (Time)
  • periodStart: Time (Time)
  • periodEnd: Time (Time)
  • granularity: String

object

object

object

Result from submitting an x402 payment for settlement.

  • success: Boolean! — Whether the payment settlement succeeded.
  • isAuthOnly: Boolean! — True if this was an auth-only payload (always false for settlement).
  • tenantId: ID! — Tenant that was credited.
  • walletAddress: String! — Wallet address that paid.
  • creditedCents: Int! — Amount credited in cents.
  • newBalanceCents: Int — New balance in cents (if available).
  • txHash: String — Blockchain transaction hash (if available).
  • message: String! — Human-readable status message.