# refund.created

A Refund was created.

## Payload schema

- `object`
  - `api_version` (`any`)
  - `context` (`object`) - Present only when `source` is `api`. Identifies the acting project and API key.
    - `developer_platform_api_key_id` (`string | null`) - format: `uuid`
    - `developer_platform_project_id` (`string | null`) - format: `uuid`
  - `created_at` (`string`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
  - `data` (`object`)
    - `object` (`object`)
      - `amount` (`integer`) - The refunded amount in minor currency units.
      - `created_at` (`string`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
      - `currency` (`string | null`) - The ISO 4217 currency code.
      - `error` (`string | null`) - The failure message when the Refund did not complete.
      - `id` (`string`) - format: `uuid`; The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
      - `invoice_id` (`string | null`) - format: `uuid`; The Invoice associated with the refunded Payment, when one is assigned.
      - `links` (`object`) - URLs to related resources.
        - `patient` (`string | null`) - format: `uri`; The full URL of a related resource.
      - `notes` (`string | null`) - Internal notes recorded with the Refund.
      - `object` (`any`) - Discriminator value emitted at `object`.
      - `patient_id` (`string | null`) - format: `uuid`; The Patient associated with the Refund.
      - `payment_id` (`string | null`) - format: `uuid`; The Payment this Refund was issued against.
      - `reason` (`string | null`) - enum: `other`, `other_party_will_pay`, `overcharged`, `overpaid`, `service_not_delivered`, `null`; The reason the Refund was issued.
      - `refund_source` (`string | null`) - enum: `bank_account`, `deduction_from_balance`, `payment_account`, `null`; How the Refund is paid.
      - `status` (`string | null`) - enum: `canceled`, `failed`, `processing`, `requires_action`, `succeeded`, `null`; The Refund's current status.
      - `succeeded_at` (`string | null`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
      - `updated_at` (`string`) - format: `date-time`; An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.
  - `developer_platform_project_id` (`string | null`) - format: `uuid`; The project ID whose credential caused the change. Null for `dashboard` events.
  - `id` (`string`) - Event identifier prefixed with `evt_`.
  - `livemode` (`boolean`) - `false` for test-event deliveries.
  - `object` (`any`)
  - `source` (`string`) - enum: `api`, `dashboard`; Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.
  - `type` (`any`)

### Example payload

```json
{
  "id": "evt_00000000-0000-4000-8000-000000000012",
  "object": "event",
  "api_version": "v1",
  "created_at": "2026-01-01T09:00:00Z",
  "data": {
    "object": {
      "id": "00000000-0000-4000-8000-000000000025",
      "object": "refund",
      "amount": 25000,
      "created_at": "2026-01-01T09:00:00Z",
      "currency": "gbp",
      "error": null,
      "invoice_id": "00000000-0000-4000-8000-000000000027",
      "links": {
        "patient": "https://api.carebit.co/v1/patients/00000000-0000-4000-8000-000000000004"
      },
      "notes": "Refund for a canceled consultation.",
      "patient_id": "00000000-0000-4000-8000-000000000004",
      "payment_id": "00000000-0000-4000-8000-000000000026",
      "reason": "service_not_delivered",
      "refund_source": "payment_account",
      "status": "processing",
      "succeeded_at": null,
      "updated_at": "2026-01-01T09:00:00Z"
    }
  },
  "developer_platform_project_id": null,
  "livemode": false,
  "source": "dashboard",
  "type": "refund.created"
}
```
