> ## 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.

# Webhooks overview

> COPE delivers public webhook events as signed JSON with at-least-once delivery.

# Webhooks

COPE webhooks deliver selected cart, checkout, order, payment, refund, chargeback, and payout events to subscriber endpoints as signed JSON: `id`, `type`, `version`, `source`, `created_at`, `occurred_at`, and the event body in `data`.

Register HTTPS endpoints in the COPE dashboard. Use the event reference to choose the webhook types your integration is ready to process.

## Recommended subscriptions

Most integrations need only the events that say how a purchase ended. The dashboard offers these first when you create an endpoint:

* [`cart.order.completed`](/webhooks/events/cart.order.completed) - An order has completed successfully.
* [`cart.order.failed`](/webhooks/events/cart.order.failed) - An order has failed.
* [`payment.sale.succeeded`](/webhooks/events/payment.sale.succeeded) - A payment sale has succeeded.
* [`cart.cart.abandoned`](/webhooks/events/cart.cart.abandoned) - A cart has been abandoned.

Cart and checkout events describe the buyer's way to a purchase: a cart created, a line added, a currency or buyer detail changed, a checkout started. Subscribe to them only when your integration acts on those steps.

## Delivery semantics

| Contract | Behavior |
| - | - |
| Encoding | JSON: `id`, `type`, `version`, `source`, `created_at`, `occurred_at`, `data` |
| Delivery | At least once |
| Ordering | Not globally ordered |
| Idempotency | Deduplicate on the event `id`, which every retry and replay of an event repeats. |
| Routing | `source` names the COPE service that sent the event, and an event type keeps its source as long as it exists, but two related types can carry different sources (`payment.failed` and `payment.attempt.failed`). Route and filter on `type`. |
| Compatibility | Additive payload changes may happen within the same major version. Breaking changes require a new event version. |

Return a 2xx response only after the event is durably accepted. If processing fails, return a non-2xx response so delivery can be retried.


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