@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.
Files changed (295) hide show
  1. package/dist/index.d.mts +366 -17
  2. package/dist/index.d.ts +366 -17
  3. package/dist/index.js +31 -7
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +31 -7
  6. package/dist/index.mjs.map +1 -1
  7. package/docs/ai-onboarding/ai-onboarding.md +2 -3
  8. package/docs/ai-onboarding/billing-best-practices-skill.md +2 -3
  9. package/docs/ai-onboarding/commet-skill.md +4 -5
  10. package/docs/ai-onboarding/mcp-server.md +8 -9
  11. package/docs/ai-onboarding/pricing-models-skill.md +2 -3
  12. package/docs/ai-onboarding/subscription-patterns-skill.md +2 -3
  13. package/docs/api-reference/addons.md +1 -1
  14. package/docs/api-reference/api-keys.md +3 -2
  15. package/docs/api-reference/credit-packs.md +1 -1
  16. package/docs/api-reference/customers.md +1 -1
  17. package/docs/api-reference/feature-access.md +1 -1
  18. package/docs/api-reference/features.md +1 -1
  19. package/docs/api-reference/generated-webhooks.md +3 -3
  20. package/docs/api-reference/index.md +2 -2
  21. package/docs/api-reference/invoices.md +1 -1
  22. package/docs/api-reference/markets.md +1 -1
  23. package/docs/api-reference/offers.md +1 -1
  24. package/docs/api-reference/payments.md +1 -1
  25. package/docs/api-reference/payouts.md +1 -1
  26. package/docs/api-reference/plan-groups.md +1 -1
  27. package/docs/api-reference/plans.md +1 -1
  28. package/docs/api-reference/portal.md +1 -1
  29. package/docs/api-reference/promo-codes.md +2 -2
  30. package/docs/api-reference/provisioning.md +1 -1
  31. package/docs/api-reference/quota.md +1 -1
  32. package/docs/api-reference/seats.md +1 -1
  33. package/docs/api-reference/subscriptions.md +81 -2
  34. package/docs/api-reference/test-clock.md +1 -1
  35. package/docs/api-reference/transactions.md +1 -1
  36. package/docs/api-reference/usage.md +1 -1
  37. package/docs/documentation/api-versioning.md +1 -2
  38. package/docs/documentation/better-auth.md +0 -1
  39. package/docs/documentation/choose-a-billing-model.md +54 -26
  40. package/docs/documentation/cli.md +1 -2
  41. package/docs/documentation/create-api-key.md +100 -25
  42. package/docs/documentation/customers/customer-credits.md +0 -1
  43. package/docs/documentation/customers/customer-portal.md +14 -2
  44. package/docs/documentation/customers/manage-customers.md +1 -2
  45. package/docs/documentation/error-handling.md +1 -2
  46. package/docs/documentation/examples.md +0 -1
  47. package/docs/documentation/finance/acceptable-use.md +0 -1
  48. package/docs/documentation/finance/finance-overview.md +0 -1
  49. package/docs/documentation/finance/local-currency-taxes.md +0 -1
  50. package/docs/documentation/finance/merchant-of-record.md +0 -1
  51. package/docs/documentation/finance/payouts-verification.md +6 -3
  52. package/docs/documentation/finance/payouts.md +0 -1
  53. package/docs/documentation/finance/supported-countries.md +0 -1
  54. package/docs/documentation/go/integrate-with-encore.md +7 -8
  55. package/docs/documentation/go/integrate-with-go.md +8 -9
  56. package/docs/documentation/introduction.md +62 -41
  57. package/docs/documentation/invoicing/handle-failed-payments.md +9 -4
  58. package/docs/documentation/invoicing/invoices-and-billing-cycles.md +0 -1
  59. package/docs/documentation/invoicing/manage-invoices.md +0 -1
  60. package/docs/documentation/java/integrate-with-java.md +6 -7
  61. package/docs/documentation/nodejs/integrate-with-astro.md +6 -7
  62. package/docs/documentation/nodejs/integrate-with-bun.md +6 -7
  63. package/docs/documentation/nodejs/integrate-with-express.md +7 -8
  64. package/docs/documentation/nodejs/integrate-with-hono.md +7 -8
  65. package/docs/documentation/nodejs/integrate-with-nextjs.md +6 -7
  66. package/docs/documentation/nodejs/integrate-with-nuxt.md +6 -7
  67. package/docs/documentation/nodejs/integrate-with-remix.md +6 -7
  68. package/docs/documentation/nodejs/integrate-with-sveltekit.md +6 -7
  69. package/docs/documentation/payments/accept-one-time-payments.md +0 -1
  70. package/docs/documentation/payments/payment-orchestration.md +0 -1
  71. package/docs/documentation/payments/payment-providers.md +0 -1
  72. package/docs/documentation/payments/transactions-refunds-and-retries.md +8 -1
  73. package/docs/documentation/php/integrate-with-laravel.md +8 -9
  74. package/docs/documentation/php/integrate-with-php.md +6 -7
  75. package/docs/documentation/php/integrate-with-symfony.md +7 -8
  76. package/docs/documentation/plans/add-ons.md +0 -1
  77. package/docs/documentation/plans/balance-and-top-ups.md +0 -1
  78. package/docs/documentation/plans/configure-features.md +0 -1
  79. package/docs/documentation/plans/consumption-models.md +0 -1
  80. package/docs/documentation/plans/create-plans.md +0 -1
  81. package/docs/documentation/plans/credit-packs.md +0 -1
  82. package/docs/documentation/plans/one-time-payments.md +0 -1
  83. package/docs/documentation/plans/plan-groups.md +0 -1
  84. package/docs/documentation/platform/custom-domains.md +0 -1
  85. package/docs/documentation/platform/dashboard-metrics-and-events.md +0 -1
  86. package/docs/documentation/platform/members-and-permissions.md +0 -1
  87. package/docs/documentation/platform/organization-settings.md +0 -1
  88. package/docs/documentation/python/integrate-with-django.md +8 -9
  89. package/docs/documentation/python/integrate-with-fastapi.md +8 -9
  90. package/docs/documentation/python/integrate-with-flask.md +8 -9
  91. package/docs/documentation/python/integrate-with-python.md +6 -7
  92. package/docs/documentation/sales/card-promotions.md +0 -1
  93. package/docs/documentation/sales/introductory-offers.md +0 -1
  94. package/docs/documentation/sales/offers.md +0 -1
  95. package/docs/documentation/sales/promo-codes.md +19 -5
  96. package/docs/documentation/sales/promotional-offers.md +1 -2
  97. package/docs/documentation/sales/regional-prices.md +0 -1
  98. package/docs/documentation/sales/trial-periods.md +8 -8
  99. package/docs/documentation/sdk-reference.md +9 -10
  100. package/docs/documentation/subscriptions/manage-subscriptions.md +114 -12
  101. package/docs/documentation/subscriptions/plan-grants.md +0 -1
  102. package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +0 -1
  103. package/docs/documentation/testing-sandbox.md +0 -1
  104. package/docs/documentation/usage/ai-token-billing.md +0 -1
  105. package/docs/documentation/usage/quota-management.md +0 -1
  106. package/docs/documentation/usage/seat-management.md +0 -1
  107. package/docs/documentation/usage/track-usage.md +0 -1
  108. package/docs/errors/addon_already_active.md +1 -1
  109. package/docs/errors/addon_has_activations.md +1 -1
  110. package/docs/errors/addon_not_active.md +1 -1
  111. package/docs/errors/addon_not_found.md +1 -1
  112. package/docs/errors/already_has_active_subscription.md +1 -1
  113. package/docs/errors/already_scheduled.md +1 -1
  114. package/docs/errors/api_key_not_found.md +1 -1
  115. package/docs/errors/card_promotions_not_available.md +1 -1
  116. package/docs/errors/charge_failed.md +1 -1
  117. package/docs/errors/charge_in_progress.md +1 -1
  118. package/docs/errors/claim_not_pending.md +1 -1
  119. package/docs/errors/credit_pack_not_found.md +1 -1
  120. package/docs/errors/customer_not_found.md +1 -1
  121. package/docs/errors/duplicate.md +1 -1
  122. package/docs/errors/endpoint_deprecated.md +1 -1
  123. package/docs/errors/endpoint_not_available.md +1 -1
  124. package/docs/errors/feature_already_exists.md +1 -1
  125. package/docs/errors/feature_disabled.md +1 -1
  126. package/docs/errors/feature_in_use.md +1 -1
  127. package/docs/errors/feature_not_found.md +1 -1
  128. package/docs/errors/feature_not_in_plan.md +1 -1
  129. package/docs/errors/forbidden.md +1 -1
  130. package/docs/errors/free_plan_change_not_supported.md +1 -1
  131. package/docs/errors/idempotency_in_progress.md +1 -1
  132. package/docs/errors/idempotency_key_mismatch.md +1 -1
  133. package/docs/errors/idempotency_unavailable.md +1 -1
  134. package/docs/errors/included_limit_reached.md +1 -1
  135. package/docs/errors/index.md +1 -1
  136. package/docs/errors/insufficient_balance.md +1 -1
  137. package/docs/errors/insufficient_credits.md +1 -1
  138. package/docs/errors/insufficient_seats.md +1 -1
  139. package/docs/errors/internal_error.md +1 -1
  140. package/docs/errors/invalid_json.md +1 -1
  141. package/docs/errors/invalid_subscription_status.md +1 -1
  142. package/docs/errors/invoice_not_found.md +1 -1
  143. package/docs/errors/market_group_in_use.md +1 -1
  144. package/docs/errors/market_group_not_found.md +1 -1
  145. package/docs/errors/market_in_use.md +1 -1
  146. package/docs/errors/market_not_found.md +1 -1
  147. package/docs/errors/missing_regional_price.md +1 -1
  148. package/docs/errors/model_not_found.md +1 -1
  149. package/docs/errors/no_active_subscription.md +1 -1
  150. package/docs/errors/no_change_requested.md +1 -1
  151. package/docs/errors/no_outstanding_invoice.md +1 -1
  152. package/docs/errors/no_payment_method.md +1 -1
  153. package/docs/errors/no_prices_configured.md +1 -1
  154. package/docs/errors/not_found.md +1 -1
  155. package/docs/errors/not_scheduled_for_cancellation.md +1 -1
  156. package/docs/errors/offer_not_applicable.md +1 -1
  157. package/docs/errors/offer_not_found.md +1 -1
  158. package/docs/errors/one_time_subscription_not_cancelable.md +1 -1
  159. package/docs/errors/organization_already_claimed.md +1 -1
  160. package/docs/errors/payment_failed.md +1 -1
  161. package/docs/errors/payment_method_not_found.md +1 -1
  162. package/docs/errors/payment_not_cancelable.md +1 -1
  163. package/docs/errors/payment_not_found.md +1 -1
  164. package/docs/errors/payouts_not_available_in_sandbox.md +1 -1
  165. package/docs/errors/plan_change_scheduled.md +1 -1
  166. package/docs/errors/plan_group_not_found.md +1 -1
  167. package/docs/errors/plan_not_found.md +1 -1
  168. package/docs/errors/plan_unavailable.md +1 -1
  169. package/docs/errors/plans_not_in_same_group.md +1 -1
  170. package/docs/errors/price_in_use.md +1 -1
  171. package/docs/errors/price_not_found.md +1 -1
  172. package/docs/errors/pricing_mode_mismatch.md +1 -1
  173. package/docs/errors/promo_code_expired.md +1 -1
  174. package/docs/errors/promo_code_not_found.md +1 -1
  175. package/docs/errors/provider_unsupported.md +1 -1
  176. package/docs/errors/rate_limited.md +1 -1
  177. package/docs/errors/sandbox_only.md +1 -1
  178. package/docs/errors/seat_limit_exceeded.md +1 -1
  179. package/docs/errors/subscription_activation_failed.md +1 -1
  180. package/docs/errors/subscription_already_canceled.md +1 -1
  181. package/docs/errors/subscription_cancel_failed.md +1 -1
  182. package/docs/errors/subscription_creation_failed.md +1 -1
  183. package/docs/errors/subscription_has_open_dispute.md +1 -1
  184. package/docs/errors/subscription_not_active.md +1 -1
  185. package/docs/errors/subscription_not_found.md +1 -1
  186. package/docs/errors/subscription_required.md +1 -1
  187. package/docs/errors/subscription_uncancel_failed.md +1 -1
  188. package/docs/errors/transaction_not_found.md +1 -1
  189. package/docs/errors/unauthorized.md +1 -1
  190. package/docs/errors/validation_error.md +1 -1
  191. package/docs/errors/webhook_not_found.md +1 -1
  192. package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +0 -1
  193. package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +0 -1
  194. package/docs/knowledge-base/how-do-discounts-work.md +0 -1
  195. package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +0 -1
  196. package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +0 -1
  197. package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +0 -1
  198. package/docs/knowledge-base/how-do-trial-periods-work.md +0 -1
  199. package/docs/knowledge-base/how-does-billing-work.md +0 -1
  200. package/docs/knowledge-base/how-does-payment-routing-work.md +0 -1
  201. package/docs/knowledge-base/how-does-quota-based-billing-work.md +0 -1
  202. package/docs/knowledge-base/how-does-seat-based-billing-work.md +0 -1
  203. package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +0 -1
  204. package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +0 -1
  205. package/docs/knowledge-base/what-happens-when-a-payment-fails.md +0 -1
  206. package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +0 -1
  207. package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +1 -2
  208. package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +0 -1
  209. package/docs/manifest.json +186 -235
  210. package/docs/platform-documentation.md +69 -149
  211. package/docs/schemas.md +35 -1
  212. package/docs/webhooks/introduction.md +0 -1
  213. package/docs/webhooks.md +98 -7
  214. package/docs/webhooks.openapi.json +11058 -0
  215. package/package.json +1 -1
  216. package/docs/ai-onboarding/meta.json +0 -17
  217. package/docs/api-reference/meta.json +0 -7
  218. package/docs/documentation/customers/meta.json +0 -5
  219. package/docs/documentation/finance/meta.json +0 -13
  220. package/docs/documentation/go/meta.json +0 -5
  221. package/docs/documentation/invoicing/meta.json +0 -9
  222. package/docs/documentation/java/meta.json +0 -5
  223. package/docs/documentation/meta.json +0 -36
  224. package/docs/documentation/nodejs/meta.json +0 -14
  225. package/docs/documentation/payments/meta.json +0 -10
  226. package/docs/documentation/php/meta.json +0 -9
  227. package/docs/documentation/plans/meta.json +0 -14
  228. package/docs/documentation/platform/meta.json +0 -10
  229. package/docs/documentation/python/meta.json +0 -10
  230. package/docs/documentation/sales/meta.json +0 -13
  231. package/docs/documentation/subscriptions/meta.json +0 -9
  232. package/docs/documentation/usage/meta.json +0 -10
  233. package/docs/knowledge-base/meta.json +0 -29
  234. package/docs/meta.json +0 -11
  235. package/docs/webhooks/addon-activated.md +0 -44
  236. package/docs/webhooks/addon-deactivated.md +0 -40
  237. package/docs/webhooks/balance-depleted.md +0 -37
  238. package/docs/webhooks/balance-low.md +0 -39
  239. package/docs/webhooks/balance-topped-up.md +0 -41
  240. package/docs/webhooks/checkout-ready.md +0 -43
  241. package/docs/webhooks/credits-depleted.md +0 -35
  242. package/docs/webhooks/credits-expired.md +0 -35
  243. package/docs/webhooks/credits-granted.md +0 -37
  244. package/docs/webhooks/credits-low.md +0 -39
  245. package/docs/webhooks/credits-purchased.md +0 -41
  246. package/docs/webhooks/customer-created.md +0 -49
  247. package/docs/webhooks/customer-state-changed.md +0 -134
  248. package/docs/webhooks/customer-updated.md +0 -49
  249. package/docs/webhooks/invoice-created.md +0 -45
  250. package/docs/webhooks/invoice-overdue.md +0 -53
  251. package/docs/webhooks/invoice-upcoming.md +0 -43
  252. package/docs/webhooks/invoice-voided.md +0 -53
  253. package/docs/webhooks/meta.json +0 -83
  254. package/docs/webhooks/payment-dispute-resolved.md +0 -52
  255. package/docs/webhooks/payment-disputed.md +0 -49
  256. package/docs/webhooks/payment-failed.md +0 -37
  257. package/docs/webhooks/payment-link-canceled.md +0 -41
  258. package/docs/webhooks/payment-link-completed.md +0 -47
  259. package/docs/webhooks/payment-link-created.md +0 -41
  260. package/docs/webhooks/payment-link-failed.md +0 -45
  261. package/docs/webhooks/payment-method-attached.md +0 -40
  262. package/docs/webhooks/payment-method-updated.md +0 -38
  263. package/docs/webhooks/payment-received.md +0 -45
  264. package/docs/webhooks/payment-recovered.md +0 -39
  265. package/docs/webhooks/payment-refunded.md +0 -47
  266. package/docs/webhooks/payment-retry-failed.md +0 -39
  267. package/docs/webhooks/payout-available.md +0 -33
  268. package/docs/webhooks/payout-created.md +0 -48
  269. package/docs/webhooks/payout-failed.md +0 -52
  270. package/docs/webhooks/payout-paid.md +0 -48
  271. package/docs/webhooks/plan-grant-created.md +0 -74
  272. package/docs/webhooks/plan-grant-expired.md +0 -86
  273. package/docs/webhooks/plan-grant-revoked.md +0 -86
  274. package/docs/webhooks/plan-grant-updated.md +0 -86
  275. package/docs/webhooks/quota-exceeded.md +0 -44
  276. package/docs/webhooks/quota-threshold-reached.md +0 -41
  277. package/docs/webhooks/seats-limit-reached.md +0 -39
  278. package/docs/webhooks/seats-updated.md +0 -39
  279. package/docs/webhooks/subscription-activated.md +0 -43
  280. package/docs/webhooks/subscription-canceled.md +0 -57
  281. package/docs/webhooks/subscription-cancellation-revoked.md +0 -37
  282. package/docs/webhooks/subscription-cancellation-scheduled.md +0 -45
  283. package/docs/webhooks/subscription-created.md +0 -35
  284. package/docs/webhooks/subscription-past-due.md +0 -43
  285. package/docs/webhooks/subscription-plan-change-revoked.md +0 -50
  286. package/docs/webhooks/subscription-plan-change-scheduled.md +0 -55
  287. package/docs/webhooks/subscription-plan-changed.md +0 -43
  288. package/docs/webhooks/subscription-reactivated.md +0 -53
  289. package/docs/webhooks/subscription-updated.md +0 -39
  290. package/docs/webhooks/trial-checkout-ready.md +0 -39
  291. package/docs/webhooks/trial-converted.md +0 -39
  292. package/docs/webhooks/trial-expired.md +0 -39
  293. package/docs/webhooks/trial-started.md +0 -46
  294. package/docs/webhooks/trial-will-end.md +0 -41
  295. package/docs/webhooks/usage-recorded.md +0 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commet/node",
3
- "version": "9.3.0",
3
+ "version": "9.5.0",
4
4
  "description": "Commet SDK for Node.js - Billing and usage tracking",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,17 +0,0 @@
1
- {
2
- "title": "Build with AI",
3
- "description": "Tools and resources for AI agents using Commet",
4
- "icon": "Robot",
5
- "root": true,
6
- "pages": [
7
- "---Getting Started---",
8
- "ai-onboarding",
9
- "---AI Tools---",
10
- "mcp-server",
11
- "---Agent Skills---",
12
- "commet-skill",
13
- "billing-best-practices-skill",
14
- "pricing-models-skill",
15
- "subscription-patterns-skill"
16
- ]
17
- }
@@ -1,7 +0,0 @@
1
- {
2
- "title": "API Reference",
3
- "description": "Complete REST API reference for the Commet platform",
4
- "icon": "Code",
5
- "root": true,
6
- "pages": ["..."]
7
- }
@@ -1,5 +0,0 @@
1
- {
2
- "title": "Customers",
3
- "description": "Create, manage, and provide self-service portals to your customers",
4
- "pages": ["manage-customers", "customer-credits", "customer-portal"]
5
- }
@@ -1,13 +0,0 @@
1
- {
2
- "title": "Finance",
3
- "description": "Payouts, account verification, and Merchant of Record",
4
- "pages": [
5
- "finance-overview",
6
- "payouts",
7
- "payouts-verification",
8
- "supported-countries",
9
- "merchant-of-record",
10
- "local-currency-taxes",
11
- "acceptable-use"
12
- ]
13
- }
@@ -1,5 +0,0 @@
1
- {
2
- "title": "Go",
3
- "description": "Integrate Commet with Go applications",
4
- "pages": ["integrate-with-go", "integrate-with-encore"]
5
- }
@@ -1,9 +0,0 @@
1
- {
2
- "title": "Invoicing",
3
- "description": "Invoice generation, billing cycles, and payment failure handling",
4
- "pages": [
5
- "invoices-and-billing-cycles",
6
- "manage-invoices",
7
- "handle-failed-payments"
8
- ]
9
- }
@@ -1,5 +0,0 @@
1
- {
2
- "title": "Java",
3
- "description": "Integrate Commet with Java applications",
4
- "pages": ["integrate-with-java"]
5
- }
@@ -1,36 +0,0 @@
1
- {
2
- "title": "Documentation",
3
- "description": "Guides, SDKs, and references to integrate Commet into your application",
4
- "icon": "Book",
5
- "root": true,
6
- "pages": [
7
- "introduction",
8
- "---Quickstart---",
9
- "create-api-key",
10
- "choose-a-billing-model",
11
- "nodejs",
12
- "python",
13
- "java",
14
- "go",
15
- "php",
16
- "---Learn---",
17
- "customers",
18
- "plans",
19
- "sales",
20
- "subscriptions",
21
- "usage",
22
- "invoicing",
23
- "payments",
24
- "finance",
25
- "platform",
26
- "---Resources---",
27
- "sdk-reference",
28
- "api-versioning",
29
- "error-handling",
30
- "testing-sandbox",
31
- "cli",
32
- "examples",
33
- "---Plugins---",
34
- "better-auth"
35
- ]
36
- }
@@ -1,14 +0,0 @@
1
- {
2
- "title": "Node.js",
3
- "description": "Integrate Commet with Node.js frameworks",
4
- "pages": [
5
- "integrate-with-nextjs",
6
- "integrate-with-remix",
7
- "integrate-with-nuxt",
8
- "integrate-with-sveltekit",
9
- "integrate-with-astro",
10
- "integrate-with-express",
11
- "integrate-with-hono",
12
- "integrate-with-bun"
13
- ]
14
- }
@@ -1,10 +0,0 @@
1
- {
2
- "title": "Payments",
3
- "description": "Accept one-time payments with no subscription or plan",
4
- "pages": [
5
- "accept-one-time-payments",
6
- "transactions-refunds-and-retries",
7
- "payment-providers",
8
- "payment-orchestration"
9
- ]
10
- }
@@ -1,9 +0,0 @@
1
- {
2
- "title": "PHP",
3
- "description": "Integrate Commet with PHP frameworks",
4
- "pages": [
5
- "integrate-with-php",
6
- "integrate-with-laravel",
7
- "integrate-with-symfony"
8
- ]
9
- }
@@ -1,14 +0,0 @@
1
- {
2
- "title": "Plans",
3
- "description": "Configure pricing plans, features, consumption models, and add-ons",
4
- "pages": [
5
- "create-plans",
6
- "configure-features",
7
- "consumption-models",
8
- "balance-and-top-ups",
9
- "add-ons",
10
- "credit-packs",
11
- "plan-groups",
12
- "one-time-payments"
13
- ]
14
- }
@@ -1,10 +0,0 @@
1
- {
2
- "title": "Platform",
3
- "description": "Organization settings, team access, branded domains, metrics, and operational events",
4
- "pages": [
5
- "organization-settings",
6
- "members-and-permissions",
7
- "custom-domains",
8
- "dashboard-metrics-and-events"
9
- ]
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "title": "Python",
3
- "description": "Integrate Commet with Python frameworks",
4
- "pages": [
5
- "integrate-with-python",
6
- "integrate-with-flask",
7
- "integrate-with-fastapi",
8
- "integrate-with-django"
9
- ]
10
- }
@@ -1,13 +0,0 @@
1
- {
2
- "title": "Sales",
3
- "description": "Create Offers, Promo Codes, Markets, and customer acquisition strategies",
4
- "pages": [
5
- "offers",
6
- "introductory-offers",
7
- "promotional-offers",
8
- "card-promotions",
9
- "promo-codes",
10
- "regional-prices",
11
- "trial-periods"
12
- ]
13
- }
@@ -1,9 +0,0 @@
1
- {
2
- "title": "Subscriptions",
3
- "description": "Manage subscription lifecycle, upgrades, and downgrades",
4
- "pages": [
5
- "manage-subscriptions",
6
- "plan-grants",
7
- "upgrade-and-downgrade-plans"
8
- ]
9
- }
@@ -1,10 +0,0 @@
1
- {
2
- "title": "Usage",
3
- "description": "Track metered usage, AI tokens, and seat-based licenses",
4
- "pages": [
5
- "track-usage",
6
- "ai-token-billing",
7
- "seat-management",
8
- "quota-management"
9
- ]
10
- }
@@ -1,29 +0,0 @@
1
- {
2
- "title": "Knowledge Base",
3
- "description": "How billing decisions work in Commet",
4
- "icon": "Lightbulb",
5
- "root": true,
6
- "pages": [
7
- "---Billing fundamentals---",
8
- "how-does-billing-work",
9
- "what-happens-when-you-change-your-prices",
10
- "how-do-monthly-quarterly-and-yearly-billing-work",
11
- "what-invoices-do-customers-receive-and-when",
12
- "---Subscriptions---",
13
- "what-happens-when-a-customer-changes-plans",
14
- "how-is-proration-calculated-when-changing-plans",
15
- "how-do-trial-periods-work",
16
- "how-do-free-plans-work-without-payment",
17
- "what-happens-when-a-payment-fails",
18
- "---Consumption and pricing---",
19
- "how-does-seat-based-billing-work",
20
- "how-does-quota-based-billing-work",
21
- "how-do-discounts-work",
22
- "how-do-credits-credit-packs-and-customer-credits-differ",
23
- "how-do-balance-and-top-ups-work",
24
- "how-do-offers-promo-codes-and-card-promotions-work-together",
25
- "---Payments---",
26
- "how-does-payment-routing-work",
27
- "what-happens-when-you-refund-or-retry-a-transaction"
28
- ]
29
- }
package/docs/meta.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "title": "Commet Documentation",
3
- "description": "B2B SaaS billing platform for Latin America",
4
- "pages": [
5
- "documentation",
6
- "knowledge-base",
7
- "ai-onboarding",
8
- "api-reference",
9
- "webhooks"
10
- ]
11
- }
@@ -1,44 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "addon.activated"
4
- description: "An add-on was activated on a subscription."
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
- - `addon` (WebhookAddonRef) — The add-on: id and name.
13
- - `featureCode` (string) — The feature the add-on unlocks or extends.
14
- - `proratedPrice` (number) — The prorated amount charged at activation in rate scale (10000 = $1.00). Zero when nothing was charged.
15
- - `currency` (string) — The subscription currency.
16
-
17
- ```json
18
- {
19
- "event": "addon.activated",
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
- "addon": {
28
- "id": "adn_5e6f7g8h",
29
- "name": "Extra Storage"
30
- },
31
- "featureCode": "storage",
32
- "proratedPrice": 25000,
33
- "currency": "usd"
34
- }
35
- }
36
- ```
37
-
38
- ## When this fires
39
-
40
- When an add-on activation completes — via `POST /subscriptions/{id}/addons` or a customer portal purchase. Any prorated activation charge has already succeeded; `proratedPrice` is the amount charged (zero when the remaining period was free).
41
-
42
- `customer.state_changed` fires alongside it with trigger `addon_activated`, reflecting the feature the add-on unlocked.
43
-
44
- Use it to enable the add-on's feature in your app the moment it is paid.
@@ -1,40 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "addon.deactivated"
4
- description: "An add-on was deactivated from a subscription."
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
- - `addon` (WebhookAddonRef) — The add-on: id and name.
13
- - `featureCode` (string) — The feature the add-on unlocked or extended.
14
-
15
- ```json
16
- {
17
- "event": "addon.deactivated",
18
- "timestamp": "2026-06-23T14:30:00.000Z",
19
- "organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
20
- "mode": "live",
21
- "apiVersion": "2026-07-31",
22
- "data": {
23
- "subscriptionId": "sub_1a2b3c4d",
24
- "customerId": "user_123",
25
- "addon": {
26
- "id": "adn_5e6f7g8h",
27
- "name": "Extra Storage"
28
- },
29
- "featureCode": "storage"
30
- }
31
- }
32
- ```
33
-
34
- ## When this fires
35
-
36
- When an active add-on is deactivated — via `DELETE /subscriptions/{id}/addons/{addonId}` or the customer portal. The add-on stops billing at the next renewal.
37
-
38
- `customer.state_changed` fires alongside it with trigger `addon_deactivated`.
39
-
40
- Use it to revoke the add-on's feature in your app.
@@ -1,37 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "balance.depleted"
4
- description: "A subscription ran out of prepaid balance."
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
- - `currentBalance` (number) — The balance after depletion in rate scale. Zero, or negative when overage is allowed.
13
- - `currency` (string) — The subscription currency.
14
-
15
- ```json
16
- {
17
- "event": "balance.depleted",
18
- "timestamp": "2026-06-23T14:30:00.000Z",
19
- "organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
20
- "mode": "live",
21
- "apiVersion": "2026-07-31",
22
- "data": {
23
- "subscriptionId": "sub_1a2b3c4d",
24
- "customerId": "user_123",
25
- "currentBalance": 0,
26
- "currency": "usd"
27
- }
28
- }
29
- ```
30
-
31
- ## When this fires
32
-
33
- The async usage processor fires this once when a deduction moves the prepaid balance from positive to zero or below. On plans that block on exhaustion, further usage is rejected with `insufficient_balance`; otherwise the balance goes negative and usage continues.
34
-
35
- `customer.state_changed` fires alongside it with trigger `balance_depleted`.
36
-
37
- Use it to cut off gated features or push an urgent top-up flow.
@@ -1,39 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "balance.low"
4
- description: "Prepaid balance dropped below 10% of the last refill."
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
- - `currentBalance` (number) — The remaining balance in rate scale (10000 = $1.00 of the subscription currency).
13
- - `thresholdBalance` (number) — The low-balance threshold that was crossed: 10% of the last refill, in rate scale.
14
- - `currency` (string) — The subscription currency.
15
-
16
- ```json
17
- {
18
- "event": "balance.low",
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
- "subscriptionId": "sub_1a2b3c4d",
25
- "customerId": "user_123",
26
- "currentBalance": 90000,
27
- "thresholdBalance": 100000,
28
- "currency": "usd"
29
- }
30
- }
31
- ```
32
-
33
- ## When this fires
34
-
35
- The async usage processor watches every balance deduction. When a batch moves the prepaid balance from above to at-or-below 10% of the last refill (period reset, top-up, or manual adjustment), this event fires once per crossing. A top-up re-arms it.
36
-
37
- Amounts are in rate scale (10000 = $1.00) in the subscription currency.
38
-
39
- Use it to prompt the customer to top up before usage gets blocked.
@@ -1,41 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "balance.topped_up"
4
- description: "A prepaid balance top-up was completed."
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
- - `invoiceId` (string) — The invoice issued for the top-up.
13
- - `invoiceNumber` (string) — The human-readable invoice number.
14
- - `amount` (number) — The topped-up value in rate scale (10000 = $1.00 of the subscription currency).
15
- - `currency` (string) — The subscription currency.
16
-
17
- ```json
18
- {
19
- "event": "balance.topped_up",
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
- "invoiceId": "inv_t1u2v3",
28
- "invoiceNumber": "INV-0051",
29
- "amount": 500000,
30
- "currency": "usd"
31
- }
32
- }
33
- ```
34
-
35
- ## When this fires
36
-
37
- When a customer on a balance plan tops up their prepaid balance through the customer portal and the payment succeeds.
38
-
39
- `amount` is the topped-up value in rate scale (10000 = $1.00 of the subscription currency) — the same scale `balance.low` and `balance.depleted` use.
40
-
41
- Use it to confirm the top-up in your own UI and to clear any low-balance warnings you raised on `balance.low`.
@@ -1,43 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "checkout.ready"
4
- description: "A checkout link is ready to share with the customer."
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
- - `invoiceId` (string) — The invoice this checkout collects.
13
- - `invoiceNumber` (string) — The human-readable invoice number.
14
- - `invoiceTotal` (number) — Invoice total in cents (100 = $1.00).
15
- - `invoiceCurrency` (string) — The invoice currency code.
16
- - `checkoutUrl` (string) — The hosted checkout URL to share with the customer.
17
-
18
- ```json
19
- {
20
- "event": "checkout.ready",
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
- "invoiceId": "inv_k1l2m3",
29
- "invoiceNumber": "INV-0042",
30
- "invoiceTotal": 9900,
31
- "invoiceCurrency": "usd",
32
- "checkoutUrl": "https://pay.commet.co/checkout/tok_9f8e7d6c"
33
- }
34
- }
35
- ```
36
-
37
- ## When this fires
38
-
39
- When a subscription is created without a payment method on file, Commet generates a hosted checkout link for the first invoice and fires this event as soon as the link is ready. Commet also emails the link to the customer — this webhook lets you deliver it through your own channels (in-app banner, chat, SMS) instead of relying on email alone.
40
-
41
- The link stays valid until the invoice is paid or voided. Trials with their own checkout flow fire `trial.checkout_ready` instead.
42
-
43
- Use the `checkoutUrl` to put the payment link in front of the customer wherever they already are.
@@ -1,35 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "credits.depleted"
4
- description: "A subscription ran out of credits."
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
- - `remainingCredits` (number) — Credits remaining after depletion. Always 0.
13
-
14
- ```json
15
- {
16
- "event": "credits.depleted",
17
- "timestamp": "2026-06-23T14:30:00.000Z",
18
- "organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
19
- "mode": "live",
20
- "apiVersion": "2026-07-31",
21
- "data": {
22
- "subscriptionId": "sub_1a2b3c4d",
23
- "customerId": "user_123",
24
- "remainingCredits": 0
25
- }
26
- }
27
- ```
28
-
29
- ## When this fires
30
-
31
- The async usage processor fires this once when a deduction moves the credit balance from positive to zero. From this point, usage requests that need more credits than remain are rejected with `insufficient_credits`.
32
-
33
- `customer.state_changed` fires alongside it with trigger `credits_depleted`, carrying the customer's full current entitlement state.
34
-
35
- Use it to block gated features in your app and drive the customer to a credit pack purchase.
@@ -1,35 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "credits.expired"
4
- description: "Unused plan credits expired at the period reset."
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
- - `expiredCredits` (number) — The unused plan credits that were discarded.
13
-
14
- ```json
15
- {
16
- "event": "credits.expired",
17
- "timestamp": "2026-06-23T14:30:00.000Z",
18
- "organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
19
- "mode": "live",
20
- "apiVersion": "2026-07-31",
21
- "data": {
22
- "subscriptionId": "sub_1a2b3c4d",
23
- "customerId": "user_123",
24
- "expiredCredits": 120
25
- }
26
- }
27
- ```
28
-
29
- ## When this fires
30
-
31
- Plan credits expire at the end of each billing period: the period reset discards whatever remained and grants the new period's credits (which fires `credits.granted`). This event reports the discarded amount. Purchased credits never expire and are not affected.
32
-
33
- It only fires when there was something to discard — a customer who used all plan credits gets no `credits.expired`.
34
-
35
- Use it for end-of-period usage summaries ("you left 120 credits on the table").
@@ -1,37 +0,0 @@
1
- ---
2
- lastModified: 2026-06-12
3
- title: "credits.granted"
4
- description: "Non-purchase credits were granted to a subscription."
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
- - `credits` (number) — The number of credits granted.
13
- - `reason` (string) — Why the credits were granted: period\_reset or manual\_adjustment.
14
-
15
- ```json
16
- {
17
- "event": "credits.granted",
18
- "timestamp": "2026-06-23T14:30:00.000Z",
19
- "organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
20
- "mode": "live",
21
- "apiVersion": "2026-07-31",
22
- "data": {
23
- "subscriptionId": "sub_1a2b3c4d",
24
- "customerId": "user_123",
25
- "credits": 500,
26
- "reason": "period_reset"
27
- }
28
- }
29
- ```
30
-
31
- ## When this fires
32
-
33
- Plan-included credits are granted at the start of every billing period (`reason: "period_reset"`), and manual adjustments from the dashboard grant purchased credits (`reason: "manual_adjustment"`). Credit pack purchases are a separate flow and fire `credits.purchased` instead.
34
-
35
- The idempotency key is derived from the billing operation that granted the credits, so engine retries never send a duplicate.
36
-
37
- Use it to reset in-app usage meters at the start of a period or to confirm a support-driven credit grant reached the customer.