> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qumo-deploy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# client.billing

> Billing & commerce: per-project billing summary, Stripe checkout/portal redirects, and usage-export configuration.

Billing & commerce: per-project billing summary, Stripe checkout/portal
redirects, and usage-export configuration.

Catalog reads (plans, SKUs, pricing) live on [`PricingResource`](/sdk/reference/pricing).

Reach it as `client.billing` on a [`QumoClient`](/sdk/reference/client#qumoclient).

### getProjectSummary

```ts theme={null}
getProjectSummary(projectId: string): Promise<BillingSummary>
```

Current-period billing snapshot for a project.

Types: [`BillingSummary`](/sdk/reference/types#billingsummary)

### createCheckoutSession

```ts theme={null}
createCheckoutSession(opts?: CheckoutSessionOptions): Promise<CheckoutSession>
```

Creates an Elements-mode Checkout Session and returns its client\_secret.
See [`CheckoutSessionOptions.tenantId`](/sdk/reference/types#checkoutsessionoptions) for session-caller scoping.

Types: [`CheckoutSessionOptions`](/sdk/reference/types#checkoutsessionoptions), [`CheckoutSession`](/sdk/reference/types#checkoutsession)

### createPortalSession

```ts theme={null}
createPortalSession(returnUrl?: string, tenantId?: string): Promise<PortalSession>
```

Creates a Stripe Customer Portal session. `tenantId` scopes the request
for session (cookie) callers — same contract as
[`CheckoutSessionOptions.tenantId`](/sdk/reference/types#checkoutsessionoptions).

Types: [`PortalSession`](/sdk/reference/types#portalsession)

### usageCsvUrl

```ts theme={null}
usageCsvUrl(from: string, to: string): string
```

Builds the CSV usage-download URL for a browser navigation/anchor click
(the export endpoint returns a file download, not JSON — the browser
performs the cookie-authenticated fetch). Not a request-executing method.
Resolves against baseUrl exactly like client.request — including a
path-prefixed base — and returns a same-origin relative URL when baseUrl
is empty (usable as an href in the browser, harmless elsewhere).
