Update a plan

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

post/v1/plans/{plan}

Path parameters

planstring required

Response

Successful response.

activeboolean required

Whether the plan can be used for new purchases.

amountinteger nullable

The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.

amount_decimalstring decimal nullable

The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.

billing_scheme'per_unit' | 'tiered' required

Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in amount) will be charged per unit in quantity (for plans with usage_type=licensed), or per unit of total usage (for plans with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.

createdinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

currencystring currency required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

idstring required

Unique identifier for the object.

interval'day' | 'month' | 'week' | 'year' required

The frequency at which a subscription is billed. One of day, week, month or year.

interval_countinteger required

The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.

livemodeboolean required

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

metadataobject nullable

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

meterstring nullable

The meter tracking the usage of a metered price

nicknamestring nullable

A brief description of the plan, hidden from customers.

object'plan' required

String representing the object's type. Objects of the same type share the same value.

tiers_mode'graduated' | 'volume' nullable

Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.

trial_period_daysinteger nullable

Default number of trial days when subscribing a customer to this plan using trial_from_plan=true.

usage_type'licensed' | 'metered' required

Configures how the quantity per period should be determined. Can be either metered or licensed. licensed automatically bills the quantity set when adding it to a subscription. metered aggregates the total usage based on usage records. Defaults to licensed.

Changes

Changed in 11 of the 51 revisions of this API.192124

    • removed the required property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/application_fee/anyOf[subschema #2: PlatformFee]/balance_transaction/anyOf[subschema #2: BalanceTransaction]/source/anyOf[subschema #6: Dispute]/payment_method_details/card/network from the response with the default status

      response-required-property-removed

    • removed the required property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/balance_transaction/anyOf[subschema #2: BalanceTransaction]/source/anyOf[subschema #6: Dispute]/payment_method_details/card/network from the response with the default status

      response-required-property-removed

    • removed the required property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/failure_balance_transaction/anyOf[subschema #2: BalanceTransaction]/source/anyOf[subschema #6: Dispute]/payment_method_details/card/network from the response with the default status

      response-required-property-removed

    This revision's changelog hit the recording limit, so it may not list every change to this endpoint.

    • added the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/card_present/anyOf[subschema #1: payment_method_options_card_present]/capture_method to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/amount_details/anyOf[subschema #1: PaymentFlowsAmountDetails]/line_items/data/items/payment_method_options/anyOf[subschema #1: PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourcePaymentMethodOptions]/klarna/subscription_reference to the response with the default status

      response-optional-property-added

    • removed the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/paypay from the response with the default status

      response-optional-property-removed

    • removed the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/paypay from the response with the default status

      response-optional-property-removed

    • added the new prevented enum value to the error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/application_fee/anyOf[subschema #2: PlatformFee]/balance_transaction/anyOf[subschema #2: BalanceTransaction]/source/anyOf[subschema #6: Dispute]/status response property for the response status default

      response-property-enum-value-added

    • added the new prevented enum value to the error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/balance_transaction/anyOf[subschema #2: BalanceTransaction]/source/anyOf[subschema #6: Dispute]/status response property for the response status default

      response-property-enum-value-added

    • added the new prevented enum value to the error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/failure_balance_transaction/anyOf[subschema #2: BalanceTransaction]/source/anyOf[subschema #6: Dispute]/status response property for the response status default

      response-property-enum-value-added

    This revision's changelog hit the recording limit, so it may not list every change to this endpoint.

    • added the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/paynow/location to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/paynow/reader to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/cashapp/transaction_id to the response with the default status

      response-optional-property-added

  • 1199cc3c557429See the full diff
    • the response property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/applicability_config/scope/price_type became optional for the status default

      response-property-became-optional

    • the response property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/total_pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/applicability_config/scope/price_type became optional for the status default

      response-property-became-optional

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/applicability_config/scope/prices to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/priority to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/total_pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/applicability_config/scope/prices to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/total_pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/priority to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/acss_debit/anyOf[subschema #1: payment_intent_payment_method_options_acss_debit]/target_date to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/au_becs_debit/anyOf[subschema #1: payment_intent_payment_method_options_au_becs_debit]/target_date to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/bacs_debit/anyOf[subschema #1: payment_intent_payment_method_options_bacs_debit]/target_date to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/sepa_debit/anyOf[subschema #1: payment_intent_payment_method_options_sepa_debit]/target_date to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/us_bank_account/anyOf[subschema #1: payment_intent_payment_method_options_us_bank_account]/target_date to the response with the default status

      response-optional-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property error/advice_code to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/charge/anyOf[subschema #2: Charge]/outcome/anyOf[subschema #1: ChargeOutcome]/advice_code to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/pay_by_bank to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/paypal/country to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/outcome/anyOf[subschema #1: ChargeOutcome]/advice_code to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/pay_by_bank to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/paypal/country to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/payment_method_options/anyOf[subschema #1: PaymentIntentPaymentMethodOptions]/pay_by_bank to the response with the default status

      response-optional-property-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/customer_tax_ids/items/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/invoice_item/anyOf[subschema #2: InvoiceItem]/subscription/anyOf[subschema #2: Subscription]/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/invoice_item/anyOf[subschema #2: InvoiceItem]/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/default_settings/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/invoice_item/anyOf[subschema #2: InvoiceItem]/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/phases/items/invoice_settings/anyOf[subschema #1: InvoiceSettingSubscriptionSchedulePhaseSetting]/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/subscription/anyOf[subschema #2: Subscription]/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/default_settings/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/phases/items/invoice_settings/anyOf[subschema #1: InvoiceSettingSubscriptionSchedulePhaseSetting]/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/quote/anyOf[subschema #2: Quote]/subscription/anyOf[subschema #2: Subscription]/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/quote/anyOf[subschema #2: Quote]/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/default_settings/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/quote/anyOf[subschema #2: Quote]/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/phases/items/invoice_settings/anyOf[subschema #1: InvoiceSettingSubscriptionSchedulePhaseSetting]/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/quote/anyOf[subschema #2: Quote]/subscription_schedule/anyOf[subschema #2: SubscriptionSchedule]/default_settings/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/quote/anyOf[subschema #2: Quote]/subscription_schedule/anyOf[subschema #2: SubscriptionSchedule]/phases/items/invoice_settings/anyOf[subschema #1: InvoiceSettingSubscriptionSchedulePhaseSetting]/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/subscription/anyOf[subschema #2: Subscription]/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/default_settings/invoice_settings/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    • added the new al_tin enum value to the error/payment_intent/invoice/anyOf[subschema #2: Invoice]/subscription/anyOf[subschema #2: Subscription]/schedule/anyOf[subschema #2: SubscriptionSchedule]/phases/items/invoice_settings/anyOf[subschema #1: InvoiceSettingSubscriptionSchedulePhaseSetting]/account_tax_ids/items/anyOf[subschema #2: tax_id]/type response property for the response status default

      response-property-enum-value-added

    This revision's changelog hit the recording limit, so it may not list every change to this endpoint.

    • added the optional property error/payment_intent/invoice/anyOf[subschema #2: Invoice]/charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/card/network_transaction_id to the response with the default status

      response-optional-property-added

    • added the optional property error/payment_intent/latest_charge/anyOf[subschema #2: Charge]/payment_method_details/anyOf[subschema #1: payment_method_details]/card/network_transaction_id to the response with the default status

      response-optional-property-added

Of the 51 revisions, 14 have no diff computed and 6 have a changelog that could not be searched.