# Events

> 🧪 **Beta.** Hosted Payment Fields is in Beta and available on request.


Register handlers with `cashier.on(CashierEmitEvent.X, handler)`.

## Field events

| Constant | String | Payload | Fires when |
|  --- | --- | --- | --- |
| `FIELD_VALIDITY_CHANGE` | `fieldValidityChange` | `{ field, valid, error? }` | A field's validity changes. |
| `FIELD_FOCUS` | `fieldFocus` | `{ field }` | A field gains focus. |
| `FIELD_BLUR` | `fieldBlur` | `{ field }` | A field loses focus. |


Use `FIELD_VALIDITY_CHANGE` to enable or disable your Pay button; use focus/blur to style your containers.

## Payment lifecycle

The payment resolves with the same events (and payloads) as the full Cashier:

| Constant | String | Payload |
|  --- | --- | --- |
| `PAYMENT_SUCCESS` | `paymentSuccess` | `PaymentEmitEventData` |
| `PAYMENT_FAILED` | `paymentFailed` | `PaymentEmitEventData` |
| `PAYMENT_PENDING` | `paymentPending` | `PaymentEmitEventData` |


See the [Cashier → Events](/cashier/sdk/events) page for `PaymentEmitEventData`.

> ⚠️ **Warning:** These events are for UI only. Reconcile the final outcome via your Omno [webhook](/guides/concepts/webhooks).


## Build it →

- [`mountFields` reference](/hosted-payment-fields/mount-fields) · [Limitations](/hosted-payment-fields/limitations)