Skip to content
Build with Mammoth › CLI reference: open the docs menu

mammoth billing

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 (--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

CommandWhat it doesEffectConfirmation
billing chargebee-planGet the workspace's Chargebee plan details.Read—
billing hosted-pageGet a Chargebee hosted-page URL. Object type is positional or an input field.High impact--yes --confirm TARGET
billing invoice chargeCharge the workspace's outstanding invoice. '--yes --confirm WS' required.High impact--yes --confirm TARGET
billing invoice listList invoices for the workspace (Stripe billing history).Read—
billing stripe cancelCancel the workspace's Stripe subscription. '--yes --confirm WS' required.High impact--yes --confirm TARGET
billing stripe checkout-urlGet a Stripe Checkout URL. 'success_url'/'cancel_url' come from '--input'.High impact--yes --confirm TARGET
billing stripe createCreate a Stripe subscription. Plan id is positional; interval is optional.High impact--yes --confirm TARGET
billing stripe end-trialEnd the workspace's Stripe trial. '--yes --confirm WS' required.High impact--yes --confirm TARGET
billing stripe getGet the workspace's Stripe billing state.Read—
billing stripe held-change cancelCancel the held plan change. '--yes --confirm WS' required.Destructive--yes --confirm TARGET
billing stripe held-change getRead the plan change the workspace is holding (what is held and why).Read—
billing stripe historyGet the workspace's Stripe billing history.Read—
billing stripe payment-method deleteDelete a Stripe payment method. '--yes --confirm PAYMENT_METHOD_ID' required.High impact--yes --confirm TARGET
billing stripe payment-method listList the workspace's Stripe payment methods.Read—
billing stripe payment-method set-defaultSet a Stripe payment method as default. '--yes --confirm PAYMENT_METHOD_ID' required.High impact--yes --confirm TARGET
billing stripe portal-urlGet a Stripe billing portal URL. '--yes --confirm WS' required.High impact--yes --confirm TARGET
billing stripe preview-invoicePreview the workspace's next Stripe invoice.Read—
billing stripe recheck-limitsRecompute the workspace's plan-limit lock and return the report.Benign mutation—
billing stripe resumeCancel a scheduled downgrade and keep the paid plan. '--yes --confirm WS' required.High impact--yes --confirm TARGET
billing stripe retry-paymentRetry the workspace's failed Stripe payment. '--yes --confirm WS' required.High impact--yes --confirm TARGET
billing stripe statusGet the workspace's Stripe subscription status.Read—
billing stripe storage setSet the TOTAL purchased storage. 'storage_gb' from '--input'; '--yes --confirm WS'.High impact--yes --confirm TARGET
billing stripe syncSync the workspace's Stripe billing state. '--yes --confirm WS' required.High impact--yes --confirm TARGET
billing stripe upcoming-invoiceGet the workspace's upcoming Stripe invoice.Read—
billing stripe usageGet the workspace's Stripe usage figures.Read—
billing subscription getGet the workspace's subscription details.Read—
billing subscription updateApply 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.

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.

mammoth billing hosted-page change_plan --yes --confirm 123
NamePassed asRequiredDefaultTypeNotes
OBJECT_TYPEpositionalno—strType of hosted page to generate; or pass it via the 'object_type' input field. Or the object_type input field.
object_type--input fieldno—str
plan_id--input fieldno—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.

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).

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.

mammoth billing stripe cancel --yes
NamePassed asRequiredDefaultTypeNotes
body--input fieldno—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'.

mammoth billing stripe checkout-url --input '{"success_url": "https://example.com/data.csv", "cancel_url": "https://example.com/data.csv"}' --yes
NamePassed asRequiredDefaultTypeNotes
success_url--input fieldyes—str
cancel_url--input fieldyes—str
add_payment_method_only--input fieldno—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.

mammoth billing stripe create 123 --yes --confirm 456
NamePassed asRequiredDefaultTypeNotes
PLAN_IDpositionalyes—intID of the plan.
billing_interval--input fieldno—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.

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.

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.

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).

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.

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.

mammoth billing stripe payment-method delete resource-123 --yes --confirm resource-123
NamePassed asRequiredDefaultTypeNotes
PAYMENT_METHOD_IDpositionalyes—strID 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.

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.

mammoth billing stripe payment-method set-default resource-123 --yes --confirm resource-123
NamePassed asRequiredDefaultTypeNotes
PAYMENT_METHOD_IDpositionalyes—strID 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.

mammoth billing stripe portal-url --yes
NamePassed asRequiredDefaultTypeNotes
return_url--input fieldno—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.

mammoth billing stripe preview-invoice
NamePassed asRequiredDefaultTypeNotes
connector_ids--input fieldno—str
additional_storage_gb--input fieldno—int
additional_user_seats--input fieldno—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.

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.

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.

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.

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'.

mammoth billing stripe storage set --input '{"storage_gb": 1}' --yes
NamePassed asRequiredDefaultTypeNotes
storage_gb--input fieldyes—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.

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.

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.

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.

mammoth billing subscription get
NamePassed asRequiredDefaultTypeNotes
fields--input fieldno—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'.

mammoth billing subscription update --input '{"patch": [{"name": "Status"}]}' --yes
NamePassed asRequiredDefaultTypeNotes
patch--input fieldyes—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)

Report an issue · support@mammoth.io