# Events

> Events tell you what happened. Learn the thin webhook, how to re-read the object, list or resend events, and every event type.

Source: https://docs.tappay.mn/concepts/events/

## Overview {#overview}

An [Event](https://docs.tappay.mn/glossary.md#event) records that something happened in your account, such as a [payment](https://docs.tappay.mn/glossary.md#payment) that succeeded. Its id starts with `evt_`. TapPay stores every event, and sends it to your [webhook endpoint](https://docs.tappay.mn/glossary.md#webhook-endpoint) as a small message.

## The thin webhook {#the-thin-webhook}

A webhook carries only three fields: the event `id`, its `type` and the `objectId`. It does not carry the object itself.

```json
{ "id": "evt_0b3f1c2e9a7d4e58", "type": "payment.succeeded", "objectId": "5d1f0a52-7c1e-4a6b-9a53-2f7c9d8e1b40" }
```

The webhook is small on purpose. The object always comes fresh from the API, so you never act on an old copy.

## Read the object again {#read-the-object-again}

Use the `objectId` to read the current object with its `GET` endpoint. For a payment, call [Retrieve a payment](https://docs.tappay.mn/reference/payments/get.md). Trust the object you read from the API, and not the webhook alone.

An event can be delivered again, for example after a resend. Store the event `id` so you handle each event only once.

## List and resend {#list-and-resend}

`GET /events` lists your events, filtered by `type`, `objectId` or a time range. See [List events](https://docs.tappay.mn/reference/events/list.md). Use [Retrieve an event](https://docs.tappay.mn/reference/events/get.md) to read one event.

If your server was down, resend an event with [Resend an event](https://docs.tappay.mn/reference/events/resend.md). TapPay delivers it again to your endpoints.

## Several endpoints {#several-endpoints}

You can register many webhook endpoints. Each has its own list of event types, its own [webhook secret](https://docs.tappay.mn/glossary.md#webhook-secret) and its own `apiVersion`.

An allowlist entry is an exact type such as `payment.succeeded`, a group such as `payment.*`, or `*` for all. Create an endpoint with [Create a webhook endpoint](https://docs.tappay.mn/reference/webhook-endpoints/create.md). The [webhooks guide](https://docs.tappay.mn/guides/webhooks.md) shows the full flow.

## Event types {#event-types}

Every event type you can receive is below. The `Object` column names the object that `objectId` points to. Events from the wallet side, such as `link.*`, `r2p.declined`, `mandate.*` and `dispute.*`, are included.

| Event | Object | Description |
| - | - | - |
| `invoice.paid` | `invoice` | [Invoice](https://docs.tappay.mn/glossary.md#invoice) fully paid |
| `invoice.partially_paid` | `invoice` | Invoice partially paid |
| `invoice.expired` | `invoice` | Invoice expired |
| `invoice.updated` | `invoice` | Invoice edited before payment. Read it again for the new values |
| `payment.processing` | `payment` | Payment processing |
| `payment.succeeded` | `payment` | Payment succeeded |
| `payment.failed` | `payment` | Payment failed |
| `payment.overpaid` | `payment` | Payment [overpaid](https://docs.tappay.mn/glossary.md#overpaid) |
| `payment.finalized` | `payment` | Payment finalized ([pre-auth](https://docs.tappay.mn/glossary.md#pre-auth)) |
| `payment.authorized` | `payment` | Payment authorized (pre-auth hold) |
| `payment.settled` | `payment` | Payment settled |
| `refund.succeeded` | `refund` | [Refund](https://docs.tappay.mn/glossary.md#refund) succeeded |
| `refund.failed` | `refund` | Refund failed |
| `ebarimt.receipt_requested` | `payment` | You must issue an ebarimt [receipt](https://docs.tappay.mn/glossary.md#receipt) |
| `ebarimt.return_requested` | `refund` | You must return an ebarimt receipt |
| `ebarimt.issued` | `payment` | Ebarimt receipt issued |
| `ebarimt.returned` | `payment` | Ebarimt receipt returned |
| `ebarimt.failed` | `payment` | Ebarimt receipt failed |
| `payout.requested` | `payout` | Manual [payout](https://docs.tappay.mn/glossary.md#payout) requested, checks pending |
| `payout.scheduled` | `payout` | Payout scheduled |
| `payout.in_transit` | `payout` | Payout in transit |
| `payout.paid` | `payout` | Payout paid |
| `payout.failed` | `payout` | Payout failed |
| `dispute.updated` | `dispute` | [Dispute](https://docs.tappay.mn/glossary.md#dispute) updated |
| `mandate.created` | `mandate` | [Mandate](https://docs.tappay.mn/glossary.md#mandate) created |
| `mandate.revoked` | `mandate` | Mandate revoked |
| `mandate.paused` | `mandate` | Mandate paused |
| `mandate.resumed` | `mandate` | Mandate resumed |
| `mandate.expired` | `mandate` | Mandate expired |
| `mandate.credential_invalid` | `mandate` | The card of the mandate is no longer valid, so the mandate is paused |
| `link.created` | `payer_link` | [Payer link](https://docs.tappay.mn/glossary.md#payer-link) created |
| `link.revoked` | `payer_link` | Payer link revoked |
| `r2p.declined` | `r2p_request` | [R2P](https://docs.tappay.mn/glossary.md#r2p) request declined by the payer |
| `subscription.created` | `subscription` | [Subscription](https://docs.tappay.mn/glossary.md#subscription) created |
| `subscription.updated` | `subscription` | Subscription updated (plan, [payment method](https://docs.tappay.mn/glossary.md#payment-method) or cancel at period end) |
| `subscription.activated` | `subscription` | Subscription activated (from trialing or past due) |
| `subscription.renewed` | `subscription` | Subscription cycle paid |
| `subscription.past_due` | `subscription` | Subscription past due |
| `subscription.paused` | `subscription` | Subscription paused |
| `subscription.resumed` | `subscription` | Subscription resumed |
| `subscription.cancelled` | `subscription` | Subscription cancelled |
| `service.customer_lookup` | `merchant_service` | Synchronous [customer](https://docs.tappay.mn/glossary.md#customer) lookup. TapPay waits for your response |
| `catalog.availability_lookup` | `catalog_offering` | Synchronous availability lookup for an offering. TapPay waits for your response |
| `order.created` | `order` | Order created. Accept or reject it |
| `order.updated` | `order` | Order changed (status, payment or progress). Skip versions older than the one you have |
| `order.reschedule_requested` | `order` | The customer asked for a new booking time. Confirm or decline it |
| `terminal_payment.delivered` | `terminal_payment` | [Terminal](https://docs.tappay.mn/glossary.md#terminal) payment request shown on the bank POS terminal |
| `terminal_payment.paid` | `terminal_payment` | Terminal payment paid by QR or card |
| `terminal_payment.declined` | `terminal_payment` | Card declined on the terminal. The request stays open |
| `terminal_payment.cancelled` | `terminal_payment` | Terminal payment request cancelled |
| `terminal_payment.failed` | `terminal_payment` | Terminal payment request could not reach the terminal |
| `terminal_payment.card_voided` | `terminal_payment` | Card payment voided on the bank terminal |
| `sticker.assigned` | `qr_sticker` | [Sticker](https://docs.tappay.mn/glossary.md#sticker) assigned to your system or moved to another terminal |
| `sticker.unassigned` | `qr_sticker` | Sticker no longer assigned to your system |
| `sticker.closed` | `qr_sticker` | Sticker closed, for example lost or damaged |
| `sticker.replaced` | `qr_sticker` | Sticker replaced. `objectId` is the new sticker |

Statuses that go with these events are in [Statuses](https://docs.tappay.mn/concepts/statuses.md).
