# Listening for Events

{% hint style="info" %}
**Helpful tip:** events are always emitted on the Lamba UI whenever an action is successfully executed
{% endhint %}

## Listening for emitted events

The code snippet below shows how you can listen for events emitted by the Lamba JS library:

```javascript
lamba.on('name_of_emitted_event',(data)=>{
   console.log('actionId...',data.id);
});
```

The `data` emitted contains the `id` of the action stored on Lamba. You can use the id to query the Lamba API to get the status and other information about that action performed.

**Kind of events emitted in the Lamba UI:**

| Event Name        | Description                                                                         |
| ----------------- | ----------------------------------------------------------------------------------- |
| `emailSent`       | returns the id of action for the sent email as `{id: "action_id_here..."}`          |
| `smsSent`         | returns the id of action for the sent SMS as `{id: "action_id_here..."}`            |
| `paymentVerified` | returns the id of action for the payment transaction as `{id: "action_id_here..."}` |
