> For the complete documentation index, see [llms.txt](https://docs.paypangea.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paypangea.com/login-with-paypangea/sdk-integration/event-handling.md).

# Event Handling

PayPangea SDK provides various events that you can listen to, such as `success`, `error`, `cancel`, and `update`. Here's how to log these events:

```javascript
const events = ['success', 'error', 'cancel', 'update'];

events.forEach(event => {
    payPangeaWidget.on(event, (data) => {
        console.log(`Event '${event}' received from PayPangea`, data);
    });
});
```
