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

# Recordatorio antes del vencimiento

> Recordatorio antes del vencimiento

<span className="cobrix-event-name">collection\_document.reminder\_before\_due</span>

## Qué significa

El programador de cobranza generó un recordatorio antes de la fecha de vencimiento. El receptor externo puede usar la plantilla incluida para entregar WhatsApp.

## Payload completo

```json theme={null}
{
  "id": "evt_c388ae9d-a84b-4cf7-a674-dbb6c2938a16",
  "event": "collection_document.reminder_before_due",
  "created_at": "2026-07-12T13:00:00.000Z",
  "api_version": "2025-01-21",
  "data": {
    "event": "collection_document.reminder_before_due",
    "version": "2026-05-18",
    "timestamp": "2026-07-12T13:00:00.000Z",
    "trigger": "automatic",
    "subjectType": "collection_document",
    "customer": {
      "id": "cc_8aa37fd1",
      "name": "Ana Pérez",
      "email": "ana@example.com",
      "phone": "+584120000000",
      "taxId": "V12345678",
      "customerCode": "C-1001"
    },
    "company": {
      "id": "7d355d52-ac74-49f5-b31c-ce29b4680752",
      "name": "Empresa de ejemplo",
      "supportPhone": "+584120001111"
    },
    "checkout": {
      "sessionId": "cs_5e52b98d",
      "token": "checkout_public_token",
      "url": "https://pay.cobrix.co/c/cs_5e52b98d",
      "expiresAt": "2026-07-15T13:00:00.000Z"
    },
    "amount": {
      "minor": "2000",
      "major": "20.00",
      "currency": "USD"
    },
    "documents": [
      {
        "invoiceId": "inv_d64d7b11",
        "number": "DOC-1001",
        "externalDocumentId": "erp-1001",
        "issuedAt": "2026-07-01",
        "dueDate": "2026-07-15",
        "amountMinor": "2000",
        "amountMajor": "20.00",
        "balanceMinor": "2000",
        "currency": "USD"
      }
    ],
    "dunningDetails": {
      "reminderType": "BEFORE_DUE",
      "documentCount": 1,
      "nearestDueDate": "2026-07-15",
      "daysUntilDue": 3
    },
    "references": {
      "checkoutType": "collection_documents",
      "source": "erp_acme",
      "idempotencyKey": "reminder-before-erp-1001-20260712"
    },
    "delivery": {
      "requestedChannels": ["whatsapp"],
      "whatsapp": {
        "provider": "meta",
        "recipient": "+584120000000",
        "metaTemplate": {
          "key": "collection_document_reminder_before_due_v2",
          "name": "collection_document_reminder_before_due_v2",
          "language": "es",
          "version": "v2",
          "variables": {
            "customer_name": "Ana Pérez",
            "amount": "20.00",
            "currency": "USD",
            "due_date": "2026-07-15",
            "checkout_url": "https://pay.cobrix.co/c/cs_5e52b98d"
          }
        }
      }
    }
  }
}
```

## Campo clave

`data.dunningDetails.daysUntilDue` expresa cuántos días faltan. No lo recalcules usando la zona horaria del servidor receptor.
