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

# Events

> Checkout callbacks you can subscribe to.

## `onSuccess(event)`

Triggered when payment succeeds.

Event fields include:

* `payment_intent_id`
* `tx_hash`
* `chain`
* `mode`

## `onAwaitingConfirmation(event)`

Triggered when transaction is submitted and awaiting final confirmation.

## `onError(error)`

Error object includes:

* `code`
* `message`
* `recoverable`

## `onClose()`

Triggered when the modal closes.
