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

# Event Types

> The five VitaRelay webhook events and their exact payloads.

# Event Types

VitaRelay emits exactly five events. Every payload includes `event` (the type)
and `occurred_at` (ISO 8601 timestamp). Deliveries generated by the sandbox
also include `"sandbox": true`.

<Note>
  In live, `order_id`, `patient_id`, and `escript_id` are UUIDs and
  `order_number` is the real order number. In sandbox, ids look like
  `sandbox_ord_…`, `sandbox_pat_…`, and `sandbox_int_…`.
</Note>

## Order events

### order.paid

Fires when the order's card-on-file charge succeeds.

```json theme={null}
{
  "event": "order.paid",
  "order_id": "0f1f2c9e-2f30-4a1b-8b1c-6f4e9a0c1d22",
  "order_number": "VR-20260804-118342",
  "total_cents": 48900,
  "occurred_at": "2026-08-04T15:04:11.220Z"
}
```

### order.shipped

Fires when the order ships and tracking is attached.

```json theme={null}
{
  "event": "order.shipped",
  "order_id": "0f1f2c9e-2f30-4a1b-8b1c-6f4e9a0c1d22",
  "order_number": "VR-20260804-118342",
  "status": "shipped",
  "tracking_number": "1Z999AA10123456784",
  "tracking_carrier": "ups",
  "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
  "occurred_at": "2026-08-05T18:22:03.005Z"
}
```

### order.delivered

Fires when the carrier reports delivery.

```json theme={null}
{
  "event": "order.delivered",
  "order_id": "0f1f2c9e-2f30-4a1b-8b1c-6f4e9a0c1d22",
  "order_number": "VR-20260804-118342",
  "status": "delivered",
  "tracking_number": "1Z999AA10123456784",
  "tracking_carrier": "ups",
  "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
  "occurred_at": "2026-08-07T14:10:47.881Z"
}
```

### order.exception

Fires when the carrier reports a delivery problem (failed attempt, return to
sender, address issue, and similar).

```json theme={null}
{
  "event": "order.exception",
  "order_id": "0f1f2c9e-2f30-4a1b-8b1c-6f4e9a0c1d22",
  "order_number": "VR-20260804-118342",
  "tracking_status": "exception",
  "tracking_number": "1Z999AA10123456784",
  "tracking_carrier": "ups",
  "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
  "occurred_at": "2026-08-06T09:31:12.400Z"
}
```

## Intake events

### intake.reviewed

**Intake reviewed / prescription signed.** Fires the moment a prescriber signs
the escript — this is the "Rx cleared" signal you should key fulfillment off of.

```json theme={null}
{
  "event": "intake.reviewed",
  "escript_id": "b93f0a7c-8d54-4b3a-9d20-1b4a7f2c5e10",
  "patient_id": "3a2b1c0d-9e8f-4a7b-8c6d-5e4f3a2b1c0d",
  "status": "signed",
  "cart_ref": "clinic-cart-7781",
  "signed_at": "2026-08-04T14:58:02.117Z",
  "occurred_at": "2026-08-04T14:58:02.190Z"
}
```

## Sandbox deliveries

Events generated by the simulated sandbox lifecycle are identical in shape but
carry `"sandbox": true` and sandbox ids:

```json theme={null}
{
  "event": "order.shipped",
  "order_id": "sandbox_ord_9f2c41ab",
  "order_number": "SBX-000412",
  "status": "shipped",
  "tracking_number": "SBXTEST0000001",
  "tracking_carrier": "ups",
  "tracking_url": "https://example.com/track/SBXTEST0000001",
  "occurred_at": "2026-08-04T15:20:00.000Z",
  "sandbox": true
}
```

<Warning>
  Never treat a payload with `"sandbox": true` as a real clinical or financial
  event.
</Warning>
