package.removal_scheduled
Triggered when a package is removed with atPeriodEnd: true. It keeps working until ends_at, the end of its paid period.
X-Clocknext-Signature*stringt=<unix seconds>,v1=<hex HMAC-SHA256> — the HMAC of ${t}.${rawBody} keyed with the endpoint's signing secret. See Verify the signature.
X-Clocknext-Event-Id*stringThe event's id — the same as id in the body, and the same on every retry.
X-Clocknext-Event-Type*stringThe event name — the same as event_type in the body.
application/json- body
id*stringevt_ + 32 hex characters. Unique per event, and the same on every retry of it — use it to skip duplicates.
event_type*stringAlways package.removal_scheduled.
triggered_at*stringWhen the event was triggered (ISO 8601).
date-timedata*The customer, the subscription and the package, as it is after the change.
Answer any 2xx within 5 seconds; the body is ignored. Anything else counts as failed and is retried.
{ "id": "evt_9e1b3d5f7a2c4e6b8d0f1a3c5e7b9d2f", "event_type": "package.removal_scheduled", "triggered_at": "2026-11-15T17:10:11.004Z", "data": { "customer": { "id": "csmwfugghy0000002b", "name": "Northwind Traders" }, "subscription": { "id": "cmwfwy4px000veqm6f12fgddc" }, "package": { "id": "cmwi3bgxx00088dm6svjsa3i1", "package_id": "cmwi3bd3s00008dm6ogh2wkc4", "name": "Chat Booster", "status": "MARKED_FOR_CANCELLATION", "cost": 4.5, "entitlements": { "credits": [ { "id": "csmwfugghy00000006", "name": "Chat Credits", "quantity": 1000 } ], "outcomes": [], "units": [], "composites": [], "flat_fee": 2 }, "started_at": "2026-11-15T17:10:10.174Z", "ends_at": "2026-12-13T18:30:00.000Z", "ended_at": null, "ended_reason": null, "cancel_reason": "Customer asked to stop the booster", "invoice_id": "cmwi3bgyj000b8dm6e9gshf1t" } }}{ "X-Clocknext-Signature": "t=1791367200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd", "X-Clocknext-Event-Id": "evt_9e1b3d5f7a2c4e6b8d0f1a3c5e7b9d2f", "X-Clocknext-Event-Type": "package.removal_scheduled"}Types
Every object type on this page, with its fields.
PackageRemovalScheduledEvent
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | evt_ + 32 hex characters. Unique per event, and the same on every retry of it — use it to skip duplicates. |
event_type | string | yes | Always package.removal_scheduled. |
triggered_at | string | yes | When the event was triggered (ISO 8601). |
data | PackageEventData | yes | The customer, the subscription and the package, as it is after the change. |
PackageEventData
The data object of a package.added, package.removal_scheduled or package.ended event: the customer, the subscription and the package.
| Field | Type | Required | Description |
|---|---|---|---|
customer | WebhookCustomer | yes | The customer the event is about. |
subscription | object | yes | The subscription the package is on. |
package | WebhookPackage | yes | The package when the event is triggered. |
WebhookCustomer
The customer the event is about.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The customer's Clocknext id. |
name | string | yes | The customer's name. |
PackageEventData.subscription
The subscription the package is on.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The subscription's id — its purchaseId in the Subscriptions API. |
WebhookPackage
The package on the subscription when the event is triggered, as packages on Get a subscription shows it, in snake_case.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The id of the package on the subscription (PurchasePackage.id). |
package_id | string | null | yes | The catalog package it was added from. Null when that package is gone. |
name | string | yes | The package's name when it was added. |
status | "SCHEDULED" | "ACTIVE" | "MARKED_FOR_CANCELLATION" | "CANCELLED" | yes | ACTIVE, MARKED_FOR_CANCELLATION or CANCELLED. |
cost | number | yes | The price for each billing cycle when it was added, in USD. |
entitlements | object | yes | What it grants each cycle, grouped by kind. Every group is always present. |
started_at | string | null | yes | When it started. |
ends_at | string | null | yes | When it ends or ended. Null while it renews. |
ended_at | string | null | yes | When it ended. Null unless CANCELLED. |
ended_reason | "REMOVED" | "INVOICE_VOIDED" | "PLAN_CHANGED" | "SUBSCRIPTION_CANCELLED" | null | yes | Why it ended. Null unless CANCELLED. |
cancel_reason | string | null | yes | The reason sent with the remove. Null when none. |
invoice_id | string | null | yes | The id of the invoice it was added on. |
WebhookPackage.entitlements
What it grants each cycle, grouped by kind. Every group is always present.
| Field | Type | Required | Description |
|---|---|---|---|
credits | WebhookPackageEntitlementItem[] | yes | The credits and their quantities. |
outcomes | WebhookPackageEntitlementItem[] | yes | The outcomes and their quantities. |
units | WebhookPackageEntitlementItem[] | yes | The units and their quantities. |
composites | WebhookPackageEntitlementItem[] | yes | The composites and their quantities. |
flat_fee | number | null | yes | The flat fee in USD each cycle. Null when there is none. |
WebhookPackageEntitlementItem
One credit, outcome, unit or composite of a package, with the quantity it grants each cycle.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The credit's, outcome's, unit's or composite's own id. |
name | string | yes | Its name. |
quantity | integer | yes | How many it grants each cycle. |
package.added POST
Triggered when a package on a subscription becomes active: its invoice is paid or recorded as paid. An unpaid attach is announced by `invoice.created`.
package.ended POST
Triggered when a package ends. `ended_reason` is `REMOVED`, `INVOICE_VOIDED` (its unpaid invoice was voided), `PLAN_CHANGED` or `SUBSCRIPTION_CANCELLED`.