@commet/node 9.3.0 → 9.4.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 (194) hide show
  1. package/dist/index.d.mts +364 -15
  2. package/dist/index.d.ts +364 -15
  3. package/dist/index.js +29 -5
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +29 -5
  6. package/dist/index.mjs.map +1 -1
  7. package/docs/api-reference/addons.md +1 -1
  8. package/docs/api-reference/api-keys.md +3 -2
  9. package/docs/api-reference/credit-packs.md +1 -1
  10. package/docs/api-reference/customers.md +1 -1
  11. package/docs/api-reference/feature-access.md +1 -1
  12. package/docs/api-reference/features.md +1 -1
  13. package/docs/api-reference/generated-webhooks.md +3 -3
  14. package/docs/api-reference/index.md +2 -2
  15. package/docs/api-reference/invoices.md +1 -1
  16. package/docs/api-reference/markets.md +1 -1
  17. package/docs/api-reference/offers.md +1 -1
  18. package/docs/api-reference/payments.md +1 -1
  19. package/docs/api-reference/payouts.md +1 -1
  20. package/docs/api-reference/plan-groups.md +1 -1
  21. package/docs/api-reference/plans.md +1 -1
  22. package/docs/api-reference/portal.md +1 -1
  23. package/docs/api-reference/promo-codes.md +1 -1
  24. package/docs/api-reference/provisioning.md +1 -1
  25. package/docs/api-reference/quota.md +1 -1
  26. package/docs/api-reference/seats.md +1 -1
  27. package/docs/api-reference/subscriptions.md +80 -1
  28. package/docs/api-reference/test-clock.md +1 -1
  29. package/docs/api-reference/transactions.md +1 -1
  30. package/docs/api-reference/usage.md +1 -1
  31. package/docs/documentation/api-versioning.md +1 -1
  32. package/docs/documentation/choose-a-billing-model.md +48 -26
  33. package/docs/documentation/create-api-key.md +101 -25
  34. package/docs/documentation/introduction.md +63 -41
  35. package/docs/documentation/payments/transactions-refunds-and-retries.md +7 -1
  36. package/docs/documentation/sdk-reference.md +9 -9
  37. package/docs/documentation/subscriptions/manage-subscriptions.md +113 -12
  38. package/docs/errors/addon_already_active.md +1 -1
  39. package/docs/errors/addon_has_activations.md +1 -1
  40. package/docs/errors/addon_not_active.md +1 -1
  41. package/docs/errors/addon_not_found.md +1 -1
  42. package/docs/errors/already_has_active_subscription.md +1 -1
  43. package/docs/errors/already_scheduled.md +1 -1
  44. package/docs/errors/api_key_not_found.md +1 -1
  45. package/docs/errors/card_promotions_not_available.md +1 -1
  46. package/docs/errors/charge_failed.md +1 -1
  47. package/docs/errors/charge_in_progress.md +1 -1
  48. package/docs/errors/claim_not_pending.md +1 -1
  49. package/docs/errors/credit_pack_not_found.md +1 -1
  50. package/docs/errors/customer_not_found.md +1 -1
  51. package/docs/errors/duplicate.md +1 -1
  52. package/docs/errors/endpoint_deprecated.md +1 -1
  53. package/docs/errors/endpoint_not_available.md +1 -1
  54. package/docs/errors/feature_already_exists.md +1 -1
  55. package/docs/errors/feature_disabled.md +1 -1
  56. package/docs/errors/feature_in_use.md +1 -1
  57. package/docs/errors/feature_not_found.md +1 -1
  58. package/docs/errors/feature_not_in_plan.md +1 -1
  59. package/docs/errors/forbidden.md +1 -1
  60. package/docs/errors/free_plan_change_not_supported.md +1 -1
  61. package/docs/errors/idempotency_in_progress.md +1 -1
  62. package/docs/errors/idempotency_key_mismatch.md +1 -1
  63. package/docs/errors/idempotency_unavailable.md +1 -1
  64. package/docs/errors/included_limit_reached.md +1 -1
  65. package/docs/errors/index.md +1 -1
  66. package/docs/errors/insufficient_balance.md +1 -1
  67. package/docs/errors/insufficient_credits.md +1 -1
  68. package/docs/errors/insufficient_seats.md +1 -1
  69. package/docs/errors/internal_error.md +1 -1
  70. package/docs/errors/invalid_json.md +1 -1
  71. package/docs/errors/invalid_subscription_status.md +1 -1
  72. package/docs/errors/invoice_not_found.md +1 -1
  73. package/docs/errors/market_group_in_use.md +1 -1
  74. package/docs/errors/market_group_not_found.md +1 -1
  75. package/docs/errors/market_in_use.md +1 -1
  76. package/docs/errors/market_not_found.md +1 -1
  77. package/docs/errors/missing_regional_price.md +1 -1
  78. package/docs/errors/model_not_found.md +1 -1
  79. package/docs/errors/no_active_subscription.md +1 -1
  80. package/docs/errors/no_change_requested.md +1 -1
  81. package/docs/errors/no_outstanding_invoice.md +1 -1
  82. package/docs/errors/no_payment_method.md +1 -1
  83. package/docs/errors/no_prices_configured.md +1 -1
  84. package/docs/errors/not_found.md +1 -1
  85. package/docs/errors/not_scheduled_for_cancellation.md +1 -1
  86. package/docs/errors/offer_not_applicable.md +1 -1
  87. package/docs/errors/offer_not_found.md +1 -1
  88. package/docs/errors/one_time_subscription_not_cancelable.md +1 -1
  89. package/docs/errors/organization_already_claimed.md +1 -1
  90. package/docs/errors/payment_failed.md +1 -1
  91. package/docs/errors/payment_method_not_found.md +1 -1
  92. package/docs/errors/payment_not_cancelable.md +1 -1
  93. package/docs/errors/payment_not_found.md +1 -1
  94. package/docs/errors/payouts_not_available_in_sandbox.md +1 -1
  95. package/docs/errors/plan_change_scheduled.md +1 -1
  96. package/docs/errors/plan_group_not_found.md +1 -1
  97. package/docs/errors/plan_not_found.md +1 -1
  98. package/docs/errors/plan_unavailable.md +1 -1
  99. package/docs/errors/plans_not_in_same_group.md +1 -1
  100. package/docs/errors/price_in_use.md +1 -1
  101. package/docs/errors/price_not_found.md +1 -1
  102. package/docs/errors/pricing_mode_mismatch.md +1 -1
  103. package/docs/errors/promo_code_expired.md +1 -1
  104. package/docs/errors/promo_code_not_found.md +1 -1
  105. package/docs/errors/provider_unsupported.md +1 -1
  106. package/docs/errors/rate_limited.md +1 -1
  107. package/docs/errors/sandbox_only.md +1 -1
  108. package/docs/errors/seat_limit_exceeded.md +1 -1
  109. package/docs/errors/subscription_activation_failed.md +1 -1
  110. package/docs/errors/subscription_already_canceled.md +1 -1
  111. package/docs/errors/subscription_cancel_failed.md +1 -1
  112. package/docs/errors/subscription_creation_failed.md +1 -1
  113. package/docs/errors/subscription_has_open_dispute.md +1 -1
  114. package/docs/errors/subscription_not_active.md +1 -1
  115. package/docs/errors/subscription_not_found.md +1 -1
  116. package/docs/errors/subscription_required.md +1 -1
  117. package/docs/errors/subscription_uncancel_failed.md +1 -1
  118. package/docs/errors/transaction_not_found.md +1 -1
  119. package/docs/errors/unauthorized.md +1 -1
  120. package/docs/errors/validation_error.md +1 -1
  121. package/docs/errors/webhook_not_found.md +1 -1
  122. package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +2 -2
  123. package/docs/manifest.json +121 -85
  124. package/docs/platform-documentation.md +6 -0
  125. package/docs/schemas.md +35 -1
  126. package/docs/webhooks/addon-activated.md +1 -1
  127. package/docs/webhooks/addon-deactivated.md +1 -1
  128. package/docs/webhooks/balance-depleted.md +1 -1
  129. package/docs/webhooks/balance-low.md +1 -1
  130. package/docs/webhooks/balance-topped-up.md +1 -1
  131. package/docs/webhooks/checkout-ready.md +1 -1
  132. package/docs/webhooks/credits-depleted.md +1 -1
  133. package/docs/webhooks/credits-expired.md +1 -1
  134. package/docs/webhooks/credits-granted.md +1 -1
  135. package/docs/webhooks/credits-low.md +1 -1
  136. package/docs/webhooks/credits-purchased.md +1 -1
  137. package/docs/webhooks/customer-created.md +1 -1
  138. package/docs/webhooks/customer-state-changed.md +2 -2
  139. package/docs/webhooks/customer-updated.md +1 -1
  140. package/docs/webhooks/invoice-created.md +1 -1
  141. package/docs/webhooks/invoice-overdue.md +1 -1
  142. package/docs/webhooks/invoice-upcoming.md +1 -1
  143. package/docs/webhooks/invoice-voided.md +1 -1
  144. package/docs/webhooks/meta.json +6 -0
  145. package/docs/webhooks/payment-dispute-resolved.md +1 -1
  146. package/docs/webhooks/payment-disputed.md +1 -1
  147. package/docs/webhooks/payment-failed.md +144 -3
  148. package/docs/webhooks/payment-link-canceled.md +1 -1
  149. package/docs/webhooks/payment-link-completed.md +44 -2
  150. package/docs/webhooks/payment-link-created.md +1 -1
  151. package/docs/webhooks/payment-link-failed.md +44 -2
  152. package/docs/webhooks/payment-method-attached.md +6 -2
  153. package/docs/webhooks/payment-method-updated.md +7 -8
  154. package/docs/webhooks/payment-received.md +160 -3
  155. package/docs/webhooks/payment-recovered.md +6 -2
  156. package/docs/webhooks/payment-refunded.md +3 -3
  157. package/docs/webhooks/payment-retry-failed.md +1 -1
  158. package/docs/webhooks/payout-available.md +1 -1
  159. package/docs/webhooks/payout-created.md +1 -1
  160. package/docs/webhooks/payout-failed.md +1 -1
  161. package/docs/webhooks/payout-paid.md +1 -1
  162. package/docs/webhooks/plan-grant-created.md +1 -1
  163. package/docs/webhooks/plan-grant-expired.md +1 -1
  164. package/docs/webhooks/plan-grant-revoked.md +1 -1
  165. package/docs/webhooks/plan-grant-updated.md +1 -1
  166. package/docs/webhooks/quota-exceeded.md +1 -1
  167. package/docs/webhooks/quota-threshold-reached.md +1 -1
  168. package/docs/webhooks/seats-limit-reached.md +1 -1
  169. package/docs/webhooks/seats-updated.md +1 -1
  170. package/docs/webhooks/subscription-activated.md +1 -1
  171. package/docs/webhooks/subscription-canceled.md +5 -4
  172. package/docs/webhooks/subscription-cancellation-revoked.md +1 -1
  173. package/docs/webhooks/subscription-cancellation-scheduled.md +1 -1
  174. package/docs/webhooks/subscription-created.md +1 -1
  175. package/docs/webhooks/subscription-past-due.md +1 -1
  176. package/docs/webhooks/subscription-pause-revoked.md +27 -0
  177. package/docs/webhooks/subscription-pause-scheduled.md +35 -0
  178. package/docs/webhooks/subscription-pause-updated.md +31 -0
  179. package/docs/webhooks/subscription-paused.md +35 -0
  180. package/docs/webhooks/subscription-plan-change-revoked.md +1 -1
  181. package/docs/webhooks/subscription-plan-change-scheduled.md +1 -1
  182. package/docs/webhooks/subscription-plan-changed.md +1 -1
  183. package/docs/webhooks/subscription-reactivated.md +1 -1
  184. package/docs/webhooks/subscription-resume-failed.md +33 -0
  185. package/docs/webhooks/subscription-resumed.md +35 -0
  186. package/docs/webhooks/subscription-updated.md +1 -1
  187. package/docs/webhooks/trial-checkout-ready.md +1 -1
  188. package/docs/webhooks/trial-converted.md +1 -1
  189. package/docs/webhooks/trial-expired.md +1 -1
  190. package/docs/webhooks/trial-started.md +1 -1
  191. package/docs/webhooks/trial-will-end.md +1 -1
  192. package/docs/webhooks/usage-recorded.md +1 -1
  193. package/docs/webhooks.md +96 -7
  194. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  # Addons
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## listActive
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Api Keys
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## delete
6
6
 
@@ -41,12 +41,13 @@ List API keys with cursor-based pagination. Keys are returned without the full s
41
41
 
42
42
  `POST /api-keys` · operation `create-api-key`
43
43
 
44
- Create a new API key. The full key is only returned once in the response.
44
+ Create a full-access or restricted API key. Provide permissions to restrict access; the full key is returned only once. A restricted key with api_key: write may only create restricted keys with the same or fewer permissions, and they expire no later than the key that creates them.
45
45
 
46
46
  ### Parameters
47
47
 
48
48
  - `name` (`string`, required)
49
49
  - `expiresInDays` (`number`, optional)
50
+ - `permissions` (`{ customer?: Array<"read"> | ["read", "write"] | ["write", "read"]; subscription?: Array<"read"> | ["read", "write"] | ["write", "read"]; invoice?: Array<"read"> | ["read", "write"] | ["write", "read"]; usage?: Array<"read"> | ["read", "write"] | ["write", "read"]; seat?: Array<"read"> | ["read", "write"] | ["write", "read"]; plan?: Array<"read"> | ["read", "write"] | ["write", "read"]; plan_group?: Array<"read"> | ["read", "write"] | ["write", "read"]; feature?: Array<"read"> | ["read", "write"] | ["write", "read"]; addon?: Array<"read"> | ["read", "write"] | ["write", "read"]; credit_pack?: Array<"read"> | ["read", "write"] | ["write", "read"]; offer?: Array<"read"> | ["read", "write"] | ["write", "read"]; promo_code?: Array<"read"> | ["read", "write"] | ["write", "read"]; market_group?: Array<"read"> | ["read", "write"] | ["write", "read"]; payment?: Array<"read"> | ["read", "write"] | ["write", "read"]; transaction?: Array<"read"> | ["read", "write"] | ["write", "read"]; payout?: Array<"read"> | ["read", "write"] | ["write", "read"]; test_clock?: Array<"read"> | ["read", "write"] | ["write", "read"]; organization?: Array<"read"> | ["read", "write"] | ["write", "read"]; api_key?: Array<"read"> | ["read", "write"] | ["write", "read"] }`, optional)
50
51
 
51
52
  ### Request options
52
53
 
@@ -1,6 +1,6 @@
1
1
  # Credit Packs
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## update
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Customers
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## revokeCredit
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Feature Access
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## get
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Features
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## get
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Webhooks
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## get
6
6
 
@@ -30,7 +30,7 @@ Update a webhook endpoint. Only the provided fields change.
30
30
 
31
31
  - `id` (`string`, required)
32
32
  - `url` (`string`, optional)
33
- - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, optional)
33
+ - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, optional)
34
34
  - `description` (`string | null`, optional)
35
35
  - `isActive` (`boolean`, optional)
36
36
  - `apiVersion` (`string`, optional)
@@ -107,7 +107,7 @@ Create a new webhook endpoint. The response includes the signing secret which is
107
107
  ### Parameters
108
108
 
109
109
  - `url` (`string`, required)
110
- - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, required)
110
+ - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, required)
111
111
  - `description` (`string`, optional)
112
112
  - `apiVersion` (`string`, optional)
113
113
 
@@ -1,6 +1,6 @@
1
1
  # API reference
2
2
 
3
- Generated from Commet API version `2026-07-31`.
3
+ Generated from Commet API version `2026-08-27`.
4
4
 
5
5
  Use this reference for the exact resources, methods, parameters, and return types available in the installed SDK.
6
6
 
@@ -23,7 +23,7 @@ Use this reference for the exact resources, methods, parameters, and return type
23
23
  - [Portal](./portal.md) — 1 operations
24
24
  - [Promo Codes](./promo-codes.md) — 4 operations
25
25
  - [Seats](./seats.md) — 6 operations
26
- - [Subscriptions](./subscriptions.md) — 18 operations
26
+ - [Subscriptions](./subscriptions.md) — 22 operations
27
27
  - [Test Clock](./test-clock.md) — 3 operations
28
28
  - [Transactions](./transactions.md) — 4 operations
29
29
  - [Usage](./usage.md) — 3 operations
@@ -1,6 +1,6 @@
1
1
  # Invoices
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## getDownloadUrl
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Markets
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## get
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Offers
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## get
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Payments
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## cancel
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Payouts
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## addBankAccount
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Plan Groups
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## removePlan
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Plans
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## updateFeature
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Portal
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## getUrl
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Promo Codes
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## get
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Provisioning
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## createClaimLink
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Quota
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## getAll
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Seats
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## getBalance
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Subscriptions
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## deactivateAddon
6
6
 
@@ -189,6 +189,65 @@ Remove the quoted direct Offer from a subscription's pending payment checkout. T
189
189
 
190
190
  `Subscription`
191
191
 
192
+ ## pause
193
+
194
+ `commet.subscriptions.pause(params, options?)`
195
+
196
+ `POST /subscriptions/{id}/pause` · operation `pause-subscription`
197
+
198
+ Pause immediately or schedule a pause for the end of the current billing or trial period. Set durationDays to null for an indefinite pause.
199
+
200
+ ### Parameters
201
+
202
+ - `id` (`string`, required)
203
+ - `mode` (`"immediate" | "period_end"`, required)
204
+ - `durationDays` (`number | null`, required)
205
+
206
+ ### Request options
207
+
208
+ - `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
209
+
210
+ ### Returns
211
+
212
+ `Subscription`
213
+
214
+ ## updatePause
215
+
216
+ `commet.subscriptions.updatePause(params, options?)`
217
+
218
+ `PATCH /subscriptions/{id}/pause` · operation `update-subscription-pause`
219
+
220
+ Change the duration of a scheduled or active pause. Set durationDays to null to make it indefinite.
221
+
222
+ ### Parameters
223
+
224
+ - `id` (`string`, required)
225
+ - `durationDays` (`number | null`, required)
226
+
227
+ ### Request options
228
+
229
+ - `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
230
+
231
+ ### Returns
232
+
233
+ `Subscription`
234
+
235
+ ## revokePause
236
+
237
+ `commet.subscriptions.revokePause(params, options?)`
238
+
239
+ `DELETE /subscriptions/{id}/pause` · operation `revoke-subscription-pause`
240
+
241
+ Revoke a pause before it becomes effective. Active pauses must be resumed instead.
242
+
243
+ ### Parameters
244
+
245
+ - `id` (`string`, required)
246
+
247
+ ### Returns
248
+
249
+ `Subscription`
250
+
192
251
  ## updatePaymentMethod
193
252
 
194
253
  `commet.subscriptions.updatePaymentMethod(params, options?)`
@@ -274,6 +333,26 @@ Generates a hosted, signed recovery link that lets the customer pay the outstand
274
333
 
275
334
  `RecoveryLink`
276
335
 
336
+ ## resume
337
+
338
+ `commet.subscriptions.resume(params, options?)`
339
+
340
+ `POST /subscriptions/{id}/resume` · operation `resume-subscription`
341
+
342
+ Resume a paused subscription. Immediate pauses continue the preserved period without a charge. Period-end pauses charge a new period before access is restored.
343
+
344
+ ### Parameters
345
+
346
+ - `id` (`string`, required)
347
+
348
+ ### Request options
349
+
350
+ - `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
351
+
352
+ ### Returns
353
+
354
+ `SubscriptionResume`
355
+
277
356
  ## get
278
357
 
279
358
  `commet.subscriptions.get(params)`
@@ -1,6 +1,6 @@
1
1
  # Test Clock
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## processBilling
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Transactions
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## refund
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Usage
2
2
 
3
- API version: `2026-07-31`
3
+ API version: `2026-08-27`
4
4
 
5
5
  ## check
6
6
 
@@ -10,7 +10,7 @@ Commet uses date-based API versioning inspired by Stripe. Every breaking change
10
10
 
11
11
  Versions use the date they were released: `YYYY-MM-DD` (e.g. `2026-05-01`).
12
12
 
13
- The current version is **2026-07-31**.
13
+ The current version is **2026-08-27**.
14
14
 
15
15
  ## How versions are resolved
16
16
 
@@ -1,38 +1,60 @@
1
1
  ---
2
- lastModified: 2026-08-17
3
- title: Choose a Billing Model
4
- description: Choose between a recurring plan, usage, credits, balance, seats, quota, and one-time payments.
2
+ lastModified: 2026-09-07
3
+ title: Quickstart
4
+ description: Go from a Commet account to your first subscription payment in sandbox.
5
5
  ---
6
6
 
7
- Start with the value your customer buys, not with an API method. Commet can combine a recurring base price with features, seats, or consumption, but each plan has one consumption model.
7
+ Commet lets you charge through **subscriptions** and **one-time payments**.
8
8
 
9
- ## Choose the primary model
9
+ - A **subscription** connects a customer to a plan. The plan defines what they can use and what they pay; Commet manages checkout, invoices, and renewals.
10
+ - A **one-time payment** charges a customer for a single purchase, without a plan or subscription. Follow [Accept One-Time Payments](/docs/accept-one-time-payments) if that is all you need.
10
11
 
11
- | You sell | Start with | Example |
12
- | ------------------------------------------ | ---------------- | --------------------------------------- |
13
- | Access to a product or tier | Recurring plan | $49 per month for Pro |
14
- | A measurable unit with possible overage | Metered | API calls, storage, messages |
15
- | Product-specific units | Credits | Generations, exports, analyses |
16
- | Monetary prepaid spend | Balance | Compute or infrastructure spend |
17
- | Licensed users or roles | Seats | Editors, agents, workspaces |
18
- | A hard operational allowance | Quota | Concurrent jobs or provisioned capacity |
19
- | A single purchase without recurring access | One-time payment | Report, license, setup fee |
12
+ This quickstart walks you through your first paid subscription in sandbox.
20
13
 
21
- **Seats and quota are feature behaviors, not separate plan consumption models.** A plan can use Metered, Credits, or Balance and still include seat or quota features.
14
+ ## Plans, features, and consumption
22
15
 
23
- ## Decide what belongs in the catalog
16
+ A **feature** is something your product provides, such as API calls, seats, or access to a capability. A **plan** groups features and sets their limits and prices.
24
17
 
25
- - Use a **plan** for the recurring package and its renewal interval.
26
- - Use an **add-on** for an optional recurring capability attached to a subscription.
27
- - Use a **credit pack** for customer-purchased credits that persist across resets.
28
- - Use an **Offer** or **Promo Code** to change the price or phases of a sale without cloning the plan.
29
- - Use a **plan grant** when you want to temporarily expand access without changing the subscription's billing.
30
- - Use a **customer credit** for a specific monetary adjustment, not as the plan's normal allowance.
18
+ Each plan uses one consumption model to define how its measured usage consumes the included allowance and is charged:
31
19
 
32
- ## Model the smallest complete version
20
+ | Model | How it works |
21
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------- |
22
+ | **Metered** | Count usage per feature. Include a quantity in the plan and optionally charge for usage above it. |
23
+ | **Credits** | Give the customer a pool of credits. Each use deducts the number of credits configured for that feature. |
24
+ | **Balance** | Give the customer a monetary balance. Each use deducts its monetary cost; the plan can block when exhausted or allow overage. |
33
25
 
34
- Start with one plan and one canonical flow. Create it in sandbox, connect one test customer, and verify checkout, access, renewal, and failure recovery before adding variants.
26
+ A fixed monthly price can include features without extra usage charges. You do not need to charge for overage to use a plan.
35
27
 
36
- Use the complete examples for [fixed subscriptions](https://github.com/commet-labs/commet/tree/main/examples/fixed), [metered billing](https://github.com/commet-labs/commet/tree/main/examples/metered), [credits](https://github.com/commet-labs/commet/tree/main/examples/credits), [balance](https://github.com/commet-labs/commet/tree/main/examples/balance-fixed), [seats](https://github.com/commet-labs/commet/tree/main/examples/seats), and [quota](https://github.com/commet-labs/commet/tree/main/examples/quota).
28
+ For this walkthrough, use a **Metered** plan with a monthly price and an included API-call allowance. See [Consumption Models](/docs/consumption-models) when you need to configure a different model.
37
29
 
38
- Next, configure the chosen model in [Consumption Models](/docs/consumption-models) and review its business rules in [How Billing Works](/docs/how-does-billing-work).
30
+ ## Your first subscription payment
31
+
32
+ 1. [Create a Commet account](/login) and select your **sandbox organization**. Keep every resource in this walkthrough in that organization. Complete its [payment provider setup](/docs/payment-providers) so it can accept sandbox payments.
33
+
34
+ 2. [Create a sandbox API key](/docs/create-api-key) and store it on your server. That guide covers the dashboard, CLI, MCP, and SDK initialization.
35
+
36
+ 3. In **Features**, create **API Calls** with code `api_calls` and type **Usage**. The code identifies the feature when your application records consumption. You will set its included quantity on the plan.
37
+
38
+ See [Configure Features](/docs/configure-features).
39
+
40
+ 4. In **Plans**, create a plan named **Pro**, with code `pro`, and choose **Metered**. Add a **USD 20 monthly price**, include **1,000 API calls**, and leave overage disabled for this first example. Use a paid price without a trial so the next steps lead directly to payment.
41
+
42
+ See [Manage Plans](/docs/create-plans).
43
+
44
+ 5. Create a test customer with a billing email and a stable identifier from your application, such as `demo_customer`. The customer represents the person or business you are going to bill.
45
+
46
+ See [Manage Customers](/docs/manage-customers) for the dashboard and SDK flow.
47
+
48
+ 6. Connect that customer to the **Pro** plan using its monthly price. Creating the subscription for this paid plan returns a `checkoutUrl`. Open it or redirect the customer there to enter their billing details and pay.
49
+
50
+ See [Manage Subscriptions](/docs/manage-subscriptions#create) for the request in your SDK.
51
+
52
+ 7. Use the sandbox checkout's **Test Data** panel to fill in test payment details and complete checkout. Confirm that the invoice is paid and the subscription is active in the dashboard.
53
+
54
+ Your first subscription payment is complete. Commet manages subsequent renewals for the monthly plan. See [Testing](/docs/testing-sandbox) for the available test tools.
55
+
56
+ ## Connect it to your product
57
+
58
+ With the first payment working, [check feature access](/docs/configure-features#current-feature-state) and [track usage](/docs/track-usage) when your customer uses the product. Use [signed webhooks](/docs/webhooks/introduction) to keep your application in sync with subscription and payment changes; a checkout redirect alone is not payment confirmation.
59
+
60
+ If a coding agent is implementing the flow, connect it through [MCP](/docs/mcp-server) or install the [Commet Skill](/docs/commet-skill). Use the same sandbox organization and the feature, plan, and customer identifiers from this walkthrough.
@@ -1,47 +1,123 @@
1
1
  ---
2
- lastModified: 2026-08-16
2
+ lastModified: 2026-09-25
3
3
  title: Create an API Key
4
- description: Create a sandbox key, keep it on your server, and rotate it without interrupting billing.
4
+ description: Create a sandbox API key from the dashboard, CLI, or MCP, store it on your server, and rotate it safely.
5
5
  ---
6
6
 
7
- Your API key selects one Commet organization and environment. A sandbox key can only access sandbox data; a live key can only access live data.
7
+ An API key gives your server access to one Commet organization. Start with a **sandbox organization** while building your integration.
8
8
 
9
- ## Create a sandbox key
9
+ New full-access keys start with `ck_sandbox_` or `ck_live_`; new restricted keys start with `rk_sandbox_` or `rk_live_`. Existing `ck_` keys remain valid. The organization that created the key determines which data it can reach. Both environments use `https://commet.co/api/v1`.
10
10
 
11
- 1. Open your sandbox organization in the dashboard.
12
- 2. Go to **Settings → API Keys**.
13
- 3. Create a key with a name that identifies the application or environment.
14
- 4. Copy the key when it is shown and store it in your server's secret manager.
11
+ ## Create a key
12
+
13
+ Choose the path that fits where you are working. You only need one to get started.
14
+
15
+ ### Dashboard
16
+
17
+ 1. Select your **sandbox organization** in the dashboard.
18
+ 2. Go to **Settings → API Keys** and click **Create API Key**.
19
+ 3. Choose **Full Access** for a backend or **AI Agents** to select resource permissions.
20
+ 4. Enter a descriptive name, such as `Local development`, and choose **Expires In (Days)**. The dashboard accepts **1–365 days** and defaults to **365**.
21
+ 5. Create the key and copy it before closing the dialog. The full secret is shown only once.
22
+
23
+ ### CLI
24
+
25
+ Install the [Commet CLI](/docs/cli), sign in through your browser, and link the project to your sandbox organization:
26
+
27
+ ```bash
28
+ npm install -g commet
29
+ commet login
30
+ commet link
31
+ ```
32
+
33
+ Choose the organization marked **sandbox**. Linking a new organization generates a key for CLI resource commands and saves it in `.commet/config.json`. The CLI adds `.commet/` to `.gitignore`. Keep that directory private.
34
+
35
+ This configures the CLI; it does **not** set `COMMET_API_KEY` for your application. To create a separate application key after linking:
36
+
37
+ ```bash
38
+ commet api-keys create --name "Local development" --expires-in-days 365
39
+ ```
40
+
41
+ Save the returned `apiKey` as described below. Resource commands use `COMMET_API_KEY` from the environment before the linked project's key, so check which credential is active before creating or deleting keys.
42
+
43
+ ### MCP
44
+
45
+ Connect your agent to the [Commet MCP server](/docs/mcp-server) at `https://commet.co/mcp/v2`. With OAuth, you can sign in through your browser and select a **sandbox organization** without an existing API key. The connection stays fixed to that organization.
46
+
47
+ Ask the agent to create an application key using `api_create_api_key` with these arguments:
48
+
49
+ ```json
50
+ {
51
+ "body": {
52
+ "name": "Local development",
53
+ "expiresInDays": 365
54
+ }
55
+ }
56
+ ```
57
+
58
+ The response contains the full secret only once. Have the agent store it directly in the intended local secret file or secret manager when your tools support that. Do not paste an existing secret into the conversation or ask the agent to repeat it in a message.
59
+
60
+ Already authenticating with a full-access API key? You can create replacements with `POST /api/v1/api-keys`. That request creates another key for the same organization. See [Create API key](/docs/api-reference/api-keys/create-api-key) for the request and response.
61
+
62
+ ## Limit key permissions
63
+
64
+ Leave `permissions` out to create a full-access key. Provide resource grants to create a restricted key. For example, a key with `customer: ["read"]` can read customers but cannot change them. Write access requires both `"read"` and `"write"`. An empty object (`{}`) grants no resource access.
65
+
66
+ A restricted key with `api_key: ["read", "write"]` can create restricted keys with the same or fewer permissions. These keys expire no later than the key that creates them. Restricted keys cannot edit or delete API keys.
67
+
68
+ ```typescript
69
+ const key = await commet.apiKeys.create({
70
+ name: "Customer reader",
71
+ permissions: { customer: ["read"] },
72
+ })
73
+ ```
74
+
75
+ The full secret is returned once. Save it in your secret store before leaving the response.
76
+
77
+ ## Store the key on your server
78
+
79
+ For local development, save the key in a git-ignored environment file:
15
80
 
16
81
  ```bash title=".env.local"
17
- COMMET_API_KEY=ck_sandbox_xxxxxxxxx
82
+ COMMET_API_KEY=ck_replace_with_your_key
18
83
  ```
19
84
 
20
- Commet does not show the full secret again. If it is lost, create a replacement and delete the old key after the new deployment is healthy.
85
+ Load this variable into your server process using your framework's environment support. For production, use your deployment's secret store. Never expose the key in browser code, public environment variables, logs, screenshots, or source control.
86
+
87
+ Commet stores a hash of the key and cannot show the full secret again. If you lose it, create a replacement.
88
+
89
+ ## Use the key in your SDK
21
90
 
22
- ## Initialize the SDK on the server
91
+ For Node.js, install the SDK:
92
+
93
+ ```bash
94
+ npm install @commet/node
95
+ ```
96
+
97
+ Initialize it in server code after loading the environment:
23
98
 
24
99
  ```typescript
25
100
  import { Commet } from "@commet/node"
26
101
 
27
- export const commet = new Commet({
28
- apiKey: process.env.COMMET_API_KEY,
29
- })
30
- ```
102
+ const apiKey = process.env.COMMET_API_KEY
103
+ if (!apiKey) {
104
+ throw new Error("COMMET_API_KEY is required")
105
+ }
31
106
 
32
- Never expose the key in browser code, public environment variables, logs, screenshots, or agent prompts. Requests sent directly to the REST API authenticate with the `x-api-key` header.
107
+ export const commet = new Commet({ apiKey })
108
+ ```
33
109
 
34
- ## Use separate keys per environment
110
+ For other languages, follow the [Python](/docs/integrate-with-python), [Go](/docs/integrate-with-go), [Java](/docs/integrate-with-java), or [PHP](/docs/integrate-with-php) integration guide. Direct REST requests authenticate with the `x-api-key` header.
35
111
 
36
- Keep sandbox and live credentials in different deployment environments. A safe promotion flow is:
112
+ ## Rotate and promote to live
37
113
 
38
- 1. Build and test with the sandbox key.
39
- 2. Verify checkout, webhooks, and a renewal with the [Test Clock](/docs/testing-sandbox).
40
- 3. Add a live key to the production secret store.
41
- 4. Deploy without copying sandbox IDs into live configuration.
114
+ Use a separate key for each application or deployment that needs independent rotation. To replace a key before it expires:
42
115
 
43
- ## Rotate a key
116
+ 1. Create a replacement in the **same organization**.
117
+ 2. Update the secret in every process using the old key and deploy or restart those processes.
118
+ 3. Verify a successful read with the replacement and confirm the application is using it.
119
+ 4. Delete the old key from **Settings → API Keys** or through [Delete API key](/docs/api-reference/api-keys/delete-api-key).
44
120
 
45
- Create the replacement first, deploy it, verify successful requests, and only then delete the previous key. Keys can also be managed through the generated [API Keys reference](/docs/api-reference/api-keys/list-api-keys).
121
+ For production, create a key in your **live organization** and store it separately from sandbox credentials. Do not copy sandbox customer, plan, or subscription IDs into live configuration. Before switching, verify checkout, webhooks, and a renewal in sandbox with the [Test Clock](/docs/testing-sandbox).
46
122
 
47
- Use one key per workload when you need independent rotation or audit boundaries. Do not reuse a developer's local key in production.
123
+ Next, follow the [quickstart](/docs/choose-a-billing-model) to complete your first subscription payment in sandbox.