CommetCommet
GitHubDiscordStatus
Introducción

Eventos de Suscripción

subscription.createdsubscription.activatedsubscription.reactivatedsubscription.pause_scheduledsubscription.pause_updatedsubscription.pause_revokedsubscription.pausedsubscription.resumedsubscription.resume_failedsubscription.canceledsubscription.updatedsubscription.plan_changedsubscription.cancellation_scheduledsubscription.cancellation_revokedsubscription.plan_change_scheduledsubscription.plan_change_revokedsubscription.past_due

Eventos de Prueba

trial.startedtrial.convertedtrial.expiredtrial.will_endtrial.checkout_ready

Eventos de Checkout

checkout.ready

Eventos de Pago

payment.receivedpayment.failedpayment.recoveredpayment.retry_failedpayment.refundedpayment.disputedpayment.dispute_resolved

Eventos de Link de Pago

payment_link.createdpayment_link.completedpayment_link.failedpayment_link.canceled

Eventos de Recibo

invoice.createdinvoice.upcominginvoice.overdueinvoice.voided

Eventos de Método de Pago

payment_method.attachedpayment_method.updated

Eventos de Cliente

customer.createdcustomer.updatedcustomer.state_changed

Eventos de Plan Grant

plan_grant.createdplan_grant.updatedplan_grant.expiredplan_grant.revoked

Eventos de Créditos y Saldo

credits.grantedcredits.purchasedcredits.lowcredits.depletedcredits.expiredbalance.topped_upbalance.lowbalance.depleted

Eventos de Cuota y Uso

quota.threshold_reachedquota.exceededusage.recorded

Eventos de Asientos

seats.updatedseats.limit_reached

Eventos de Complementos

addon.activatedaddon.deactivated

Eventos de Payout

payout.availablepayout.createdpayout.paidpayout.failed
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

plan_grant.expired

Venció un Plan Grant.

Payload

All webhook payloads follow a consistent top-level structure with event-specific data nested within the data object.

idstring

The public plan grant ID.

customerIdstring

The public customer ID.

subscriptionIdstring

The public subscription ID.

basePlanIdstring

The public ID of the subscribed base plan.

targetPlanIdstring

The public ID of the plan whose access was granted.

targetPlanReleaseIdstring

The public ID of the immutable target plan release.

status"active" | "expired" | "revoked"

The plan grant status at this transition.

duration"cycles" | "until_date" | "until_revoked"

How the plan grant duration is defined at this transition.

durationCyclesinteger | null

The cycle count when duration is cycles.

startsAtstring

When the plan grant started.

expiresAtstring | null

The effective expiration deadline, if any.

reasonstring

The reason recorded for this transition.

source"dashboard" | "api" | "system"

Where this transition originated.

revokedAtstring | null

When the plan grant was revoked, otherwise null.

createdAtstring

When the plan grant was created.

updatedAtstring

When the represented transition occurred.

eventsWebhookPlanGrantTimelineEvent[]

The grant timeline through the represented transition.

{
  "event": "plan_grant.expired",
  "timestamp": "2026-06-23T14:30:00.000Z",
  "organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
  "mode": "live",
  "apiVersion": "2026-08-27",
  "data": {
    "id": "pgr_1a2b3c4d",
    "customerId": "user_123",
    "subscriptionId": "sub_1a2b3c4d",
    "basePlanId": "pln_starter",
    "targetPlanId": "pln_pro",
    "targetPlanReleaseId": "plr_1a2b3c4d",
    "status": "expired",
    "duration": "cycles",
    "durationCycles": 2,
    "startsAt": "2026-08-01T00:00:00.000Z",
    "expiresAt": "2026-10-01T00:00:00.000Z",
    "reason": "Two-month product evaluation",
    "source": "system",
    "revokedAt": null,
    "createdAt": "2026-08-01T00:00:00.000Z",
    "updatedAt": "2026-10-01T00:05:00.000Z",
    "events": [
      {
        "id": "gre_1a2b3c4d",
        "type": "created",
        "reason": "Two-month product evaluation",
        "source": "api",
        "previousExpiresAt": null,
        "expiresAt": "2026-10-01T00:00:00.000Z",
        "duration": "cycles",
        "durationCycles": 2,
        "requestedExpiresAt": null,
        "createdAt": "2026-08-01T00:00:00.000Z"
      },
      {
        "id": "gre_9i0j1k2l",
        "type": "expired",
        "reason": "Two-month product evaluation",
        "source": "system",
        "previousExpiresAt": null,
        "expiresAt": "2026-10-01T00:00:00.000Z",
        "duration": null,
        "durationCycles": null,
        "requestedExpiresAt": null,
        "createdAt": "2026-10-01T00:05:00.000Z"
      }
    ]
  }
}

Cuándo se dispara

Después de cerrar de forma durable un Plan Grant vencido, ya sea durante billing discovery o al crear su reemplazo. El payload representa el grant anterior al vencer y su último evento es expired.

Cuando vence durante billing discovery también se dispara customer.state_changed con el trigger plan_access_ended.

¿Cómo está esta guía?

plan_grant.updated

Cambió la duración de un Plan Grant.

plan_grant.revoked

Se revocó un Plan Grant.