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

# Event reference

> Every webhook event type Pazy sends, with links to the payload for each

Each event arrives in the same [envelope](/webhooks/payload-and-headers#event-envelope). The `type` field says which event it is, and `data` holds the fields documented on the pages below.

## All event types

| Event type | Fired when | Details |
| - | - | - |
| `expense.transaction.status_changed` | A card or UPI transaction reaches a final outcome | [Expense transactions](/webhooks/events/expense-transaction) |
| `expense.approval.status_changed` | An expense moves through approval and accounting sync | [Expense approvals](/webhooks/events/expense-approval) |
| `expense.attachment.updated` | A receipt or supporting document is added or removed | [Expense attachments](/webhooks/events/expense-attachment) |
| `payment.invoice.completed` / `.failed` / `.reversed` | A payment against an invoice succeeds, fails or is refunded | [Payment events](/webhooks/events/payment) |
| `payment.reimbursement.completed` / `.failed` / `.reversed` | A payment against a reimbursement group succeeds, fails or is refunded | [Payment events](/webhooks/events/payment) |
| `payment.advances.completed` / `.failed` / `.reversed` | An advance payment against a purchase order succeeds, fails or is refunded | [Payment events](/webhooks/events/payment) |
| `payout.api.transaction.status_changed` | A payout transaction changes status | [Payout events](/webhooks/events/payout) |

## Subscribing

You choose which events to receive when you [set up an endpoint](/webhooks/setup#choose-events). You can subscribe to exact types, or to a family with a wildcard:

| Subscription | Receives |
| - | - |
| `payment.invoice.completed` | Only that event |
| `payment.*` | All nine `payment.*` events, including any added later |
| `expense.*` | All `expense.*` events |

## Handling unknown events

Pazy can add event types. Your handler should return `2xx` for any `type` it doesn't recognize. See [forward compatibility](/webhooks/payload-and-headers#forward-compatibility).

```javascript theme={null}
switch (event.type) {
  case 'payment.invoice.completed':
    await handleInvoicePaid(event.data);
    break;
  default:
    // Unknown or unsubscribed type: acknowledge and ignore
    break;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.