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

# Payment lifecycle

> Public payment states and the webhook events that announce terminal payment, refund, and dispute transitions.

# Payment lifecycle

> Generated from COPE public event contracts. Do not edit this page by hand.

Payment events describe money-state transitions. COPE does not emit a separate public `payment.pending` event; pending is an inferred transitional state after checkout creation and before a terminal payment event.

## Payment States

| State                         | Meaning                                                                  | Event                                 | Schema-backed page                                               |
| ----------------------------- | ------------------------------------------------------------------------ | ------------------------------------- | ---------------------------------------------------------------- |
| `pending`                     | Payment processing has started but no terminal outcome is available yet. | No separate event                     | Implied by checkout/order flow                                   |
| `succeeded`                   | The sale payment succeeded.                                              | `payment.sale.succeeded`              | [Schema](../webhooks/events/payment.sale.succeeded)              |
| `failed`                      | The payment attempt failed before a completed order could be fulfilled.  | `payment.failed`                      | [Schema](../webhooks/events/payment.failed)                      |
| `refunded`                    | A full or partial refund was created.                                    | `payment.refund.created`              | [Schema](../webhooks/events/payment.refund.created)              |
| `refund_reversed`             | A prior refund was reversed.                                             | `payment.refund.reversed`             | [Schema](../webhooks/events/payment.refund.reversed)             |
| `dispute_opened`              | A dispute was opened for the payment.                                    | `payment.dispute.opened`              | [Schema](../webhooks/events/payment.dispute.opened)              |
| `dispute_won`                 | The dispute resolved in the vendor platform side favor.                  | `payment.dispute.won`                 | [Schema](../webhooks/events/payment.dispute.won)                 |
| `dispute_lost`                | The dispute resolved against the vendor platform side.                   | `payment.dispute.lost`                | [Schema](../webhooks/events/payment.dispute.lost)                |
| `dispute_counter_fee_created` | A dispute counter fee was created.                                       | `payment.dispute.counter_fee.created` | [Schema](../webhooks/events/payment.dispute.counter_fee.created) |
| `chargebacked`                | A chargeback was created for the payment.                                | `payment.chargeback.created`          | [Schema](../webhooks/events/payment.chargeback.created)          |
| `chargeback_reversed`         | A prior chargeback was reversed.                                         | `payment.chargeback.reversed`         | [Schema](../webhooks/events/payment.chargeback.reversed)         |

## Relationship To Orders

| Need                                                          | Prefer                                        | Why                                                  |
| ------------------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------- |
| Fulfillment, access grants, or buyer-facing order handling    | `cart.order.completed`                        | It is the order-level business fact.                 |
| Payment reconciliation, attribution, or money-state workflows | `payment.sale.succeeded`                      | It is the payment-centric success fact.              |
| Refund or chargeback reconciliation                           | `payment.refund.*` and `payment.chargeback.*` | These events announce post-sale money-state changes. |

## Consumption Notes

* Do not wait for `payment.pending`; no such public event is emitted.
* Process terminal events idempotently because webhook delivery is at least once.
* A partial refund uses `payment.refund.created`; inspect the amount fields in the payload rather than expecting a separate event type.
