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

# Listar assinaturas

> Lista paginada das assinaturas da loja da chave. Todos os filtros são opcionais e se combinam (E); sem filtro, traz todas. `offerId` ou `productId` de outra loja, ou inexistente, devolve lista vazia. Ordem: `createdAt` decrescente e, no empate, `id` decrescente. O item não traz ids nem dados do gateway.

Escopo exigido: `subscriptions:read`.



## OpenAPI

````yaml /openapi.json get /v1/subscriptions
openapi: 3.1.0
info:
  title: Gravity Play API
  version: 1.0.0
  description: >-
    API para criar cobranças, receber pagamentos e ler cursos, turmas, alunos e
    progresso da área de membros. Cada chave de API tem escopos; cada operação
    indica o escopo que exige.
servers:
  - url: https://api.sandbox.gravitypay.app
    description: Sandbox (testes) — alvo do try-it
  - url: https://api.gravitypay.app
    description: Produção
security:
  - bearerAuth: []
tags:
  - name: Cobranças
    description: Cobranças avulsas com link de pagamento.
  - name: Pagamentos
    description: Vendas da loja e vendedores.
  - name: Assinaturas
    description: Assinaturas da loja, com dados do cliente. Exige `subscriptions:read`.
  - name: Cursos
    description: Cursos da área de membros, com módulos e aulas.
  - name: Turmas
    description: Turmas dos cursos.
  - name: Alunos
    description: 'Alunos, matrículas e progresso. Dado pessoal: exige `students:read`.'
paths:
  /v1/subscriptions:
    get:
      tags:
        - Assinaturas
      summary: Listar assinaturas
      description: >-
        Lista paginada das assinaturas da loja da chave. Todos os filtros são
        opcionais e se combinam (E); sem filtro, traz todas. `offerId` ou
        `productId` de outra loja, ou inexistente, devolve lista vazia. Ordem:
        `createdAt` decrescente e, no empate, `id` decrescente. O item não traz
        ids nem dados do gateway.


        Escopo exigido: `subscriptions:read`.
      operationId: listSubscriptions
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PerPage'
        - name: productId
          in: query
          required: false
          schema:
            type: string
          description: Assinaturas cuja oferta pertence a este produto.
        - name: offerId
          in: query
          required: false
          schema:
            type: string
          description: Assinaturas desta oferta.
        - name: customerEmail
          in: query
          required: false
          schema:
            type: string
          description: >-
            E-mail do cliente, sem diferenciar maiúsculas e ignorando espaços
            nas pontas. Vazio responde 400.
        - name: customerDocument
          in: query
          required: false
          schema:
            type: string
          description: >-
            CPF ou CNPJ do cliente. Compara só os dígitos: `123.456.789-09` e
            `12345678909` acham a mesma assinatura, gravada de qualquer um dos
            jeitos. Valor sem nenhum dígito responde 400.
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - active
              - past_due
              - canceled
              - incomplete
          description: Status da assinatura. Outro valor responde 400.
      responses:
        '200':
          description: Lista de assinaturas
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionList'
              example:
                object: list
                data:
                  - id: clx1sub01
                    object: subscription
                    status: active
                    amountInCents: 4990
                    currency: BRL
                    billingCycle: MONTHLY
                    paymentMethod: credit_card
                    provider: PAGARME
                    offer:
                      id: clx1offer01
                      name: Plano mensal
                    product:
                      id: clx1product01
                      name: Mentoria
                    customer:
                      email: ana@cliente.com
                      name: Ana Cliente
                      document: '12345678909'
                      phone: '11999990000'
                    parentSubscriptionId: null
                    salesRep:
                      id: clx1rep01
                      name: Bruno Vendas
                      refCode: BRUNO1
                    salesRefCode: BRUNO1
                    currentPeriodEnd: '2026-10-10T14:21:00.000Z'
                    nextChargeAt: null
                    canceledAt: null
                    createdAt: '2026-09-10T14:21:00.000Z'
                    updatedAt: '2026-09-10T14:21:05.000Z'
                page: 1
                perPage: 50
                total: 1
                totalPages: 1
                hasMore: false
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/InsufficientScope'
components:
  parameters:
    Page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
      description: >-
        Página (começa em 1). Página além da última devolve `data` vazio e
        `hasMore` false.
    PerPage:
      name: perPage
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
      description: Itens por página (1 a 100; default 50).
  schemas:
    SubscriptionList:
      type: object
      required:
        - object
        - data
        - page
        - perPage
        - total
        - totalPages
        - hasMore
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Subscription'
        page:
          type: integer
        perPage:
          type: integer
        total:
          type: integer
        totalPages:
          type: integer
        hasMore:
          type: boolean
    Subscription:
      type: object
      required:
        - id
        - object
        - status
        - amountInCents
        - currency
        - billingCycle
        - paymentMethod
        - provider
        - offer
        - product
        - customer
        - parentSubscriptionId
        - salesRep
        - salesRefCode
        - currentPeriodEnd
        - nextChargeAt
        - canceledAt
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - subscription
        status:
          type: string
          enum:
            - active
            - past_due
            - canceled
            - incomplete
        amountInCents:
          type:
            - integer
            - 'null'
          description: >-
            Valor recorrente gravado na criação da assinatura. Editar a oferta
            depois não muda este valor. `null` em assinatura antiga sem o
            registro.
        currency:
          type:
            - string
            - 'null'
          description: Moeda gravada na criação, como `amountInCents`.
        billingCycle:
          type:
            - string
            - 'null'
          enum:
            - WEEKLY
            - MONTHLY
            - QUARTERLY
            - SEMIANNUAL
            - ANNUAL
            - null
          description: Ciclo gravado na criação.
        paymentMethod:
          type: string
          enum:
            - credit_card
            - pix
            - boleto
        provider:
          type: string
          enum:
            - STRIPE
            - ASAAS
            - EFI
            - PAGARME
        offer:
          type:
            - object
            - 'null'
          description: '`null` quando a oferta foi apagada.'
          required:
            - id
            - name
          properties:
            id:
              type: string
            name:
              type: string
        product:
          type:
            - object
            - 'null'
          description: Produto da oferta. `null` quando a oferta foi apagada.
          required:
            - id
            - name
          properties:
            id:
              type: string
            name:
              type: string
        customer:
          type: object
          required:
            - email
            - name
            - document
            - phone
          properties:
            email:
              type:
                - string
                - 'null'
            name:
              type:
                - string
                - 'null'
            document:
              type:
                - string
                - 'null'
              description: 'CPF/CNPJ como foi gravado: só dígitos ou formatado.'
            phone:
              type:
                - string
                - 'null'
        parentSubscriptionId:
          type:
            - string
            - 'null'
          description: Assinatura principal, quando esta nasceu de um order bump.
        salesRep:
          type:
            - object
            - 'null'
          description: >-
            Quem vendeu, no mesmo formato de `Payment.salesRep`. `null` em venda
            direta, código que não resolveu ou vendedor removido.
          required:
            - id
            - name
            - refCode
          properties:
            id:
              type: string
            name:
              type: string
            refCode:
              type: string
        salesRefCode:
          type:
            - string
            - 'null'
          description: Código de referência bruto gravado na assinatura.
        currentPeriodEnd:
          type:
            - string
            - 'null'
          format: date-time
          description: Fim do período já pago.
        nextChargeAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Próxima cobrança gerada pelo Gravity Play (PIX, boleto e cartão com
            recorrência própria). `null` quando o gateway cobra sozinho.
        canceledAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          required:
            - type
            - message
          properties:
            type:
              type: string
              description: >-
                `authentication` (401), `insufficient_scope` (403),
                `invalid_request` (400) ou `not_found` (404).
            message:
              type: string
            param:
              type: string
              description: Parâmetro que falhou, em `invalid_request`.
            requiredScope:
              type: string
              description: Escopo que falta, em `insufficient_scope`.
  responses:
    Error:
      description: Erro
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InsufficientScope:
      description: A chave é válida, mas não tem o escopo exigido pela operação.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: insufficient_scope
              message: Esta chave de API não tem o escopo students:read.
              requiredScope: students:read
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````