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

# subscription.cancelled

> A subscription has been cancelled, and `cancellation_reason` says why.

# subscription.cancelled

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

Use this event to stop expecting renewals on a subscription and to end whatever you grant alongside it. You receive it once per subscription. A cancellation the buyer or COPE support asked for through COPE arrives when it is accepted: the subscription keeps running and the buyer keeps access until `access_until`, so do not revoke anything before that date. Every other ending — one you asked for through the cancel endpoint, renewal payments that kept failing, or a cancellation made directly at the payment processor — arrives when the subscription has already ended, and `access_until` is when it ended. `cancellation_reason` is one of `buyer_cancel`, `admin_cancel`, `business_cancel` and `payment_failed`, and those four are the whole list. Identify the subscription by `subscription.id`, with `subscription_id` carrying the same value until it retires; `line_item_id` and `business_id` are internal references, so do not store them.

## Delivery Contract

| Field           | Value                                                                                |
| --------------- | ------------------------------------------------------------------------------------ |
| Encoding        | CloudEvents 1.0 structured JSON                                                      |
| Delivery        | At least once                                                                        |
| Idempotency     | Use the CloudEvents `source` + `id` tuple, or COPE `idempotency_key` when available. |
| Source          | `cope.subscription`                                                                  |
| Subject pattern | `subscription:<identifier>`                                                          |
| Category        | Subscriptions                                                                        |
| Availability    | Available in the public webhook reference.                                           |
| Schema title    | subscription.cancelled v1 payload                                                    |
| Schema ID       | `https://schemas.cope.com/events/subscription.cancelled/v1`                          |

## Payload Fields

| Field                     | Required | Type      | Allowed Values                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                                                                                                                                                        |
| ------------------------- | -------- | --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `access_until`            | yes      | \`string  | null\`                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | When the buyer's access ends. For a cancellation sent when it is accepted, this is the end of the period already paid for; for every other ending it is when the subscription ended. Null when that date is not known. |
| `additional_recipients`   | no       | `array`   | -                                                                   | Inboxes you configured to be copied on this notification type. Absent when there are none.                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                        |
| `business`                | no       | `object`  | -                                                                   | The business selling the subscription. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by.                                                                                                                                                                                                                                                                                                                                    |                                                                                                                                                                                                                        |
| `business_name`           | no       | \`string  | null\`                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | The seller's name as it appeared on the purchase.                                                                                                                                                                      |
| `buyer`                   | yes      | `object`  | -                                                                   | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                                        |
| `cancellation_reason`     | yes      | `string`  | `buyer_cancel`, `admin_cancel`, `business_cancel`, `payment_failed` | Why the subscription ended, and these four values are the whole list. `buyer_cancel`: the buyer cancelled it, or it was cancelled directly at the payment processor. `admin_cancel`: COPE support cancelled it on the buyer's behalf after the buyer confirmed. `business_cancel`: you cancelled it. `payment_failed`: renewal payments failed and every retry was used up. A fifth value would arrive only with a coordinated change to the consumers of this event, never on its own. |                                                                                                                                                                                                                        |
| `cancelled_at`            | yes      | `string`  | -                                                                   | When the cancellation was accepted. For an ending nobody asked for — renewal payments that kept failing — it is when the subscription ended. Always present.                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                        |
| `currency`                | yes      | \`string  | null\`                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | ISO 4217 code of the recurring charge. Null when the subscription's terms are not on record.                                                                                                                           |
| `event_type`              | no       | `const`   | `subscription.cancelled`                                            | Optional on the wire, and normally absent: the event's type is carried by the CloudEvents envelope as `type`, so the payload does not repeat it. It is declared here so that if you copy the envelope's type onto the payload before validating the payload against this schema, that validation still passes. Read the envelope rather than depending on this field — a payload without it is valid.                                                                                   |                                                                                                                                                                                                                        |
| `interval`                | yes      | \`string  | null\`                                                              | `day`, `week`, `month`, `year`                                                                                                                                                                                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                                      |
| `interval_count`          | yes      | \`integer | null\`                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                      |
| `line_item`               | no       | `object`  | -                                                                   | The order line the subscription belongs to. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by.                                                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                        |
| `line_item_id`            | yes      | `integer` | -                                                                   | An internal reference. Do not store it or use it to identify the subscription. It is a database row number, not a public identifier — use `subscription.id` instead. It is removed at the contract cut (plan 53 D-13), and the removal is legal here because a public identifier for the same entity is in this same payload.                                                                                                                                                           |                                                                                                                                                                                                                        |
| `manage_subscription_url` | yes      | `string`  | -                                                                   | Where the buyer manages their subscriptions.                                                                                                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                        |
| `order`                   | no       | `object`  | -                                                                   | The order the subscription was bought on. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by.                                                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                        |
| `product`                 | no       | `object`  | -                                                                   | The product the subscription is for. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by.                                                                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                                                        |
| `product_name`            | no       | \`string  | null\`                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | The product's name as it was when the subscription was bought, so it is still present after the product is renamed or deleted.                                                                                         |
| `recurring_amount_cents`  | yes      | \`integer | null\`                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | The recurring charge per billing cycle in minor units, as it stood when the subscription was cancelled.                                                                                                                |
| `subscription`            | no       | `object`  | -                                                                   | The subscription this event concerns. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by.                                                                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                                        |
| `subscription_id`         | no       | `string`  | -                                                                   | The subscription's public reference ('sub\_' followed by 16 alphanumerics) — the identifier the subscriptions API accepts, and the handle to use for this subscription. Events sent before this field existed omit it; order\_uuid identifies the purchase in that case.                                                                                                                                                                                                                |                                                                                                                                                                                                                        |

## Example CloudEvent

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "data": {
    "access_until": "example_access_until",
    "buyer": {
      "email": "buyer@example.com",
      "first_name": "example_first_name",
      "last_name": "example_last_name",
      "locale": "example_locale"
    },
    "cancellation_reason": "buyer_cancel",
    "cancelled_at": "2026-05-05T12:00:00.000Z",
    "currency": "EUR",
    "interval": "day",
    "interval_count": 1000,
    "line_item_id": 1000,
    "manage_subscription_url": "https://example.com",
    "recurring_amount_cents": 1000
  },
  "datacontenttype": "application/json",
  "dataschema": "https://schemas.cope.com/events/subscription.cancelled/v1",
  "id": "subscription.cancelled:example",
  "idempotency_key": "subscription.cancelled:example",
  "source": "cope.subscription",
  "specversion": "1.0",
  "subject": "subscription:example",
  "time": "2026-05-05T12:00:00.000Z",
  "type": "subscription.cancelled"
}
```

## Compatibility

Fields may be added within the same major version. Removing or changing the meaning of a documented field requires a new event version.
