# booking.refunded

HTML: https://www.app2email.com/docs/api/webhooks/booking.refunded · Index: https://www.app2email.com/docs/api/llms.txt

An appointment's online payment was refunded, in full or in part (from the calendar, the API, or automatically when it is cancelled).

Group: Book-and-Pay. Header `X-App2email-Event: booking.refunded`. Inside the envelope `{id, type, created, number, test?, data}` ([envelope, headers, signature](https://www.app2email.com/docs/api/webhooks.md)). Every webhook of the number gets every number event: filter by `type`.

## data

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `data.id` | integer | yes |  |
| `data.reference` | string | yes |  |
| `data.status` | string |  |  |
| `data.contact` | string |  |  |
| `data.start` | string |  |  |
| `data.end` | string |  |  |
| `data.payment` | object | yes | A payment row. kind booking: the online payment (or deposit) of an appointment; request: a one-off payment request; package: a prepaid package bought online. Money is a number in the payment's currency plus a label such as "$40.00". Also inside booking.paid, booking.refunded and payment.paid. ticket: the online payment of a ticket order (the order's payment.id). |
| `data.payment.id` | integer |  |  |
| `data.payment.kind` | string |  | one of: `booking`, `request`, `package`, `ticket` |
| `data.payment.status` | string |  | one of: `pending`, `paid`, `partly_refunded`, `refunded`, `failed`, `expired`, `cancelled` |
| `data.payment.provider` | string |  | one of: `stripe`, `paypal` |
| `data.payment.amount` | number |  |  |
| `data.payment.amount_label` | string |  |  |
| `data.payment.full_label` | string |  | The price before a discount. |
| `data.payment.discount_label` | string |  |  |
| `data.payment.coupon_code` | string |  |  |
| `data.payment.currency` | string |  |  |
| `data.payment.refunded` | number |  |  |
| `data.payment.refunded_label` | string |  |  |
| `data.payment.description` | string |  |  |
| `data.payment.contact` | string |  |  |
| `data.payment.payer_name` | string |  |  |
| `data.payment.appointment_id` | integer |  |  |
| `data.payment.booking_reference` | string |  |  |
| `data.payment.package_purchase_id` | integer |  |  |
| `data.payment.checkout_url` | string |  | The provider's checkout page while the payment is open. Empty otherwise. |
| `data.payment.link_url` | string |  | A payment request's page on the business's booking site. |
| `data.payment.last_error` | string |  |  |
| `data.payment.paid` | string |  |  |
| `data.payment.refunded_at` | string |  |  |
| `data.payment.created` | string |  |  |
| `data.timestamp` | string |  |  |
| `data.refund` | object |  |  |
| `data.refund.amount` | number |  |  |
| `data.refund.amount_label` | string |  |  |
| `data.refund.full` | boolean |  |  |
| `data.refund.by` | string |  |  |

## Samples

### full

```json
{
  "id": "evt_Pay3k9m2Lw8Rt5Yp1Zs02",
  "type": "booking.refunded",
  "created": "2026-11-11T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "id": 42,
    "reference": "BK-7Q3M2A",
    "status": "confirmed",
    "contact": "61412345678",
    "contact_name": "Sample Contact",
    "contact_email": "sample@example.com",
    "service": {
      "id": "haircut",
      "name": "Haircut",
      "duration_min": 30
    },
    "start": "2026-11-14T23:00:00.000Z",
    "end": "2026-11-14T23:30:00.000Z",
    "timezone": "Australia/Sydney",
    "source": "web",
    "answers": {},
    "provider": {
      "id": "maria",
      "name": "Maria"
    },
    "credits_used": 0,
    "payment_status": "refunded",
    "created": "2026-11-11T01:00:00.000Z",
    "timestamp": "2026-11-11T01:00:00.000Z",
    "payment": {
      "id": 15,
      "kind": "booking",
      "status": "refunded",
      "provider": "stripe",
      "amount": 40,
      "amount_label": "$40.00",
      "full_label": "$40.00",
      "discount_label": "",
      "coupon_code": "",
      "currency": "USD",
      "refunded": 40,
      "refunded_label": "$40.00",
      "description": "Haircut",
      "contact": "61412345678",
      "payer_name": "John Smith",
      "appointment_id": 42,
      "booking_reference": "BK-7Q3M2A",
      "package_purchase_id": null,
      "checkout_url": "",
      "link_url": "",
      "last_error": "",
      "paid": "2026-11-11T01:15:00.000Z",
      "refunded_at": null,
      "created": "2026-11-11T01:10:00.000Z"
    },
    "refund": {
      "amount": 40,
      "amount_label": "$40.00",
      "full": true,
      "by": "jane@example.com"
    }
  }
}
```

## Caused by

- [Refund a payment, in full or a part](https://www.app2email.com/docs/api/payments/refund-payment.md): `POST /v1/{number}/payments/{id}/refund`

Send it to your URL: https://www.app2email.com/docs/api/webhooks/tester?type=booking.refunded
