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

# Get invoice by id

> Retrieves a single invoice by its id.



## OpenAPI

````yaml /openapi.yaml get /invoices/{id}
openapi: 3.0.3
info:
  title: Palomma Rentals API
  version: 1.0.0
  description: API for creating and managing rental invoices and settlements.
  contact:
    name: Palomma
servers:
  - url: https://api.palomma.com/v1
    description: Production
  - url: https://sandbox.api.palomma.com/v1
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Invoices
    description: Create, retrieve, and list invoices.
  - name: Settlements
    description: Retrieve settlements by date and cycle.
paths:
  /invoices/{id}:
    get:
      tags:
        - Invoices
      summary: Get invoice by id
      description: Retrieves a single invoice by its id.
      operationId: getInvoice
      parameters:
        - in: path
          name: id
          required: true
          description: Invoice id.
          schema:
            type: string
          example: 01HQY8EW1H9YGH5PAV5Y2M9R3T
      responses:
        '200':
          description: Invoice found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Invoice:
      type: object
      required:
        - id
        - status
        - amount
        - description
        - contract
        - customerDocumentNumber
        - createdAt
        - paymentUrl
      properties:
        id:
          type: string
          description: Unique invoice identifier.
        reference:
          type: string
          description: Merchant-provided invoice reference.
        status:
          type: string
          description: >-
            Invoice status: `ready` (payment link active), `paid`, `cancelled`,
            or `chargeback`.
          enum:
            - ready
            - paid
            - cancelled
            - chargeback
        amount:
          type: number
          description: Invoice amount in COP.
        description:
          type: string
          description: Invoice description.
        contract:
          type: string
          description: Contract identifier.
        expirationDate:
          type: string
          description: >-
            Payment link expiration datetime (ISO 8601). Invoices expire 5
            minutes after creation, so redirect the customer immediately. Once a
            transaction is in progress, it no longer expires until the
            transaction completes.
        customerDocumentNumber:
          type: string
          description: Customer's document number.
        customerName:
          type: string
          description: Customer's display name.
        createdAt:
          type: string
          description: Invoice creation datetime (ISO 8601).
        paymentDate:
          type: string
          format: date-time
          description: When the invoice was paid. Present on paid and chargeback invoices.
        paymentMethod:
          type: string
          enum:
            - pse
            - nequiButton
            - bancolombiaButton
            - breb
            - card
          description: Payment method used. Present on paid and chargeback invoices.
        paymentSource:
          type: string
          enum:
            - whatsapp
            - portal
            - link
          description: >-
            Channel through which payment was made. Present on paid and
            chargeback invoices.
        paymentAmount:
          type: number
          description: >-
            Amount actually paid in COP. Present on paid and chargeback
            invoices.
        settlementDate:
          type: string
          description: >-
            Expected settlement date (`YYYY-MM-DD`). Present on paid and
            chargeback invoices.
        settlementTime:
          type: string
          description: Expected settlement cycle. Present on paid and chargeback invoices.
        paymentId:
          type: string
          description: Payment identifier. Present on paid and chargeback invoices.
        paymentUrl:
          type: string
          format: uri
          description: Palomma hosted payment page URL for this invoice.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
  responses:
    BadRequest:
      description: Invalid request input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidBody:
              value:
                error: Invalid JSON in request body
            schemaError:
              value:
                error: Amount must be an integer
    Unauthorized:
      description: Invalid or missing bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid or missing token
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invoiceNotFound:
              value:
                error: Invoice not found
            settlementNotFound:
              value:
                error: Settlement not found
    InternalServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Send header: `Authorization: Bearer <apiKey>`.'

````