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

# Consultar factura

> Devuelve la factura con sus líneas y su historial fiscal.

Es [el mismo endpoint de detalle de siempre](/client/invoices/get). Sobre una factura emitida por OnePay agrega el bloque fiscal.

<Note>
  No uses este endpoint para esperar el CUFE. El timbrado es asíncrono y el resultado te llega por el webhook `invoice.stamped`; hacer polling acá solo gasta requests.
</Note>

El arreglo `stampings` trae el historial fiscal completo, del más nuevo al más viejo: la factura de venta y cada nota crédito o débito que la corrige.

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.onepay.la/v1/invoices/inv_01J8XK9V4N \
    -H "Authorization: Bearer $ONEPAY_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "inv_01J8XK9V4N",
    "status": "PAID",
    "fiscal_status": "accepted",
    "stamp_policy": "on_payment",
    "currency": "COP",
    "due_date": "2026-08-16",
    "customer": {
      "id": "cus_01J8XK2P9WQZ",
      "name": "Ana Ramírez",
      "email": "ana@ejemplo.com",
      "document_type": "CC",
      "document_number": "1020304050"
    },
    "items": [
      {
        "description": "Plan Fibra 200 Mbps",
        "quantity": 1,
        "unit_amount": 8990000,
        "subtotal": 8990000,
        "tax_type": "IVA",
        "tax_rate": 19,
        "tax_amount": 1708100,
        "total": 10698100,
        "unit_measure": "94"
      }
    ],
    "totals": { "subtotal": 23990000, "tax_amount": 4558100, "total": 28548100 },
    "amount": 285481,
    "payment_id": "pay_01J8XKC5D2",
    "stampings": [
      {
        "id": "stm_01J8XKB2R7",
        "type": "credit_note",
        "status": "accepted",
        "number": "NC900",
        "cufe": "d7b2f4a9...",
        "replaces_id": "stm_01J8XKA1Q3",
        "total": 15000000,
        "stamped_at": "2026-08-05T10:14:02+00:00"
      },
      {
        "id": "stm_01J8XKA1Q3",
        "type": "invoice",
        "status": "accepted",
        "number": "FE1",
        "cufe": "a3f5c8e2...",
        "xml_url": "https://...",
        "pdf_url": "https://...",
        "replaces_id": null,
        "total": 28548100,
        "stamped_at": "2026-08-02T09:03:44+00:00",
        "sent_at": "2026-08-02T09:03:51+00:00"
      }
    ],
    "created_at": "2026-08-01T14:22:10+00:00"
  }
  ```
</ResponseExample>
