> ## Documentation Index
> Fetch the complete documentation index at: https://docs.therius.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Subscription Plan

> Define a recurring billing plan with amount, currency, interval, trial period, and optional geographic restrictions.

Plans define the billing terms for subscriptions — amount, currency, interval, and optional trial period. Once a plan has active subscribers, its `amount`, `interval`, `intervalCount`, and `currency` are immutable. To change pricing or cadence for existing subscribers, create a new plan and migrate them using [change-plan](/api-reference/subscriptions/change-plan).

`amount`, `currency`, `interval`, and `intervalCount` become immutable once the plan has active subscribers — see the parameters panel above for the full field list, including the introductory-pricing (`introAmount`/`introBillingCycles`) and `maxBillingCycles`/`availableCountries` options.

Returns `201 Created` with the full plan object including the generated `id`.

<RequestExample>
  ```bash cURL theme={"dark"}
  curl -X POST https://api.therius.io/v1/subscription/plan \
    -H "Authorization: Bearer prv_production_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "merchantCode": "MERCHANT_001",
      "name": "Pro Monthly",
      "amount": 2999,
      "currency": "USD",
      "interval": "month",
      "trialPeriodDays": 14,
      "availableCountries": ["US", "CA"]
    }'
  ```
</RequestExample>


## OpenAPI

````yaml POST /subscription/plan
openapi: 3.1.0
info:
  title: Therius API
  description: REST API for payments, subscriptions, and billing plans.
  version: 1.0.0
servers:
  - url: https://api.therius.io/v1
    description: Production
  - url: https://api-sandbox.therius.io/v1
    description: Sandbox
security:
  - bearerAuth: []
paths:
  /subscription/plan:
    post:
      tags:
        - Plans
      summary: Create a subscription plan
      operationId: createPlan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - merchantCode
                - name
                - interval
                - amount
                - currency
              properties:
                merchantCode:
                  type: string
                  description: Your merchant account identifier.
                name:
                  type: string
                  description: Human-readable plan name.
                description:
                  type: string
                  description: Optional plan description.
                interval:
                  type: string
                  enum:
                    - day
                    - week
                    - month
                    - year
                  description: Billing interval unit.
                intervalCount:
                  type: integer
                  description: Number of `interval` units between charges. Defaults to 1.
                amount:
                  type: integer
                  description: Recurring charge in the currency minor units.
                currency:
                  type: string
                  description: ISO 4217 currency code.
                exponent:
                  type: integer
                  description: >-
                    Decimal places for `amount` - defaults to the currency
                    standard (2 for USD, 0 for JPY).
                trialPeriodDays:
                  type: integer
                  description: Free-trial length in days. `0` for no trial.
                introAmount:
                  type: integer
                  description: >-
                    Introductory charge in minor units for the first
                    `introBillingCycles` cycles.
                introBillingCycles:
                  type: integer
                  description: Cycles billed at `introAmount` before reverting to `amount`.
                maxBillingCycles:
                  type: integer
                  description: >-
                    Total cycles after which the subscription auto-completes.
                    `0` = open-ended.
                availableCountries:
                  type: array
                  items:
                    type: string
                  description: >-
                    ISO 3166-1 alpha-2 codes to restrict the plan to. Omit for
                    global availability.
      responses:
        '201':
          description: Plan created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan'
components:
  schemas:
    Plan:
      type: object
      description: >-
        A reusable billing plan. `amount` is a flat integer in the currency
        minor units (with separate `currency` + `exponent`) - not an Amount
        object.
      properties:
        id:
          type: integer
          description: The plan unique integer ID.
        merchantId:
          type: integer
          description: The merchant account that owns the plan.
        name:
          type: string
        description:
          type: string
        interval:
          type: string
          enum:
            - day
            - week
            - month
            - year
          description: Billing interval unit. Immutable after creation.
        intervalCount:
          type: integer
          description: >-
            Number of `interval` units between charges - `month` + `3` bills
            quarterly.
        amount:
          type: integer
          description: >-
            Recurring charge in the currency minor units (e.g. `2999` = $29.99
            at exponent 2). Immutable after creation.
        currency:
          type: string
          description: ISO 4217 currency code. Immutable after creation.
        exponent:
          type: integer
          description: >-
            Decimal places for `amount` / `introAmount` - `2` for USD, `0` for
            JPY.
        trialPeriodDays:
          type: integer
          description: Free-trial length in days before the first charge. `0` for no trial.
        introAmount:
          type: integer
          description: >-
            Introductory charge in minor units for the first
            `introBillingCycles` cycles, if set.
        introBillingCycles:
          type: integer
          description: >-
            How many initial cycles are billed at `introAmount` before the rate
            reverts to `amount`.
        maxBillingCycles:
          type: integer
          description: >-
            Total cycles after which the subscription auto-completes. `0` =
            open-ended.
        availableCountries:
          type: array
          items:
            type: string
          description: >-
            ISO 3166-1 alpha-2 codes the plan is offered in. Empty = available
            everywhere.
        isActive:
          type: boolean
          description: >-
            Whether the plan accepts new subscribers. Existing subscriptions are
            unaffected when this is `false`.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret API key: `Bearer prv_production_xxx` (production) or `Bearer
        prv_sandbox_xxx` (sandbox).

````