The Plan Object

Attributes

A plan is a reusable pricing catalog entry. Subscribe a customer to a plan instead of setting amount/frequency directly on the subscription, and every field that defines “how much, how often” is resolved from the plan.

idstring

The unique identifier of the plan (MAX 64; MIN 36).

Example: 00000000-0000-4000-8000-000000000001

account_idstring

The unique identifier of the account the plan belongs to (MAX 64; MIN 36).

Example: 00000000-0000-4000-8000-000000000002

account_idsArray of strings

The additional accounts the plan is shared with, excluding the owner in account_id. Empty for a plan that belongs to a single account. Returned only, the field is not accepted when creating a plan.

Example: [“00000000-0000-4000-8000-000000000003”]

namestring

The plan name (MAX 255; MIN 3).

Example: Streaming Pro

descriptionstring

The plan description. No length limit is currently enforced.

Example: Access to Pro features, billed monthly

merchant_referencestring

Your own identifier for the plan. No length limit is currently enforced.

Example: streaming-pro-monthly

statusenum

Status of the plan.

Possible values:

  • ACTIVE = The plan can be subscribed to.
  • CANCELED = The plan no longer accepts new subscriptions. Canceling a plan also cancels every subscription currently linked to it.
base_amountobject

The default price charged in any country without an explicit entry in country_prices.

Hide properties
currencyenum

The currency used to make the payment (MAX 3; MIN 3; ISO 4217).

valuenumber

The payment amount (multiple of 0.0001).

Example: 20.00

frequencyobject

The billing frequency for the plan. Every subscription created from this plan inherits it — do not send frequency when subscribing with a plan_id.

Hide properties
typeenum

Possible enum values: DAY, WEEK, MONTH, QUARTER, HALF_YEAR, or YEAR.

valueint

Example: 1

country_pricesarray of objects

Explicit per-country prices. A country not listed here falls back to base_amount.

Hide properties
countrystring

MAX 2; MIN 2; ISO 3166-1.

amountobject
Hide properties
currencyenum
valuenumber
allowed_payment_methodsarray of strings

Payment method types accepted for subscriptions on this plan.

Example: ["CARD", "PIX"]

metadataarray of objects

Key-value pairs attached to the plan itself. This is independent of any metadata set directly on a subscription — see the Subscription object for that.

Hide properties
keystring

Example: campaign

valuestring

Example: app_store

phasesarray of objects

An optional leading ladder of phases (for example, a trial) before the plan’s regular price applies. Omit for a flat plan with no trial.

Hide properties
order*int

1-indexed position in the ladder. The highest order is the terminal, regular-price phase and has no duration. Required.

name*string

Required, non-empty — every phase must have a name.

type*enum

Required. Possible values: TRIAL (any leading phase, any price including 0), REGULAR (the terminal phase).

durationobject

Required on every non-terminal phase; omitted on the terminal phase.

Hide properties
typeenum

DAY, WEEK, MONTH, or YEAR.

valueint
frequencyobject

Optional. If omitted, the phase bills as a single lump-sum charge covering the whole duration. If set, the phase bills every frequency interval instead. Not applicable to the terminal phase.

Hide properties
typeenum

DAY, WEEK, MONTH, QUARTER, HALF_YEAR, or YEAR.

valueint
amountobject

The phase’s flat price. 0 is allowed (a free trial).

On a non-terminal phase, this or country_prices is required — one of the two. On the terminal REGULAR phase, omit this entirely: sending an amount there is rejected with 400 BAD_REQUEST (“The terminal phase price comes from the plan base_amount/country_prices - remove the phase amount”). The terminal phase’s price always comes from the plan’s own base_amount/country_prices, never from a phase-level field.
country_pricesarray of objects

Per-country prices for this phase, same shape as the plan-level country_prices. On a non-terminal phase, this or amount is required. Not applicable to the terminal phase.

total_paymentsint

Server-computed. If frequency is omitted, always 1 (one lump-sum charge for the whole phase). If frequency is set, duration / frequency (both in the same unit) — e.g. a 3-month duration billed monthly (frequency: {type: MONTH, value: 1}) produces 3. null on the terminal phase.

subscribers_countint

The number of live subscriptions (in any non-terminal status) currently on this plan. This is the set a cancel would affect.

Example: 12

Only returned by List Plans — not present on Create Plan or Retrieve Plan responses.
countriesarray of strings

Sorted ISO α2 codes — the distinct union of every country this plan explicitly prices, at the plan level or inside any phase. An empty array means the plan applies globally via base_amount, not that it has no coverage.

Only returned by List Plans — not present on Create Plan or Retrieve Plan responses.
created_atTimestamp
updated_atTimestamp