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

# List subscription plans

> Retrieves a paginated list of subscription plans with optional filtering by active status and billing interval.



## OpenAPI

````yaml /api-reference/orchestrator-openapi.json get /v1/plans
openapi: 3.0.0
info:
  title: Payment Orchestrator API
  description: API documentation for the Payment Orchestrator service
  version: 1.0.0
servers:
  - url: https://api.sandbox.cheqpay.mx/pos
    description: Sandbox environment
  - url: https://prod.cheqpay.mx/pos
    description: Production environment
security:
  - ApiKeyAuth: []
    MerchantIdAuth: []
tags:
  - name: Customer
    description: Customer management endpoints (v1)
  - name: Customer V2
    description: >-
      Customer management endpoints (v2) - merchant-scoped, no external ID
      required
  - name: Payment Order
    description: Payment order management endpoints
  - name: Checkout
    description: Payment checkout endpoints
  - name: Payment Method
    description: Payment method management endpoints
  - name: Subscription Plan
    description: Subscription plan management endpoints for recurring payments
  - name: Subscription
    description: Subscription management endpoints for recurring billing
  - name: Subscription Invoice
    description: Subscription invoice management endpoints
paths:
  /v1/plans:
    get:
      tags:
        - Subscription Plan
      summary: List subscription plans
      description: >-
        Retrieves a paginated list of subscription plans with optional filtering
        by active status and billing interval.
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Number of plans to return per page (max 100)
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number (starts from 1)
        - name: active
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
          description: Filter by active status
        - name: interval
          in: query
          schema:
            type: string
            enum:
              - DAY
              - WEEK
              - MONTH
              - YEAR
          description: Filter by billing interval
      responses:
        '200':
          description: Subscription plans retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionPlanListResponse'
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
components:
  schemas:
    SubscriptionPlanListResponse:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionPlanResponse'
          description: List of subscription plans
        pagination:
          type: object
          properties:
            total:
              type: integer
              description: Total number of plans matching the filter
              example: 50
            limit:
              type: integer
              description: Number of plans per page
              example: 20
            page:
              type: integer
              description: Current page number (starts from 1)
              example: 1
            hasMore:
              type: boolean
              description: Whether there are more plans available
              example: true
    ValidationError:
      type: object
      description: Validation error response
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: Error message
          example: Validation failed
        errors:
          type: array
          description: List of validation errors
          items:
            type: object
            properties:
              field:
                type: string
                description: Field that failed validation
                example: name
              message:
                type: string
                description: Validation error message
                example: Required
      example:
        message: Validation failed
        errors:
          - field: name
            message: Required
    UnauthorizedError:
      type: object
      description: Unauthorized error response
      properties:
        message:
          type: string
          description: Error message
          example: Invalid api key
      example:
        message: Invalid api key
    InternalError:
      type: object
      description: Error response
      properties:
        message:
          type: string
          description: Error message
          example: Error message
      example:
        message: Error message
    SubscriptionPlanResponse:
      type: object
      required:
        - id
        - merchantId
        - name
        - amount
        - currency
        - interval
        - intervalCount
        - active
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique plan identifier
          example: 123e4567-e89b-12d3-a456-426614174000
        merchantId:
          type: string
          description: Merchant identifier
          example: merchant_123
        externalId:
          type: string
          nullable: true
          description: External plan ID from merchant system
          example: PLAN-MONTHLY-001
        name:
          type: string
          description: Plan name
          example: Monthly Premium Plan
        description:
          type: string
          nullable: true
          description: Plan description
          example: Premium subscription with all features included
        amount:
          type: string
          description: Amount in smallest currency unit (string representation of BigInt)
          example: '9900'
        currency:
          type: string
          description: Currency code
          example: MXN
        interval:
          type: string
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
          description: Billing interval
          example: MONTH
        intervalCount:
          type: integer
          description: Number of intervals between billings
          example: 1
        trialDays:
          type: integer
          nullable: true
          description: Number of trial days
          example: 14
        active:
          type: boolean
          description: Whether the plan is active
          example: true
        metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: Additional metadata
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2025-01-15T10:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2025-01-15T10:00:00.000Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication (required)
    MerchantIdAuth:
      type: apiKey
      in: header
      name: x-merchant-id
      description: Merchant ID for identifying the merchant (required)

````