@commet/node 9.4.0 → 9.6.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 (197) hide show
  1. package/dist/index.d.mts +41 -41
  2. package/dist/index.d.ts +41 -41
  3. package/dist/index.js +3 -3
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +3 -3
  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/offers.md +2 -2
  14. package/docs/api-reference/plans.md +1 -1
  15. package/docs/api-reference/promo-codes.md +3 -3
  16. package/docs/api-reference/subscriptions.md +4 -4
  17. package/docs/documentation/api-versioning.md +2 -2
  18. package/docs/documentation/better-auth.md +0 -1
  19. package/docs/documentation/choose-a-billing-model.md +14 -8
  20. package/docs/documentation/cli.md +14 -15
  21. package/docs/documentation/create-api-key.md +0 -1
  22. package/docs/documentation/customers/customer-credits.md +0 -1
  23. package/docs/documentation/customers/customer-portal.md +14 -2
  24. package/docs/documentation/customers/manage-customers.md +1 -2
  25. package/docs/documentation/error-handling.md +1 -2
  26. package/docs/documentation/examples.md +0 -1
  27. package/docs/documentation/finance/acceptable-use.md +0 -1
  28. package/docs/documentation/finance/finance-overview.md +0 -1
  29. package/docs/documentation/finance/local-currency-taxes.md +0 -1
  30. package/docs/documentation/finance/merchant-of-record.md +0 -1
  31. package/docs/documentation/finance/payouts-verification.md +6 -3
  32. package/docs/documentation/finance/payouts.md +0 -1
  33. package/docs/documentation/finance/supported-countries.md +0 -1
  34. package/docs/documentation/go/integrate-with-encore.md +7 -8
  35. package/docs/documentation/go/integrate-with-go.md +8 -9
  36. package/docs/documentation/introduction.md +3 -4
  37. package/docs/documentation/invoicing/handle-failed-payments.md +9 -4
  38. package/docs/documentation/invoicing/invoices-and-billing-cycles.md +10 -10
  39. package/docs/documentation/invoicing/manage-invoices.md +0 -1
  40. package/docs/documentation/java/integrate-with-java.md +6 -7
  41. package/docs/documentation/nodejs/integrate-with-astro.md +6 -7
  42. package/docs/documentation/nodejs/integrate-with-bun.md +6 -7
  43. package/docs/documentation/nodejs/integrate-with-express.md +7 -8
  44. package/docs/documentation/nodejs/integrate-with-hono.md +7 -8
  45. package/docs/documentation/nodejs/integrate-with-nextjs.md +6 -7
  46. package/docs/documentation/nodejs/integrate-with-nuxt.md +6 -7
  47. package/docs/documentation/nodejs/integrate-with-remix.md +6 -7
  48. package/docs/documentation/nodejs/integrate-with-sveltekit.md +6 -7
  49. package/docs/documentation/payments/accept-one-time-payments.md +0 -1
  50. package/docs/documentation/payments/payment-orchestration.md +0 -1
  51. package/docs/documentation/payments/payment-providers.md +0 -1
  52. package/docs/documentation/payments/transactions-refunds-and-retries.md +2 -1
  53. package/docs/documentation/php/integrate-with-laravel.md +8 -9
  54. package/docs/documentation/php/integrate-with-php.md +6 -7
  55. package/docs/documentation/php/integrate-with-symfony.md +7 -8
  56. package/docs/documentation/plans/add-ons.md +0 -1
  57. package/docs/documentation/plans/balance-and-top-ups.md +1 -2
  58. package/docs/documentation/plans/configure-features.md +0 -1
  59. package/docs/documentation/plans/consumption-models.md +7 -8
  60. package/docs/documentation/plans/create-plans.md +0 -1
  61. package/docs/documentation/plans/credit-packs.md +0 -1
  62. package/docs/documentation/plans/one-time-payments.md +0 -1
  63. package/docs/documentation/plans/plan-groups.md +0 -1
  64. package/docs/documentation/platform/custom-domains.md +0 -1
  65. package/docs/documentation/platform/dashboard-metrics-and-events.md +0 -1
  66. package/docs/documentation/platform/members-and-permissions.md +0 -1
  67. package/docs/documentation/platform/organization-settings.md +0 -1
  68. package/docs/documentation/python/integrate-with-django.md +8 -9
  69. package/docs/documentation/python/integrate-with-fastapi.md +8 -9
  70. package/docs/documentation/python/integrate-with-flask.md +8 -9
  71. package/docs/documentation/python/integrate-with-python.md +6 -7
  72. package/docs/documentation/sales/card-promotions.md +0 -1
  73. package/docs/documentation/sales/introductory-offers.md +0 -1
  74. package/docs/documentation/sales/offers.md +0 -1
  75. package/docs/documentation/sales/promo-codes.md +19 -5
  76. package/docs/documentation/sales/promotional-offers.md +1 -2
  77. package/docs/documentation/sales/regional-prices.md +0 -1
  78. package/docs/documentation/sales/trial-periods.md +8 -8
  79. package/docs/documentation/sdk-reference.md +1 -2
  80. package/docs/documentation/subscriptions/manage-subscriptions.md +2 -1
  81. package/docs/documentation/subscriptions/plan-grants.md +0 -1
  82. package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +0 -1
  83. package/docs/documentation/testing-sandbox.md +0 -1
  84. package/docs/documentation/usage/ai-token-billing.md +0 -1
  85. package/docs/documentation/usage/quota-management.md +0 -1
  86. package/docs/documentation/usage/seat-management.md +0 -1
  87. package/docs/documentation/usage/track-usage.md +0 -1
  88. package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +1 -2
  89. package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +0 -1
  90. package/docs/knowledge-base/how-do-discounts-work.md +0 -1
  91. package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +8 -9
  92. package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +6 -7
  93. package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +0 -1
  94. package/docs/knowledge-base/how-do-trial-periods-work.md +0 -1
  95. package/docs/knowledge-base/how-does-billing-work.md +0 -1
  96. package/docs/knowledge-base/how-does-payment-routing-work.md +0 -1
  97. package/docs/knowledge-base/how-does-quota-based-billing-work.md +0 -1
  98. package/docs/knowledge-base/how-does-seat-based-billing-work.md +0 -1
  99. package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +1 -2
  100. package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +2 -1
  101. package/docs/knowledge-base/what-happens-when-a-payment-fails.md +0 -1
  102. package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +0 -1
  103. package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +0 -1
  104. package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +13 -14
  105. package/docs/manifest.json +72 -157
  106. package/docs/platform-documentation.md +69 -155
  107. package/docs/schemas.md +10 -9
  108. package/docs/webhooks/introduction.md +0 -1
  109. package/docs/webhooks.md +2 -0
  110. package/docs/webhooks.openapi.json +11058 -0
  111. package/package.json +1 -1
  112. package/docs/ai-onboarding/meta.json +0 -17
  113. package/docs/api-reference/meta.json +0 -7
  114. package/docs/documentation/customers/meta.json +0 -5
  115. package/docs/documentation/finance/meta.json +0 -13
  116. package/docs/documentation/go/meta.json +0 -5
  117. package/docs/documentation/invoicing/meta.json +0 -9
  118. package/docs/documentation/java/meta.json +0 -5
  119. package/docs/documentation/meta.json +0 -36
  120. package/docs/documentation/nodejs/meta.json +0 -14
  121. package/docs/documentation/payments/meta.json +0 -10
  122. package/docs/documentation/php/meta.json +0 -9
  123. package/docs/documentation/plans/meta.json +0 -14
  124. package/docs/documentation/platform/meta.json +0 -10
  125. package/docs/documentation/python/meta.json +0 -10
  126. package/docs/documentation/sales/meta.json +0 -13
  127. package/docs/documentation/subscriptions/meta.json +0 -9
  128. package/docs/documentation/usage/meta.json +0 -10
  129. package/docs/knowledge-base/meta.json +0 -29
  130. package/docs/meta.json +0 -11
  131. package/docs/webhooks/addon-activated.md +0 -44
  132. package/docs/webhooks/addon-deactivated.md +0 -40
  133. package/docs/webhooks/balance-depleted.md +0 -37
  134. package/docs/webhooks/balance-low.md +0 -39
  135. package/docs/webhooks/balance-topped-up.md +0 -41
  136. package/docs/webhooks/checkout-ready.md +0 -43
  137. package/docs/webhooks/credits-depleted.md +0 -35
  138. package/docs/webhooks/credits-expired.md +0 -35
  139. package/docs/webhooks/credits-granted.md +0 -37
  140. package/docs/webhooks/credits-low.md +0 -39
  141. package/docs/webhooks/credits-purchased.md +0 -41
  142. package/docs/webhooks/customer-created.md +0 -49
  143. package/docs/webhooks/customer-state-changed.md +0 -134
  144. package/docs/webhooks/customer-updated.md +0 -49
  145. package/docs/webhooks/invoice-created.md +0 -45
  146. package/docs/webhooks/invoice-overdue.md +0 -53
  147. package/docs/webhooks/invoice-upcoming.md +0 -43
  148. package/docs/webhooks/invoice-voided.md +0 -53
  149. package/docs/webhooks/meta.json +0 -89
  150. package/docs/webhooks/payment-dispute-resolved.md +0 -52
  151. package/docs/webhooks/payment-disputed.md +0 -49
  152. package/docs/webhooks/payment-failed.md +0 -178
  153. package/docs/webhooks/payment-link-canceled.md +0 -41
  154. package/docs/webhooks/payment-link-completed.md +0 -89
  155. package/docs/webhooks/payment-link-created.md +0 -41
  156. package/docs/webhooks/payment-link-failed.md +0 -87
  157. package/docs/webhooks/payment-method-attached.md +0 -44
  158. package/docs/webhooks/payment-method-updated.md +0 -37
  159. package/docs/webhooks/payment-received.md +0 -202
  160. package/docs/webhooks/payment-recovered.md +0 -43
  161. package/docs/webhooks/payment-refunded.md +0 -47
  162. package/docs/webhooks/payment-retry-failed.md +0 -39
  163. package/docs/webhooks/payout-available.md +0 -33
  164. package/docs/webhooks/payout-created.md +0 -48
  165. package/docs/webhooks/payout-failed.md +0 -52
  166. package/docs/webhooks/payout-paid.md +0 -48
  167. package/docs/webhooks/plan-grant-created.md +0 -74
  168. package/docs/webhooks/plan-grant-expired.md +0 -86
  169. package/docs/webhooks/plan-grant-revoked.md +0 -86
  170. package/docs/webhooks/plan-grant-updated.md +0 -86
  171. package/docs/webhooks/quota-exceeded.md +0 -44
  172. package/docs/webhooks/quota-threshold-reached.md +0 -41
  173. package/docs/webhooks/seats-limit-reached.md +0 -39
  174. package/docs/webhooks/seats-updated.md +0 -39
  175. package/docs/webhooks/subscription-activated.md +0 -43
  176. package/docs/webhooks/subscription-canceled.md +0 -58
  177. package/docs/webhooks/subscription-cancellation-revoked.md +0 -37
  178. package/docs/webhooks/subscription-cancellation-scheduled.md +0 -45
  179. package/docs/webhooks/subscription-created.md +0 -35
  180. package/docs/webhooks/subscription-past-due.md +0 -43
  181. package/docs/webhooks/subscription-pause-revoked.md +0 -27
  182. package/docs/webhooks/subscription-pause-scheduled.md +0 -35
  183. package/docs/webhooks/subscription-pause-updated.md +0 -31
  184. package/docs/webhooks/subscription-paused.md +0 -35
  185. package/docs/webhooks/subscription-plan-change-revoked.md +0 -50
  186. package/docs/webhooks/subscription-plan-change-scheduled.md +0 -55
  187. package/docs/webhooks/subscription-plan-changed.md +0 -43
  188. package/docs/webhooks/subscription-reactivated.md +0 -53
  189. package/docs/webhooks/subscription-resume-failed.md +0 -33
  190. package/docs/webhooks/subscription-resumed.md +0 -35
  191. package/docs/webhooks/subscription-updated.md +0 -39
  192. package/docs/webhooks/trial-checkout-ready.md +0 -39
  193. package/docs/webhooks/trial-converted.md +0 -39
  194. package/docs/webhooks/trial-expired.md +0 -39
  195. package/docs/webhooks/trial-started.md +0 -46
  196. package/docs/webhooks/trial-will-end.md +0 -41
  197. package/docs/webhooks/usage-recorded.md +0 -41
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-08-16
3
2
  title: AI Onboarding
4
3
  description: Give an AI agent the product knowledge, tools, environment, and safety boundaries it needs to implement Commet.
5
4
  ---
@@ -48,9 +47,9 @@ MCP v2 generates one `api_*` tool per current OpenAPI operation and also exposes
48
47
  Use the smallest source that answers the task:
49
48
 
50
49
  1. `node_modules/@commet/node/docs/README.md` for the API that matches the installed SDK version.
51
- 2. [Documentation index](https://commet.co/docs/llms.txt) to discover the right curated concept or business rule.
50
+ 2. [Documentation index](/docs/llms.txt) to discover the right curated concept or business rule.
52
51
  3. Append `.md` to a page URL for focused Markdown, such as `https://commet.co/docs/how-does-billing-work.md`.
53
- 4. [Full documentation](https://commet.co/docs/llms-full.txt) only when the task genuinely needs the complete curated corpus.
52
+ 4. [Full documentation](/docs/llms-full.txt) only when the task genuinely needs the complete curated corpus.
54
53
  5. [OpenAPI](https://commet.co/openapi.json) and generated API Reference for the exact current platform contract.
55
54
 
56
55
  Installed SDK docs are version-matched. The curated Documentation explains how dashboard and API work together. The Knowledge Base defines business rules. API Reference and Webhooks define the current generated contracts.
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-31
3
2
  title: Billing Best Practices Skill
4
3
  description: Comprehensive guide for building production-ready billing systems with AI agents.
5
4
  ---
@@ -25,5 +24,5 @@ npx skills add commet-labs/billing-best-practices
25
24
 
26
25
  ## Learn More
27
26
 
28
- - [**View on GitHub**](https://github.com/commet-labs/billing-best-practices)
29
- - [**View on skills.sh**](https://skills.sh/commet-labs/billing-best-practices)
27
+ - [**View on GitHub**](https://github.com/commet-labs/billing-best-practices) — See the full source code and documentation.
28
+ - [**View on skills.sh**](https://skills.sh/commet-labs/billing-best-practices) — Installation stats and security audits.
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-31
3
2
  title: Commet Skills
4
3
  description: Give AI agents expert-level billing knowledge with Agent Skills.
5
4
  ---
@@ -52,7 +51,7 @@ Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, Windsurf, OpenCode, and
52
51
 
53
52
  ## Learn More
54
53
 
55
- - [**commet-labs/skills on skills.sh**](https://skills.sh/commet-labs/skills)
56
- - [**billing-best-practices**](https://skills.sh/commet-labs/billing-best-practices)
57
- - [**pricing-models**](https://skills.sh/commet-labs/pricing-models)
58
- - [**subscription-patterns**](https://skills.sh/commet-labs/subscription-patterns)
54
+ - [**commet-labs/skills on skills.sh**](https://skills.sh/commet-labs/skills) — All 7 skills in one package.
55
+ - [**billing-best-practices**](https://skills.sh/commet-labs/billing-best-practices) — SaaS billing patterns and best practices.
56
+ - [**pricing-models**](https://skills.sh/commet-labs/pricing-models) — Choose the right pricing model for your SaaS.
57
+ - [**subscription-patterns**](https://skills.sh/commet-labs/subscription-patterns) — Subscription lifecycle, trials, proration, dunning.
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-31
3
2
  title: MCP Server
4
3
  description: Use the MCP Server to manage billing infrastructure.
5
4
  ---
@@ -45,7 +44,7 @@ To use it, you'll need to:
45
44
 
46
45
  Choose your preferred client below.
47
46
 
48
- ### cursor
47
+ ### Cursor
49
48
 
50
49
  Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global MCP server".
51
50
 
@@ -59,13 +58,13 @@ Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global
59
58
  }
60
59
  ```
61
60
 
62
- ### claude-code
61
+ ### Claude Code
63
62
 
64
63
  ```bash
65
64
  claude mcp add --transport http commet https://commet.co/mcp/v2
66
65
  ```
67
66
 
68
- ### claude-desktop
67
+ ### Claude Desktop
69
68
 
70
69
  Open Claude Desktop settings > "Developer" tab > "Edit Config".
71
70
 
@@ -79,7 +78,7 @@ Open Claude Desktop settings > "Developer" tab > "Edit Config".
79
78
  }
80
79
  ```
81
80
 
82
- ### codex
81
+ ### Codex
83
82
 
84
83
  ```bash
85
84
  codex mcp add commet --url https://commet.co/mcp/v2
@@ -91,7 +90,7 @@ The command opens the browser for OAuth authentication. Once complete, verify wi
91
90
  codex mcp list
92
91
  ```
93
92
 
94
- ### copilot
93
+ ### Copilot
95
94
 
96
95
  Add the following to your VS Code `settings.json`:
97
96
 
@@ -108,7 +107,7 @@ Add the following to your VS Code `settings.json`:
108
107
  }
109
108
  ```
110
109
 
111
- ### gemini
110
+ ### Gemini
112
111
 
113
112
  Add the following to `~/.gemini/settings.json`:
114
113
 
@@ -122,7 +121,7 @@ Add the following to `~/.gemini/settings.json`:
122
121
  }
123
122
  ```
124
123
 
125
- ### opencode
124
+ ### OpenCode
126
125
 
127
126
  Add the following to `opencode.json`:
128
127
 
@@ -137,7 +136,7 @@ Add the following to `opencode.json`:
137
136
  }
138
137
  ```
139
138
 
140
- ### windsurf
139
+ ### Windsurf
141
140
 
142
141
  ```json
143
142
  {
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-04-03
3
2
  title: Pricing Models Skill
4
3
  description: Choose and implement the right pricing model for your SaaS with AI agents.
5
4
  ---
@@ -25,5 +24,5 @@ npx skills add commet-labs/pricing-models
25
24
 
26
25
  ## Learn More
27
26
 
28
- - [**View on GitHub**](https://github.com/commet-labs/pricing-models)
29
- - [**View on skills.sh**](https://skills.sh/commet-labs/pricing-models)
27
+ - [**View on GitHub**](https://github.com/commet-labs/pricing-models) — See the full source code and documentation.
28
+ - [**View on skills.sh**](https://skills.sh/commet-labs/pricing-models) — Installation stats and security audits.
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-04-03
3
2
  title: Subscription Patterns Skill
4
3
  description: Universal subscription billing patterns for trials, proration, dunning, and more.
5
4
  ---
@@ -25,5 +24,5 @@ npx skills add commet-labs/subscription-patterns
25
24
 
26
25
  ## Learn More
27
26
 
28
- - [**View on GitHub**](https://github.com/commet-labs/subscription-patterns)
29
- - [**View on skills.sh**](https://skills.sh/commet-labs/subscription-patterns)
27
+ - [**View on GitHub**](https://github.com/commet-labs/subscription-patterns) — See the full source code and documentation.
28
+ - [**View on skills.sh**](https://skills.sh/commet-labs/subscription-patterns) — Installation stats and security audits.
@@ -30,7 +30,7 @@ Replace reusable offer terms. Existing applications keep their immutable accepte
30
30
 
31
31
  - `id` (`string`, required)
32
32
  - `name` (`string`, required)
33
- - `phases` (`Array<{ type: "free_trial"; durationDays: number } | { type: "percentage"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; percentage: number } | { type: "amount_off"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; amounts: Array<{ currency: string; amount: number }> } | { type: "fixed_price"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; prices: Array<{ currency: string; amount: number }> }>`, required)
33
+ - `phases` (`Array<{ type: "free_trial"; durationDays: number } | { type: "percentage"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null; percentage: number } | { type: "amount_off"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null; amounts: Array<{ currency: string; amount: number }> } | { type: "fixed_price"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null; prices: Array<{ currency: string; amount: number }> }>`, required)
34
34
  - `metadata` (`Record<string, unknown>`, optional)
35
35
  - `startsAt` (`string | null`, optional)
36
36
  - `endsAt` (`string | null`, optional)
@@ -89,7 +89,7 @@ Create reusable offer terms without assigning a plan, price, eligibility rule, o
89
89
  ### Parameters
90
90
 
91
91
  - `name` (`string`, required)
92
- - `phases` (`Array<{ type: "free_trial"; durationDays: number } | { type: "percentage"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; percentage: number } | { type: "amount_off"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; amounts: Array<{ currency: string; amount: number }> } | { type: "fixed_price"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; prices: Array<{ currency: string; amount: number }> }>`, required)
92
+ - `phases` (`Array<{ type: "free_trial"; durationDays: number } | { type: "percentage"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null; percentage: number } | { type: "amount_off"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null; amounts: Array<{ currency: string; amount: number }> } | { type: "fixed_price"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null; prices: Array<{ currency: string; amount: number }> }>`, required)
93
93
  - `metadata` (`Record<string, unknown>`, optional)
94
94
  - `startsAt` (`string | null`, optional)
95
95
  - `endsAt` (`string | null`, optional)
@@ -189,7 +189,7 @@ Add a base price or a selectable market price variant. Variants inherit their ba
189
189
  ### Parameters
190
190
 
191
191
  - `id` (`string`, required)
192
- - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "yearly" | "one_time"`, required)
192
+ - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time"`, required)
193
193
  - `metadata` (`Record<string, unknown>`, optional)
194
194
  - `price` (`number`, optional)
195
195
  - `trialDays` (`number`, optional)
@@ -29,7 +29,7 @@ Update a promo code's billing interval, redemption limits, expiration, active st
29
29
  ### Parameters
30
30
 
31
31
  - `id` (`string`, required)
32
- - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null`, optional)
32
+ - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null`, optional)
33
33
  - `maxRedemptions` (`number | null`, optional)
34
34
  - `expiresAt` (`string | null`, optional)
35
35
  - `active` (`boolean`, optional)
@@ -66,13 +66,13 @@ List promo codes with cursor-based pagination.
66
66
 
67
67
  `POST /promo-codes` · operation `create-promo-code`
68
68
 
69
- Create a distribution code for an existing Offer. The referenced Offer owns the benefit and duration; the promo code owns redemption restrictions.
69
+ Create a distribution code for an existing Offer with one or more sequential discount phases and an optional leading trial. The code owns redemption restrictions.
70
70
 
71
71
  ### Parameters
72
72
 
73
73
  - `code` (`string`, required)
74
74
  - `offerId` (`string`, required)
75
- - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null`, optional)
75
+ - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null`, optional)
76
76
  - `maxRedemptions` (`number`, optional)
77
77
  - `expiresAt` (`string`, optional)
78
78
  - `planIds` (`Array<string>`, optional)
@@ -118,7 +118,7 @@ Upgrade or change billing interval immediately, optionally applying an Offer. Sc
118
118
 
119
119
  - `id` (`string`, required)
120
120
  - `newPlanId` (`string`, optional)
121
- - `newBillingInterval` (`"weekly" | "monthly" | "quarterly" | "yearly"`, optional)
121
+ - `newBillingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"`, optional)
122
122
  - `successUrl` (`string`, optional)
123
123
  - `offerId` (`string`, optional)
124
124
 
@@ -281,7 +281,7 @@ Preview proration details for an immediate plan change without applying it. Free
281
281
 
282
282
  - `id` (`string`, required)
283
283
  - `planId` (`string`, required)
284
- - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "yearly" | "one_time"`, optional)
284
+ - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time"`, optional)
285
285
  - `offerId` (`string`, optional)
286
286
 
287
287
  ### Request options
@@ -428,12 +428,12 @@ List all subscriptions. Filter by customer ID or status.
428
428
 
429
429
  `POST /subscriptions` · operation `create-subscription`
430
430
 
431
- Create a subscription for a customer. Commet selects the default price when priceId is omitted and resolves its market from the customer's billing country. Without an offer override, Commet applies the price's automatic introductory Offer. Pass offerId to apply an active compatible Offer directly, or cardPromotionId to preselect a card-eligible Promotional Offer for the initial checkout when card promotions are enabled for the organization. For the initial checkout, provider accepts either a processor name or an exact payment connection ID.
431
+ Create a subscription for a customer. Commet selects the default price when priceId is omitted. The subscription starts at the base USD price; market and currency are resolved from the buyer's request country when the checkout opens. Without an offer override, Commet applies the price's automatic introductory Offer. Pass offerId to apply an active compatible Offer directly, or cardPromotionId to preselect a card-eligible Promotional Offer for the initial checkout when card promotions are enabled for the organization. For the initial checkout, provider accepts either a processor name or an exact payment connection ID.
432
432
 
433
433
  ### Parameters
434
434
 
435
435
  - `customerId` (`string`, required)
436
- - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null`, optional)
436
+ - `billingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null`, optional)
437
437
  - `priceId` (`string`, optional) — Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing.
438
438
  - `initialSeats` (`Record<string, number>`, optional)
439
439
  - `provider` (`"stripe" | "commet" | "dlocal" | string`, optional) — Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present.
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-31
3
2
  title: API Versioning
4
3
  description: How Commet versions its API and webhooks so your integration never breaks unexpectedly.
5
4
  ---
@@ -10,7 +9,7 @@ Commet uses date-based API versioning inspired by Stripe. Every breaking change
10
9
 
11
10
  Versions use the date they were released: `YYYY-MM-DD` (e.g. `2026-05-01`).
12
11
 
13
- The current version is **2026-08-27**.
12
+ The current version is `2026-08-27`.
14
13
 
15
14
  ## How versions are resolved
16
15
 
@@ -49,6 +48,7 @@ Non-breaking changes ship continuously and never require a version bump:
49
48
  - New event types
50
49
  - New API endpoints
51
50
  - New optional request parameters
51
+ - New values in existing enums, such as a new billing interval. Your integration should accept values it does not recognize instead of failing
52
52
 
53
53
  ## Backward compatibility policy
54
54
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-10
3
2
  title: Better Auth
4
3
  description: Better Auth Plugin for Billing and Subscriptions using Commet
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-09-07
3
2
  title: Quickstart
4
3
  description: Go from a Commet account to your first subscription payment in sandbox.
5
4
  ---
@@ -29,27 +28,34 @@ For this walkthrough, use a **Metered** plan with a monthly price and an include
29
28
 
30
29
  ## Your first subscription payment
31
30
 
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.
31
+ 1. ### Create your account
32
+ [Create a Commet account](https://commet.co/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
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.
34
+ 2. ### Create an API key
35
+ [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
 
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
+ 3. ### Create a feature
38
+ 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
39
 
38
40
  See [Configure Features](/docs/configure-features).
39
41
 
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.
42
+ 4. ### Create a plan
43
+ 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
44
 
42
45
  See [Manage Plans](/docs/create-plans).
43
46
 
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.
47
+ 5. ### Create a customer
48
+ 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
49
 
46
50
  See [Manage Customers](/docs/manage-customers) for the dashboard and SDK flow.
47
51
 
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.
52
+ 6. ### Create the subscription
53
+ 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
54
 
50
55
  See [Manage Subscriptions](/docs/manage-subscriptions#create) for the request in your SDK.
51
56
 
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.
57
+ 7. ### Complete the payment
58
+ 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
59
 
54
60
  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
61
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-08-16
3
2
  title: CLI
4
3
  description: The official command-line tool for Commet. Manage billing, forward webhooks, and automate your workflow from the terminal.
5
4
  ---
@@ -274,7 +273,7 @@ commet subscriptions create \
274
273
  | `--customer-id <id>` | Yes | Customer ID |
275
274
  | `--plan-code <code>` | One of `plan-code` / `plan-id` | Plan code |
276
275
  | `--plan-id <id>` | One of `plan-code` / `plan-id` | Plan ID |
277
- | `--billing-interval <interval>` | No | `weekly`, `monthly`, `quarterly`, `yearly`, `one_time` |
276
+ | `--billing-interval <interval>` | No | `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`, `one_time` |
278
277
  | `--price-id <id>` | No | Selectable plan price. Omit it to use the interval default and its market pricing |
279
278
  | `--initial-seats <json>` | No | Initial seats as JSON: `{featureCode: count}` |
280
279
  | `--skip-trial <bool>` | No | Skip trial period |
@@ -383,7 +382,7 @@ commet plans add-feature \
383
382
  | `--overage-enabled <bool>` | No | Enable overage billing |
384
383
  | `--overage-unit-price <n>` | No | Overage price per unit (fixed pricing) |
385
384
  | `--pricing-mode <mode>` | No | `fixed` or `ai_model` |
386
- | `--margin <n>` | No | Margin percentage (ai\_model pricing) |
385
+ | `--margin <n>` | No | Margin percentage (ai_model pricing) |
387
386
  | `--credits-per-unit <n>` | No | Credits per unit |
388
387
 
389
388
  **`commet plans add-price`**
@@ -405,18 +404,18 @@ commet plans add-price \
405
404
  --trial-days 14
406
405
  ```
407
406
 
408
- | Flag | Required | Description |
409
- | ------------------------------- | ----------------------------------------- | ----------------------------------------------------------- |
410
- | `--plan-id <id>` | Yes | Plan ID |
411
- | `--billing-interval <interval>` | Yes | `weekly`, `monthly`, `quarterly`, `yearly`, `one_time` |
412
- | `--price <n>` | One of `price` / `inherits-from-price-id` | Base price in the currency's minor unit |
413
- | `--inherits-from-price-id <id>` | One of `price` / `inherits-from-price-id` | Base price inherited by a selectable variant |
414
- | `--trial-days <n>` | No | Trial period in days |
415
- | `--is-default <bool>` | No | Set as default price |
416
- | `--included-balance <n>` | No | Included balance amount |
417
- | `--included-credits <n>` | No | Included credits amount |
418
- | `--market-prices <json>` | Required for a variant | Market prices as `{marketGroupId, currency, price}` objects |
419
- | `--metadata <json>` | No | Price metadata |
407
+ | Flag | Required | Description |
408
+ | ------------------------------- | ----------------------------------------- | -------------------------------------------------------------------- |
409
+ | `--plan-id <id>` | Yes | Plan ID |
410
+ | `--billing-interval <interval>` | Yes | `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`, `one_time` |
411
+ | `--price <n>` | One of `price` / `inherits-from-price-id` | Base price in the currency's minor unit |
412
+ | `--inherits-from-price-id <id>` | One of `price` / `inherits-from-price-id` | Base price inherited by a selectable variant |
413
+ | `--trial-days <n>` | No | Trial period in days |
414
+ | `--is-default <bool>` | No | Set as default price |
415
+ | `--included-balance <n>` | No | Included balance amount |
416
+ | `--included-credits <n>` | No | Included credits amount |
417
+ | `--market-prices <json>` | Required for a variant | Market prices as `{marketGroupId, currency, price}` objects |
418
+ | `--metadata <json>` | No | Price metadata |
420
419
 
421
420
  Create a selectable variant that changes only Argentina and inherits the rest of the base price:
422
421
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-09-25
3
2
  title: Create an API Key
4
3
  description: Create a sandbox API key from the dashboard, CLI, or MCP, store it on your server, and rotate it safely.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-08-16
3
2
  title: Customer Credits
4
3
  description: Grant monetary invoice credit to a customer, inspect its remaining balance, and revoke unused credit.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-28
3
2
  title: Customer Portal
4
3
  description: Self-service portal for customers to manage their subscriptions.
5
4
  ---
@@ -12,12 +11,25 @@ Self-service page where customers manage their subscription, view usage, change
12
11
  - See usage across all features
13
12
  - Upgrade or downgrade plans (requires a [Plan Group](/docs/plan-groups))
14
13
  - Purchase [Credit Packs](/docs/credit-packs), balance top-ups, and [Add-ons](/docs/add-ons)
15
- - Update payment method and billing details
14
+ - Manage saved payment methods and billing details
16
15
  - View invoice history
17
16
  - Cancel subscription
18
17
 
19
18
  Purchases are available on active, trialing, and free plan subscriptions. Free plan customers are prompted to add a payment method on their first purchase.
20
19
 
20
+ ## Saved payment methods
21
+
22
+ Your customers can save several cards and choose their default payment method. A new card becomes the default unless the customer saves it as an alternative. The first saved card is always the default.
23
+
24
+ While a subscription is open:
25
+
26
+ - Customers must choose another default before removing the current one.
27
+ - They cannot remove the last saved method or the last method usable with the subscription's payment connection.
28
+
29
+ Without an open subscription, customers can remove any saved method. Changing the default or removing methods is blocked while a payment or automatic retry is in progress.
30
+
31
+ Commet can also use saved methods for [automatic payment retries](/docs/handle-failed-payments#saved-payment-methods).
32
+
21
33
  ## Generate a portal URL
22
34
 
23
35
  Portal URLs are not single-use — the customer can revisit the link while the session is alive. A session expires after **30 minutes** of inactivity, auto-refreshes while the customer is active, and is capped at **2 hours** from creation. Generate a fresh URL on each visit.
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-28
3
2
  title: Manage Customers
4
3
  description: Create and manage customers using the current Commet SDKs and dashboard.
5
4
  ---
@@ -343,4 +342,4 @@ See the [Customers API reference](/docs/api-reference/customers/list-customers)
343
342
 
344
343
  - [Customer Portal](/docs/customer-portal)
345
344
  - [Manage Subscriptions](/docs/manage-subscriptions)
346
- - [Offers & Pricing changelog and migration checklist](/changelog/offers-and-pricing)
345
+ - [Offers & Pricing changelog and migration checklist](https://commet.co/changelog/offers-and-pricing)
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-31
3
2
  title: Error Handling
4
3
  description: Handle errors with automatic retries and typed error classes
5
4
  ---
@@ -106,7 +105,7 @@ Go exposes `*commet.CommetError` and `*commet.ValidationError` as concrete types
106
105
 
107
106
  ## Error Code Reference
108
107
 
109
- Every current API error includes a stable `code` and a version-matched `doc_url` such as [`customer_not_found`](/docs/api-reference/2026-07-31/errors/customer_not_found.md). The URL returns a dedicated English Markdown reference with handling and retry guidance for the resolved API version.
108
+ Every current API error includes a stable `code` and a version-matched `doc_url` such as [`customer_not_found`](/docs/api-reference/errors/customer_not_found.md). The URL returns a dedicated English Markdown reference with handling and retry guidance for the resolved API version.
110
109
 
111
110
  Keep the `x-request-id` response header when logging or reporting an error. Commet records the same identifier in Platform, allowing the request to be correlated without including credentials or customer data.
112
111
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-08-16
3
2
  title: Examples
4
3
  description: Explore complete applications for the main Commet billing models and lifecycle patterns.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-08-13
3
2
  title: Acceptable Use Policy
4
3
  description: What products and services can be sold through Commet.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-10
3
2
  title: Finance Overview
4
3
  description: How money flows through Commet — balances, payouts, and transaction history.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-16
3
2
  title: Local Currency Taxes
4
3
  description: Banks in some countries add taxes or surcharges on top of local currency payments. What they are, where they apply, and how to handle customer questions.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-10
3
2
  title: Merchant of Record
4
3
  description: What a Merchant of Record is and how Commet handles taxes, compliance, refunds, and payouts on your behalf.
5
4
  ---
@@ -1,12 +1,13 @@
1
1
  ---
2
- lastModified: 2026-08-10
3
2
  title: Account Verification
4
3
  description: How to get verified for payouts — complete the KYC form in the Commet dashboard.
5
4
  ---
6
5
 
7
6
  Organizations using their own payment connection can start accepting payments immediately. Commet-managed payment processing remains unavailable until merchant review and identity verification are complete.
8
7
 
9
- > **Note: Live organizations only**
8
+ > **Note**
9
+ >
10
+ > **Live organizations only**
10
11
  >
11
12
  > Payout verification is unavailable in sandbox. Switch to your live organization before submitting business, identity, document, or bank information.
12
13
 
@@ -39,7 +40,9 @@ After completing verification in the Commet dashboard, you can add destination b
39
40
 
40
41
  `POST /api/v1/payouts/verification` is deprecated and no longer accepts or processes KYC data. Authenticated requests return `410 Gone` with the `endpoint_deprecated` error code.
41
42
 
42
- > **Warning: Complete verification in the dashboard**
43
+ > **Warning**
44
+ >
45
+ > **Complete verification in the dashboard**
43
46
  >
44
47
  > Do not send business, identity, document, or bank information to this endpoint. Use the one-time verification flow in your live organization's finance section.
45
48
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-08-04
3
2
  title: Request a Payout to Your Bank
4
3
  description: Withdraw your available Commet balance to your bank account — $10 minimum, no payout fee, arrives in up to 7 business days.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-08-06
3
2
  title: Supported Countries
4
3
  description: Countries where Commet supports payouts and business operations.
5
4
  ---
@@ -1,5 +1,4 @@
1
1
  ---
2
- lastModified: 2026-07-31
3
2
  title: Integrate with Encore
4
3
  description: Add billing and payments to your Encore application.
5
4
  ---
@@ -10,14 +9,14 @@ Install the Commet Skill so your coding agent can integrate the current SDK and
10
9
  npx skills add commet-labs/skills --skill commet
11
10
  ```
12
11
 
13
- 1. ## Install
12
+ 1. ### Install
14
13
  ```bash
15
14
  encore app create --example=hello-world myapp
16
15
  cd myapp
17
16
  go get github.com/commet-labs/commet-go/v9
18
17
  ```
19
18
 
20
- 2. ## Configure
19
+ 2. ### Configure
21
20
  Store secrets using Encore's secret manager instead of environment variables:
22
21
  ```bash
23
22
  encore secret set --type dev,local,pr,prod CommetAPIKey
@@ -45,7 +44,7 @@ npx skills add commet-labs/skills --skill commet
45
44
  ```
46
45
  There is no environment option on the client: sandbox vs live is decided by the organization the API key belongs to.
47
46
 
48
- 3. ## Subscribe
47
+ 3. ### Subscribe
49
48
  ```go title="billing/billing.go"
50
49
  import "context"
51
50
 
@@ -92,7 +91,7 @@ npx skills add commet-labs/skills --skill commet
92
91
  }
93
92
  ```
94
93
 
95
- 4. ## Check Access
94
+ 4. ### Check Access
96
95
  ```go title="billing/billing.go"
97
96
  type SubscriptionResponse struct {
98
97
  Status string `json:"status"`
@@ -143,7 +142,7 @@ npx skills add commet-labs/skills --skill commet
143
142
  }
144
143
  ```
145
144
 
146
- 5. ## Track Usage
145
+ 5. ### Track Usage
147
146
  ```go title="billing/billing.go"
148
147
  func float64Ptr(value float64) *float64 { return &value }
149
148
 
@@ -175,7 +174,7 @@ npx skills add commet-labs/skills --skill commet
175
174
  ```
176
175
  Usage is aggregated and billed at end of period.
177
176
 
178
- 6. ## Webhooks
177
+ 6. ### Webhooks
179
178
  ```go title="billing/webhooks.go"
180
179
  package billing
181
180
 
@@ -216,7 +215,7 @@ npx skills add commet-labs/skills --skill commet
216
215
  }
217
216
  ```
218
217
 
219
- 7. ## Run
218
+ 7. ### Run
220
219
  ```bash
221
220
  encore run
222
221
  ```