> ## 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.

# Get a single invoice of the authenticated user



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi get /v1/billing/invoices/{invoice_id}
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/{invoice_id}:
    get:
      tags:
        - Billing
      summary: Get a single invoice of the authenticated user
      operationId: getV1BillingInvoicesByInvoice_id
      parameters:
        - in: path
          name: invoice_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Fatura
          content:
            application/json:
              schema:
                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
        '404':
          description: Recurso não encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: not found
        '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.