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

# Buscar assinatura

> Retorna uma assinatura pelo seu `id`. Escopo: `subscriptions:read`. Retorna `404` se não for do produtor autenticado.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/subscriptions/{id}
openapi: 3.0.3
info:
  title: Ticto API v2
  version: 2.0.0
  description: >-
    API pública da Ticto para criar produtos e ofertas e ler pedidos,
    assinaturas e saques. Autenticação por token Bearer com escopos granulares.
    Todo acesso é isolado ao produtor dono do token — por construção, não por
    checagem por endpoint.
servers:
  - url: https://api.ticto.cloud
    description: Produção (tokens ticto_live_)
  - url: https://sandbox.ticto.cloud
    description: Sandbox (tokens ticto_test_)
security:
  - bearerAuth: []
tags:
  - name: Produtos
    description: Criação e leitura de produtos.
  - name: Ofertas
    description: Criação e leitura de ofertas de um produto.
  - name: Pedidos
    description: Leitura de pedidos (paridade com a API v1).
  - name: Assinaturas
    description: Leitura de assinaturas (paridade com a API v1).
  - name: Saques
    description: Leitura de saques/cashouts (paridade com a API v1).
paths:
  /api/v2/subscriptions/{id}:
    get:
      tags:
        - Assinaturas
      summary: Buscar assinatura
      description: >-
        Retorna uma assinatura pelo seu `id`. Escopo: `subscriptions:read`.
        Retorna `404` se não for do produtor autenticado.
      operationId: getSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: ID da assinatura.
      responses:
        '200':
          description: Detalhe da assinatura.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth:
            - subscriptions:read
components:
  schemas:
    SubscriptionDetail:
      type: object
      description: Detalhe de uma assinatura (`GET /subscriptions/{id}`).
      properties:
        id:
          type: integer
        price:
          type: integer
          description: Em centavos.
        first_charge_price:
          type: integer
          description: Em centavos; cai para `price` quando não definido.
        currency:
          type: string
          example: BRL
        interval:
          type: integer
          description: Intervalo em dias.
          example: 30
        next_charge:
          type: string
          nullable: true
        situation:
          type: string
          example: active
        best_day_to_charge:
          type: integer
          nullable: true
        free_days:
          type: integer
          nullable: true
        max_charges:
          type: integer
          nullable: true
        successful_charges:
          type: integer
        failed_charges:
          type: integer
        is_smart_installment:
          type: boolean
        cancellation_requested_at:
          type: string
          nullable: true
        canceled_at:
          type: string
          nullable: true
        canceled_by:
          type: string
          nullable: true
        payment_method:
          type: string
          example: credit_card
        pix_recurring_cancellation:
          type: object
          nullable: true
          description: Preenchido só em Pix recorrente cancelado.
          properties:
            cancelled_by:
              type: string
            cancellation_reason:
              type: string
              nullable: true
            cancelled_via_webhook:
              type: boolean
        offer_code:
          type: string
          nullable: true
        offer_name:
          type: string
          nullable: true
        order:
          type: object
          properties:
            id:
              type: integer
            hash:
              type: string
            created_at:
              type: string
        product:
          type: object
          properties:
            name:
              type: string
            id:
              type: integer
        customer:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            email:
              type: string
            document:
              type: string
              nullable: true
            phone:
              type: string
              nullable: true
        card:
          type: object
          properties:
            holder:
              type: string
              nullable: true
            brand:
              type: string
              nullable: true
        transactions:
          type: array
          items:
            type: object
        histories:
          type: array
          items:
            type: object
        created_at:
          type: string
          example: 01/06/2026 14:32:10
        updated_at:
          type: string
          example: 01/06/2026 14:32:12
      example:
        id: 4410
        price: 12400
        first_charge_price: 12400
        currency: BRL
        interval: 30
        next_charge: 01/07/2026
        situation: active
        best_day_to_charge: null
        free_days: 0
        max_charges: null
        successful_charges: 3
        failed_charges: 0
        is_smart_installment: false
        cancellation_requested_at: null
        canceled_at: null
        canceled_by: null
        payment_method: credit_card
        pix_recurring_cancellation: null
        offer_code: O88AA1234
        offer_name: Mensalidade
        order:
          id: 90720
          hash: TOP0106X1Y2Z3
          created_at: 01/04/2026 09:12:00
        product:
          name: Comunidade Premium
          id: 306
        customer:
          id: 9902
          name: Maria Souza
          email: maria@exemplo.com
          document: 987.654.321-00
          phone: '5511999998888'
        card:
          holder: MARIA SOUZA
          brand: visa
        transactions:
          - id: 123999
            hash: TRX9M3K1LP
            status: authorized
            payment_method: credit_card
            paid_amount: 12400
            created_at: 01/06/2026 09:12:05
        histories:
          - id: 8801
            subscription_id: 4410
            type: charge
            status: paid
            reference_date: Junho 2026
            metadata: null
            created_at: 01/06/2026 09:12:05
        created_at: 01/04/2026 09:12:00
        updated_at: 01/06/2026 09:12:05
    Error:
      type: object
      properties:
        error:
          type: string
          example: insufficient_scope
        message:
          type: string
          example: 'Token is missing the required ability: orders:read.'
        request_id:
          type: string
          nullable: true
  responses:
    Unauthorized:
      description: Token ausente, inválido ou expirado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: Invalid or expired token.
            request_id: null
    NotFound:
      description: >-
        Recurso inexistente ou que não pertence ao produtor autenticado (o
        isolamento não confirma a existência de recursos de terceiros).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: not_found
            message: Resource not found.
            request_id: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token opaco no formato `ticto_live_...` (produção) ou `ticto_test_...`
        (sandbox). Enviado como `Authorization: Bearer <token>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.