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

# Webhook event catalog

> Every webhook event type, the shared envelope, and payment, card lifecycle, enrollment, mandate and quote-request event data.

Events come in six families. Every event uses the same [envelope](#event-envelope); its `data` depends on the event type.

## Event types

| Family | Events | Resource |
| - | - | - |
| [Payments](#payment-events) | `payment.credentials_ready` `payment.succeeded` `payment.failed` | `payment`, the payment transaction ID (such as `txn_example`) |
| [Cards](#card-lifecycle) | `card.saved` `card.deleted` | `card`, `card_...` |
| [Mandate lifecycle](#lifecycle-events) | `mandate.paused` `mandate.resumed` `mandate.cancelled` `mandate.expired` | `mandate`, `mdt_...` |
| [Card enrollment](#enrollment-and-mandate-setup) | `card_enrollment.completed` `card_enrollment.failed` `card_enrollment.cancelled` `card_enrollment.expired` | `card_enrollment`, `ses_...` (standalone) or `sa_...` (checkout completion) |
| [Mandate setup](#enrollment-and-mandate-setup) | `mandate.created` `mandate.creation_failed` `mandate.creation_cancelled` `mandate.creation_expired` | `mandate_setup`, `ses_...` |
| [Quote request failures](#quote-request-failures) | `quote.request_failed` | `quote_request`, `qreq_...` |

## Coverage

V1 covers supported merchant checkout and mandate charge attempts, plus stored-card creation and deletion. Full card enrollment and authorize-only mandate setup have their own event families, described below.

V1 excludes:

* agent-account sessions
* full-enrollment result events for provision-only synchronous enrollment (a newly stored card still emits `card.saved`)
* card lifecycle changes other than saving and deletion, such as display-metadata updates
* failures before a durable payment attempt exists

Explicit payment-success simulation is supported for sandbox checkout and
quote-backed mandate charges. Genuine credential issuance and simulated success
produce payment events with distinct [outcome sources](#outcome-sources).

### Who receives an event

An endpoint must be verified and subscribed when the event is created. Enabling webhooks doesn't reconstruct past events.

| Endpoint state when the event is created | Result |
| - | - |
| Active | Eligible for delivery. |
| Automatically paused for health | Selected events are retained without dispatch until the endpoint is resumed, within the original retry window. |
| Manually paused | Not selected. |
| Deleted | Not selected. |
| Unverified | Not selected. |

## Event envelope

Every event shares this envelope. This example is a `payment.succeeded` event:

```json theme={null}
{
  "id": "evt_example",
  "type": "payment.succeeded",
  "schema_version": "2026-10-08",
  "occurred_at": "2026-10-08T10:00:00Z",
  "environment": "sandbox",
  "account_id": "ma_example",
  "resource": { "type": "payment", "id": "txn_example", "version": 2 },
  "data": {
    "session_id": "ses_example",
    "mandate_id": null,
    "order_id": "ord_example",
    "card_id": "card_example",
    "status": "succeeded",
    "amount": { "value": "100.00", "currency": "INR" },
    "outcome_source": "merchant_observed",
    "failure_category": null,
    "failure_stage": null,
    "error": null
  }
}
```

| Field | Description |
| - | - |
| `id` | Event ID, such as `evt_example`. Deduplicate by this value. |
| `type` | Event type. Payload shapes are discriminated by `type`. |
| `schema_version` | Remains `2026-10-08`. |
| `occurred_at` | Event timestamp, such as `2026-10-08T10:00:00Z`. |
| `environment` | Environment, such as `sandbox`. |
| `account_id` | Account ID, such as `ma_example`. |
| `resource` | The `type`, `id` and `version` of the resource the event describes. See [Event types](#event-types) for each family's resource. |
| `data` | Event-specific fields. See each event family below. |

### Handling events

* **Deduplicate by `id`**, independently of version handling.
* **Keep the newest state.** Persist the highest applied `resource.version` per resource, so an older, late notification can't overwrite a newer state.
* **Ignore new fields.** Additive future fields should be ignored safely.
* **Expect identical replays.** Event payloads keep their original schema version and bytes through retries and replays.

`GET /v1/webhook-event-types` returns descriptions, supported flows, JSON schemas and safe examples for every type.

The schema version remains `2026-10-08`. New payment events add `data.card_id`,
and sandbox simulated success adds the `sandbox_simulated` outcome source.
Refresh any pinned catalog schemas or strict outcome-source enums before testing
these sandbox events. Older retained event bytes are unchanged and can omit
`card_id`.

Payloads omit payment credentials, network tokens, dynamic CVV, full card numbers, provider/vault references, addresses, email, and raw metadata. A Prava `card_id` is an opaque application-scoped identifier.

## Payment events

| Event | Meaning |
| - | - |
| `payment.credentials_ready` | Prava issued credentials for this payment attempt. It does **not** mean the merchant charged successfully. |
| `payment.succeeded` | An issued payment attempt was recorded successful. Explicit sandbox simulation uses `sandbox_simulated`; it does not confirm a merchant charge. |
| `payment.failed` | An issued payment attempt failed, or Prava recorded a definite failure before issuing credentials. Inspect `failure_stage` and `error` for the cause. |

Mandate charges use these same events. See [Mandate charges](#mandate-charges).

Payment success or failure does not establish final order settlement.

### Payment data

The [envelope example](#event-envelope) shows a full payment payload.

| Field | Description |
| - | - |
| `session_id` | Session ID, such as `ses_example`, or `null` for a charge without a session. |
| `mandate_id` | The mandate ID for an owned mandate charge, or `null` for other payment flows. See [Mandate charges](#mandate-charges). |
| `order_id` | Order ID, such as `ord_example`. |
| `card_id` | The card bound to this payment attempt, checked against its application and customer. It can differ from the session's original preselected card after a retry. `null` when no owned card can be resolved; older retained payloads can omit it. |
| `status` | Status, such as `succeeded`. |
| `amount` | Amounts are decimal strings in the payment's currency. |
| `outcome_source` | One of the [outcome sources](#outcome-sources). |
| `failure_category` | `PAYMENT_ATTEMPT_FAILED` for a failed payment. See [Failed payments](#failed-payments). |
| `failure_stage` | Where a failed payment failed. See [Failed payments](#failed-payments). |
| `error` | The cause of a failure. See [Failed payments](#failed-payments). |

### Attempts and versions

* The payment transaction ID identifies the attempt. Each new attempt has its own ID.
* `resource.version` increases for each recorded change to that attempt.

For a session-based checkout, `resource.id` corresponds to
`transactions[].txn_id` in [Get Payment Result](https://docs.prava.space/api-reference/get-payment-result.md),
and `data.card_id` identifies that attempt's card. Keep separate attempt records
when a shopper switches cards. Associate the replacement card when receiving
`payment.credentials_ready`; it does not require a standalone enrollment event.

Webhook statuses `credentials_ready`, `succeeded` and `failed` correspond to
transaction statuses `awaiting_result`, `completed` and `failed`. Webhooks cover
eligible lifecycle changes, not every verification attempt. Use Payment Result
for the complete session attempt list, including failures before credentials
were issued. A newly added checkout card also emits `card_enrollment.completed`
when full enrollment finishes; payment success is a separate milestone.

### Outcome sources

| `outcome_source` | Used for |
| - | - |
| `prava_issued` | Credentials |
| `merchant_observed` | Quote-backed results reconciled by Prava |
| `merchant_reported` | Supported non-quote results |
| `prava_observed` | A definite failure Prava records before credential issuance |
| `sandbox_simulated` | A successful explicit sandbox payment simulation. This does not confirm a merchant charge and is never used for production events. |

### Failed payments

A failed payment keeps the category `PAYMENT_ATTEMPT_FAILED`. `failure_stage` shows where it failed:

| `failure_stage` | Meaning |
| - | - |
| `payment` | An issued attempt failed. |
| `credential_issuance` | One of the supported failures Prava records before issuing credentials. |

The error code preserves the known operation result. Unknown causes stay generic. Private provider messages are excluded. See the [error reference](https://docs.prava.space/webhooks/errors.md).

These never emit `payment.failed`:

* session-user fail reports
* unverified legacy reports
* transport timeouts
* uncertain issuance outcomes

An API rejection before a transaction exists remains API-only.

## Card lifecycle

Subscribe explicitly to these events to reconcile the cards saved for your application. Existing endpoint subscriptions do not automatically gain either event.

| Event | Emitted when | Resource version |
| - | - | - |
| `card.saved` | A new stored-card record is committed during checkout, replacement-card retry, standalone enrollment or a supported card-saving API flow. | `1` |
| `card.deleted` | A card is deleted through the [Delete Card API](https://docs.prava.space/api-reference/delete-card.md) or checkout card-removal flow. | `2` |

Saving a card does not establish successful payment or completed passkey enrollment. A later failed or cancelled payment does not undo `card.saved`. Both standalone full enrollment and a new-card checkout can produce `card.saved` followed by `card_enrollment.completed`.

Reusing an existing card, duplicate recovery and display/default-card updates do not emit another save event. A rejected deletion that leaves the card intact emits no delete event. If the deletion can't be recorded as a notification right away, the card stays deleted and Prava sends `card.deleted` once it is recorded. List Cards reflects the deletion immediately. Repeated deletion requests do not create another logical deletion event.

```json theme={null}
{
  "id": "evt_example",
  "type": "card.saved",
  "schema_version": "2026-10-08",
  "occurred_at": "2026-10-28T12:00:00Z",
  "environment": "sandbox",
  "account_id": "ma_example",
  "resource": {
    "type": "card",
    "id": "card_example",
    "version": 1
  },
  "data": {
    "card_id": "card_example",
    "customer_id": "cus_example",
    "user_id": "user_example",
    "session_id": "ses_example"
  }
}
```

Both events use the same data fields:

| Field | Meaning |
| - | - |
| `card_id` | The saved or deleted card; matches `resource.id`. |
| `customer_id` | The internal Prava customer identifier (`cus_...`). |
| `user_id` | Your original `user_id` passed to Create Session or Enroll Card; `null` if none was stored. Use this value as `customer_id` in the Delete Card API. |
| `session_id` | An existing session owned by the same application and customer, when available; otherwise `null`. It can be null for direct API operations or a card saved before its session exists. |

Use `user_id` to associate the card with your user, including when `session_id` is null. An available `session_id` also links the event to a checkout. A card event carries no payment credentials or provider identifiers.

Deduplicate deliveries by event `id` and retain the highest `resource.version` per card. Delivery is unordered: a delayed version `1` save must not restore a card after version `2` deletion. A historical card can first appear as a version `2` deletion; earlier saves are not backfilled. Saving the physical card again after removal creates a new Card ID.

The schema version remains `2026-10-08`. Refresh pinned catalog validators before subscribing to the two new event types.

## Mandate charges and lifecycle

### Mandate charges

Mandate charges use `payment.credentials_ready`, `payment.succeeded` and `payment.failed`.

New regular and quote-backed mandate charges report the card the mandate was set up with as `data.card_id`. It is `null` when that card cannot be determined safely. Previously captured events remain unchanged, including on delivery retries. Use `data.mandate_id` and the transaction's `resource.id` to correlate charges.

* Newly created payment events include `data.mandate_id` for an owned mandate charge, or `null` for other payment flows.
* Older retained payloads may omit this additive field.
* Use the mandate ID to correlate charges without another API request.
* Issued credentials do not establish payment success or final settlement.

### Lifecycle events

Subscribe separately to the lifecycle events you need. Existing endpoints do not gain the new subscriptions automatically.

| Event | Meaning |
| - | - |
| `mandate.paused` | An active standing mandate was paused locally. New charges are blocked. |
| `mandate.resumed` | A paused standing mandate was resumed locally. Validity, budget, cadence and charge checks still apply. |
| `mandate.cancelled` | An active or paused standing mandate was cancelled locally. This does not reverse existing payments or confirm card-network revocation. |
| `mandate.expired` | A standing mandate reached its validity deadline, or an eligible mandate was explicitly marked expired. Existing charges are unchanged. |

* These events use resource type `mandate` and an `mdt_...` resource ID.
* They are distinct from setup cancellation and expiry (`mandate.creation_cancelled` and `mandate.creation_expired`).
* Agent-owned mandates, and one-off payment mandates that Prava creates for a single payment, are excluded.

```json theme={null}
{
  "id": "evt_mandate_example",
  "type": "mandate.paused",
  "schema_version": "2026-10-08",
  "occurred_at": "2026-10-20T10:00:00Z",
  "environment": "sandbox",
  "account_id": "ma_example",
  "resource": { "type": "mandate", "id": "mdt_example", "version": 1 },
  "data": {
    "mandate_id": "mdt_example",
    "order_id": "ord_setup_example",
    "previous_status": "active",
    "status": "paused",
    "valid_until": "2026-10-27T10:00:00Z",
    "recurring_frequency": "one_time",
    "error": null
  }
}
```

| Field | Description |
| - | - |
| `mandate_id` | Mandate ID, such as `mdt_example`. |
| `order_id` | Order ID, such as `ord_setup_example`. |
| `previous_status` | Previous status, such as `active`. Clock-expiry payloads have `previous_status: null`. |
| `status` | Describes local control, not an available-balance or charge-authorization guarantee. For a resume, `status` is `active`; an already-passed deadline can still prevent charging. |
| `valid_until` | Validity deadline. Can be `null` for an indefinite recurring mandate or an ambiguous legacy deadline. |
| `recurring_frequency` | `one_time`, `weekly`, `monthly` or `yearly`. `null` for a legacy record without a frequency. |
| `error` | `null`. Lifecycle changes are normal outcomes. Creation and charge failures keep their own safe error contracts. |

### Clock-driven expiry

Prava detects clock-driven expiry automatically. You don't need to call the status API, and detecting expiry doesn't change any financial state.

| Mandate | Expiry deadline |
| - | - |
| One-time | The earlier of the stored deadline and seven days after creation |
| Recurring | The stored deadline, if any |

* Active and paused mandates can receive clock-expiry notifications. Cancelled and consumed mandates do not.
* Once expiry is recorded, later local pause, resume or cancel changes do not emit another lifecycle notification for that expired mandate.
* If a mandate's stored deadlines conflict, Prava doesn't send an expiry event rather than guess.

> [!TIP]
>
> The API can retain its stored `status`. Compare `valid_until` with the current time as well as checking `state` and `status`. A paused mandate can still report `state: "paused"` after its deadline.

**Delays and backfill**

* An expiry event can arrive some time after the deadline. Revalidate the highest resource version and deduplicate event IDs as with other events.
* Deadlines that passed before these events were enabled, including before a later re-enablement, aren't backfilled.
* Retained events and replay bytes remain unchanged.

## Enrollment and mandate setup

| Event | Meaning |
| - | - |
| `card_enrollment.completed` | A stored card, VIC enrollment and the confirmed passkey result were persisted during standalone enrollment or checkout. Includes `card_id`, last four digits, normalized brand and expiry, passkey result and consent state. |
| `card_enrollment.failed` | Enrollment failed; `outcome` distinguishes `not_started` from `card_provisioned`. |
| `card_enrollment.cancelled` | The action or session was cancelled. |
| `card_enrollment.expired` | The unfinished session expired. |
| `mandate.created` | One setup attempt is authorized and its mandate is active. Includes `mandate_id` and approved frequency, charge-count terms and an optional decimal cumulative budget. No charge occurred. |
| `mandate.creation_failed` | All setup attempts are currently failed. A later retry can still authorize. |
| `mandate.creation_cancelled` | The unfinished setup session was dismissed. |
| `mandate.creation_expired` | The unfinished setup session expired. |

* Standalone enrollment and mandate-setup resources keep their `ses_...` IDs.
* A new card enrolled during checkout uses the enrollment action's `sa_...` resource ID. `data.session_id` is the original checkout session, including when another card was tried first. Use `data.card_id` to identify the enrolled card.
* Two newly enrolled cards in the same checkout have separate enrollment resources. Reusing an already saved card does not create another enrollment event.
* Checkout completion uses the same full-enrollment milestone as standalone enrollment: provisioning alone is insufficient. The event can arrive before the payment succeeds, fails or is cancelled.
* `card_enrollment.failed`, `.cancelled` and `.expired` continue to describe standalone enrollment sessions. Existing retained events are unchanged; historical checkout enrollments are not backfilled.
* `card_enrollment.cancelled` preserves its existing `failure_category: null`. The additive `error.code` is `SESSION_CANCELLED`.
* `mandate.created` preserves the stored approved frequency. Current recurring mandates use `weekly`, `monthly` or `yearly`; older records may use uppercase values. New mandate lifecycle events use lowercase values.
* These events describe setup. Later charges use the [payment event family](#payment-events) with a mandate ID. Later pause, resume, cancellation and expiry use the [mandate lifecycle events](#lifecycle-events).

### Enrollment and setup data

| Field | Card enrollment | Mandate setup |
| - | - | - |
| `session_id` | Yes | Yes |
| `status` | Yes | Yes |
| `outcome` | Yes | No |
| `card_id` | Yes | No |
| `passkey` | Yes | No |
| `consent_status` | Yes | No |
| `card` | Yes, nullable | No |
| `order_id` | No | Yes |
| `mandate_id` | No | Yes, nullable |
| `terms` | No | Yes, nullable |
| `failure_category` | Yes, fixed | Yes, fixed |
| `error` | A safe error for negative outcomes | A safe error for negative outcomes |

Mandate setup terms:

| Field | Meaning |
| - | - |
| `terms.total_budget` | `null` when the stored mandate has no cumulative spend cap. Prava does not substitute a setup or order amount. When present, it is `{ "value": "1200.00", "currency": "INR" }`. |
| `terms.max_charges` | `max_charges: 0` identifies a cumulative-budget pool rather than a zero-use mandate. |

Raw provider errors, consent references, customer PII, instruction IDs and card tokens are excluded. This does not verify future merchant cancellations or order settlement.

### Versions and ordering

* Each recorded status advances `resource.version`. Retain the latest version when retries, failures and eventual completion arrive out of order.
* Consecutive unchanged status writes are deduplicated.
* A retry that returns to an earlier failure or expiry can publish a new event with a higher version.

### Which result wins

| Situation | Result |
| - | - |
| A completed or failed result is persisted | It takes precedence over cancellation and expiry, matching the status API. Persisted completed/failed results and actual retry transitions keep their precedence and resource versions. |
| Cancellation or revocation is recorded at or after session expiration | The expired result is preserved. |
| Cancellation is recorded earlier | It remains cancelled. |
| Revocation is repeated | It retains its original recording timestamp, so retrying a previous cancellation after expiry cannot change it into an expiry event. |

### Session expiry

* Prava detects expiry automatically for unfinished sessions that expire after webhooks were enabled.
* Enabling webhooks does not backfill past results or expirations.

## Quote request failures

Subscribe explicitly to `quote.request_failed` to receive errors from admitted merchant-owned `POST /v1/shop/quote` requests. A quote ID may never have been created, so the resource is a **quote request**, identified by `qreq_...`.

This event reports the **failure of the quote API request**, not the lifecycle of an existing quote or a payment.

```json theme={null}
{
  "id": "evt_example",
  "type": "quote.request_failed",
  "schema_version": "2026-10-08",
  "occurred_at": "2026-10-16T00:00:00Z",
  "environment": "sandbox",
  "account_id": "ma_example",
  "resource": { "type": "quote_request", "id": "qreq_example", "version": 1 },
  "data": {
    "request_id": "qreq_example",
    "status": "failed",
    "failure_category": "QUOTE_REQUEST_FAILED",
    "error": { "code": "VARIANT_UNAVAILABLE", "message": "The selected item is sold out. Choose another variant or product." }
  }
}
```

> [!WARNING]
>
> `quote.request_failed` is best-effort. Prava doesn't guarantee an event for every failed quote request: during bursts of failures, such as a downstream outage, some failures may not produce a webhook, and missed events aren't sent later. Always handle the API's error response directly; don't wait for a webhook to learn that a request failed.

### The request ID header

The failed HTTP response includes `Prava-Quote-Request-Id` only after an event is confirmed persisted for an active, verified, explicitly subscribed endpoint.

| Situation | `Prava-Quote-Request-Id` |
| - | - |
| Event confirmed persisted for an active, verified, explicitly subscribed endpoint | Included |
| Webhooks disabled | Not received |
| Inactive owner | Not received |
| No eligible subscribers | Not received |
| The event wasn't saved, or it's unclear whether it was saved | Not received. The original API error is preserved. An event might still exist after an unconfirmed response. |

* A returned request ID confirms event persistence, not successful webhook delivery or business processing.
* Each HTTP attempt has its own request/event ID, including attempts that reuse an API idempotency key. Deduplicate event delivery by the event ID.
* Prava doesn't retry saving a missed event.

### Before you retry

`QUOTE_TIMEOUT`, for example, does not prove that the downstream service created no quote. Reconcile the existing operation and use the API's idempotency rules before retrying.

### Delivery

Once an event is saved, it follows the normal [delivery and retry rules](https://docs.prava.space/webhooks/delivery.md). The best-effort limit applies only to saving the event, before those delivery guarantees begin. If no endpoint is subscribed, no event is saved.

### What doesn't generate this event

| Case | Why |
| - | - |
| Authentication, schema validation, rate-limit and invalid-idempotency-key rejections | They are synchronous admission errors. |
| Agent-owned requests | They are outside merchant webhook coverage. |
| Product selection or address confirmation returned successfully | It is not a quote failure. |

No request body, address/contact data, product URL, access grant or unverified quote ID is included.

### No quote lifecycle events

There are currently no independent `quote.ready`, `quote.updated` or `quote.expired` lifecycle events. Expiry reported during a quote request can appear as its error; it is not a background notification that every quote expired. See [coverage and missing events](https://docs.prava.space/webhooks/errors.md#coverage-boundaries).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.