---
title: "Update account with new Subscription details"
method: PUT
path: "/billing/accounts/{account_id}/subscription"
tags: ["Billing"]
---

# Update account with new Subscription details

`PUT /billing/accounts/{account_id}/subscription`

Used to update the mabl Account and Subscriptions for the associated Stripe Customer

## Path parameters

- `account_id` string, required

## Request body

- MablStripeSubscriptionUpdate — mabl Subscription update
  - `stripe_customer_id` string — Stripe Customer ID for the associated Account
  - `prorate` boolean — If true, will generate a proration invoice item that credits remaining unused time until the Subscription period end
  - `invoice_cancellations_now` boolean — If true, will generate a final invoice that invoices resulting cancellations for any un-invoiced metered usage and new/pending proration invoice items. Only valid when cancelling Subscriptions alongside an update.
  - `collection_method` 'charge_automatically' | 'send_invoice' — Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.
  - `trial_until_next_anchor` boolean — Defines if a newly created Subscription should be a trial until the next billing anchor (1st of month at 23:00 UTC)
  - `days_until_due` integer — Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where collection_method is set to send_invoice.
  - `force_recreate` boolean — If true, will entirely cancel and recreate Subscriptions
  - `backdate_start_time` integer — For new subscriptions, a past time in epoch millis to backdate the subscription’s start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time.
  - `core` object — Description of the `core` mabl Subscription.
    - `interval` 'month' | 'quarter' | 'annual' — Interval of the Stripe Subscription billing cycle
    - `price` string — ID of the associated Stripe Price
  - `addons` AccountSubscriptionAddons[] — Description of the addons to be applied to the Account.
    - `addon` 'a11y' | 'advanced_ai' | 'advanced_content_validation' | 'mobile' | 'performance' | 'tam' — Core billing addon
    - `quantity` integer — Quantity of the addon to be applied to the Account.
  - `overages` object — Description of the `overages` mabl Subscription. This will include up to three Prices (credits, automators, and participants).
    - `allocations` object — Allocations for credits, automators, and participants to be applied to the Account.
      - `credits` integer — Total number of allocated credits for the billing period
      - `automators` integer — Total number of allocated automators for the billing period
      - `participants` integer — Total number of allocated participants for the billing period
    - `interval` 'month' | 'quarter' | 'annual' — Interval of the Stripe Subscription billing cycle
    - `price_ids` string[] — ID of the related Stripe Price for the overages Subscription

## Response `200`

Success

- Account — A billing account
  - `id` string — The ID of the DailyExecutionUsage
  - `disabled` boolean — True if the account has been manually disabled; false/undefined otherwise
  - `disabled_last_updated_time` integer — Time at which the disabled flag was last updated
  - `disabled_last_updated_by_id` string — The ID of the user who last updated the disabled flag
  - `name` string — The name of the account
  - `stripe_customer_details` StripeCustomerDetails — Details about the customer in stripe
    - `stripe_country` string — Two letter ISO 3166-1 country code
    - `stripe_state` string — State, county, province, or region.
    - `customer_name` string — The name of the customer
  - `stripe_customer_id` string — Legacy billing accounts only -- The ID of customer in stripe
  - `company_id` string — The id of the company that owns the account
  - `customer_name` string — DEPRECATED - The name of the customer
  - `subscription` object — mabl Core billing accounts only -- Subscription related information about the account
    - `allocations` BillingAllocations — Allocations for the billing period
      - `credits` integer — Total number of credits allocated for the billing period
      - `automators` integer — Total number of automators allocated for the billing period
      - `participants` integer — Total number of participants allocated for the billing period
      - `enforce_limit` boolean, nullable — When true on a workspace's allocations, the workspace's explicit credit allocation is enforced: new cloud runs are blocked once the allocation is exhausted for the billing period. Absent or false, the allocation is informational only. Requires an explicit credits value. Only meaningful on a workspace's allocations; ignored on an account subscription's allocations.
    - `addons` AccountSubscriptionAddons[] — Account addons
      - `addon` 'a11y' | 'advanced_ai' | 'advanced_content_validation' | 'mobile' | 'performance' | 'tam' — Core billing addon
      - `quantity` integer — Quantity of the addon to be applied to the Account.
    - `execution_credit_weights` ExecutionCreditWeights — A mapping used to translate test executions into the equivalent execution credit usage
      - `adhoc_ai_assertion_batch` integer — Adhoc ai assertion batch size per billable unit
      - `functional_advanced_ai` integer — Defines how many additional credits each functional test will consume due to advanced ai features
      - `functional_api` integer — Defines how many credits each functional api test consume
      - `functional_browser` integer — Defines how many credits each functional browser test consume
      - `functional_mobile` integer — Defines how many credits each functional mobile test consume
      - `performance_api_15vum` integer — Defines how many credits 15 virtual user minutes consume in a performance api test
      - `performance_browser_15vum` integer — Defines how many credits 15 virtual user minutes consume in a performance browser test
    - `legacy` boolean — Indicator if the account is on the legacy billing system
    - `stripe` object — Stripe information associated with the account
      - `customer` object — Information about the associated Stripe Customer
        - `id` string — ID of the associated Stripe Customer
        - `name` string — Name of the associated Stripe Customer
        - `state` string — State, county, province, or region of the associated Stripe Customer
        - `country` string — Two letter ISO 3166-1 country code of the associated Stripe Customer
      - `subscriptions` MablStripeSubscription[] — Array of Stripe Subscriptions as they relate to mabl billing
        - `id` string — ID of the Subscription in Stripe
        - `interval` 'month' | 'quarter' | 'annual' — Interval of the Stripe Subscription billing cycle
        - `billing_cycle_anchor` integer — The reference point in epoch time millis that aligns past, present, and future billing cycle interval start and end times. Note, this can be in the future!
        - `items` object[]
          - `id` string — ID of the Subscription Item in Stripe
          - `created_time` integer — The time in epoch millis that this subscription item was created.
          - `price_id` string — ID of the associated Price in Stripe
          - `type` 'core' | 'credit_overages' — Product variant
        - `type` 'core' | 'overages' — Subscription variant; core and overages Subscription can be separated on different intervals.
    - `is_trial` boolean — Indicates if the Account subscription is a trial. This does not indicate if the trial is active or expired.
    - `trial_start_time` integer — Time free trial started in epoch time
    - `trial_end_time` integer — Time free trial ends in epoch time
    - `start_time` integer — Time the user first subscribed
    - `end_time` integer — Time the user's subscription ends
  - `stripe_subscriptions` Subscription[] — Legacy billing accounts only -- The plans that a customer is subscribed to
    - `plan_type` 'journey_executions' | 'executions' | 'monthly' | 'quarterly' | 'technical_account_manager' | 'yearly' | 'annual_executions' — The type of plan this subscription is on
    - `plan_subtype` 'a11y' | 'api' | 'browser' | 'technical_account_manager' | 'performance'
    - `plan_id` string — The id for the plan subscribed to in stripe
    - `subscription_id` string — The id of the subscription in stripe. A subscription can have multiple subscription items.
    - `subscription_items_id` string — The id of the subscription item for this account on this plan. This is the id we need to bill against.
  - `has_completed_additional_trial_info` boolean — flag indicating wether the user who created this account has completed the additional information required when authenticating with google
  - `free_trial_start_time` integer — Legacy billing accounts only -- time free trial started in epoch time
  - `free_trial_end_time` integer — Legacy billing accounts only -- time free trial ends in epoch time
  - `subscription_start_time` integer — Legacy billing accounts only -- time the user first subscribed
  - `subscription_end_time` integer — Legacy billing accounts only -- time the user's subscription ends
  - `mabl_plan_type` 'enterprise' | 'enterprise_5000' | 'enterprise_10000' | 'enterprise_20000' | 'enterprise_50000' | 'essentials' | 'growth' | 'pay_as_you_go' | 'pro' | 'seed' | 'startup' | 'trial' | 'core_migrated' — The plan type this user is currently subscribed to
  - `mabl_subscription_period` 'monthly' | 'quarterly' | 'yearly' — The period of the subscription
  - `allocated_test_runs` integer — Legacy billing accounts only -- The number of browser test runs allocated to this account by its subscription
  - `allocated_api_runs` integer — Legacy billing accounts only -- The number of API test runs allocated to this account by its subscription
  - `allocated_a11y_runs` integer — Legacy billing accounts only -- The number of a11y step runs allocated to this account by its subscription
  - `performance_subscription_start_time` integer — Legacy billing accounts only -- time the user first subscribed to performance testing feature
  - `allocated_performance_minutes` integer — Legacy billing accounts only -- The amount of performance virtual user-minutes allocated to this account by its subscription. This allocation represents the "soft cap" after which overages will be incurred and is purely informational. The performance "hard cap" can be found in the workspace quota under allocations => performance.
  - `api_steps_billable` boolean — Legacy billing accounts only -- If true, API steps in browser tests will count toward API overages; otherwise only API test requests will be counted
  - `effective_features` string[] — Computed set of all features that this account has access to
  - `granted_features` string[] — Set of additional features that should be included in 'effective_features' regardless of plan type
  - `excluded_features` string[] — Set of features that should be excluded from 'effective_features' regardless of plan type; overrides granted_features.
  - `created_time` integer — Time at which the account was created
  - `created_by_id` string — The ID of the user who created this account
  - `last_updated_time` integer — Time at which the account was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this account

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Account not found
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
