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

# Listar assinaturas

> Lista paginada de assinaturas, com filtros e um bloco de métricas agregadas (`stats`).

Lista paginada das assinaturas, com filtros por `status`, `productId`, `offerId`, período e busca por cliente.

A resposta traz um bloco `stats` com métricas agregadas — assinaturas ativas, MRR (receita recorrente mensal), churn e LTV.

<Info>
  Visão conceitual em [Guias › Assinaturas](/guias/assinaturas).
</Info>


## OpenAPI

````yaml GET /v1/subscriptions
openapi: 3.0.3
info:
  title: API Ephra
  description: >-
    API REST para gerar cobranças (PIX, cartão e boleto), consultar transações e
    gerenciar webhooks.
  version: 1.0.0
servers:
  - url: https://api.ephra.io
    description: Servidor de produção
security:
  - bearerAuth: []
tags:
  - name: Autenticação
    description: Login e obtenção do token de acesso
  - name: Pagamentos
    description: Criação de cobranças PIX, cartão e boleto
  - name: Assinaturas
    description: Cobrança recorrente — iniciar, listar, consultar e cancelar assinaturas
  - name: Transações
    description: Consulta de transações
  - name: Webhooks
    description: Cadastro e gerenciamento de webhooks
paths:
  /v1/subscriptions:
    get:
      tags:
        - Assinaturas
      summary: Listar assinaturas
      description: >-
        Lista paginada de assinaturas, com filtros e um bloco de métricas
        agregadas (`stats`).
      operationId: listSubscriptions
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - active
              - overdue
              - cancelled
              - completed
              - failed
        - name: productId
          in: query
          schema:
            type: string
          description: Filtra por produto
        - name: offerId
          in: query
          schema:
            type: integer
          description: Filtra por oferta/plano
        - name: search
          in: query
          schema:
            type: string
          description: Busca por cliente
        - name: period
          in: query
          schema:
            type: string
            enum:
              - all
              - last_30_days
              - this_month
              - last_3_months
        - name: dateFrom
          in: query
          schema:
            type: string
            format: date
          description: Data inicial (ISO)
        - name: dateTo
          in: query
          schema:
            type: string
            format: date
          description: Data final (ISO)
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
            maximum: 100
      responses:
        '200':
          description: Lista de assinaturas
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SubscriptionListResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: clx_sub_123
              startDate:
                type: string
                example: '2026-07-11T12:00:00.000Z'
              product:
                type: object
                properties:
                  id:
                    type: string
                    example: prod_ABC123
                  name:
                    type: string
                    example: Curso Premium
              customer:
                type: object
                properties:
                  id:
                    type: string
                    example: cust_1
                  name:
                    type: string
                    example: Maria Silva
                  email:
                    type: string
                    format: email
                    example: maria@exemplo.com
              status:
                type: string
                enum:
                  - active
                  - overdue
                  - cancelled
                  - completed
                  - failed
                example: active
              statusLabel:
                type: string
                example: Ativo
              netAmountInCents:
                type: integer
                example: 34900
        stats:
          type: object
          properties:
            activeSubscriptions:
              type: integer
              example: 128
            monthlyRecurringRevenueInCents:
              type: integer
              example: 4467200
            ltvMonths:
              type: number
              example: 6.4
            churnRate:
              type: number
              example: 3.2
            totalSubscriptions:
              type: integer
              example: 210
            cancelledSubscriptions:
              type: integer
              example: 42
        pagination:
          type: object
          properties:
            page:
              type: integer
              example: 1
            limit:
              type: integer
              example: 20
            total:
              type: integer
              example: 210
            totalPages:
              type: integer
              example: 11
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: Mensagem descritiva do erro
  responses:
    Unauthorized:
      description: Token ausente, inválido ou expirado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            error: Unauthorized
            message: Token inválido ou expirado
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````