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

# Resume a subscription

> Reverses a period-end cancellation that has not yet taken effect, for a subscription with cancel_at_period_end set to true.



## OpenAPI

````yaml /openapi/subscriptions.yaml post /subscriptions/{id}/resume
openapi: 3.0.3
info:
  title: Ionic Subscriptions API
  version: '2026-05-01'
  description: |
    Recurring billing subscriptions.

    A subscription (`sub_…`) attaches one or more priced items to a customer
    and bills them automatically each period. Each item references a recurring
    price (`price_…`); all items must share one currency and one billing
    cadence. A first invoice is issued at creation (unless the subscription
    opens with a trial); subsequent invoices are issued at each period boundary.

    All timestamps are Unix epoch seconds. Monetary amounts are integers in
    the currency's minor unit (for example cents for USD); amounts are
    determined by the item prices, not carried on the subscription itself.
    Identifiers are opaque, prefixed strings: subscriptions are `sub_…` and
    subscription items are `si_…`.

    Authentication uses a merchant secret key as a bearer token. Read
    endpoints require the `subscriptions:read` permission; write endpoints
    require `subscriptions:write`. The mode of the key (test or live) scopes
    which subscriptions it can see and mutate, reflected by each resource's
    `livemode` field. Mutating endpoints accept an optional `Idempotency-Key`
    header.

    Errors are returned as `{ "error": { "code": "...", "message": "..." } }`.
    A malformed path identifier returns 400. An operation rejected by the
    subscription's state machine (for example canceling an already-canceled
    subscription) returns 422. Concurrent updates are retried automatically;
    if they still conflict, the API returns 409 and the request can be retried.
servers:
  - url: '{baseUrl}/v1'
    variables:
      baseUrl:
        default: https://api.ionicfi.com
        description: API base URL for your environment.
security:
  - secretKey: []
tags:
  - name: Subscriptions
    description: Create, manage, and inspect recurring billing subscriptions.
paths:
  /subscriptions/{id}/resume:
    parameters:
      - $ref: '#/components/parameters/SubscriptionId'
    post:
      tags:
        - Subscriptions
      summary: Resume a subscription
      description: >-
        Reverses a period-end cancellation that has not yet taken effect, for a
        subscription with cancel_at_period_end set to true.
      operationId: subscriptions_resume
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: The updated subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/SubscriptionNotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/InvalidSubscriptionState'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - secretKey:
            - subscriptions:write
components:
  parameters:
    SubscriptionId:
      name: id
      in: path
      required: true
      description: The subscription id (`sub_…`).
      schema:
        type: string
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        A unique key that makes retries safe: the same key with the same request
        body returns the original response instead of repeating the operation.
      schema:
        type: string
        maxLength: 255
  schemas:
    Subscription:
      type: object
      required:
        - billing_cycle_anchor
        - cancel_at_period_end
        - collection_method
        - created_at
        - current_period_end
        - current_period_start
        - customer
        - id
        - items
        - livemode
        - metadata
        - object
        - status
        - updated_at
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - subscription
        customer:
          type: string
          description: Customer id (`cus_…`).
        status:
          type: string
          enum:
            - incomplete
            - trialing
            - active
            - past_due
            - unpaid
            - canceled
          description: |
            `incomplete` — created; first invoice not yet paid.
            `trialing` — in free trial; no invoice yet (or a zero-total one).
            `active` — most recent invoice paid; in good standing.
            `past_due` — most recent invoice payment failed; in dunning.
            `unpaid` — dunning exhausted; service stopped. Terminal.
            `canceled` — terminated (immediately or at period end). Terminal.
        collection_method:
          type: string
          enum:
            - charge_automatically
            - send_invoice
        default_payment_method:
          type: string
          nullable: true
          description: >-
            The payment method used for automatic renewal charges (`pm_…`). Null
            when not set.
        items:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionItem'
        current_period_start:
          type: integer
          description: Unix epoch seconds. Start of the current billing period.
        current_period_end:
          type: integer
          description: Unix epoch seconds. End of the current billing period.
        billing_cycle_anchor:
          type: integer
          description: >-
            Unix epoch seconds. The reference point used to compute period
            boundaries.
        trial_start:
          type: integer
          nullable: true
          description: >-
            Unix epoch seconds. Start of the trial period. Null when the
            subscription was not created with a trial.
        trial_end:
          type: integer
          nullable: true
          description: Unix epoch seconds. End of the trial period. Null when no trial.
        cancel_at_period_end:
          type: boolean
          description: >-
            True when the subscription is scheduled to cancel at the end of the
            current period.
        canceled_at:
          type: integer
          nullable: true
          description: >-
            Unix epoch seconds. When the cancellation was requested. Null while
            not canceled.
        ended_at:
          type: integer
          nullable: true
          description: >-
            Unix epoch seconds. When the subscription terminated. Null while
            active.
        latest_invoice:
          type: string
          nullable: true
          description: >-
            Most recent invoice id (`inv_…`). Null before the first invoice is
            issued.
        metadata:
          type: object
          additionalProperties:
            type: string
        livemode:
          type: boolean
        created_at:
          type: integer
          description: Unix epoch seconds.
        updated_at:
          type: integer
    SubscriptionItem:
      type: object
      required:
        - id
        - metadata
        - price
        - quantity
      properties:
        id:
          type: string
          description: Item id (`si_…`).
        price:
          type: string
          description: Recurring price id (`price_…`).
        quantity:
          type: integer
        metadata:
          type: object
          additionalProperties:
            type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: A stable, machine-readable error code.
            message:
              type: string
  responses:
    BadRequest:
      description: The request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_DATA
              message: invalid collection_method
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key lacks the required permission, or the merchant is not active.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    SubscriptionNotFound:
      description: No subscription with that id is visible to this key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: SUBSCRIPTION_NOT_FOUND
              message: subscription not found
    Conflict:
      description: The resource was modified concurrently; retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: CONFLICT
              message: subscription modified concurrently, please retry
    InvalidSubscriptionState:
      description: |
        The operation is not allowed in the subscription's current state, or
        the item prices violate a constraint (for example mismatched currency
        or cadence, or a non-recurring price).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_SUBSCRIPTION_STATE
              message: invalid subscription state for this operation
    RateLimited:
      description: Too many requests. Honour the `Retry-After` header before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: |
        The API could not return a successful response. For a mutating request,
        retrieve the resource before retrying because the operation may have
        completed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: 'A merchant secret key (`sk_…`) sent as `Authorization: Bearer <key>`.'

````