@commet/node 9.5.0 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +90 -51
- package/dist/index.d.ts +90 -51
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/docs/ai-onboarding/commet-skill.md +1 -1
- package/docs/ai-onboarding/mcp-server.md +1 -1
- package/docs/api-reference/index.md +1 -1
- package/docs/api-reference/offers.md +2 -2
- package/docs/api-reference/plans.md +1 -1
- package/docs/api-reference/promo-codes.md +2 -2
- package/docs/api-reference/subscriptions.md +29 -4
- package/docs/documentation/api-versioning.md +1 -0
- package/docs/documentation/better-auth.md +1 -8
- package/docs/documentation/cli.md +13 -13
- package/docs/documentation/customers/customer-portal.md +1 -7
- package/docs/documentation/customers/manage-customers.md +0 -6
- package/docs/documentation/error-handling.md +1 -1
- package/docs/documentation/finance/acceptable-use.md +1 -6
- package/docs/documentation/finance/finance-overview.md +0 -5
- package/docs/documentation/finance/local-currency-taxes.md +0 -6
- package/docs/documentation/finance/merchant-of-record.md +0 -7
- package/docs/documentation/finance/payouts-verification.md +0 -5
- package/docs/documentation/finance/payouts.md +0 -6
- package/docs/documentation/finance/supported-countries.md +1 -6
- package/docs/documentation/go/integrate-with-encore.md +1 -8
- package/docs/documentation/go/integrate-with-go.md +1 -8
- package/docs/documentation/invoicing/handle-failed-payments.md +3 -9
- package/docs/documentation/invoicing/invoices-and-billing-cycles.md +10 -15
- package/docs/documentation/java/integrate-with-java.md +1 -5
- package/docs/documentation/nodejs/integrate-with-astro.md +1 -8
- package/docs/documentation/nodejs/integrate-with-bun.md +1 -8
- package/docs/documentation/nodejs/integrate-with-express.md +1 -8
- package/docs/documentation/nodejs/integrate-with-hono.md +1 -8
- package/docs/documentation/nodejs/integrate-with-nextjs.md +1 -8
- package/docs/documentation/nodejs/integrate-with-nuxt.md +1 -8
- package/docs/documentation/nodejs/integrate-with-remix.md +1 -8
- package/docs/documentation/nodejs/integrate-with-sveltekit.md +1 -8
- package/docs/documentation/payments/accept-one-time-payments.md +0 -8
- package/docs/documentation/payments/payment-orchestration.md +0 -6
- package/docs/documentation/payments/payment-providers.md +0 -6
- package/docs/documentation/php/integrate-with-laravel.md +1 -8
- package/docs/documentation/php/integrate-with-php.md +1 -7
- package/docs/documentation/php/integrate-with-symfony.md +1 -8
- package/docs/documentation/plans/add-ons.md +0 -8
- package/docs/documentation/plans/balance-and-top-ups.md +1 -1
- package/docs/documentation/plans/configure-features.md +1 -8
- package/docs/documentation/plans/consumption-models.md +7 -14
- package/docs/documentation/plans/create-plans.md +0 -9
- package/docs/documentation/plans/credit-packs.md +0 -7
- package/docs/documentation/plans/one-time-payments.md +36 -7
- package/docs/documentation/plans/plan-groups.md +0 -6
- package/docs/documentation/python/integrate-with-django.md +1 -8
- package/docs/documentation/python/integrate-with-fastapi.md +1 -8
- package/docs/documentation/python/integrate-with-flask.md +1 -8
- package/docs/documentation/python/integrate-with-python.md +1 -8
- package/docs/documentation/sales/introductory-offers.md +1 -9
- package/docs/documentation/sales/offers.md +0 -8
- package/docs/documentation/sales/promo-codes.md +0 -7
- package/docs/documentation/sales/promotional-offers.md +0 -7
- package/docs/documentation/sales/regional-prices.md +0 -7
- package/docs/documentation/sales/trial-periods.md +0 -8
- package/docs/documentation/sdk-reference.md +1 -1
- package/docs/documentation/subscriptions/manage-subscriptions.md +2 -9
- package/docs/documentation/subscriptions/pay-in-advance.md +161 -0
- package/docs/documentation/subscriptions/plan-grants.md +0 -6
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +1 -7
- package/docs/documentation/testing-sandbox.md +1 -1
- package/docs/documentation/usage/ai-token-billing.md +0 -6
- package/docs/documentation/usage/quota-management.md +1 -7
- package/docs/documentation/usage/seat-management.md +1 -7
- package/docs/documentation/usage/track-usage.md +1 -7
- package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +1 -1
- package/docs/knowledge-base/how-do-discounts-work.md +0 -8
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +9 -15
- package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +6 -12
- package/docs/knowledge-base/how-do-trial-periods-work.md +1 -8
- package/docs/knowledge-base/how-does-billing-work.md +1 -1
- package/docs/knowledge-base/how-does-quota-based-billing-work.md +1 -7
- package/docs/knowledge-base/how-does-seat-based-billing-work.md +1 -7
- package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +1 -7
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +2 -6
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +1 -7
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +1 -7
- package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +13 -19
- package/docs/manifest.json +8 -1
- package/docs/platform-documentation.md +1 -0
- package/docs/schemas.md +23 -13
- package/docs/webhooks/introduction.md +3 -3
- package/docs/webhooks.md +4 -4
- package/docs/webhooks.openapi.json +15 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with SvelteKit
|
|
3
|
-
description: Add billing and payments to your SvelteKit application.
|
|
3
|
+
description: Add billing and payments to your SvelteKit application with the Commet SDK, using server endpoints for subscriptions and usage.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -117,10 +117,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
117
117
|
redirect(303, portal.portalUrl)
|
|
118
118
|
}
|
|
119
119
|
```
|
|
120
|
-
|
|
121
|
-
## Related
|
|
122
|
-
|
|
123
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
124
|
-
- [Track Usage](/docs/track-usage)
|
|
125
|
-
- [Customer Portal](/docs/customer-portal)
|
|
126
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -303,11 +303,3 @@ Navigate to **Payments**. Each payment shows its status, amount, tax, customer,
|
|
|
303
303
|
- `payments.charge` requires a vaulted payment method on the customer
|
|
304
304
|
- Charges cannot be canceled
|
|
305
305
|
- A link can only be canceled while `pending`
|
|
306
|
-
|
|
307
|
-
## Related
|
|
308
|
-
|
|
309
|
-
- [One-Time Plans](/docs/one-time-payments) — One-time charges billed as a plan
|
|
310
|
-
- [Invoices and Billing Cycles](/docs/invoices-and-billing-cycles) — How invoices are generated
|
|
311
|
-
- [Manage Customers](/docs/manage-customers) — Create customers and vault payment methods
|
|
312
|
-
- [SDK Reference](/docs/sdk-reference) — Node.js SDK methods
|
|
313
|
-
- [CLI](/docs/cli#payments) — Create payment links from the terminal
|
|
@@ -34,9 +34,3 @@ If you need new traffic to use another provider, connect it and reassign the rel
|
|
|
34
34
|
**Coming soon:** reuse a saved payment method across different providers.
|
|
35
35
|
|
|
36
36
|
Today, a saved payment method belongs to the provider connection that collected it. Commet does not copy card credentials between Stripe, dLocal, and Commet, and a routing change cannot make the same vaulted method chargeable by another provider. Customers must complete a new setup or checkout on the new connection.
|
|
37
|
-
|
|
38
|
-
## Related
|
|
39
|
-
|
|
40
|
-
- [Payment Providers](/docs/payment-providers) — Connect and configure Stripe, dLocal, and Commet
|
|
41
|
-
- [Use Commet alongside your PSPs](/docs/merchant-of-record#use-commet-alongside-your-psps) — Understand the MoR boundary for each rail
|
|
42
|
-
- [Handle Failed Payments](/docs/handle-failed-payments) — Provider errors, retries, and self-serve recovery
|
|
@@ -50,9 +50,3 @@ Routing changes apply to new charges. A subscription with a saved payment method
|
|
|
50
50
|
If a connection already has payment history, Commet does not hard-delete it. Keep it connected for its existing billing history and route new countries or new customers to another provider. To move an existing customer, use a new checkout or the Customer Portal to collect a payment method on the new connection; this is a new payment-method setup, not a database migration.
|
|
51
51
|
|
|
52
52
|
See [Payment Orchestration](/docs/payment-orchestration) for country routing, defaults, and provider-bound payment methods.
|
|
53
|
-
|
|
54
|
-
## Related
|
|
55
|
-
|
|
56
|
-
- [Use Commet alongside your PSPs](/docs/merchant-of-record#use-commet-alongside-your-psps) — Understand when Commet is the MoR and when your PSP is the MoR
|
|
57
|
-
- [Handle Failed Payments](/docs/handle-failed-payments) — Retries, provider errors, and recovery paths
|
|
58
|
-
- [Testing in the Sandbox](/docs/testing-sandbox) — Test billing without live charges
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Laravel
|
|
3
|
-
description: Add billing and payments to your Laravel application.
|
|
3
|
+
description: Add billing and payments to your Laravel application with the Commet SDK, registered in a service provider.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -212,10 +212,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
212
212
|
Route::get('/billing/portal', [BillingController::class, 'portal']);
|
|
213
213
|
Route::post('/webhooks/commet', [WebhookController::class, 'handle']);
|
|
214
214
|
```
|
|
215
|
-
|
|
216
|
-
## Related
|
|
217
|
-
|
|
218
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
219
|
-
- [Track Usage](/docs/track-usage)
|
|
220
|
-
- [Customer Portal](/docs/customer-portal)
|
|
221
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with PHP
|
|
3
|
-
description:
|
|
3
|
+
description: Add billing and payments to your PHP application with the Commet SDK, installed with Composer.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -94,9 +94,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
94
94
|
|
|
95
95
|
echo json_encode(['ok' => true]);
|
|
96
96
|
```
|
|
97
|
-
|
|
98
|
-
## Related
|
|
99
|
-
|
|
100
|
-
- [Laravel](/docs/integrate-with-laravel)
|
|
101
|
-
- [Symfony](/docs/integrate-with-symfony)
|
|
102
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Symfony
|
|
3
|
-
description: Add billing and payments to your Symfony application.
|
|
3
|
+
description: Add billing and payments to your Symfony application with the Commet SDK, wired as a service in services.yaml.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -204,10 +204,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
```
|
|
207
|
-
|
|
208
|
-
## Related
|
|
209
|
-
|
|
210
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
211
|
-
- [Track Usage](/docs/track-usage)
|
|
212
|
-
- [Customer Portal](/docs/customer-portal)
|
|
213
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -246,11 +246,3 @@ Customers can self-service add-ons from the portal:
|
|
|
246
246
|
## Learn more
|
|
247
247
|
|
|
248
248
|
- [How Does Billing Work](/docs/how-does-billing-work)
|
|
249
|
-
|
|
250
|
-
## Related
|
|
251
|
-
|
|
252
|
-
- [Consumption Models](/docs/consumption-models) — Metered, Credits, and Balance explained
|
|
253
|
-
- [Configure Features](/docs/configure-features) — Define features that add-ons can unlock
|
|
254
|
-
- [Credit Packs](/docs/credit-packs) — Another way to extend plan capabilities
|
|
255
|
-
- [Manage Subscriptions](/docs/manage-subscriptions) — Subscription lifecycle and management
|
|
256
|
-
- [Customer Portal](/docs/customer-portal) — Where customers activate add-ons
|
|
@@ -9,7 +9,7 @@ The Balance consumption model gives a subscription a monetary allowance. Billabl
|
|
|
9
9
|
|
|
10
10
|
In **Plans**, choose **Balance**, set the amount included at each reset, and add billable features. Use [AI Token Billing](/docs/ai-token-billing) when model token cost and margin determine the charge.
|
|
11
11
|
|
|
12
|
-
Plan balance resets monthly for monthly, quarterly, yearly, free, and one-time plans. Weekly plans reset every seven days. Purchased top-ups do not survive the next reset.
|
|
12
|
+
Plan balance resets monthly for monthly, quarterly, semiannual, yearly, free, and one-time plans. Weekly plans reset every seven days. Purchased top-ups do not survive the next reset.
|
|
13
13
|
|
|
14
14
|
## Adjust balance without charging
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Configure Features
|
|
3
|
-
description:
|
|
3
|
+
description: Choose boolean, usage, seats or quota features, read a customer's current access, and check a consumption before you track it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Features are reusable capabilities that can be attached to several plans with different limits and prices.
|
|
@@ -325,10 +325,3 @@ $usageEvent = $commet->usage->track(
|
|
|
325
325
|
```
|
|
326
326
|
|
|
327
327
|
Use the caller-owned `eventId` for the business event when retries must deduplicate it. Request idempotency is a separate transport option that maps to `Idempotency-Key`.
|
|
328
|
-
|
|
329
|
-
## Related
|
|
330
|
-
|
|
331
|
-
- [Track Usage](/docs/track-usage)
|
|
332
|
-
- [Consumption Models](/docs/consumption-models)
|
|
333
|
-
- [Seat Management](/docs/seat-management)
|
|
334
|
-
- [Quota Management](/docs/quota-management)
|
|
@@ -62,13 +62,13 @@ Set a margin percentage instead of a fixed price. Commet looks up the model's to
|
|
|
62
62
|
|
|
63
63
|
## Comparison
|
|
64
64
|
|
|
65
|
-
| Aspect | Metered
|
|
66
|
-
| -------------------- |
|
|
67
|
-
| **When exceeded** | Overage at period end
|
|
68
|
-
| **Reset behavior** | Usage resets to 0 each period
|
|
69
|
-
| **Purchased extras** | N/A
|
|
70
|
-
| **Reset frequency** | Weekly plans reset every 7 days. Monthly, quarterly, yearly, one-time, and free plans reset monthly | Same | Same |
|
|
71
|
-
| **Customer portal** | View usage
|
|
65
|
+
| Aspect | Metered | Credits | Balance |
|
|
66
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------ | ----------------------------------------- |
|
|
67
|
+
| **When exceeded** | Overage at period end | Blocked or buy packs | Overage at period end |
|
|
68
|
+
| **Reset behavior** | Usage resets to 0 each period | Plan credits reset each period | Balance resets to plan amount each period |
|
|
69
|
+
| **Purchased extras** | N/A | Credits persist forever | Top-ups reset at period |
|
|
70
|
+
| **Reset frequency** | Weekly plans reset every 7 days. Monthly, quarterly, semiannual, yearly, one-time, and free plans reset monthly | Same | Same |
|
|
71
|
+
| **Customer portal** | View usage | Buy credit packs | Add balance (top-up) |
|
|
72
72
|
|
|
73
73
|
## Overage restrictions by plan type
|
|
74
74
|
|
|
@@ -83,10 +83,3 @@ See [Free Plans](/docs/how-do-free-plans-work-without-payment) and [Trials](/doc
|
|
|
83
83
|
## Learn more
|
|
84
84
|
|
|
85
85
|
- [How Does Billing Work](/docs/how-does-billing-work)
|
|
86
|
-
|
|
87
|
-
## Related
|
|
88
|
-
|
|
89
|
-
- [Manage Plans](/docs/create-plans) — Create plans with consumption models
|
|
90
|
-
- [Credit Packs](/docs/credit-packs) — Configure credit packages for credits-based plans
|
|
91
|
-
- [Configure Features](/docs/configure-features) — Define what customers can access
|
|
92
|
-
- [Customer Portal](/docs/customer-portal) — Where customers manage their consumption
|
|
@@ -150,12 +150,3 @@ curl https://commet.co/api/v1/plans/pln_xxx \
|
|
|
150
150
|
|
|
151
151
|
- [How Does Billing Work](/docs/how-does-billing-work)
|
|
152
152
|
- [How Do Free Plans Work Without Payment](/docs/how-do-free-plans-work-without-payment)
|
|
153
|
-
|
|
154
|
-
## Related
|
|
155
|
-
|
|
156
|
-
- [Consumption Models](/docs/consumption-models) — Metered, Credits, and Balance explained
|
|
157
|
-
- [Credit Packs](/docs/credit-packs) — Purchasable credit packages
|
|
158
|
-
- [Plan Groups](/docs/plan-groups) — Enable self-service upgrades and downgrades
|
|
159
|
-
- [Configure Features](/docs/configure-features) — Boolean, metered, and seat features
|
|
160
|
-
- [Manage Subscriptions](/docs/manage-subscriptions) — Assign plans to customers
|
|
161
|
-
- [Customer Portal](/docs/customer-portal) — Self-service billing portal
|
|
@@ -79,10 +79,3 @@ curl https://commet.co/api/v1/credit-packs \
|
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
The `price` field is in **cents** (1000 = $10.00). Prices are always in USD.
|
|
82
|
-
|
|
83
|
-
## Related
|
|
84
|
-
|
|
85
|
-
- [Consumption Models](/docs/consumption-models) — How credits-based billing works
|
|
86
|
-
- [Manage Plans](/docs/create-plans) — Create plans with consumption models
|
|
87
|
-
- [Customer Portal](/docs/customer-portal) — Where customers purchase credit packs
|
|
88
|
-
- [Configure Features](/docs/configure-features) — Define credit costs per feature
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: One-Time Payments
|
|
3
|
-
description: Sell lifetime access or
|
|
3
|
+
description: Sell lifetime access, or a period of access that never renews, with a single payment.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Commet sells a one-time purchase in two ways:
|
|
7
|
+
|
|
8
|
+
| Option | Use it for | How |
|
|
9
|
+
| ---------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------ |
|
|
10
|
+
| [Lifetime access](#create-a-one-time-subscription) | Access the customer keeps forever | A price with the `one_time` interval |
|
|
11
|
+
| [A period without renewal](#sell-a-period-without-renewal) | A month, a year, or several periods that end on their own | A recurring price with `cancelAtPeriodEnd: true` |
|
|
12
|
+
|
|
13
|
+
A one-time price charges the customer once at checkout and never bills again for the plan base. Use it for lifetime deals or any plan where recurring billing doesn't apply.
|
|
7
14
|
|
|
8
15
|
> **Note**
|
|
9
16
|
>
|
|
@@ -133,9 +140,31 @@ If there's no overage or additional charges at a billing cycle, no invoice is ge
|
|
|
133
140
|
|
|
134
141
|
In the [Customer Portal](/docs/customer-portal), one-time subscriptions display the interval as **Lifetime**. The cancel button is hidden since cancellation is not allowed. Customers can still change plans if the plan belongs to a [Plan Group](/docs/plan-groups).
|
|
135
142
|
|
|
136
|
-
##
|
|
143
|
+
## Sell a period without renewal
|
|
144
|
+
|
|
145
|
+
To sell a month, a year, or any period of access that ends on its own, create the subscription on a recurring price with `cancelAtPeriodEnd: true`. The customer pays once at checkout, and the subscription ends after the paid period without renewing with any payment method.
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
curl -X POST https://commet.co/api/v1/subscriptions \
|
|
149
|
+
-H "x-api-key: $COMMET_API_KEY" \
|
|
150
|
+
-H "commet-version: 2026-08-27" \
|
|
151
|
+
-H "Content-Type: application/json" \
|
|
152
|
+
-d '{"customerId":"user_123","planId":"pln_xxx","cancelAtPeriodEnd":true}'
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
To cover several periods in that payment, such as 6 months, add `prepaidPeriods`. [Pay in Advance](/docs/pay-in-advance) explains how each period is priced.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
curl -X POST https://commet.co/api/v1/subscriptions \
|
|
159
|
+
-H "x-api-key: $COMMET_API_KEY" \
|
|
160
|
+
-H "commet-version: 2026-08-27" \
|
|
161
|
+
-H "Content-Type: application/json" \
|
|
162
|
+
-d '{"customerId":"user_123","planId":"pln_xxx","prepaidPeriods":6,"cancelAtPeriodEnd":true}'
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
- The cancellation is scheduled from creation: the response already shows `cancelAtPeriodEnd: true` and `cancellation` before the customer pays.
|
|
166
|
+
- The purchase keeps ending even if the customer saves a card through a payment method update link, and the Customer Portal doesn't offer **Keep subscription** for it.
|
|
167
|
+
- Free trials don't combine with it. An explicit trial (`customTrialDays`, a trial Offer, or a trial Promo Code) returns `400`, the plan's automatic introductory trial is skipped, and a trial Promo Code entered at checkout is rejected.
|
|
168
|
+
- When the purchase ends, Commet emits [`subscription.canceled`](/docs/webhooks/subscription-canceled).
|
|
137
169
|
|
|
138
|
-
|
|
139
|
-
- [Manage Subscriptions](/docs/manage-subscriptions) — Full subscription lifecycle
|
|
140
|
-
- [Invoices and Billing Cycles](/docs/invoices-and-billing-cycles) — How invoicing works
|
|
141
|
-
- [Consumption Models](/docs/consumption-models) — Metered, Credits, and Balance explained
|
|
170
|
+
To make it renew, [reverse the scheduled cancellation](/docs/manage-subscriptions#reverse-a-scheduled-cancellation) through the API with `POST /v1/subscriptions/{id}/uncancel`. If the customer paid with a method Commet can't charge again, such as OXXO, and has no saved card, the request returns `409 subscription_uncancel_failed`.
|
|
@@ -22,9 +22,3 @@ This order defines the upgrade path and display order in the Customer Portal.
|
|
|
22
22
|
## Learn more
|
|
23
23
|
|
|
24
24
|
- [What Happens When a Customer Changes Plans](/docs/what-happens-when-a-customer-changes-plans)
|
|
25
|
-
|
|
26
|
-
## Related
|
|
27
|
-
|
|
28
|
-
- [Manage Plans](/docs/create-plans) — Create plans to add to groups
|
|
29
|
-
- [Upgrade and Downgrade Plans](/docs/upgrade-and-downgrade-plans) — How plan changes work
|
|
30
|
-
- [Customer Portal](/docs/customer-portal) — Where customers change plans
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Django
|
|
3
|
-
description: Add billing and payments to your Django application.
|
|
3
|
+
description: Add billing and payments to your Django application with the Commet SDK, including feature access checks and webhook verification.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -151,10 +151,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
151
151
|
path("billing/", include("billing.urls")),
|
|
152
152
|
]
|
|
153
153
|
```
|
|
154
|
-
|
|
155
|
-
## Related
|
|
156
|
-
|
|
157
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
158
|
-
- [Track Usage](/docs/track-usage)
|
|
159
|
-
- [Customer Portal](/docs/customer-portal)
|
|
160
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with FastAPI
|
|
3
|
-
description: Add billing and payments to your FastAPI application.
|
|
3
|
+
description: Add billing and payments to your FastAPI application with the Commet SDK, including feature access checks and webhook verification.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -154,10 +154,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
154
154
|
```bash
|
|
155
155
|
uvicorn main:app --port 3000
|
|
156
156
|
```
|
|
157
|
-
|
|
158
|
-
## Related
|
|
159
|
-
|
|
160
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
161
|
-
- [Track Usage](/docs/track-usage)
|
|
162
|
-
- [Customer Portal](/docs/customer-portal)
|
|
163
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Flask
|
|
3
|
-
description: Add billing and payments to your Flask application.
|
|
3
|
+
description: Add billing and payments to your Flask application with the Commet SDK, using a Blueprint for billing routes and webhooks.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -143,10 +143,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
143
143
|
if __name__ == "__main__":
|
|
144
144
|
app.run(port=3000)
|
|
145
145
|
```
|
|
146
|
-
|
|
147
|
-
## Related
|
|
148
|
-
|
|
149
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
150
|
-
- [Track Usage](/docs/track-usage)
|
|
151
|
-
- [Customer Portal](/docs/customer-portal)
|
|
152
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Python
|
|
3
|
-
description:
|
|
3
|
+
description: Add billing and payments to your Python application with the Commet SDK, installed with pip, uv or poetry.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
|
|
@@ -80,10 +80,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
80
80
|
commet.feature_access.get(code="custom_branding", customer_id="user_123")
|
|
81
81
|
commet.seats.add(customer_id="user_123", feature_code="editor", count=3)
|
|
82
82
|
```
|
|
83
|
-
|
|
84
|
-
## Related
|
|
85
|
-
|
|
86
|
-
- [Flask](/docs/integrate-with-flask)
|
|
87
|
-
- [FastAPI](/docs/integrate-with-fastapi)
|
|
88
|
-
- [Django](/docs/integrate-with-django)
|
|
89
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Introductory Offers
|
|
3
|
-
description:
|
|
3
|
+
description: Attach an existing Offer to a base plan price so Commet applies it automatically to eligible new subscriptions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
An Introductory Offer is not a separate Offer type. It is an existing Offer attached to one base plan price with introductory placement.
|
|
@@ -53,11 +53,3 @@ An explicit `offerId` applies that Offer directly instead. It cannot be combined
|
|
|
53
53
|
## Trials and compatibility fields
|
|
54
54
|
|
|
55
55
|
`trialDays`, `customTrialDays`, and `skipTrial` remain supported API shortcuts. Internally, an accepted trial is recorded as a `free_trial` phase in the Offer Application. Prefer catalog Offers when the same terms should be named, reused, inspected, or distributed consistently.
|
|
56
|
-
|
|
57
|
-
## Related
|
|
58
|
-
|
|
59
|
-
- [Offers](/docs/offers)
|
|
60
|
-
- [Promotional Offers](/docs/promotional-offers)
|
|
61
|
-
- [Promo Codes](/docs/promo-codes)
|
|
62
|
-
- [Trial Periods](/docs/trial-periods)
|
|
63
|
-
- [Manage Subscriptions](/docs/manage-subscriptions)
|
|
@@ -54,11 +54,3 @@ When Commet quotes or applies an Offer, it records an immutable Offer Applicatio
|
|
|
54
54
|
Editing, deactivating, or archiving the catalog Offer affects future applications only. Existing applications remain available for billing and audit.
|
|
55
55
|
|
|
56
56
|
The v9 response is target-aware (`plan_price`, `addon`, or `credit_pack`) so new purchase surfaces do not require another breaking response change. Current public subscription, Introductory, direct, and Promo Code flows create `plan_price` applications.
|
|
57
|
-
|
|
58
|
-
## Related
|
|
59
|
-
|
|
60
|
-
- [Introductory Offers](/docs/introductory-offers)
|
|
61
|
-
- [Promotional Offers](/docs/promotional-offers)
|
|
62
|
-
- [Promo Codes](/docs/promo-codes)
|
|
63
|
-
- [Trial Periods](/docs/trial-periods)
|
|
64
|
-
- [Offers API reference](/docs/api-reference/offers/list-offers)
|
|
@@ -70,10 +70,3 @@ await commet.subscriptions.create({
|
|
|
70
70
|
promoCode: 'LAUNCH50',
|
|
71
71
|
})
|
|
72
72
|
```
|
|
73
|
-
|
|
74
|
-
## Related
|
|
75
|
-
|
|
76
|
-
- [Offers](/docs/offers)
|
|
77
|
-
- [Promotional Offers](/docs/promotional-offers)
|
|
78
|
-
- [Introductory Offers](/docs/introductory-offers)
|
|
79
|
-
- [Manage Subscriptions](/docs/manage-subscriptions)
|
|
@@ -65,10 +65,3 @@ The same operation on a subscription with a pending payment checkout quotes or r
|
|
|
65
65
|
Use direct `offerId` when your application decides who receives the terms. Use a Promo Code when the customer should enter a code and the campaign needs redemption restrictions.
|
|
66
66
|
|
|
67
67
|
A Promo Code can distribute multiple discount phases, including `fixed_price`, and can begin with a trial when a discount follows it. A trial-only Offer remains available for direct application.
|
|
68
|
-
|
|
69
|
-
## Related
|
|
70
|
-
|
|
71
|
-
- [Offers](/docs/offers)
|
|
72
|
-
- [Introductory Offers](/docs/introductory-offers)
|
|
73
|
-
- [Promo Codes](/docs/promo-codes)
|
|
74
|
-
- [Manage Subscriptions](/docs/manage-subscriptions)
|
|
@@ -90,10 +90,3 @@ Accepted Offer phases are a separate immutable snapshot; the selected catalog pr
|
|
|
90
90
|
## v8 compatibility
|
|
91
91
|
|
|
92
92
|
API `2026-07-24` and SDK v8 keep `/pricing/market-groups` and `commet.pricing.*`. API `2026-07-31` and SDK v9 use the top-level Market surface.
|
|
93
|
-
|
|
94
|
-
## Related
|
|
95
|
-
|
|
96
|
-
- [Offers](/docs/offers)
|
|
97
|
-
- [Create Plans](/docs/create-plans)
|
|
98
|
-
- [Manage Subscriptions](/docs/manage-subscriptions)
|
|
99
|
-
- [Markets API reference](/docs/api-reference/markets/list-markets)
|
|
@@ -78,11 +78,3 @@ The customer provides a payment method during checkout but is not charged immedi
|
|
|
78
78
|
4. any following Offer phase becomes active.
|
|
79
79
|
|
|
80
80
|
Accepted Offer phases remain immutable, but the selected catalog price does not. If the price changes during the trial, the first paid charge uses the current value of the selected price.
|
|
81
|
-
|
|
82
|
-
## Related
|
|
83
|
-
|
|
84
|
-
- [Offers](/docs/offers)
|
|
85
|
-
- [Introductory Offers](/docs/introductory-offers)
|
|
86
|
-
- [Promotional Offers](/docs/promotional-offers)
|
|
87
|
-
- [How trial periods work](/docs/how-do-trial-periods-work)
|
|
88
|
-
- [Handle Failed Payments](/docs/handle-failed-payments)
|
|
@@ -112,6 +112,8 @@ The normal path needs only `customerId` and either `planCode` or `planId`. Optio
|
|
|
112
112
|
|
|
113
113
|
Omitting `priceId` preserves default price and Market resolution. Omitting `offerId` preserves automatic Introductory Offer selection.
|
|
114
114
|
|
|
115
|
+
To charge several billing periods in the first payment, see [Pay in Advance](/docs/pay-in-advance). To sell a period that doesn't renew, see [One-Time Payments](/docs/one-time-payments#sell-a-period-without-renewal).
|
|
116
|
+
|
|
115
117
|
A compatible `pending_payment` checkout may be reused. An incompatible pending selection can be replaced without duplicating a paid subscription.
|
|
116
118
|
|
|
117
119
|
Omitting a `promoCode` or `offerId` that the pending checkout carries, including an Offer assigned through `PUT /subscriptions/{id}/offer`, replaces it with a new subscription and checkout without that benefit. Redirect to the returned `checkoutUrl`; the previous link stops working. To keep the Offer, send it again or assign it to the returned subscription ID.
|
|
@@ -596,12 +598,3 @@ Automatic dunning retries are anchored to the original decline on days 1, 3, 5,
|
|
|
596
598
|
The same `reactivate` operation charges the saved payment method, reuses the subscription record, and starts a fresh period anchored to the reactivation date. You may pass an `offerId`; accepted phases are persisted as an immutable Offer Application.
|
|
597
599
|
|
|
598
600
|
The selected price is not snapshotted. Future renewals use its current catalog value. Archiving that price prevents new selection but does not break the existing subscription.
|
|
599
|
-
|
|
600
|
-
## Related
|
|
601
|
-
|
|
602
|
-
- [Grant Temporary Plan Access](/docs/plan-grants)
|
|
603
|
-
- [Upgrade and Downgrade Plans](/docs/upgrade-and-downgrade-plans)
|
|
604
|
-
- [Handle Failed Payments](/docs/handle-failed-payments)
|
|
605
|
-
- [Regional and Market Pricing](/docs/regional-prices)
|
|
606
|
-
- [Introductory Offers](/docs/introductory-offers)
|
|
607
|
-
- [Customer Portal](/docs/customer-portal)
|