Se dispara cuando una suscripción termina, al final del período o de inmediato. Revoca el acceso acá.
All webhook payloads follow a consistent top-level structure with event-specific data nested within the data object.
The subscription ID.
The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
Always "canceled" for this event. Revoke access when you receive this.
ISO 8601 datetime when the cancellation was requested or triggered.
The reason for cancellation, if provided. Set by Commet on system-initiated terminations: "refund" (full refund of a subscription invoice) or "dunning_exhausted" (all payment retries failed).
ISO 8601 datetime when the subscription ended. Matches the billing period end for scheduled cancellations; for immediate terminations it is the moment of termination.
{
"event": "subscription.canceled",
"timestamp": "2026-06-23T14:30:00.000Z",
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
"mode": "live",
"apiVersion": "2026-07-31",
"data": {
"subscriptionId": "sub_1a2b3c4d",
"customerId": "user_123",
"status": "canceled",
"canceledAt": "2026-04-20T10:15:00.000Z",
"cancelReason": "Too expensive",
"endDate": "2026-04-25T00:00:00.000Z"
}
}Una cancelación regular se agenda para el final del período de cobro actual. Se disparan dos eventos en momentos distintos:
| Momento | Evento | status | Qué hacer |
|---|---|---|---|
| El cliente solicita la cancelación | subscription.updated | active | Muestra "termina el {endDate}" en tu UI. NO revoques el acceso. |
| Termina el período de cobro | subscription.canceled | canceled | Revoca el acceso. |
POST /subscriptions/{id}/cancel
└→ subscription.updated (status: "active", canceledAt: set, endDate: set)
... pasa el tiempo hasta que termina el período de cobro ...
└→ subscription.canceled (status: "canceled")Algunas terminaciones se saltan la agenda: subscription.canceled llega de inmediato, sin un subscription.updated previo, y endDate es el momento de la terminación — no un límite del período de cobro.
POST /subscriptions/{id}/cancel con immediate: true. Las cancelaciones de planes gratuitos y de suscripciones en pending_payment o past_due también se resuelven de inmediato — cancelar dentro de la ventana de gracia de dunning anula la renovación impaga.cancelReason: "refund", junto con payment.refunded.cancelReason: "dunning_exhausted", junto con payment.retry_failed.¿Cómo está esta guía?