@commet/node 9.3.0 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +366 -17
- package/dist/index.d.ts +366 -17
- package/dist/index.js +31 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -7
- package/dist/index.mjs.map +1 -1
- package/docs/ai-onboarding/ai-onboarding.md +2 -3
- package/docs/ai-onboarding/billing-best-practices-skill.md +2 -3
- package/docs/ai-onboarding/commet-skill.md +4 -5
- package/docs/ai-onboarding/mcp-server.md +8 -9
- package/docs/ai-onboarding/pricing-models-skill.md +2 -3
- package/docs/ai-onboarding/subscription-patterns-skill.md +2 -3
- package/docs/api-reference/addons.md +1 -1
- package/docs/api-reference/api-keys.md +3 -2
- package/docs/api-reference/credit-packs.md +1 -1
- package/docs/api-reference/customers.md +1 -1
- package/docs/api-reference/feature-access.md +1 -1
- package/docs/api-reference/features.md +1 -1
- package/docs/api-reference/generated-webhooks.md +3 -3
- package/docs/api-reference/index.md +2 -2
- package/docs/api-reference/invoices.md +1 -1
- package/docs/api-reference/markets.md +1 -1
- package/docs/api-reference/offers.md +1 -1
- package/docs/api-reference/payments.md +1 -1
- package/docs/api-reference/payouts.md +1 -1
- package/docs/api-reference/plan-groups.md +1 -1
- package/docs/api-reference/plans.md +1 -1
- package/docs/api-reference/portal.md +1 -1
- package/docs/api-reference/promo-codes.md +2 -2
- package/docs/api-reference/provisioning.md +1 -1
- package/docs/api-reference/quota.md +1 -1
- package/docs/api-reference/seats.md +1 -1
- package/docs/api-reference/subscriptions.md +81 -2
- package/docs/api-reference/test-clock.md +1 -1
- package/docs/api-reference/transactions.md +1 -1
- package/docs/api-reference/usage.md +1 -1
- package/docs/documentation/api-versioning.md +1 -2
- package/docs/documentation/better-auth.md +0 -1
- package/docs/documentation/choose-a-billing-model.md +54 -26
- package/docs/documentation/cli.md +1 -2
- package/docs/documentation/create-api-key.md +100 -25
- package/docs/documentation/customers/customer-credits.md +0 -1
- package/docs/documentation/customers/customer-portal.md +14 -2
- package/docs/documentation/customers/manage-customers.md +1 -2
- package/docs/documentation/error-handling.md +1 -2
- package/docs/documentation/examples.md +0 -1
- package/docs/documentation/finance/acceptable-use.md +0 -1
- package/docs/documentation/finance/finance-overview.md +0 -1
- package/docs/documentation/finance/local-currency-taxes.md +0 -1
- package/docs/documentation/finance/merchant-of-record.md +0 -1
- package/docs/documentation/finance/payouts-verification.md +6 -3
- package/docs/documentation/finance/payouts.md +0 -1
- package/docs/documentation/finance/supported-countries.md +0 -1
- package/docs/documentation/go/integrate-with-encore.md +7 -8
- package/docs/documentation/go/integrate-with-go.md +8 -9
- package/docs/documentation/introduction.md +62 -41
- package/docs/documentation/invoicing/handle-failed-payments.md +9 -4
- package/docs/documentation/invoicing/invoices-and-billing-cycles.md +0 -1
- package/docs/documentation/invoicing/manage-invoices.md +0 -1
- package/docs/documentation/java/integrate-with-java.md +6 -7
- package/docs/documentation/nodejs/integrate-with-astro.md +6 -7
- package/docs/documentation/nodejs/integrate-with-bun.md +6 -7
- package/docs/documentation/nodejs/integrate-with-express.md +7 -8
- package/docs/documentation/nodejs/integrate-with-hono.md +7 -8
- package/docs/documentation/nodejs/integrate-with-nextjs.md +6 -7
- package/docs/documentation/nodejs/integrate-with-nuxt.md +6 -7
- package/docs/documentation/nodejs/integrate-with-remix.md +6 -7
- package/docs/documentation/nodejs/integrate-with-sveltekit.md +6 -7
- package/docs/documentation/payments/accept-one-time-payments.md +0 -1
- package/docs/documentation/payments/payment-orchestration.md +0 -1
- package/docs/documentation/payments/payment-providers.md +0 -1
- package/docs/documentation/payments/transactions-refunds-and-retries.md +8 -1
- package/docs/documentation/php/integrate-with-laravel.md +8 -9
- package/docs/documentation/php/integrate-with-php.md +6 -7
- package/docs/documentation/php/integrate-with-symfony.md +7 -8
- package/docs/documentation/plans/add-ons.md +0 -1
- package/docs/documentation/plans/balance-and-top-ups.md +0 -1
- package/docs/documentation/plans/configure-features.md +0 -1
- package/docs/documentation/plans/consumption-models.md +0 -1
- package/docs/documentation/plans/create-plans.md +0 -1
- package/docs/documentation/plans/credit-packs.md +0 -1
- package/docs/documentation/plans/one-time-payments.md +0 -1
- package/docs/documentation/plans/plan-groups.md +0 -1
- package/docs/documentation/platform/custom-domains.md +0 -1
- package/docs/documentation/platform/dashboard-metrics-and-events.md +0 -1
- package/docs/documentation/platform/members-and-permissions.md +0 -1
- package/docs/documentation/platform/organization-settings.md +0 -1
- package/docs/documentation/python/integrate-with-django.md +8 -9
- package/docs/documentation/python/integrate-with-fastapi.md +8 -9
- package/docs/documentation/python/integrate-with-flask.md +8 -9
- package/docs/documentation/python/integrate-with-python.md +6 -7
- package/docs/documentation/sales/card-promotions.md +0 -1
- package/docs/documentation/sales/introductory-offers.md +0 -1
- package/docs/documentation/sales/offers.md +0 -1
- package/docs/documentation/sales/promo-codes.md +19 -5
- package/docs/documentation/sales/promotional-offers.md +1 -2
- package/docs/documentation/sales/regional-prices.md +0 -1
- package/docs/documentation/sales/trial-periods.md +8 -8
- package/docs/documentation/sdk-reference.md +9 -10
- package/docs/documentation/subscriptions/manage-subscriptions.md +114 -12
- package/docs/documentation/subscriptions/plan-grants.md +0 -1
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +0 -1
- package/docs/documentation/testing-sandbox.md +0 -1
- package/docs/documentation/usage/ai-token-billing.md +0 -1
- package/docs/documentation/usage/quota-management.md +0 -1
- package/docs/documentation/usage/seat-management.md +0 -1
- package/docs/documentation/usage/track-usage.md +0 -1
- package/docs/errors/addon_already_active.md +1 -1
- package/docs/errors/addon_has_activations.md +1 -1
- package/docs/errors/addon_not_active.md +1 -1
- package/docs/errors/addon_not_found.md +1 -1
- package/docs/errors/already_has_active_subscription.md +1 -1
- package/docs/errors/already_scheduled.md +1 -1
- package/docs/errors/api_key_not_found.md +1 -1
- package/docs/errors/card_promotions_not_available.md +1 -1
- package/docs/errors/charge_failed.md +1 -1
- package/docs/errors/charge_in_progress.md +1 -1
- package/docs/errors/claim_not_pending.md +1 -1
- package/docs/errors/credit_pack_not_found.md +1 -1
- package/docs/errors/customer_not_found.md +1 -1
- package/docs/errors/duplicate.md +1 -1
- package/docs/errors/endpoint_deprecated.md +1 -1
- package/docs/errors/endpoint_not_available.md +1 -1
- package/docs/errors/feature_already_exists.md +1 -1
- package/docs/errors/feature_disabled.md +1 -1
- package/docs/errors/feature_in_use.md +1 -1
- package/docs/errors/feature_not_found.md +1 -1
- package/docs/errors/feature_not_in_plan.md +1 -1
- package/docs/errors/forbidden.md +1 -1
- package/docs/errors/free_plan_change_not_supported.md +1 -1
- package/docs/errors/idempotency_in_progress.md +1 -1
- package/docs/errors/idempotency_key_mismatch.md +1 -1
- package/docs/errors/idempotency_unavailable.md +1 -1
- package/docs/errors/included_limit_reached.md +1 -1
- package/docs/errors/index.md +1 -1
- package/docs/errors/insufficient_balance.md +1 -1
- package/docs/errors/insufficient_credits.md +1 -1
- package/docs/errors/insufficient_seats.md +1 -1
- package/docs/errors/internal_error.md +1 -1
- package/docs/errors/invalid_json.md +1 -1
- package/docs/errors/invalid_subscription_status.md +1 -1
- package/docs/errors/invoice_not_found.md +1 -1
- package/docs/errors/market_group_in_use.md +1 -1
- package/docs/errors/market_group_not_found.md +1 -1
- package/docs/errors/market_in_use.md +1 -1
- package/docs/errors/market_not_found.md +1 -1
- package/docs/errors/missing_regional_price.md +1 -1
- package/docs/errors/model_not_found.md +1 -1
- package/docs/errors/no_active_subscription.md +1 -1
- package/docs/errors/no_change_requested.md +1 -1
- package/docs/errors/no_outstanding_invoice.md +1 -1
- package/docs/errors/no_payment_method.md +1 -1
- package/docs/errors/no_prices_configured.md +1 -1
- package/docs/errors/not_found.md +1 -1
- package/docs/errors/not_scheduled_for_cancellation.md +1 -1
- package/docs/errors/offer_not_applicable.md +1 -1
- package/docs/errors/offer_not_found.md +1 -1
- package/docs/errors/one_time_subscription_not_cancelable.md +1 -1
- package/docs/errors/organization_already_claimed.md +1 -1
- package/docs/errors/payment_failed.md +1 -1
- package/docs/errors/payment_method_not_found.md +1 -1
- package/docs/errors/payment_not_cancelable.md +1 -1
- package/docs/errors/payment_not_found.md +1 -1
- package/docs/errors/payouts_not_available_in_sandbox.md +1 -1
- package/docs/errors/plan_change_scheduled.md +1 -1
- package/docs/errors/plan_group_not_found.md +1 -1
- package/docs/errors/plan_not_found.md +1 -1
- package/docs/errors/plan_unavailable.md +1 -1
- package/docs/errors/plans_not_in_same_group.md +1 -1
- package/docs/errors/price_in_use.md +1 -1
- package/docs/errors/price_not_found.md +1 -1
- package/docs/errors/pricing_mode_mismatch.md +1 -1
- package/docs/errors/promo_code_expired.md +1 -1
- package/docs/errors/promo_code_not_found.md +1 -1
- package/docs/errors/provider_unsupported.md +1 -1
- package/docs/errors/rate_limited.md +1 -1
- package/docs/errors/sandbox_only.md +1 -1
- package/docs/errors/seat_limit_exceeded.md +1 -1
- package/docs/errors/subscription_activation_failed.md +1 -1
- package/docs/errors/subscription_already_canceled.md +1 -1
- package/docs/errors/subscription_cancel_failed.md +1 -1
- package/docs/errors/subscription_creation_failed.md +1 -1
- package/docs/errors/subscription_has_open_dispute.md +1 -1
- package/docs/errors/subscription_not_active.md +1 -1
- package/docs/errors/subscription_not_found.md +1 -1
- package/docs/errors/subscription_required.md +1 -1
- package/docs/errors/subscription_uncancel_failed.md +1 -1
- package/docs/errors/transaction_not_found.md +1 -1
- package/docs/errors/unauthorized.md +1 -1
- package/docs/errors/validation_error.md +1 -1
- package/docs/errors/webhook_not_found.md +1 -1
- package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +0 -1
- package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +0 -1
- package/docs/knowledge-base/how-do-discounts-work.md +0 -1
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +0 -1
- package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +0 -1
- package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +0 -1
- package/docs/knowledge-base/how-do-trial-periods-work.md +0 -1
- package/docs/knowledge-base/how-does-billing-work.md +0 -1
- package/docs/knowledge-base/how-does-payment-routing-work.md +0 -1
- package/docs/knowledge-base/how-does-quota-based-billing-work.md +0 -1
- package/docs/knowledge-base/how-does-seat-based-billing-work.md +0 -1
- package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +0 -1
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +0 -1
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +0 -1
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +0 -1
- package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +1 -2
- package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +0 -1
- package/docs/manifest.json +186 -235
- package/docs/platform-documentation.md +69 -149
- package/docs/schemas.md +35 -1
- package/docs/webhooks/introduction.md +0 -1
- package/docs/webhooks.md +98 -7
- package/docs/webhooks.openapi.json +11058 -0
- package/package.json +1 -1
- package/docs/ai-onboarding/meta.json +0 -17
- package/docs/api-reference/meta.json +0 -7
- package/docs/documentation/customers/meta.json +0 -5
- package/docs/documentation/finance/meta.json +0 -13
- package/docs/documentation/go/meta.json +0 -5
- package/docs/documentation/invoicing/meta.json +0 -9
- package/docs/documentation/java/meta.json +0 -5
- package/docs/documentation/meta.json +0 -36
- package/docs/documentation/nodejs/meta.json +0 -14
- package/docs/documentation/payments/meta.json +0 -10
- package/docs/documentation/php/meta.json +0 -9
- package/docs/documentation/plans/meta.json +0 -14
- package/docs/documentation/platform/meta.json +0 -10
- package/docs/documentation/python/meta.json +0 -10
- package/docs/documentation/sales/meta.json +0 -13
- package/docs/documentation/subscriptions/meta.json +0 -9
- package/docs/documentation/usage/meta.json +0 -10
- package/docs/knowledge-base/meta.json +0 -29
- package/docs/meta.json +0 -11
- package/docs/webhooks/addon-activated.md +0 -44
- package/docs/webhooks/addon-deactivated.md +0 -40
- package/docs/webhooks/balance-depleted.md +0 -37
- package/docs/webhooks/balance-low.md +0 -39
- package/docs/webhooks/balance-topped-up.md +0 -41
- package/docs/webhooks/checkout-ready.md +0 -43
- package/docs/webhooks/credits-depleted.md +0 -35
- package/docs/webhooks/credits-expired.md +0 -35
- package/docs/webhooks/credits-granted.md +0 -37
- package/docs/webhooks/credits-low.md +0 -39
- package/docs/webhooks/credits-purchased.md +0 -41
- package/docs/webhooks/customer-created.md +0 -49
- package/docs/webhooks/customer-state-changed.md +0 -134
- package/docs/webhooks/customer-updated.md +0 -49
- package/docs/webhooks/invoice-created.md +0 -45
- package/docs/webhooks/invoice-overdue.md +0 -53
- package/docs/webhooks/invoice-upcoming.md +0 -43
- package/docs/webhooks/invoice-voided.md +0 -53
- package/docs/webhooks/meta.json +0 -83
- package/docs/webhooks/payment-dispute-resolved.md +0 -52
- package/docs/webhooks/payment-disputed.md +0 -49
- package/docs/webhooks/payment-failed.md +0 -37
- package/docs/webhooks/payment-link-canceled.md +0 -41
- package/docs/webhooks/payment-link-completed.md +0 -47
- package/docs/webhooks/payment-link-created.md +0 -41
- package/docs/webhooks/payment-link-failed.md +0 -45
- package/docs/webhooks/payment-method-attached.md +0 -40
- package/docs/webhooks/payment-method-updated.md +0 -38
- package/docs/webhooks/payment-received.md +0 -45
- package/docs/webhooks/payment-recovered.md +0 -39
- package/docs/webhooks/payment-refunded.md +0 -47
- package/docs/webhooks/payment-retry-failed.md +0 -39
- package/docs/webhooks/payout-available.md +0 -33
- package/docs/webhooks/payout-created.md +0 -48
- package/docs/webhooks/payout-failed.md +0 -52
- package/docs/webhooks/payout-paid.md +0 -48
- package/docs/webhooks/plan-grant-created.md +0 -74
- package/docs/webhooks/plan-grant-expired.md +0 -86
- package/docs/webhooks/plan-grant-revoked.md +0 -86
- package/docs/webhooks/plan-grant-updated.md +0 -86
- package/docs/webhooks/quota-exceeded.md +0 -44
- package/docs/webhooks/quota-threshold-reached.md +0 -41
- package/docs/webhooks/seats-limit-reached.md +0 -39
- package/docs/webhooks/seats-updated.md +0 -39
- package/docs/webhooks/subscription-activated.md +0 -43
- package/docs/webhooks/subscription-canceled.md +0 -57
- package/docs/webhooks/subscription-cancellation-revoked.md +0 -37
- package/docs/webhooks/subscription-cancellation-scheduled.md +0 -45
- package/docs/webhooks/subscription-created.md +0 -35
- package/docs/webhooks/subscription-past-due.md +0 -43
- package/docs/webhooks/subscription-plan-change-revoked.md +0 -50
- package/docs/webhooks/subscription-plan-change-scheduled.md +0 -55
- package/docs/webhooks/subscription-plan-changed.md +0 -43
- package/docs/webhooks/subscription-reactivated.md +0 -53
- package/docs/webhooks/subscription-updated.md +0 -39
- package/docs/webhooks/trial-checkout-ready.md +0 -39
- package/docs/webhooks/trial-converted.md +0 -39
- package/docs/webhooks/trial-expired.md +0 -39
- package/docs/webhooks/trial-started.md +0 -46
- package/docs/webhooks/trial-will-end.md +0 -41
- package/docs/webhooks/usage-recorded.md +0 -41
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-06-12
|
|
3
|
-
title: "payout.paid"
|
|
4
|
-
description: "A payout landed in your bank account."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `payoutId` (string) — The payout ID.
|
|
11
|
-
- `amount` (number) — Gross payout amount in cents (100 = $1.00).
|
|
12
|
-
- `fee` (number) — Provider transfer fee in cents.
|
|
13
|
-
- `netAmount` (number) — What reached your bank in cents (amount minus fee).
|
|
14
|
-
- `currency` (string) — The payout currency. Always "usd".
|
|
15
|
-
- `status` (string) — Always "paid" for this event.
|
|
16
|
-
- `destinationBank` (WebhookBankRef | null) — Destination bank display metadata: bankName and last4.
|
|
17
|
-
- `paidAt` (string | null) — ISO 8601 datetime when the provider confirmed the deposit arrived.
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"event": "payout.paid",
|
|
22
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
23
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
24
|
-
"mode": "live",
|
|
25
|
-
"apiVersion": "2026-07-31",
|
|
26
|
-
"data": {
|
|
27
|
-
"payoutId": "8b6f2a1c-4d3e-4f5a-9b8c-7d6e5f4a3b2c",
|
|
28
|
-
"amount": 20000,
|
|
29
|
-
"fee": 0,
|
|
30
|
-
"netAmount": 20000,
|
|
31
|
-
"currency": "usd",
|
|
32
|
-
"status": "paid",
|
|
33
|
-
"destinationBank": {
|
|
34
|
-
"bankName": "CHASE",
|
|
35
|
-
"last4": "6789"
|
|
36
|
-
},
|
|
37
|
-
"paidAt": "2026-06-14T09:00:00.000Z"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## When this fires
|
|
43
|
-
|
|
44
|
-
When the bank settlement of a payout completes — the moment the money actually reaches your bank account, confirmed by the payment provider. This is the terminal success state of the payout lifecycle started by `payout.created`.
|
|
45
|
-
|
|
46
|
-
`paidAt` is the provider-confirmed arrival time. Fires exactly once per payout.
|
|
47
|
-
|
|
48
|
-
Use it to reconcile bank deposits against the payouts that produced them.
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-08-18
|
|
3
|
-
title: "plan_grant.created"
|
|
4
|
-
description: "A plan grant was created."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `id` (string) — The public plan grant ID.
|
|
11
|
-
- `customerId` (string) — The public customer ID.
|
|
12
|
-
- `subscriptionId` (string) — The public subscription ID.
|
|
13
|
-
- `basePlanId` (string) — The public ID of the subscribed base plan.
|
|
14
|
-
- `targetPlanId` (string) — The public ID of the plan whose access was granted.
|
|
15
|
-
- `targetPlanReleaseId` (string) — The public ID of the immutable target plan release.
|
|
16
|
-
- `status` ("active" | "expired" | "revoked") — The plan grant status at this transition.
|
|
17
|
-
- `duration` ("cycles" | "until\_date" | "until\_revoked") — How the plan grant duration is defined at this transition.
|
|
18
|
-
- `durationCycles` (integer | null) — The cycle count when duration is cycles.
|
|
19
|
-
- `startsAt` (string) — When the plan grant started.
|
|
20
|
-
- `expiresAt` (string | null) — The effective expiration deadline, if any.
|
|
21
|
-
- `reason` (string) — The reason recorded for this transition.
|
|
22
|
-
- `source` ("dashboard" | "api" | "system") — Where this transition originated.
|
|
23
|
-
- `revokedAt` (string | null) — When the plan grant was revoked, otherwise null.
|
|
24
|
-
- `createdAt` (string) — When the plan grant was created.
|
|
25
|
-
- `updatedAt` (string) — When the represented transition occurred.
|
|
26
|
-
- `events` (WebhookPlanGrantTimelineEvent\[]) — The grant timeline through the represented transition.
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"event": "plan_grant.created",
|
|
31
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
32
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
33
|
-
"mode": "live",
|
|
34
|
-
"apiVersion": "2026-07-31",
|
|
35
|
-
"data": {
|
|
36
|
-
"id": "pgr_1a2b3c4d",
|
|
37
|
-
"customerId": "user_123",
|
|
38
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
39
|
-
"basePlanId": "pln_starter",
|
|
40
|
-
"targetPlanId": "pln_pro",
|
|
41
|
-
"targetPlanReleaseId": "plr_1a2b3c4d",
|
|
42
|
-
"status": "active",
|
|
43
|
-
"duration": "cycles",
|
|
44
|
-
"durationCycles": 2,
|
|
45
|
-
"startsAt": "2026-08-01T00:00:00.000Z",
|
|
46
|
-
"expiresAt": "2026-10-01T00:00:00.000Z",
|
|
47
|
-
"reason": "Two-month product evaluation",
|
|
48
|
-
"source": "api",
|
|
49
|
-
"revokedAt": null,
|
|
50
|
-
"createdAt": "2026-08-01T00:00:00.000Z",
|
|
51
|
-
"updatedAt": "2026-08-01T00:00:00.000Z",
|
|
52
|
-
"events": [
|
|
53
|
-
{
|
|
54
|
-
"id": "gre_1a2b3c4d",
|
|
55
|
-
"type": "created",
|
|
56
|
-
"reason": "Two-month product evaluation",
|
|
57
|
-
"source": "api",
|
|
58
|
-
"previousExpiresAt": null,
|
|
59
|
-
"expiresAt": "2026-10-01T00:00:00.000Z",
|
|
60
|
-
"duration": "cycles",
|
|
61
|
-
"durationCycles": 2,
|
|
62
|
-
"requestedExpiresAt": null,
|
|
63
|
-
"createdAt": "2026-08-01T00:00:00.000Z"
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## When this fires
|
|
71
|
-
|
|
72
|
-
After a Plan Grant is committed through the API or dashboard. The payload is the grant as it existed at creation, and its last timeline event is `created`.
|
|
73
|
-
|
|
74
|
-
`customer.state_changed` also fires with trigger `plan_access_granted`.
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-08-18
|
|
3
|
-
title: "plan_grant.expired"
|
|
4
|
-
description: "A plan grant expired."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `id` (string) — The public plan grant ID.
|
|
11
|
-
- `customerId` (string) — The public customer ID.
|
|
12
|
-
- `subscriptionId` (string) — The public subscription ID.
|
|
13
|
-
- `basePlanId` (string) — The public ID of the subscribed base plan.
|
|
14
|
-
- `targetPlanId` (string) — The public ID of the plan whose access was granted.
|
|
15
|
-
- `targetPlanReleaseId` (string) — The public ID of the immutable target plan release.
|
|
16
|
-
- `status` ("active" | "expired" | "revoked") — The plan grant status at this transition.
|
|
17
|
-
- `duration` ("cycles" | "until\_date" | "until\_revoked") — How the plan grant duration is defined at this transition.
|
|
18
|
-
- `durationCycles` (integer | null) — The cycle count when duration is cycles.
|
|
19
|
-
- `startsAt` (string) — When the plan grant started.
|
|
20
|
-
- `expiresAt` (string | null) — The effective expiration deadline, if any.
|
|
21
|
-
- `reason` (string) — The reason recorded for this transition.
|
|
22
|
-
- `source` ("dashboard" | "api" | "system") — Where this transition originated.
|
|
23
|
-
- `revokedAt` (string | null) — When the plan grant was revoked, otherwise null.
|
|
24
|
-
- `createdAt` (string) — When the plan grant was created.
|
|
25
|
-
- `updatedAt` (string) — When the represented transition occurred.
|
|
26
|
-
- `events` (WebhookPlanGrantTimelineEvent\[]) — The grant timeline through the represented transition.
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"event": "plan_grant.expired",
|
|
31
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
32
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
33
|
-
"mode": "live",
|
|
34
|
-
"apiVersion": "2026-07-31",
|
|
35
|
-
"data": {
|
|
36
|
-
"id": "pgr_1a2b3c4d",
|
|
37
|
-
"customerId": "user_123",
|
|
38
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
39
|
-
"basePlanId": "pln_starter",
|
|
40
|
-
"targetPlanId": "pln_pro",
|
|
41
|
-
"targetPlanReleaseId": "plr_1a2b3c4d",
|
|
42
|
-
"status": "expired",
|
|
43
|
-
"duration": "cycles",
|
|
44
|
-
"durationCycles": 2,
|
|
45
|
-
"startsAt": "2026-08-01T00:00:00.000Z",
|
|
46
|
-
"expiresAt": "2026-10-01T00:00:00.000Z",
|
|
47
|
-
"reason": "Two-month product evaluation",
|
|
48
|
-
"source": "system",
|
|
49
|
-
"revokedAt": null,
|
|
50
|
-
"createdAt": "2026-08-01T00:00:00.000Z",
|
|
51
|
-
"updatedAt": "2026-10-01T00:05:00.000Z",
|
|
52
|
-
"events": [
|
|
53
|
-
{
|
|
54
|
-
"id": "gre_1a2b3c4d",
|
|
55
|
-
"type": "created",
|
|
56
|
-
"reason": "Two-month product evaluation",
|
|
57
|
-
"source": "api",
|
|
58
|
-
"previousExpiresAt": null,
|
|
59
|
-
"expiresAt": "2026-10-01T00:00:00.000Z",
|
|
60
|
-
"duration": "cycles",
|
|
61
|
-
"durationCycles": 2,
|
|
62
|
-
"requestedExpiresAt": null,
|
|
63
|
-
"createdAt": "2026-08-01T00:00:00.000Z"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": "gre_9i0j1k2l",
|
|
67
|
-
"type": "expired",
|
|
68
|
-
"reason": "Two-month product evaluation",
|
|
69
|
-
"source": "system",
|
|
70
|
-
"previousExpiresAt": null,
|
|
71
|
-
"expiresAt": "2026-10-01T00:00:00.000Z",
|
|
72
|
-
"duration": null,
|
|
73
|
-
"durationCycles": null,
|
|
74
|
-
"requestedExpiresAt": null,
|
|
75
|
-
"createdAt": "2026-10-01T00:05:00.000Z"
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## When this fires
|
|
83
|
-
|
|
84
|
-
After an expired Plan Grant is durably closed by billing discovery or while creating its replacement. The payload is the old grant at expiration, and its last timeline event is `expired`.
|
|
85
|
-
|
|
86
|
-
`customer.state_changed` also fires with trigger `plan_access_ended` when billing discovery expires the grant.
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-08-18
|
|
3
|
-
title: "plan_grant.revoked"
|
|
4
|
-
description: "A plan grant was revoked."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `id` (string) — The public plan grant ID.
|
|
11
|
-
- `customerId` (string) — The public customer ID.
|
|
12
|
-
- `subscriptionId` (string) — The public subscription ID.
|
|
13
|
-
- `basePlanId` (string) — The public ID of the subscribed base plan.
|
|
14
|
-
- `targetPlanId` (string) — The public ID of the plan whose access was granted.
|
|
15
|
-
- `targetPlanReleaseId` (string) — The public ID of the immutable target plan release.
|
|
16
|
-
- `status` ("active" | "expired" | "revoked") — The plan grant status at this transition.
|
|
17
|
-
- `duration` ("cycles" | "until\_date" | "until\_revoked") — How the plan grant duration is defined at this transition.
|
|
18
|
-
- `durationCycles` (integer | null) — The cycle count when duration is cycles.
|
|
19
|
-
- `startsAt` (string) — When the plan grant started.
|
|
20
|
-
- `expiresAt` (string | null) — The effective expiration deadline, if any.
|
|
21
|
-
- `reason` (string) — The reason recorded for this transition.
|
|
22
|
-
- `source` ("dashboard" | "api" | "system") — Where this transition originated.
|
|
23
|
-
- `revokedAt` (string | null) — When the plan grant was revoked, otherwise null.
|
|
24
|
-
- `createdAt` (string) — When the plan grant was created.
|
|
25
|
-
- `updatedAt` (string) — When the represented transition occurred.
|
|
26
|
-
- `events` (WebhookPlanGrantTimelineEvent\[]) — The grant timeline through the represented transition.
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"event": "plan_grant.revoked",
|
|
31
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
32
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
33
|
-
"mode": "live",
|
|
34
|
-
"apiVersion": "2026-07-31",
|
|
35
|
-
"data": {
|
|
36
|
-
"id": "pgr_1a2b3c4d",
|
|
37
|
-
"customerId": "user_123",
|
|
38
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
39
|
-
"basePlanId": "pln_starter",
|
|
40
|
-
"targetPlanId": "pln_pro",
|
|
41
|
-
"targetPlanReleaseId": "plr_1a2b3c4d",
|
|
42
|
-
"status": "revoked",
|
|
43
|
-
"duration": "until_revoked",
|
|
44
|
-
"durationCycles": null,
|
|
45
|
-
"startsAt": "2026-08-01T00:00:00.000Z",
|
|
46
|
-
"expiresAt": null,
|
|
47
|
-
"reason": "Evaluation completed",
|
|
48
|
-
"source": "api",
|
|
49
|
-
"revokedAt": "2026-08-20T14:00:00.000Z",
|
|
50
|
-
"createdAt": "2026-08-01T00:00:00.000Z",
|
|
51
|
-
"updatedAt": "2026-08-20T14:00:00.000Z",
|
|
52
|
-
"events": [
|
|
53
|
-
{
|
|
54
|
-
"id": "gre_1a2b3c4d",
|
|
55
|
-
"type": "created",
|
|
56
|
-
"reason": "Open-ended evaluation",
|
|
57
|
-
"source": "api",
|
|
58
|
-
"previousExpiresAt": null,
|
|
59
|
-
"expiresAt": null,
|
|
60
|
-
"duration": "until_revoked",
|
|
61
|
-
"durationCycles": null,
|
|
62
|
-
"requestedExpiresAt": null,
|
|
63
|
-
"createdAt": "2026-08-01T00:00:00.000Z"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": "gre_m3n4o5p6",
|
|
67
|
-
"type": "revoked",
|
|
68
|
-
"reason": "Evaluation completed",
|
|
69
|
-
"source": "api",
|
|
70
|
-
"previousExpiresAt": null,
|
|
71
|
-
"expiresAt": null,
|
|
72
|
-
"duration": null,
|
|
73
|
-
"durationCycles": null,
|
|
74
|
-
"requestedExpiresAt": null,
|
|
75
|
-
"createdAt": "2026-08-20T14:00:00.000Z"
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## When this fires
|
|
83
|
-
|
|
84
|
-
After an active Plan Grant is manually revoked through the API or dashboard. The payload is the grant at revocation, and its last timeline event is `revoked`.
|
|
85
|
-
|
|
86
|
-
`customer.state_changed` also fires with trigger `plan_access_ended`.
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-08-18
|
|
3
|
-
title: "plan_grant.updated"
|
|
4
|
-
description: "A plan grant duration changed."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `id` (string) — The public plan grant ID.
|
|
11
|
-
- `customerId` (string) — The public customer ID.
|
|
12
|
-
- `subscriptionId` (string) — The public subscription ID.
|
|
13
|
-
- `basePlanId` (string) — The public ID of the subscribed base plan.
|
|
14
|
-
- `targetPlanId` (string) — The public ID of the plan whose access was granted.
|
|
15
|
-
- `targetPlanReleaseId` (string) — The public ID of the immutable target plan release.
|
|
16
|
-
- `status` ("active" | "expired" | "revoked") — The plan grant status at this transition.
|
|
17
|
-
- `duration` ("cycles" | "until\_date" | "until\_revoked") — How the plan grant duration is defined at this transition.
|
|
18
|
-
- `durationCycles` (integer | null) — The cycle count when duration is cycles.
|
|
19
|
-
- `startsAt` (string) — When the plan grant started.
|
|
20
|
-
- `expiresAt` (string | null) — The effective expiration deadline, if any.
|
|
21
|
-
- `reason` (string) — The reason recorded for this transition.
|
|
22
|
-
- `source` ("dashboard" | "api" | "system") — Where this transition originated.
|
|
23
|
-
- `revokedAt` (string | null) — When the plan grant was revoked, otherwise null.
|
|
24
|
-
- `createdAt` (string) — When the plan grant was created.
|
|
25
|
-
- `updatedAt` (string) — When the represented transition occurred.
|
|
26
|
-
- `events` (WebhookPlanGrantTimelineEvent\[]) — The grant timeline through the represented transition.
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"event": "plan_grant.updated",
|
|
31
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
32
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
33
|
-
"mode": "live",
|
|
34
|
-
"apiVersion": "2026-07-31",
|
|
35
|
-
"data": {
|
|
36
|
-
"id": "pgr_1a2b3c4d",
|
|
37
|
-
"customerId": "user_123",
|
|
38
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
39
|
-
"basePlanId": "pln_starter",
|
|
40
|
-
"targetPlanId": "pln_pro",
|
|
41
|
-
"targetPlanReleaseId": "plr_1a2b3c4d",
|
|
42
|
-
"status": "active",
|
|
43
|
-
"duration": "until_date",
|
|
44
|
-
"durationCycles": null,
|
|
45
|
-
"startsAt": "2026-08-01T00:00:00.000Z",
|
|
46
|
-
"expiresAt": "2026-11-15T00:00:00.000Z",
|
|
47
|
-
"reason": "Extended evaluation",
|
|
48
|
-
"source": "dashboard",
|
|
49
|
-
"revokedAt": null,
|
|
50
|
-
"createdAt": "2026-08-01T00:00:00.000Z",
|
|
51
|
-
"updatedAt": "2026-08-15T12:00:00.000Z",
|
|
52
|
-
"events": [
|
|
53
|
-
{
|
|
54
|
-
"id": "gre_1a2b3c4d",
|
|
55
|
-
"type": "created",
|
|
56
|
-
"reason": "Two-month product evaluation",
|
|
57
|
-
"source": "api",
|
|
58
|
-
"previousExpiresAt": null,
|
|
59
|
-
"expiresAt": "2026-10-01T00:00:00.000Z",
|
|
60
|
-
"duration": "cycles",
|
|
61
|
-
"durationCycles": 2,
|
|
62
|
-
"requestedExpiresAt": null,
|
|
63
|
-
"createdAt": "2026-08-01T00:00:00.000Z"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": "gre_5e6f7g8h",
|
|
67
|
-
"type": "updated",
|
|
68
|
-
"reason": "Extended evaluation",
|
|
69
|
-
"source": "dashboard",
|
|
70
|
-
"previousExpiresAt": "2026-10-01T00:00:00.000Z",
|
|
71
|
-
"expiresAt": "2026-11-15T00:00:00.000Z",
|
|
72
|
-
"duration": "until_date",
|
|
73
|
-
"durationCycles": null,
|
|
74
|
-
"requestedExpiresAt": "2026-11-15T00:00:00.000Z",
|
|
75
|
-
"createdAt": "2026-08-15T12:00:00.000Z"
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## When this fires
|
|
83
|
-
|
|
84
|
-
After an active Plan Grant's duration or deadline is committed. The payload is the grant at that update, and its last timeline event is `updated`.
|
|
85
|
-
|
|
86
|
-
This event does not fire for any other field change.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-06-12
|
|
3
|
-
title: "quota.exceeded"
|
|
4
|
-
description: "Usage passed a feature's included quantity."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `subscriptionId` (string) — The subscription ID.
|
|
11
|
-
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
12
|
-
- `featureCode` (string) — The metered feature code.
|
|
13
|
-
- `currentUsage` (number) — Total usage in the current period.
|
|
14
|
-
- `includedAmount` (number) — The included quantity for the period.
|
|
15
|
-
- `overageEnabled` (boolean) — True when overage billing began; false when the hard limit was hit and usage is now blocked.
|
|
16
|
-
- `periodStart` (string) — ISO 8601 start of the usage period.
|
|
17
|
-
|
|
18
|
-
```json
|
|
19
|
-
{
|
|
20
|
-
"event": "quota.exceeded",
|
|
21
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
22
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
23
|
-
"mode": "live",
|
|
24
|
-
"apiVersion": "2026-07-31",
|
|
25
|
-
"data": {
|
|
26
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
27
|
-
"customerId": "user_123",
|
|
28
|
-
"featureCode": "api_calls",
|
|
29
|
-
"currentUsage": 1080,
|
|
30
|
-
"includedAmount": 1000,
|
|
31
|
-
"overageEnabled": true,
|
|
32
|
-
"periodStart": "2026-06-01T00:00:00.000Z"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## When this fires
|
|
38
|
-
|
|
39
|
-
Once per feature per billing period, when period usage passes the included quantity:
|
|
40
|
-
|
|
41
|
-
- **Overage enabled** (`overageEnabled: true`): overage billing began — every unit past the included amount will be charged at renewal.
|
|
42
|
-
- **Overage disabled** (`overageEnabled: false`): the hard limit was hit — further usage requests for this feature are rejected. This case also fires `customer.state_changed` with trigger `quota_exceeded`, since the customer's access changed.
|
|
43
|
-
|
|
44
|
-
Use it to surface overage charges in your UI, or to block the feature when the limit is hard.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-06-12
|
|
3
|
-
title: "quota.threshold_reached"
|
|
4
|
-
description: "Usage crossed 80% of a feature's included quantity."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `subscriptionId` (string) — The subscription ID.
|
|
11
|
-
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
12
|
-
- `featureCode` (string) — The metered feature code.
|
|
13
|
-
- `currentUsage` (number) — Total usage in the current period after the crossing.
|
|
14
|
-
- `includedAmount` (number) — The included quantity for the period.
|
|
15
|
-
- `periodStart` (string) — ISO 8601 start of the usage period.
|
|
16
|
-
|
|
17
|
-
```json
|
|
18
|
-
{
|
|
19
|
-
"event": "quota.threshold_reached",
|
|
20
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
21
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
22
|
-
"mode": "live",
|
|
23
|
-
"apiVersion": "2026-07-31",
|
|
24
|
-
"data": {
|
|
25
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
26
|
-
"customerId": "user_123",
|
|
27
|
-
"featureCode": "api_calls",
|
|
28
|
-
"currentUsage": 850,
|
|
29
|
-
"includedAmount": 1000,
|
|
30
|
-
"periodStart": "2026-06-01T00:00:00.000Z"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## When this fires
|
|
36
|
-
|
|
37
|
-
For metered plans, the async usage processor compares each feature's period usage against its included quantity. When usage crosses 80% of the included amount, this fires once for that feature and billing period. Unlimited features never fire it.
|
|
38
|
-
|
|
39
|
-
If a single burst jumps straight past the included amount, only `quota.exceeded` fires.
|
|
40
|
-
|
|
41
|
-
Use it to warn the customer they are approaching their limit.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-06-12
|
|
3
|
-
title: "seats.limit_reached"
|
|
4
|
-
description: "A seat change reached the plan's included seat limit."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
11
|
-
- `subscriptionId` (string) — The subscription ID.
|
|
12
|
-
- `featureCode` (string) — The seats feature code.
|
|
13
|
-
- `currentSeats` (number) — The seat count after the change.
|
|
14
|
-
- `includedSeats` (number) — The included seat limit of the plan.
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"event": "seats.limit_reached",
|
|
19
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
20
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
21
|
-
"mode": "live",
|
|
22
|
-
"apiVersion": "2026-07-31",
|
|
23
|
-
"data": {
|
|
24
|
-
"customerId": "user_123",
|
|
25
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
26
|
-
"featureCode": "editors",
|
|
27
|
-
"currentSeats": 5,
|
|
28
|
-
"includedSeats": 5
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## When this fires
|
|
34
|
-
|
|
35
|
-
When a seat change moves the count from below the plan's included seat limit to at or above it. It fires once per crossing — removing seats and re-adding past the limit fires it again. Plans with unlimited seats never fire it.
|
|
36
|
-
|
|
37
|
-
Seats are not blocked at the limit: counts above the included amount are allowed and billed as overage when the plan enables it.
|
|
38
|
-
|
|
39
|
-
Use it to prompt an upgrade to a higher tier before overage kicks in.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-06-12
|
|
3
|
-
title: "seats.updated"
|
|
4
|
-
description: "A customer's seat count changed."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
11
|
-
- `subscriptionId` (string | null) — The live subscription ID, or null when the customer has no live subscription.
|
|
12
|
-
- `featureCode` (string) — The seats feature code.
|
|
13
|
-
- `previousSeats` (number) — The seat count before the change.
|
|
14
|
-
- `currentSeats` (number) — The seat count after the change.
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"event": "seats.updated",
|
|
19
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
20
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
21
|
-
"mode": "live",
|
|
22
|
-
"apiVersion": "2026-07-31",
|
|
23
|
-
"data": {
|
|
24
|
-
"customerId": "user_123",
|
|
25
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
26
|
-
"featureCode": "editors",
|
|
27
|
-
"previousSeats": 3,
|
|
28
|
-
"currentSeats": 5
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## When this fires
|
|
34
|
-
|
|
35
|
-
Every seat mutation fires it: the SDK seat endpoints (add, set, remove, bulk) and manual seat events created from the dashboard. The payload carries the previous and the new absolute count for the feature.
|
|
36
|
-
|
|
37
|
-
`customer.state_changed` fires alongside it with trigger `seats_updated`, carrying the full entitlement state including the seats summary.
|
|
38
|
-
|
|
39
|
-
Use it to keep your own member-management UI in sync with billed seats.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-07-10
|
|
3
|
-
title: "subscription.activated"
|
|
4
|
-
description: "Fired when a subscription becomes active after payment"
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `subscriptionId` (string) — The subscription ID.
|
|
11
|
-
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
12
|
-
- `status` (string) — Current status. One of: draft, pending\_payment, trialing, active, past\_due, canceled. Access is granted while trialing, active, or past\_due — past\_due is a permissive grace window during dunning, where you decide whether to keep serving the customer or block them.
|
|
13
|
-
- `currentPeriodStart` (string, optional) — ISO 8601 start of the current billing period.
|
|
14
|
-
- `currentPeriodEnd` (string, optional) — ISO 8601 end of the current billing period.
|
|
15
|
-
- `name` (string | null) — Optional custom name for the subscription.
|
|
16
|
-
- `invoiceId` (string) — The invoice ID for this payment.
|
|
17
|
-
- `invoiceNumber` (string) — The human-readable invoice number.
|
|
18
|
-
- `invoiceTotal` (number) — Invoice total in cents (100 = $1.00).
|
|
19
|
-
- `invoiceCurrency` (string) — The invoice currency code.
|
|
20
|
-
- `provider` ("stripe" | "commet" | "dlocal" | null) — The payment provider that processed the activating charge: stripe, commet, or dlocal. Null when the subscription activated without a charge (zero-total or setup-based activation).
|
|
21
|
-
|
|
22
|
-
```json
|
|
23
|
-
{
|
|
24
|
-
"event": "subscription.activated",
|
|
25
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
26
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
27
|
-
"mode": "live",
|
|
28
|
-
"apiVersion": "2026-07-31",
|
|
29
|
-
"data": {
|
|
30
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
31
|
-
"customerId": "user_123",
|
|
32
|
-
"status": "active",
|
|
33
|
-
"currentPeriodStart": "2026-03-25T00:00:00.000Z",
|
|
34
|
-
"currentPeriodEnd": "2026-04-25T00:00:00.000Z",
|
|
35
|
-
"name": "Acme Corp",
|
|
36
|
-
"invoiceId": "inv_k1l2m3",
|
|
37
|
-
"invoiceNumber": "INV-0042",
|
|
38
|
-
"invoiceTotal": 9900,
|
|
39
|
-
"invoiceCurrency": "usd",
|
|
40
|
-
"provider": "stripe"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
```
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
lastModified: 2026-07-16
|
|
3
|
-
title: "subscription.canceled"
|
|
4
|
-
description: "Fired when a subscription is terminated, at period end or immediately. Revoke access here."
|
|
5
|
-
full: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
-
|
|
10
|
-
- `subscriptionId` (string) — The subscription ID.
|
|
11
|
-
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
12
|
-
- `status` (string) — Always "canceled" for this event. Revoke access when you receive this.
|
|
13
|
-
- `canceledAt` (string, optional) — ISO 8601 datetime when the cancellation was requested or triggered.
|
|
14
|
-
- `cancelReason` (string | null) — 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).
|
|
15
|
-
- `endDate` (string, optional) — ISO 8601 datetime when the subscription ended. Matches the billing period end for scheduled cancellations; for immediate terminations it is the moment of termination.
|
|
16
|
-
|
|
17
|
-
```json
|
|
18
|
-
{
|
|
19
|
-
"event": "subscription.canceled",
|
|
20
|
-
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
21
|
-
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
22
|
-
"mode": "live",
|
|
23
|
-
"apiVersion": "2026-07-31",
|
|
24
|
-
"data": {
|
|
25
|
-
"subscriptionId": "sub_1a2b3c4d",
|
|
26
|
-
"customerId": "user_123",
|
|
27
|
-
"status": "canceled",
|
|
28
|
-
"canceledAt": "2026-04-20T10:15:00.000Z",
|
|
29
|
-
"cancelReason": "Too expensive",
|
|
30
|
-
"endDate": "2026-04-25T00:00:00.000Z"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Cancellation lifecycle
|
|
36
|
-
|
|
37
|
-
A regular cancellation is scheduled for the end of the current billing period. Two events fire at different moments:
|
|
38
|
-
|
|
39
|
-
| Moment | Event | status | What to do |
|
|
40
|
-
| ------------------------------ | ----------------------- | ---------- | ------------------------------------------------------------ |
|
|
41
|
-
| Customer requests cancellation | `subscription.updated` | `active` | Show "ending on {endDate}" in your UI. Do NOT revoke access. |
|
|
42
|
-
| Billing period ends | `subscription.canceled` | `canceled` | Revoke access. |
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
POST /subscriptions/{id}/cancel
|
|
46
|
-
└→ subscription.updated (status: "active", canceledAt: set, endDate: set)
|
|
47
|
-
... time passes until billing period ends ...
|
|
48
|
-
└→ subscription.canceled (status: "canceled")
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Immediate terminations
|
|
52
|
-
|
|
53
|
-
Some terminations skip the schedule: `subscription.canceled` arrives right away, with no prior `subscription.updated`, and `endDate` is the moment of termination — not a billing period boundary.
|
|
54
|
-
|
|
55
|
-
- `POST /subscriptions/{id}/cancel` with `immediate: true`. Cancellations of free plans and of subscriptions in `pending_payment` or `past_due` also settle immediately — canceling inside the dunning grace window voids the unpaid renewal.
|
|
56
|
-
- A full refund of a subscription invoice: fires with `cancelReason: "refund"`, alongside `payment.refunded`.
|
|
57
|
-
- Exhausted dunning retries: fires with `cancelReason: "dunning_exhausted"`, alongside `payment.retry_failed`.
|