> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# mammoth billing

> All 27 mammoth billing commands with examples, arguments and confirmation flags: Manage billing and hosted checkout flows.

> Generated from mammoth-cli 2.4.2, released 2026-11-02: `mammoth schema list`, `mammoth capability list` and the CLI's own `--help`. Do not edit by hand; run `npm run docs:capabilities`.

Manage billing and hosted checkout flows. 27 commands.

Every command also takes the [global flags](https://mammoth.io/docs/build/cli/global-flags/) (`--output`, `--yes`, `--confirm`, `--dry-run`, `--input`, `--profile`, ...), which are not repeated below. `--input` takes a JSON or YAML document of the input fields; `mammoth schema get COMMAND_ID` prints a command's full input schema.

**Confirmation.** Commands marked `--yes --confirm TARGET` or `--yes` always need those flags, even at a terminal: they never prompt. Commands marked "`--yes` or prompt" ask at an interactive terminal (table output, no `--no-input`) and otherwise need `--yes`. `--dry-run` skips confirmation and sends nothing.

## Summary

| Command | What it does | Effect | Confirmation |
|---|---|---|---|
| [`billing chargebee-plan`](#mammoth-billing-chargebee-plan) | Get the workspace's Chargebee plan details. | Read | — |
| [`billing hosted-page`](#mammoth-billing-hosted-page) | Get a Chargebee hosted-page URL. Object type is positional or an input field. | High impact | `--yes --confirm TARGET` |
| [`billing invoice charge`](#mammoth-billing-invoice-charge) | Charge the workspace's outstanding invoice. '--yes --confirm WS' required. | High impact | `--yes --confirm TARGET` |
| [`billing invoice list`](#mammoth-billing-invoice-list) | List invoices for the workspace (Stripe billing history). | Read | — |
| [`billing stripe cancel`](#mammoth-billing-stripe-cancel) | Cancel the workspace's Stripe subscription. '--yes --confirm WS' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe checkout-url`](#mammoth-billing-stripe-checkout-url) | Get a Stripe Checkout URL. 'success_url'/'cancel_url' come from '--input'. | High impact | `--yes --confirm TARGET` |
| [`billing stripe create`](#mammoth-billing-stripe-create) | Create a Stripe subscription. Plan id is positional; interval is optional. | High impact | `--yes --confirm TARGET` |
| [`billing stripe end-trial`](#mammoth-billing-stripe-end-trial) | End the workspace's Stripe trial. '--yes --confirm WS' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe get`](#mammoth-billing-stripe-get) | Get the workspace's Stripe billing state. | Read | — |
| [`billing stripe held-change cancel`](#mammoth-billing-stripe-held-change-cancel) | Cancel the held plan change. '--yes --confirm WS' required. | Destructive | `--yes --confirm TARGET` |
| [`billing stripe held-change get`](#mammoth-billing-stripe-held-change-get) | Read the plan change the workspace is holding (what is held and why). | Read | — |
| [`billing stripe history`](#mammoth-billing-stripe-history) | Get the workspace's Stripe billing history. | Read | — |
| [`billing stripe payment-method delete`](#mammoth-billing-stripe-payment-method-delete) | Delete a Stripe payment method. '--yes --confirm PAYMENT_METHOD_ID' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe payment-method list`](#mammoth-billing-stripe-payment-method-list) | List the workspace's Stripe payment methods. | Read | — |
| [`billing stripe payment-method set-default`](#mammoth-billing-stripe-payment-method-set-default) | Set a Stripe payment method as default. '--yes --confirm PAYMENT_METHOD_ID' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe portal-url`](#mammoth-billing-stripe-portal-url) | Get a Stripe billing portal URL. '--yes --confirm WS' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe preview-invoice`](#mammoth-billing-stripe-preview-invoice) | Preview the workspace's next Stripe invoice. | Read | — |
| [`billing stripe recheck-limits`](#mammoth-billing-stripe-recheck-limits) | Recompute the workspace's plan-limit lock and return the report. | Benign mutation | — |
| [`billing stripe resume`](#mammoth-billing-stripe-resume) | Cancel a scheduled downgrade and keep the paid plan. '--yes --confirm WS' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe retry-payment`](#mammoth-billing-stripe-retry-payment) | Retry the workspace's failed Stripe payment. '--yes --confirm WS' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe status`](#mammoth-billing-stripe-status) | Get the workspace's Stripe subscription status. | Read | — |
| [`billing stripe storage set`](#mammoth-billing-stripe-storage-set) | Set the TOTAL purchased storage. 'storage_gb' from '--input'; '--yes --confirm WS'. | High impact | `--yes --confirm TARGET` |
| [`billing stripe sync`](#mammoth-billing-stripe-sync) | Sync the workspace's Stripe billing state. '--yes --confirm WS' required. | High impact | `--yes --confirm TARGET` |
| [`billing stripe upcoming-invoice`](#mammoth-billing-stripe-upcoming-invoice) | Get the workspace's upcoming Stripe invoice. | Read | — |
| [`billing stripe usage`](#mammoth-billing-stripe-usage) | Get the workspace's Stripe usage figures. | Read | — |
| [`billing subscription get`](#mammoth-billing-subscription-get) | Get the workspace's subscription details. | Read | — |
| [`billing subscription update`](#mammoth-billing-subscription-update) | Apply a patch to the workspace's subscription. 'patch' comes from '--input'. | High impact | `--yes --confirm TARGET` |

## billing commands

### mammoth billing chargebee-plan

Get the workspace's Chargebee plan details.

```bash
mammoth billing chargebee-plan
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.chargebee-plan` · **Result:** `BillingChargebeePlanResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.chargebee_plan`, API `GET /workspaces/{workspace_id}/chargebee-plan` (GetChargebeePlan)

### mammoth billing hosted-page

Get a Chargebee hosted-page URL. Object type is positional or an input field.

```bash
mammoth billing hosted-page change_plan --yes --confirm 123
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `OBJECT_TYPE` | positional | no | — | `str` | Type of hosted page to generate; or pass it via the 'object_type' input field. Or the `object_type` input field. |
| `object_type` | `--input` field | no | — | `str` |  |
| `plan_id` | `--input` field | no | — | `str` |  |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Creates a hosted billing page URL for object_type (for example change_plan). Nothing changes until someone completes the page. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.hosted-page` · **Result:** `BillingHostedPageResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.hosted_page`, API `POST /workspaces/{workspace_id}/subscription_v1/hosted-page` (FetchHostedPage)

## billing invoice

### mammoth billing invoice charge

Charge the workspace's outstanding invoice. '--yes --confirm WS' required.

```bash
mammoth billing invoice charge --yes
```

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Charges the workspace's open invoice to its saved payment method now; money moves. Read `billing stripe status` first. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.invoice.charge` · **Result:** `BillingInvoiceChargeResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.invoice_charge`, API `POST /workspaces/{workspace_id}/invoices/charge` (ChargeWorkspaceInvoices)

### mammoth billing invoice list

List invoices for the workspace (Stripe billing history).

```bash
mammoth billing invoice list
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none · **Pages:** `single_page`
- **Id:** `billing.invoice.list` · **Result:** `BillingInvoiceListResult`

## billing stripe

### mammoth billing stripe cancel

Cancel the workspace's Stripe subscription. '--yes --confirm WS' required.

```bash
mammoth billing stripe cancel --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `body` | `--input` field | no | — | `dict[str, any]` |  |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Cancels the workspace subscription at the billing provider. Read `billing stripe status` first; `billing stripe resume` reverses a pending cancel. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.stripe.cancel` · **Result:** `BillingStripeCancelResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_cancel`, API `POST /workspaces/{workspace_id}/subscription/cancel` (CancelWorkspaceSubscription)

### mammoth billing stripe checkout-url

Get a Stripe Checkout URL. 'success_url'/'cancel_url' come from '--input'.

```bash
mammoth billing stripe checkout-url --input '{"success_url": "https://example.com/data.csv", "cancel_url": "https://example.com/data.csv"}' --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `success_url` | `--input` field | yes | — | `str` |  |
| `cancel_url` | `--input` field | yes | — | `str` |  |
| `add_payment_method_only` | `--input` field | no | — | `bool` |  |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Creates a checkout URL (success_url and cancel_url are required); nothing is charged until someone completes it. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.stripe.checkout-url` · **Result:** `BillingStripeCheckoutUrlResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_checkout_url`, API `POST /workspaces/{workspace_id}/subscription/create-checkout` (CreateCheckoutUrl)

### mammoth billing stripe create

Create a Stripe subscription. Plan id is positional; interval is optional.

```bash
mammoth billing stripe create 123 --yes --confirm 456
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `PLAN_ID` | positional | yes | — | `int` | ID of the plan. |
| `billing_interval` | `--input` field | no | — | `str` |  |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Required inputs: PLAN_ID.
- **Id:** `billing.stripe.create` · **Result:** `BillingStripeCreateResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_create`, API `POST /workspaces/{workspace_id}/subscription` (CreateWorkspaceSubscription)

### mammoth billing stripe end-trial

End the workspace's Stripe trial. '--yes --confirm WS' required.

```bash
mammoth billing stripe end-trial --yes
```

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Ends the workspace's free trial now and starts billing; the CLI cannot undo it. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.stripe.end-trial` · **Result:** `BillingStripeEndTrialResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_end_trial`, API `POST /workspaces/{workspace_id}/subscription/end-trial` (EndTrialAndStartSubscription)

### mammoth billing stripe get

Get the workspace's Stripe billing state.

```bash
mammoth billing stripe get
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.stripe.get` · **Result:** `BillingStripeGetResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_get`, API `GET /workspaces/{workspace_id}/subscription` (GetWorkspaceSubscription)

### mammoth billing stripe held-change cancel

Cancel the held plan change. '--yes --confirm WS' required.

```bash
mammoth billing stripe held-change cancel --yes --confirm 123
```

- **Effect:** Destructive, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Irreversible: voids the unpaid invoice of the plan change the workspace is holding. If that invoice was already paid, the change is applied instead and the result says landed: true. Read `billing stripe held-change get` first; the confirmation and --dry-run name the held plan. Needs --yes and --confirm WORKSPACE_ID (the refusal prints the exact target).
- **Id:** `billing.stripe.held-change.cancel` · **Result:** `BillingStripeHeldChangeCancelResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_held_change_cancel`, API `POST /workspaces/{workspace_id}/subscription/held-change/cancel` (CancelHeldChange)

### mammoth billing stripe held-change get

Read the plan change the workspace is holding (what is held and why).

```bash
mammoth billing stripe held-change get
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Preconditions:** Answers not found when no plan change is waiting for payment.
- **Id:** `billing.stripe.held-change.get` · **Result:** `BillingStripeHeldChangeGetResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_held_change_get`, API `GET /workspaces/{workspace_id}/subscription/held-change` (GetHeldChange)

### mammoth billing stripe history

Get the workspace's Stripe billing history.

```bash
mammoth billing stripe history
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.stripe.history` · **Result:** `BillingStripeHistoryResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_history`, API `GET /workspaces/{workspace_id}/subscription/billing-history` (GetWorkspaceBillingHistory)

### mammoth billing stripe payment-method delete

Delete a Stripe payment method. '--yes --confirm PAYMENT_METHOD_ID' required.

```bash
mammoth billing stripe payment-method delete resource-123 --yes --confirm resource-123
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `PAYMENT_METHOD_ID` | positional | yes | — | `str` | ID of the payment method. |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Required inputs: PAYMENT_METHOD_ID.
- **Id:** `billing.stripe.payment-method.delete` · **Result:** `BillingStripePaymentMethodDeleteResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_payment_method_delete`, API `DELETE /workspaces/{workspace_id}/subscription/payment-methods/{payment_method_id}` (DeletePaymentMethod)

### mammoth billing stripe payment-method list

List the workspace's Stripe payment methods.

```bash
mammoth billing stripe payment-method list
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none · **Pages:** `single_page`
- **Id:** `billing.stripe.payment-method.list` · **Result:** `BillingStripePaymentMethodListResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_payment_method_list`, API `GET /workspaces/{workspace_id}/subscription/payment-methods` (GetPaymentMethods)

### mammoth billing stripe payment-method set-default

Set a Stripe payment method as default. '--yes --confirm PAYMENT_METHOD_ID' required.

```bash
mammoth billing stripe payment-method set-default resource-123 --yes --confirm resource-123
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `PAYMENT_METHOD_ID` | positional | yes | — | `str` | ID of the payment method. |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Required inputs: PAYMENT_METHOD_ID.
- **Id:** `billing.stripe.payment-method.set-default` · **Result:** `BillingStripePaymentMethodSetDefaultResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_payment_method_set_default`, API `POST /workspaces/{workspace_id}/subscription/payment-methods/default` (SetDefaultPaymentMethod)

### mammoth billing stripe portal-url

Get a Stripe billing portal URL. '--yes --confirm WS' required.

```bash
mammoth billing stripe portal-url --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `return_url` | `--input` field | no | — | `str` |  |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Creates a customer-portal link that grants access to the workspace's billing; do not log or share it. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.stripe.portal-url` · **Result:** `BillingStripePortalUrlResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_portal_url`, API `POST /workspaces/{workspace_id}/subscription/customer-portal` (CreateCustomerPortalUrl)

### mammoth billing stripe preview-invoice

Preview the workspace's next Stripe invoice.

```bash
mammoth billing stripe preview-invoice
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `connector_ids` | `--input` field | no | — | `str` |  |
| `additional_storage_gb` | `--input` field | no | — | `int` |  |
| `additional_user_seats` | `--input` field | no | — | `int` |  |

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.stripe.preview-invoice` · **Result:** `BillingStripePreviewInvoiceResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_preview_invoice`, API `GET /workspaces/{workspace_id}/subscription/preview-invoice` (PreviewInvoice)

### mammoth billing stripe recheck-limits

Recompute the workspace's plan-limit lock and return the report.

```bash
mammoth billing stripe recheck-limits
```

- **Effect:** Benign mutation, scope `workspace` · **Confirmation:** none
- **Preconditions:** Recomputes which plan limits the workspace exceeds and stores the over-limit lock (over_limit_info: over_limit, items, advisory). Run it after deleting items; the lock clears once everything is under the limits. Safe to repeat.
- **Id:** `billing.stripe.recheck-limits` · **Result:** `BillingStripeRecheckLimitsResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_recheck_limits`, API `POST /workspaces/{workspace_id}/subscription/recheck-limits` (RecheckWorkspaceLimits)

### mammoth billing stripe resume

Cancel a scheduled downgrade and keep the paid plan. '--yes --confirm WS' required.

```bash
mammoth billing stripe resume --yes
```

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Keep the paid plan: clears a scheduled cancel-at-period-end downgrade, so the workspace does not move to Free at period end. With nothing scheduled the message says so and nothing changes.
- **Id:** `billing.stripe.resume` · **Result:** `BillingStripeResumeResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_resume`, API `POST /workspaces/{workspace_id}/subscription/resume` (ResumeWorkspaceSubscription)

### mammoth billing stripe retry-payment

Retry the workspace's failed Stripe payment. '--yes --confirm WS' required.

```bash
mammoth billing stripe retry-payment --yes
```

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Retries the failed payment on the workspace's latest invoice; money moves if it succeeds. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.stripe.retry-payment` · **Result:** `BillingStripeRetryPaymentResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_retry_payment`, API `POST /workspaces/{workspace_id}/subscription/retry-payment` (RetryPayment)

### mammoth billing stripe status

Get the workspace's Stripe subscription status.

```bash
mammoth billing stripe status
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.stripe.status` · **Result:** `BillingStripeStatusResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_status`, API `GET /workspaces/{workspace_id}/subscription/status` (GetWorkspaceSubscriptionStatus)

### mammoth billing stripe storage set

Set the TOTAL purchased storage. 'storage_gb' from '--input'; '--yes --confirm WS'.

```bash
mammoth billing stripe storage set --input '{"storage_gb": 1}' --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `storage_gb` | `--input` field | yes | — | `int` |  |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Sets the TOTAL purchased storage in GB (the plan's included storage or one of its storage options), not an increment. Inline-pricing plans only; the subscription is re-priced and the difference invoiced at once. Preview the cost first with billing stripe preview-invoice.
- **Id:** `billing.stripe.storage.set` · **Result:** `BillingStripeStorageSetResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_storage_update`, API `PUT /workspaces/{workspace_id}/subscription/storage` (UpdateSubscriptionStorage)

### mammoth billing stripe sync

Sync the workspace's Stripe billing state. '--yes --confirm WS' required.

```bash
mammoth billing stripe sync --yes
```

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Re-reads the subscription from the billing provider and overwrites Mammoth's copy of plan and status. Needs --yes and --confirm TARGET (the refusal prints the exact target).
- **Id:** `billing.stripe.sync` · **Result:** `BillingStripeSyncResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_sync`, API `POST /workspaces/{workspace_id}/subscription/sync` (SyncSubscription)

### mammoth billing stripe upcoming-invoice

Get the workspace's upcoming Stripe invoice.

```bash
mammoth billing stripe upcoming-invoice
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.stripe.upcoming-invoice` · **Result:** `BillingStripeUpcomingInvoiceResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_upcoming_invoice`, API `GET /workspaces/{workspace_id}/subscription/upcoming-invoice` (GetUpcomingInvoice)

### mammoth billing stripe usage

Get the workspace's Stripe usage figures.

```bash
mammoth billing stripe usage
```

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.stripe.usage` · **Result:** `BillingStripeUsageResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.stripe_usage`, API `GET /workspaces/{workspace_id}/subscription/usage` (GetWorkspaceUsage)

## billing subscription

### mammoth billing subscription get

Get the workspace's subscription details.

```bash
mammoth billing subscription get
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `fields` | `--input` field | no | — | `str` |  |

- **Effect:** Read, scope `workspace` · **Confirmation:** none
- **Id:** `billing.subscription.get` · **Result:** `BillingSubscriptionGetResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.subscription_get`, API `GET /workspaces/{workspace_id}/subscription_v1` (GetWkspSubscriptionDetail)

### mammoth billing subscription update

Apply a patch to the workspace's subscription. 'patch' comes from '--input'.

```bash
mammoth billing subscription update --input '{"patch": [{"name": "Status"}]}' --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `patch` | `--input` field | yes | — | `list[dict[str, any]]` |  |

- **Effect:** High impact, scope `workspace` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** Plans: storage 1 GB Free, 10 GB Starter, 50 GB Pro; users 1, 5, 10.
- **Id:** `billing.subscription.update` · **Result:** `BillingSubscriptionUpdateResult` · **Backed by:** SDK `mammoth.api.billing.BillingAPI.subscription_update`, API `PATCH /workspaces/{workspace_id}/subscription_v1` (UpdateSubscriptionDetail)

---
Source: https://mammoth.io/docs/build/cli/billing.md · Updated: 2026-11-02
