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

# Webhooks

> Tracking payment session state changes via webhooks

The state of the payment session can be tracked by consuming webhook events.

The event will contain a `payment_session` object that includes, amongst other fields, the `created_at`, `updated_at` and `payment_id` fields.

Where applicable the `customer_id` and `payment_method_id` fields, that are needed for a subsequent (`next_in_series`) payment, is also included, and is sometimes referred to as a `token`.

The payment session events are:

* **`payment_session.created`**: Indicates a payment session was created successfully and can be used to initiate the payment process. See the [payment\_session.created](/api-reference/collect/payment_sessions/webhook/created) event for more information.
* **`payment_session.updated`**: Indicates a payment session was updated successfully and can be used for tracking the status of the payment session. See the [payment\_session.updated](/api-reference/collect/payment_sessions/webhook/updated) event for more information.
* **`payment_session.completed`**: Indicates a payment session has completed. See the [payment\_session.completed](/api-reference/collect/payment_sessions/webhook/completed) event for more information.

### Error Codes

👉 [See Common Error Codes](/api-reference/getting-started/errors)
