@commet/node 9.7.0 → 9.9.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.
Files changed (64) hide show
  1. package/dist/index.d.mts +413 -52
  2. package/dist/index.d.ts +413 -52
  3. package/dist/index.js +39 -12
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +39 -12
  6. package/dist/index.mjs.map +1 -1
  7. package/docs/ai-onboarding/mcp-server.md +1 -1
  8. package/docs/api-reference/customers.md +6 -2
  9. package/docs/api-reference/generated-webhooks.md +2 -2
  10. package/docs/api-reference/index.md +2 -2
  11. package/docs/api-reference/offers.md +2 -2
  12. package/docs/api-reference/plans.md +16 -3
  13. package/docs/api-reference/promo-codes.md +3 -1
  14. package/docs/api-reference/subscriptions.md +84 -9
  15. package/docs/api-reference/usage.md +0 -4
  16. package/docs/documentation/cli.md +60 -49
  17. package/docs/documentation/create-api-key.md +3 -1
  18. package/docs/documentation/customers/customer-portal.md +10 -2
  19. package/docs/documentation/customers/manage-customers.md +2 -1
  20. package/docs/documentation/finance/payouts.md +11 -0
  21. package/docs/documentation/finance/supported-countries.md +5 -5
  22. package/docs/documentation/invoicing/handle-failed-payments.md +9 -9
  23. package/docs/documentation/payments/accept-one-time-payments.md +1 -1
  24. package/docs/documentation/payments/payment-orchestration.md +2 -0
  25. package/docs/documentation/payments/payment-providers.md +46 -0
  26. package/docs/documentation/payments/transactions-refunds-and-retries.md +1 -1
  27. package/docs/documentation/plans/add-ons.md +1 -1
  28. package/docs/documentation/plans/consumption-models.md +44 -9
  29. package/docs/documentation/plans/credit-packs.md +49 -1
  30. package/docs/documentation/plans/one-time-payments.md +3 -3
  31. package/docs/documentation/plans/plan-groups.md +46 -10
  32. package/docs/documentation/platform/dashboard-metrics-and-events.md +40 -9
  33. package/docs/documentation/sales/connect-dub-affiliates.md +52 -0
  34. package/docs/documentation/sales/introductory-offers.md +7 -13
  35. package/docs/documentation/sales/offers.md +10 -6
  36. package/docs/documentation/sales/promo-codes.md +47 -17
  37. package/docs/documentation/sales/promotional-offers.md +6 -7
  38. package/docs/documentation/sales/regional-prices.md +16 -0
  39. package/docs/documentation/sales/trial-periods.md +67 -40
  40. package/docs/documentation/subscriptions/manage-subscriptions.md +65 -2
  41. package/docs/documentation/subscriptions/pay-in-advance.md +4 -7
  42. package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +20 -2
  43. package/docs/documentation/testing-sandbox.md +2 -0
  44. package/docs/documentation/usage/track-usage.md +23 -0
  45. package/docs/errors/customer_deleted.md +22 -0
  46. package/docs/errors/index.md +5 -0
  47. package/docs/errors/managed_by_integration.md +22 -0
  48. package/docs/errors/no_scheduled_plan_change.md +22 -0
  49. package/docs/errors/plan_balance_limit_reached.md +22 -0
  50. package/docs/errors/plan_credit_limit_reached.md +22 -0
  51. package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +8 -8
  52. package/docs/knowledge-base/how-do-discounts-work.md +7 -5
  53. package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +14 -8
  54. package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +1 -1
  55. package/docs/knowledge-base/how-do-trial-periods-work.md +30 -24
  56. package/docs/knowledge-base/how-does-billing-work.md +1 -0
  57. package/docs/knowledge-base/what-happens-when-a-payment-fails.md +11 -9
  58. package/docs/manifest.json +54 -2
  59. package/docs/platform-documentation.md +1 -0
  60. package/docs/schemas.md +51 -9
  61. package/docs/webhooks/introduction.md +14 -12
  62. package/docs/webhooks.md +53 -17
  63. package/docs/webhooks.openapi.json +857 -745
  64. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ # customer_deleted
2
+
3
+ The externalId belongs to a deleted customer, so the plan group's default plan cannot start for it.
4
+
5
+ - **Error type:** `conflict_error`
6
+ - **`code`:** `customer_deleted`
7
+ - **API version:** `2026-08-27`
8
+
9
+
10
+ ## What to do
11
+
12
+ Create the customer with a different externalId, or send the request without planGroupId.
13
+
14
+ The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
15
+
16
+ ## Retry behavior
17
+
18
+ Do not retry the same request.
19
+
20
+ ## Correlate the request
21
+
22
+ Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
@@ -12,6 +12,7 @@ Use the response `code` to open the matching local reference. Preserve `x-reques
12
12
  - [`payouts_not_available_in_sandbox`](./payouts_not_available_in_sandbox.md) — Payout operations are not available in sandbox mode.
13
13
  - [`not_found`](./not_found.md) — The requested endpoint or resource could not be found in the current organization, mode, or API version.
14
14
  - [`customer_not_found`](./customer_not_found.md) — The requested customer does not exist in this organization.
15
+ - [`customer_deleted`](./customer_deleted.md) — The externalId belongs to a deleted customer, so the plan group's default plan cannot start for it.
15
16
  - [`feature_not_found`](./feature_not_found.md) — The requested feature, seat feature, or quota feature does not exist in this organization.
16
17
  - [`plan_not_found`](./plan_not_found.md) — The requested plan does not exist or is not available in this organization.
17
18
  - [`subscription_not_found`](./subscription_not_found.md) — The requested subscription does not exist in this organization.
@@ -31,6 +32,8 @@ Use the response `code` to open the matching local reference. Preserve `x-reques
31
32
  - [`insufficient_credits`](./insufficient_credits.md) — The subscription does not have enough credits for the usage event.
32
33
  - [`insufficient_seats`](./insufficient_seats.md) — The requested seat removal exceeds the subscription's available seat balance.
33
34
  - [`included_limit_reached`](./included_limit_reached.md) — The requested usage exceeds the plan's included usage limit.
35
+ - [`plan_credit_limit_reached`](./plan_credit_limit_reached.md) — The usage event would spend more plan credits than the plan's credit limit allows in the current day or week, and purchased credits do not cover the rest.
36
+ - [`plan_balance_limit_reached`](./plan_balance_limit_reached.md) — The usage event would spend more plan balance than the plan's balance limit allows in the current day or week, and purchased balance does not cover the rest.
34
37
  - [`missing_regional_price`](./missing_regional_price.md) — The plan has no price for the subscription's currency or resolved market.
35
38
  - [`payment_failed`](./payment_failed.md) — The operation could not complete its payment or required tax calculation.
36
39
  - [`payment_not_found`](./payment_not_found.md) — The requested payment does not exist in this organization.
@@ -56,6 +59,7 @@ Use the response `code` to open the matching local reference. Preserve `x-reques
56
59
  - [`plans_not_in_same_group`](./plans_not_in_same_group.md) — The current and target plans do not belong to the same plan group.
57
60
  - [`free_plan_change_not_supported`](./free_plan_change_not_supported.md) — This plan-change operation does not support the selected free plan.
58
61
  - [`plan_change_scheduled`](./plan_change_scheduled.md) — The requested plan change takes effect at the end of the current billing period instead of being prorated immediately.
62
+ - [`no_scheduled_plan_change`](./no_scheduled_plan_change.md) — The subscription has no scheduled plan change to revoke.
59
63
  - [`addon_not_found`](./addon_not_found.md) — The requested add-on does not exist in this organization.
60
64
  - [`addon_already_active`](./addon_already_active.md) — The add-on is already active on this subscription.
61
65
  - [`addon_not_active`](./addon_not_active.md) — The add-on is not active on this subscription.
@@ -77,6 +81,7 @@ Use the response `code` to open the matching local reference. Preserve `x-reques
77
81
  - [`transaction_not_found`](./transaction_not_found.md) — The requested transaction does not exist in this organization.
78
82
  - [`price_not_found`](./price_not_found.md) — The requested price does not exist on the selected plan or no price matches the operation.
79
83
  - [`price_in_use`](./price_in_use.md) — The price cannot be removed or changed while it is in use.
84
+ - [`managed_by_integration`](./managed_by_integration.md) — The record is managed by an integration (its managedBy field), so its terms change only in that integration.
80
85
  - [`market_not_found`](./market_not_found.md) — The requested market does not exist in this organization.
81
86
  - [`market_in_use`](./market_in_use.md) — The market cannot be deleted while a price or subscription uses it.
82
87
  - [`market_group_not_found`](./market_group_not_found.md) — The requested market group does not exist in this organization.
@@ -0,0 +1,22 @@
1
+ # managed_by_integration
2
+
3
+ The record is managed by an integration (its managedBy field), so its terms change only in that integration.
4
+
5
+ - **Error type:** `conflict_error`
6
+ - **`code`:** `managed_by_integration`
7
+ - **API version:** `2026-08-27`
8
+
9
+
10
+ ## What to do
11
+
12
+ Make the change in the integration, such as Dub. Here you can still rename an Offer and activate or deactivate a promo code.
13
+
14
+ The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
15
+
16
+ ## Retry behavior
17
+
18
+ Do not retry the same change; it is rejected while the integration manages the record.
19
+
20
+ ## Correlate the request
21
+
22
+ Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
@@ -0,0 +1,22 @@
1
+ # no_scheduled_plan_change
2
+
3
+ The subscription has no scheduled plan change to revoke.
4
+
5
+ - **Error type:** `conflict_error`
6
+ - **`code`:** `no_scheduled_plan_change`
7
+ - **API version:** `2026-08-27`
8
+
9
+
10
+ ## What to do
11
+
12
+ Read the subscription's scheduledPlanChange before revoking a plan change.
13
+
14
+ The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
15
+
16
+ ## Retry behavior
17
+
18
+ Do not retry unless a plan change is scheduled first.
19
+
20
+ ## Correlate the request
21
+
22
+ Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
@@ -0,0 +1,22 @@
1
+ # plan_balance_limit_reached
2
+
3
+ The usage event would spend more plan balance than the plan's balance limit allows in the current day or week, and purchased balance does not cover the rest.
4
+
5
+ - **Error type:** `billing_error`
6
+ - **`code`:** `plan_balance_limit_reached`
7
+ - **API version:** `2026-08-27`
8
+
9
+
10
+ ## What to do
11
+
12
+ Use the planBalanceLimit details to show what remains and when the window resets, or let the customer top up, which the limit never caps.
13
+
14
+ The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
15
+
16
+ ## Retry behavior
17
+
18
+ Retry after planBalanceLimit.resetsAt or once purchased balance covers the usage.
19
+
20
+ ## Correlate the request
21
+
22
+ Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
@@ -0,0 +1,22 @@
1
+ # plan_credit_limit_reached
2
+
3
+ The usage event would spend more plan credits than the plan's credit limit allows in the current day or week, and purchased credits do not cover the rest.
4
+
5
+ - **Error type:** `billing_error`
6
+ - **`code`:** `plan_credit_limit_reached`
7
+ - **API version:** `2026-08-27`
8
+
9
+
10
+ ## What to do
11
+
12
+ Use the planCreditLimit details to show what remains and when the window resets, or let the customer buy credits, which the limit never caps.
13
+
14
+ The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
15
+
16
+ ## Retry behavior
17
+
18
+ Retry after planCreditLimit.resetsAt or once purchased credits cover the usage.
19
+
20
+ ## Correlate the request
21
+
22
+ Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
@@ -5,15 +5,15 @@ description: Choose the correct credit mechanism based on what the customer rece
5
5
 
6
6
  These mechanisms share a name but affect different ledgers.
7
7
 
8
- | Mechanism | Represents | Reset or expiry | Used by |
9
- | ------------------- | -------------------------------------------------------------- | ---------------------------------- | ------------------------------------ |
10
- | **Plan credits** | Recurring product units included in a Credits plan | Reset with the plan allowance | Usage events |
11
- | **Credit pack** | Product units the customer buys | Persists across plan resets | Usage events after recurring credits |
12
- | **Customer credit** | Money that reduces eligible recurring invoices in one currency | Optional expiration; consumed FIFO | Invoice calculation before tax |
13
- | **Plan grant** | Temporary access beyond the subscribed plan | Ends when revoked or expired | Feature access, not a credit ledger |
8
+ | Mechanism | Represents | Reset or expiry | Used by |
9
+ | --------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
10
+ | **Plan credits** | Recurring product units included in a Credits plan | Expire at each reset, or [roll over](/docs/consumption-models#roll-over-unused-plan-credits) up to a cap | Usage events, within an optional daily or weekly limit |
11
+ | **Purchased credits** | Product units the customer buys as a pack, a chosen quantity, or an automatic top-up | Persist across plan resets | Usage events after plan credits, never limited |
12
+ | **Customer credit** | Money that reduces eligible recurring invoices in one currency | Optional expiration; consumed FIFO | Invoice calculation before tax |
13
+ | **Plan grant** | Temporary access beyond the subscribed plan | Ends when revoked or expired | Feature access, not a credit ledger |
14
14
 
15
- Use plan credits and packs when the customer thinks in actions such as generations or exports. Use customer credit when the adjustment is monetary, such as USD 25 after a service incident. Use a plan grant when no invoice should exist at all.
15
+ Use plan and purchased credits when the customer thinks in actions such as generations or exports. Use customer credit when the adjustment is monetary, such as USD 25 after a service incident. Use a plan grant when no invoice should exist at all.
16
16
 
17
- Revoking unused customer credit does not rewrite invoices that already consumed it. Purchased credit packs do not disappear at the next plan reset.
17
+ Revoking unused customer credit does not rewrite invoices that already consumed it. Purchased credits do not disappear at the next plan reset.
18
18
 
19
19
  See [Credit Packs](/docs/credit-packs), [Customer Credits](/docs/customer-credits), and [Plan Grants](/docs/plan-grants) for implementation.
@@ -17,13 +17,13 @@ A direct Offer does not need a prior association with the selected plan or price
17
17
 
18
18
  ## Eligibility and exclusivity
19
19
 
20
- Automatic introductory selection currently excludes customers with an `active` or `past_due` subscription in the organization. Other historical statuses do not create a lifetime ban.
20
+ Automatic introductory selection excludes customers with an `active`, `past_due`, or `paused` subscription in the organization. Other historical statuses do not create a lifetime ban.
21
21
 
22
- An explicit `offerId` overrides automatic introductory selection. A Promo Code is rejected with `intro_offer_active` while an eligible introductory placement applies. `offerId`, `promoCode`, `customTrialDays`, and `skipTrial: true` are mutually exclusive selection controls.
22
+ An explicit `offerId` overrides automatic introductory selection. A Promo Code is rejected with `intro_offer_active` while an eligible introductory placement applies. `offerId`, `promoCode`, and `cardPromotionId` are mutually exclusive. `customTrialDays` and `skipTrial` combine with `offerId` and `promoCode`, not with `cardPromotionId`. A trial without a payment method starts with none of the three.
23
23
 
24
24
  ## Duration and phases
25
25
 
26
- An Offer may combine a free trial with ordered discount or fixed-price phases. A finite `durationCycles` counts billing periods, not calendar months. A yearly Offer phase with `durationCycles: 2` lasts two yearly billing cycles.
26
+ An Offer combines ordered discount or fixed-price phases. A finite `durationCycles` counts billing periods, not calendar months. A yearly Offer phase with `durationCycles: 2` lasts two yearly billing cycles.
27
27
 
28
28
  ```
29
29
  Pro costs $99/month with 50% off for 3 cycles:
@@ -34,11 +34,13 @@ Cycle 3: $49.50
34
34
  Cycle 4: $99.00
35
35
  ```
36
36
 
37
- The final discount phase may use `durationCycles: null` to remain active until the accepted application ends. Promo Codes are intentionally narrower: they can reference only one `percentage` or `amount_off` phase.
37
+ The final discount phase may use `durationCycles: null` to remain active until the accepted application ends. Promo Codes can reference the same Offers. Introductory placement is narrower: exactly one finite `percentage` or `amount_off` phase.
38
+
39
+ Trials are not Offer phases. When the price has a [trial](/docs/trial-periods), the discount starts with the first invoice after it.
38
40
 
39
41
  ## Plan changes
40
42
 
41
- The Offer Application belongs to the price target accepted by the subscription. An immediate plan change ends that application. The change may pass a new `offerId`; otherwise the new plan begins at its normal price. Scheduled plan changes do not accept an Offer.
43
+ The Offer Application belongs to the price target accepted by the subscription. An immediate plan change ends that application. The change may pass a new `offerId` or a `promoCode`; otherwise the new plan begins at its normal price. Scheduled plan changes accept neither.
42
44
 
43
45
  ## What gets discounted
44
46
 
@@ -7,14 +7,14 @@ A free plan has no price and no checkout. When you assign a customer to a free p
7
7
 
8
8
  ## How Free Plans Differ from Paid Plans
9
9
 
10
- | | Paid plan | Free plan |
11
- | -------------- | ----------------------------------------- | ---------------------------------------------------------- |
12
- | Price | Has a price | $0 |
13
- | Billing | Monthly, quarterly, semiannual, or yearly | No charges — usage resets monthly |
14
- | How they start | Checkout + payment | **Activated immediately** |
15
- | Invoices | Yes | Only for purchases (credits, balance, add-ons) |
16
- | Overage | Configurable per feature | **Never allowed** — usage is blocked at the included limit |
17
- | Usage resets | Every month | Every month |
10
+ | | Paid plan | Free plan |
11
+ | -------------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
12
+ | Price | Has a price | $0 |
13
+ | Billing | Monthly, quarterly, semiannual, or yearly | No charges — usage resets monthly |
14
+ | How they start | Checkout + payment, or a [trial without a payment method](/docs/trial-periods#start-a-trial-without-a-payment-method) | **Activated immediately** |
15
+ | Invoices | Yes | Only for purchases (credits, balance, add-ons) |
16
+ | Overage | Configurable per feature | **Never allowed** — usage is blocked at the included limit |
17
+ | Usage resets | Every month | Every month |
18
18
 
19
19
  ## Monthly Usage Resets
20
20
 
@@ -79,3 +79,9 @@ Credit from free plan: $0 (it's free)
79
79
  They pay: $99 (full month)
80
80
  Invoices, payment method, and billing info appear in their portal.
81
81
  ```
82
+
83
+ When the Pro price has a trial without a payment method and the customer never had Pro, the trial starts at once with no checkout and no charge. Without a card at the end of the trial, the subscription moves to the plan group's default plan, or is canceled when the group has none.
84
+
85
+ ## Use a Free Plan as the Default Plan
86
+
87
+ Mark a free plan as its [plan group's default plan](/docs/plan-groups#default-plan-and-signup-trial) to keep customers on it instead of canceling. A paid plan of the group that ends from the Customer Portal, a revoked payment authorization, exhausted payment retries, or a trial without a card moves to it.
@@ -3,7 +3,7 @@ title: Offers, Promo Codes, and Card Promotions
3
3
  description: Understand where commercial terms live and how each distribution channel selects them.
4
4
  ---
5
5
 
6
- An Offer owns the economic terms: trial, percentage discount, amount off, or temporary fixed price. Introductory Offers, direct Promotional Offers, Promo Codes, and Card Promotions decide how those terms reach a customer.
6
+ An Offer owns the economic terms: percentage discount, amount off, or temporary fixed price. Trials belong to the plan price. Introductory Offers, direct Promotional Offers, Promo Codes, and Card Promotions decide how those terms reach a customer.
7
7
 
8
8
  | Channel | Who selects it | Additional rule |
9
9
  | ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
@@ -1,46 +1,52 @@
1
1
  ---
2
2
  title: Trials
3
- description: "A free trial is an Offer phase: checkout saves the payment method without charging it, and the first charge waits until the trial ends."
3
+ description: "How a plan price trial works: checkout saves a card without charging it, or the trial starts at once without one and the first charge waits until it ends."
4
4
  ---
5
5
 
6
- A trial is a `free_trial` phase in an Offer. It delays the first charge; the Offer's application channel determines whether Commet selects it automatically or your integration assigns it directly.
6
+ A trial is a number of free days set on a plan price. Each price chooses whether its trial requires a payment method.
7
7
 
8
8
  ## What the customer experiences
9
9
 
10
- | | Regular checkout | Trial checkout |
11
- | -------------- | --------------------------- | ----------------------------------------- |
12
- | Payment | Charged immediately | Payment method saved, no immediate charge |
13
- | Primary action | Pay | Start free trial |
14
- | After checkout | Subscription becomes active | Subscription becomes `trialing` |
10
+ | | Trial with a payment method | Trial without a payment method |
11
+ | -------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------- |
12
+ | Start | Checkout saves the payment method, no charge | Starts at once, no checkout |
13
+ | Primary action | Start free trial | None until the customer adds a card |
14
+ | `checkoutUrl` | Checkout link | `null` |
15
+ | Trial ends | First charge, subscription becomes `active` | With a card, the same. Without one, moves to the plan group's default plan or is canceled |
15
16
 
16
- The trial starts after payment-method setup succeeds. If the card requires 3D Secure, the customer completes verification before the trial begins.
17
+ The trial with a payment method starts after setup succeeds. If the card requires 3D Secure, the customer completes verification before the trial begins.
17
18
 
18
19
  ## How it works
19
20
 
20
21
  ```
21
- 1. Commet resolves an Offer with a free_trial phase.
22
- 2. Checkout saves the payment method without charging it.
23
- 3. The subscription becomes trialing and records trialEndsAt.
24
- 4. At the end, Commet charges the selected price's current catalog value.
25
- 5. The next accepted Offer phase starts, if one exists.
22
+ 1. Commet reads the trial days of the selected price.
23
+ 2. With a payment method required, checkout saves it without charging.
24
+ Without one, the subscription starts trialing at once.
25
+ 3. The subscription is trialing and records trialEndsAt.
26
+ 4. At the end, Commet charges the current value of the selected price.
27
+ Without a card, it moves to the default plan or is canceled, with no invoice.
28
+ 5. A discount from an Offer starts with the first invoice after the trial.
26
29
  ```
27
30
 
28
31
  > **Warning**
29
32
  >
30
- > The accepted Offer phases are immutable, but the selected catalog price is not. A price change during the trial changes the first paid charge.
33
+ > The subscription keeps its accepted trial days, but the selected catalog price can change. A price change during the trial changes the first paid charge.
31
34
 
32
- ## Reusable and customer-specific trials
35
+ ## Customer-specific trials
33
36
 
34
- Use a catalog Offer when the trial should have a reusable name and distribution strategy. It can be attached to a base price as introductory or passed directly with `offerId`.
37
+ Use `customTrialDays` to replace the price's trial days for one subscription, or `skipTrial: true` to start without a trial. Both combine with `offerId`.
35
38
 
36
- Use `customTrialDays` for terms exclusive to one subscription. Commet records those accepted terms as a custom Offer Application. Use `skipTrial: true` to bypass automatic introductory selection.
39
+ A customer gets one trial per plan. A customer who already had the plan, in a trial or paying, starts with the regular checkout.
37
40
 
38
41
  ## During the trial
39
42
 
40
- | Behavior | During trial |
41
- | ------------------------------------- | --------------------------------------------------------- |
42
- | Plan features | Available |
43
- | Overage | Blocked at included limits |
44
- | Credit, balance, and add-on purchases | Available after checkout captures the payment method |
45
- | Metered usage reset | Monthly on the billing day for trials longer than a month |
46
- | Included balance and credits | Granted once when the trial starts |
43
+ | Behavior | During trial |
44
+ | ------------------------------------- | ---------------------------------------------------------------------------------------- |
45
+ | Plan features | Available |
46
+ | Overage | Blocked at included limits |
47
+ | Credit, balance, and add-on purchases | Available with a saved payment method |
48
+ | Immediate plan changes | End the trial and charge the new plan; without a payment method, `409 no_payment_method` |
49
+ | Metered usage reset | Monthly on the billing day for trials longer than a month |
50
+ | Included balance and credits | Granted once when the trial starts |
51
+
52
+ See [Trial Periods](/docs/trial-periods) to configure trials.
@@ -47,6 +47,7 @@ Those layers change at different times. Commet separates catalog changes, subscr
47
47
  | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------- |
48
48
  | Trial starts | They use the product, no charge. **Overage is blocked** — usage stops at included limits |
49
49
  | Trial ends | They're charged the current price, overage activates normally |
50
+ | Trial without a payment method ends without a card | No charge; the subscription moves to the plan group's default plan or is canceled |
50
51
  | Renewal or retryable first-trial charge fails | Subscription becomes `past_due`; usage continues while retries run and purchases are blocked |
51
52
  | First-trial charge needs a payment method or customer action | Subscription remains `pending_payment` so checkout can complete |
52
53
  | Canceled subscription | Can be reactivated — fresh invoice at the current price, new billing period starts that day |
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  title: Payment Failures
3
- description: Usage and seats keep working while Commet retries a failed charge on days 1, 3, 5 and 7, and the subscription is canceled if every retry fails.
3
+ description: Usage and seats keep working while Commet retries a failed charge on days 1, 3, 5 and 7; if all fail, the subscription ends or moves to the default plan.
4
4
  ---
5
5
 
6
- When a payment fails, your customer's usage and seats keep working while Commet retries the charge — but new purchases are blocked. If all retries fail, their subscription is canceled.
6
+ When a payment fails, your customer's usage and seats keep working while Commet retries the charge — but new purchases are blocked. If all retries fail, their subscription is canceled, or moves to the plan group's [default plan](/docs/plan-groups#default-plan-and-signup-trial).
7
7
 
8
8
  ## What Your Customer Experiences
9
9
 
@@ -14,15 +14,15 @@ Payment fails
14
14
  → Commet retries the charge automatically
15
15
 
16
16
  All retries fail
17
- → Their subscription is canceled
18
- → Access is revoked
17
+ → Their subscription is canceled, or moves to the default plan
18
+ → Paid access is revoked
19
19
  ```
20
20
 
21
- | Stage | Access | What's happening |
22
- | --------------------- | -------------------------------- | ---------------------------------------------------------------------------------- |
23
- | Payment fails | **Usage and seats keep working** | Subscription moves to `past_due`, invoice becomes `outstanding`, retries scheduled |
24
- | During grace period | **Usage and seats keep working** | Automatic retries on day 1, day 3, day 5, and day 7; usage keeps accruing as debt |
25
- | All retries exhausted | Revoked | Subscription canceled, invoice marked `uncollectible` |
21
+ | Stage | Access | What's happening |
22
+ | --------------------- | --------------------------------------- | ---------------------------------------------------------------------------------- |
23
+ | Payment fails | **Usage and seats keep working** | Subscription moves to `past_due`, invoice becomes `outstanding`, retries scheduled |
24
+ | During grace period | **Usage and seats keep working** | Automatic retries on day 1, day 3, day 5, and day 7; usage keeps accruing as debt |
25
+ | All retries exhausted | Revoked, or limited to the default plan | Subscription canceled or moved to the default plan, invoice marked `uncollectible` |
26
26
 
27
27
  > **Warning**
28
28
  >
@@ -31,3 +31,5 @@ All retries fail
31
31
  ## First Charge After a Trial
32
32
 
33
33
  A retryable provider decline on the first paid invoice follows the same `past_due` dunning schedule. If the charge cannot start because the payment method is missing or the customer must take an action, the subscription remains `pending_payment` and checkout is used to complete payment instead of starting dunning.
34
+
35
+ A [trial without a payment method](/docs/trial-periods#start-a-trial-without-a-payment-method) that ends without a card is not charged. It moves to the default plan or is canceled, with no invoice.
@@ -12,7 +12,7 @@
12
12
  "platformDocumentation": {
13
13
  "source": "commet-labs/docs",
14
14
  "index": "platform-documentation.md",
15
- "count": 96,
15
+ "count": 97,
16
16
  "entries": [
17
17
  "documentation/introduction.md",
18
18
  "documentation/create-api-key.md",
@@ -51,6 +51,7 @@
51
51
  "documentation/sales/promotional-offers.md",
52
52
  "documentation/sales/introductory-offers.md",
53
53
  "documentation/sales/promo-codes.md",
54
+ "documentation/sales/connect-dub-affiliates.md",
54
55
  "documentation/sales/regional-prices.md",
55
56
  "documentation/sales/trial-periods.md",
56
57
  "documentation/subscriptions/manage-subscriptions.md",
@@ -114,7 +115,7 @@
114
115
  },
115
116
  "errorReferences": {
116
117
  "index": "errors/index.md",
117
- "count": 83,
118
+ "count": 88,
118
119
  "entries": [
119
120
  {
120
121
  "code": "validation_error",
@@ -164,6 +165,12 @@
164
165
  "documentation": "errors/customer_not_found.md",
165
166
  "canonicalUrl": "/docs/api-reference/2026-08-27/errors/customer_not_found.md"
166
167
  },
168
+ {
169
+ "code": "customer_deleted",
170
+ "type": "conflict_error",
171
+ "documentation": "errors/customer_deleted.md",
172
+ "canonicalUrl": "/docs/api-reference/2026-08-27/errors/customer_deleted.md"
173
+ },
167
174
  {
168
175
  "code": "feature_not_found",
169
176
  "type": "not_found_error",
@@ -278,6 +285,18 @@
278
285
  "documentation": "errors/included_limit_reached.md",
279
286
  "canonicalUrl": "/docs/api-reference/2026-08-27/errors/included_limit_reached.md"
280
287
  },
288
+ {
289
+ "code": "plan_credit_limit_reached",
290
+ "type": "billing_error",
291
+ "documentation": "errors/plan_credit_limit_reached.md",
292
+ "canonicalUrl": "/docs/api-reference/2026-08-27/errors/plan_credit_limit_reached.md"
293
+ },
294
+ {
295
+ "code": "plan_balance_limit_reached",
296
+ "type": "billing_error",
297
+ "documentation": "errors/plan_balance_limit_reached.md",
298
+ "canonicalUrl": "/docs/api-reference/2026-08-27/errors/plan_balance_limit_reached.md"
299
+ },
281
300
  {
282
301
  "code": "missing_regional_price",
283
302
  "type": "billing_error",
@@ -428,6 +447,12 @@
428
447
  "documentation": "errors/plan_change_scheduled.md",
429
448
  "canonicalUrl": "/docs/api-reference/2026-08-27/errors/plan_change_scheduled.md"
430
449
  },
450
+ {
451
+ "code": "no_scheduled_plan_change",
452
+ "type": "conflict_error",
453
+ "documentation": "errors/no_scheduled_plan_change.md",
454
+ "canonicalUrl": "/docs/api-reference/2026-08-27/errors/no_scheduled_plan_change.md"
455
+ },
431
456
  {
432
457
  "code": "addon_not_found",
433
458
  "type": "not_found_error",
@@ -554,6 +579,12 @@
554
579
  "documentation": "errors/price_in_use.md",
555
580
  "canonicalUrl": "/docs/api-reference/2026-08-27/errors/price_in_use.md"
556
581
  },
582
+ {
583
+ "code": "managed_by_integration",
584
+ "type": "conflict_error",
585
+ "documentation": "errors/managed_by_integration.md",
586
+ "canonicalUrl": "/docs/api-reference/2026-08-27/errors/managed_by_integration.md"
587
+ },
557
588
  {
558
589
  "code": "market_not_found",
559
590
  "type": "not_found_error",
@@ -1287,6 +1318,18 @@
1287
1318
  "method": "POST",
1288
1319
  "path": "/subscriptions/{id}/addons"
1289
1320
  },
1321
+ {
1322
+ "name": "getAutoTopUp",
1323
+ "operationId": "get-subscription-auto-top-up",
1324
+ "method": "GET",
1325
+ "path": "/subscriptions/{id}/auto-top-up"
1326
+ },
1327
+ {
1328
+ "name": "updateAutoTopUp",
1329
+ "operationId": "update-subscription-auto-top-up",
1330
+ "method": "PATCH",
1331
+ "path": "/subscriptions/{id}/auto-top-up"
1332
+ },
1290
1333
  {
1291
1334
  "name": "adjustBalance",
1292
1335
  "operationId": "adjust-balance",
@@ -1389,6 +1432,12 @@
1389
1432
  "method": "GET",
1390
1433
  "path": "/subscriptions/{id}"
1391
1434
  },
1435
+ {
1436
+ "name": "revokeScheduledPlanChange",
1437
+ "operationId": "revoke-scheduled-plan-change",
1438
+ "method": "DELETE",
1439
+ "path": "/subscriptions/{id}/scheduled-plan-change"
1440
+ },
1392
1441
  {
1393
1442
  "name": "uncancel",
1394
1443
  "operationId": "uncancel-subscription",
@@ -1613,6 +1662,7 @@
1613
1662
  "invoice.upcoming",
1614
1663
  "payment_method.attached",
1615
1664
  "payment_method.updated",
1665
+ "payment_method.detached",
1616
1666
  "customer.created",
1617
1667
  "customer.updated",
1618
1668
  "customer.state_changed",
@@ -1625,9 +1675,11 @@
1625
1675
  "credits.low",
1626
1676
  "credits.depleted",
1627
1677
  "credits.expired",
1678
+ "balance.granted",
1628
1679
  "balance.topped_up",
1629
1680
  "balance.low",
1630
1681
  "balance.depleted",
1682
+ "balance.expired",
1631
1683
  "quota.threshold_reached",
1632
1684
  "quota.exceeded",
1633
1685
  "seats.updated",
@@ -39,6 +39,7 @@ This documentation snapshot is serialized from the source of commet.co/docs and
39
39
  - [documentation/sales/promotional-offers.md](./documentation/sales/promotional-offers.md)
40
40
  - [documentation/sales/introductory-offers.md](./documentation/sales/introductory-offers.md)
41
41
  - [documentation/sales/promo-codes.md](./documentation/sales/promo-codes.md)
42
+ - [documentation/sales/connect-dub-affiliates.md](./documentation/sales/connect-dub-affiliates.md)
42
43
  - [documentation/sales/regional-prices.md](./documentation/sales/regional-prices.md)
43
44
  - [documentation/sales/trial-periods.md](./documentation/sales/trial-periods.md)
44
45
  - [documentation/subscriptions/manage-subscriptions.md](./documentation/subscriptions/manage-subscriptions.md)