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

# List invoices of the authenticated user

> Busca faturas direto no gateway de pagamento (Stripe) usando o gateway_customer_id das assinaturas do usuário. Nenhuma tabela local é mantida.



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi get /v1/billing/invoices
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/billing/invoices:
    get:
      tags:
        - Billing
      summary: List invoices of the authenticated user
      description: >-
        Busca faturas direto no gateway de pagamento (Stripe) usando o
        gateway_customer_id das assinaturas do usuário. Nenhuma tabela local é
        mantida.
      operationId: getV1BillingInvoices
      parameters:
        - in: query
          name: status
          required: false
          schema:
            type: string
            enum:
              - open
              - paid
              - overdue
              - draft
              - uncollectible
              - void
          description: Filtrar por status. Omitir retorna todas.
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: Limite de faturas por customer (default 50).
      responses:
        '200':
          description: Lista de faturas
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: 'ID da fatura no gateway (ex.: in_xxx no Stripe)'
                    number:
                      type: string
                      nullable: true
                    description:
                      type: string
                      nullable: true
                    status:
                      type: string
                      enum:
                        - draft
                        - open
                        - paid
                        - uncollectible
                        - void
                        - overdue
                    amount_due:
                      type: integer
                      description: Valor devido em centavos
                    amount_paid:
                      type: integer
                      description: Valor pago em centavos
                    amount_remaining:
                      type: integer
                      description: Valor restante em centavos
                    currency:
                      type: string
                      description: 'Moeda (ex.: brl)'
                    due_date:
                      type: string
                      format: date-time
                      nullable: true
                    issued_at:
                      type: string
                      format: date-time
                    paid_at:
                      type: string
                      format: date-time
                      nullable: true
                    period_start:
                      type: string
                      format: date-time
                      nullable: true
                    period_end:
                      type: string
                      format: date-time
                      nullable: true
                    hosted_invoice_url:
                      type: string
                      nullable: true
                      description: URL do checkout hospedado pelo gateway
                    invoice_pdf_url:
                      type: string
                      nullable: true
                    receipt_url:
                      type: string
                      nullable: true
                    lines:
                      type: array
                      items:
                        type: object
                        properties:
                          description:
                            type: string
                          amount:
                            type: integer
                          quantity:
                            type: integer
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '500':
          description: Erro interno do servidor
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: internal_error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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