@commet/node 9.6.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 +51 -12
- package/dist/index.d.ts +51 -12
- 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/subscriptions.md +26 -1
- package/docs/documentation/better-auth.md +1 -8
- 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 +0 -6
- 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/configure-features.md +1 -8
- package/docs/documentation/plans/consumption-models.md +0 -7
- 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-discounts-work.md +0 -8
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +1 -7
- package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +0 -6
- 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 +0 -6
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +0 -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 +1 -7
- package/docs/manifest.json +8 -1
- package/docs/platform-documentation.md +1 -0
- package/docs/schemas.md +13 -4
- 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: Commet Skills
|
|
3
|
-
description:
|
|
3
|
+
description: Install Commet Agent Skills with one command so coding agents such as Claude Code and Cursor know the SDK, pricing models and billing patterns.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Agent Skills give AI agents modular billing capabilities — SDK integration, pricing models, subscription patterns, and billing best practices. Install all skills with a single command.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: MCP Server
|
|
3
|
-
description:
|
|
3
|
+
description: Connect Cursor, Claude Code or Claude Desktop to the Commet MCP server and manage billing with a tool for every API operation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## What is an MCP Server?
|
|
@@ -23,7 +23,7 @@ Use this reference for the exact resources, methods, parameters, and return type
|
|
|
23
23
|
- [Portal](./portal.md) — 1 operations
|
|
24
24
|
- [Promo Codes](./promo-codes.md) — 4 operations
|
|
25
25
|
- [Seats](./seats.md) — 6 operations
|
|
26
|
-
- [Subscriptions](./subscriptions.md) —
|
|
26
|
+
- [Subscriptions](./subscriptions.md) — 23 operations
|
|
27
27
|
- [Test Clock](./test-clock.md) — 3 operations
|
|
28
28
|
- [Transactions](./transactions.md) — 4 operations
|
|
29
29
|
- [Usage](./usage.md) — 3 operations
|
|
@@ -254,7 +254,7 @@ Revoke a pause before it becomes effective. Active pauses must be resumed instea
|
|
|
254
254
|
|
|
255
255
|
`POST /subscriptions/{id}/payment-method/update` · operation `update-payment-method`
|
|
256
256
|
|
|
257
|
-
Creates a hosted checkout
|
|
257
|
+
Creates a hosted checkout to update the payment method of an active, trialing or past_due subscription. Pending-payment subscriptions must use their payment checkout.
|
|
258
258
|
|
|
259
259
|
### Parameters
|
|
260
260
|
|
|
@@ -269,6 +269,29 @@ Creates a hosted checkout session for the customer to update the subscription's
|
|
|
269
269
|
|
|
270
270
|
`PaymentMethodUpdateCheckout`
|
|
271
271
|
|
|
272
|
+
## createPrepaidPeriodsCheckout
|
|
273
|
+
|
|
274
|
+
`commet.subscriptions.createPrepaidPeriodsCheckout(params, options?)`
|
|
275
|
+
|
|
276
|
+
`POST /subscriptions/{id}/prepaid-periods` · operation `create-prepaid-periods-checkout`
|
|
277
|
+
|
|
278
|
+
Creates a hosted checkout to pay billing periods of a recurring subscription in advance with any payment method. On an active subscription the paid periods start after the last paid period and replace any open prepaid-periods checkout. On a pending-payment subscription the first payment covers the requested periods and replaces its pending checkout. The billing interval does not change.
|
|
279
|
+
|
|
280
|
+
### Parameters
|
|
281
|
+
|
|
282
|
+
- `id` (`string`, required)
|
|
283
|
+
- `periods` (`number`, required) — Active subscriptions: billing periods to add after the last paid period. Pending-payment subscriptions: total billing periods the first payment covers, including the current one.
|
|
284
|
+
- `offerId` (`string`, optional) — Offer applied from the first added period for its full configured duration. Active subscriptions only; assign an Offer to a pending-payment subscription with PUT /subscriptions/{id}/offer.
|
|
285
|
+
- `successUrl` (`string`, optional)
|
|
286
|
+
|
|
287
|
+
### Request options
|
|
288
|
+
|
|
289
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
290
|
+
|
|
291
|
+
### Returns
|
|
292
|
+
|
|
293
|
+
`PrepaidPeriodsCheckout`
|
|
294
|
+
|
|
272
295
|
## previewChange
|
|
273
296
|
|
|
274
297
|
`commet.subscriptions.previewChange(params, options?)`
|
|
@@ -440,6 +463,8 @@ Create a subscription for a customer. Commet selects the default price when pric
|
|
|
440
463
|
- `name` (`string`, optional)
|
|
441
464
|
- `startDate` (`string`, optional)
|
|
442
465
|
- `successUrl` (`string`, optional)
|
|
466
|
+
- `prepaidPeriods` (`number`, optional) — Billing periods of the subscription's interval paid with the first payment, including the current one. Defaults to 1. The interval does not change: each paid period renews at zero and the subscription renews normally after the last one unless `cancelAtPeriodEnd` is true.
|
|
467
|
+
- `cancelAtPeriodEnd` (`boolean`, optional) — Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method.
|
|
443
468
|
- `offerId` (`string`, optional)
|
|
444
469
|
- `promoCode` (`string`, optional)
|
|
445
470
|
- `customTrialDays` (`number`, optional)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Better Auth
|
|
3
|
-
description:
|
|
3
|
+
description: Use the @commet/better-auth plugin to create Commet customers on signup and manage subscriptions, usage and seats from Better Auth.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
[Better Auth](https://better-auth.com) is a modern authentication library for TypeScript. This plugin integrates Commet directly into your Better Auth setup.
|
|
@@ -351,10 +351,3 @@ Configure the webhook endpoint in your Commet dashboard: `/api/auth/commet/webho
|
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
353
|
```
|
|
354
|
-
|
|
355
|
-
## Related
|
|
356
|
-
|
|
357
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
358
|
-
- [Usage Events](/docs/track-usage)
|
|
359
|
-
- [Seat Management](/docs/seat-management)
|
|
360
|
-
- [Customer Portal](/docs/customer-portal)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Customer Portal
|
|
3
|
-
description: Self-service
|
|
3
|
+
description: Self-service page where customers change plans, view usage, buy credits and see invoices, with a fresh portal URL generated on each visit.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Self-service page where customers manage their subscription, view usage, change plans, and purchase credits. Automatically created with every subscription.
|
|
@@ -111,9 +111,3 @@ export const GET = CustomerPortal({
|
|
|
111
111
|
Serve the portal from your own domain (e.g., `billing.acme.com`) instead of `commet.co`. Go to **Settings** → **Custom Domains**, add the domain, and point the DNS records shown — portal links use your domain once it verifies.
|
|
112
112
|
|
|
113
113
|
Each custom domain serves one surface: **portal** or **checkout**. Checkout pages support custom domains the same way.
|
|
114
|
-
|
|
115
|
-
## Related
|
|
116
|
-
|
|
117
|
-
- [Manage Subscriptions](/docs/manage-subscriptions)
|
|
118
|
-
- [Plan Groups](/docs/plan-groups)
|
|
119
|
-
- [Credit Packs](/docs/credit-packs)
|
|
@@ -337,9 +337,3 @@ $customersListResult = $commet->customers->list();
|
|
|
337
337
|
Lists return `{ object, data, hasMore, nextCursor }`. Pass `nextCursor` back as `cursor` to request the next page. Singular customer operations return the customer directly.
|
|
338
338
|
|
|
339
339
|
See the [Customers API reference](/docs/api-reference/customers/list-customers) for the exact generated request and response fields.
|
|
340
|
-
|
|
341
|
-
## Related
|
|
342
|
-
|
|
343
|
-
- [Customer Portal](/docs/customer-portal)
|
|
344
|
-
- [Manage Subscriptions](/docs/manage-subscriptions)
|
|
345
|
-
- [Offers & Pricing changelog and migration checklist](https://commet.co/changelog/offers-and-pricing)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Error Handling
|
|
3
|
-
description:
|
|
3
|
+
description: Catch typed API and validation errors in each Commet SDK, configure automatic retries, and keep usage tracking from blocking requests.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Error Classes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Acceptable Use Policy
|
|
3
|
-
description:
|
|
3
|
+
description: Which products can be sold through Commet-managed payments, which categories need manual review, and which cannot use them.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Commet acts as Merchant of Record for transactions processed through Commet-managed payment connections. This policy defines which products we can support on that payment rail. Customer-owned payment connections remain subject to their provider's own rules and do not make a product eligible for Commet-managed processing.
|
|
@@ -137,8 +137,3 @@ Viewer ratings, mature themes, romance, adult situations, or genre labels do not
|
|
|
137
137
|
This policy incorporates applicable payment-provider requirements, including [Stripe's prohibited and restricted businesses](https://stripe.com/legal/restricted-businesses) and [dLocal's restricted and prohibited activities](https://www.dlocal.com/legal/terms-and-conditions/). Provider approval for a restricted category must be documented in writing; an internal Commet approval cannot replace it.
|
|
138
138
|
|
|
139
139
|
The lists above are representative rather than exhaustive. Commet may review, suspend, or stop processing when new evidence shows illegal, misleading, unsupported, or materially different activity.
|
|
140
|
-
|
|
141
|
-
## Related
|
|
142
|
-
|
|
143
|
-
- [Merchant of Record](/docs/merchant-of-record) — How Commet handles taxes and compliance as your MoR
|
|
144
|
-
- [Finance Overview](/docs/finance-overview) — Balances, payouts, and transaction history
|
|
@@ -24,8 +24,3 @@ Once verified, request payouts of $10 or more. Money reaches your bank account i
|
|
|
24
24
|
## Transaction history
|
|
25
25
|
|
|
26
26
|
Every payment, payout, and status change is recorded as a transaction. Use the finance dashboard to view incoming payments from subscriptions and credit purchases, outgoing payouts, and real-time status updates.
|
|
27
|
-
|
|
28
|
-
## Related
|
|
29
|
-
|
|
30
|
-
- [Account Verification](/docs/payouts-verification) — Get verified to withdraw money
|
|
31
|
-
- [Merchant of Record](/docs/merchant-of-record) — How Commet handles taxes and compliance
|
|
@@ -31,9 +31,3 @@ Rates and rules change frequently and vary by bank, card type, and local regulat
|
|
|
31
31
|
- **Refunds don't include bank taxes.** If you refund a payment, Commet returns the amount it charged. Tax perceptions are refunded (or credited) by the customer's bank or tax authority under local rules.
|
|
32
32
|
|
|
33
33
|
If a customer asks about an unexpected extra charge, direct them to their card issuer — the bank can confirm which tax was applied and how to claim it back where local rules allow it.
|
|
34
|
-
|
|
35
|
-
## Related
|
|
36
|
-
|
|
37
|
-
- [Regional Prices](/docs/regional-prices) — Let customers pay in their own currency
|
|
38
|
-
- [Merchant of Record](/docs/merchant-of-record) — How Commet handles taxes and compliance on your behalf
|
|
39
|
-
- [Supported Countries](/docs/supported-countries) — Where Commet operates
|
|
@@ -38,10 +38,3 @@ See [Payment Providers](/docs/payment-providers) to connect your accounts and [P
|
|
|
38
38
|
We believe the best companies of the future will be small teams of 5 to 30 people. Technology enables small teams to build incredible products, but monetization complexity shouldn't be a barrier.
|
|
39
39
|
|
|
40
40
|
Commet exists to be the simplest, developer-preferred tool for monetization. We don't aim to solve every use case — we want to be the tool small teams choose when they want to monetize simply, globally, and without hassle.
|
|
41
|
-
|
|
42
|
-
## Related
|
|
43
|
-
|
|
44
|
-
- [Finance Overview](/docs/finance-overview) — Balances, payouts, and transaction history
|
|
45
|
-
- [Acceptable Use Policy](/docs/acceptable-use) — What products and services can be sold through Commet
|
|
46
|
-
- [Supported Countries](/docs/supported-countries) — 112 countries where Commet operates
|
|
47
|
-
- [Payment Providers](/docs/payment-providers) — Connect Commet, Stripe, and dLocal payment rails
|
|
@@ -182,8 +182,3 @@ curl -X POST https://commet.co/api/v1/payouts \
|
|
|
182
182
|
-H "Content-Type: application/json" \
|
|
183
183
|
-d '{"amount": 50000, "description": "March payout"}'
|
|
184
184
|
```
|
|
185
|
-
|
|
186
|
-
## Related
|
|
187
|
-
|
|
188
|
-
- [Finance Overview](/docs/finance-overview) — Balances, payouts, and transaction history
|
|
189
|
-
- [Merchant of Record](/docs/merchant-of-record) — How Commet handles taxes and compliance
|
|
@@ -32,9 +32,3 @@ Navigate to **Payouts**. Add your bank accounts, then click **Withdraw funds** t
|
|
|
32
32
|
- Only the **Available** balance can be withdrawn — Pending funds cannot.
|
|
33
33
|
- Account verification is required before the first payout.
|
|
34
34
|
- Money reaches your bank account in **up to 7 business days**.
|
|
35
|
-
|
|
36
|
-
## Related
|
|
37
|
-
|
|
38
|
-
- [Account Verification](/docs/payouts-verification) — Get verified to withdraw money
|
|
39
|
-
- [Finance Overview](/docs/finance-overview) — Balances, payouts, and transaction history
|
|
40
|
-
- [Merchant of Record](/docs/merchant-of-record) — How Commet handles taxes and compliance
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Supported Countries
|
|
3
|
-
description:
|
|
3
|
+
description: Commet supports businesses in 112 countries across the Americas, Europe, Asia and Pacific, and Africa, and your country sets your payout currency.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Commet supports businesses in 112 countries across all major regions. Your country is set during onboarding and determines your payout currency and compliance requirements.
|
|
@@ -20,8 +20,3 @@ Armenia, Australia, Azerbaijan, Bahrain, Bangladesh, Bhutan, Brunei, Cambodia, H
|
|
|
20
20
|
## Africa
|
|
21
21
|
|
|
22
22
|
Algeria, Angola, Benin, Botswana, Côte d’Ivoire, Egypt, Ethiopia, Gabon, Gambia, Ghana, Kenya, Mauritius, Morocco, Mozambique, Namibia, Niger, Nigeria, Rwanda, Senegal, South Africa, Tanzania, Tunisia
|
|
23
|
-
|
|
24
|
-
## Related
|
|
25
|
-
|
|
26
|
-
- [Finance Overview](/docs/finance-overview) — How money flows through Commet
|
|
27
|
-
- [Account Verification](/docs/payouts-verification) — Get verified to withdraw money
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Encore
|
|
3
|
-
description: Add billing and payments to your Encore application.
|
|
3
|
+
description: Add billing and payments to your Encore application with the Commet SDK, with API keys stored in Encore secrets.
|
|
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.
|
|
@@ -219,10 +219,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
219
219
|
```bash
|
|
220
220
|
encore run
|
|
221
221
|
```
|
|
222
|
-
|
|
223
|
-
## Related
|
|
224
|
-
|
|
225
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
226
|
-
- [Track Usage](/docs/track-usage)
|
|
227
|
-
- [Customer Portal](/docs/customer-portal)
|
|
228
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Go
|
|
3
|
-
description: Add billing and payments to your Go application
|
|
3
|
+
description: Add billing and payments to your Go application with the Commet SDK and net/http, including 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.
|
|
@@ -248,10 +248,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
248
248
|
log.Fatal(http.ListenAndServe(":3000", mux))
|
|
249
249
|
}
|
|
250
250
|
```
|
|
251
|
-
|
|
252
|
-
## Related
|
|
253
|
-
|
|
254
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
255
|
-
- [Track Usage](/docs/track-usage)
|
|
256
|
-
- [Customer Portal](/docs/customer-portal)
|
|
257
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -204,7 +204,7 @@ const recovery = await commet.subscriptions.createRecoveryLink({ id: 'sub_123' }
|
|
|
204
204
|
|
|
205
205
|
### Update the payment method
|
|
206
206
|
|
|
207
|
-
`updatePaymentMethod` returns a hosted checkout where the customer updates the subscription's default payment method.
|
|
207
|
+
`updatePaymentMethod` returns a hosted checkout where the customer updates the subscription's default payment method. It works for `active`, `trialing`, and `past_due` subscriptions.
|
|
208
208
|
|
|
209
209
|
```typescript
|
|
210
210
|
const paymentMethodUpdate = await commet.subscriptions.updatePaymentMethod({
|
|
@@ -215,6 +215,8 @@ const paymentMethodUpdate = await commet.subscriptions.updatePaymentMethod({
|
|
|
215
215
|
// redirect(paymentMethodUpdate.checkoutUrl)
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
+
For a `pending_payment` subscription it returns `409` with `subscription_not_active`, as for any other status. After a first failed charge, the customer pays through the subscription's payment checkout instead: the `recoveryUrl` on the [`payment.failed` webhook](/docs/webhooks/payment-failed).
|
|
219
|
+
|
|
218
220
|
## Self-serve recovery
|
|
219
221
|
|
|
220
222
|
Customers in `past_due` see their subscription in the [Customer Portal](/docs/customer-portal) with a **Reactivate Subscription** button. They can choose:
|
|
@@ -278,11 +280,3 @@ curl -X POST https://commet.co/api/v1/portal/request-access \
|
|
|
278
280
|
-H "Content-Type: application/json" \
|
|
279
281
|
-d '{"customerId": "user_123"}'
|
|
280
282
|
```
|
|
281
|
-
|
|
282
|
-
## Related
|
|
283
|
-
|
|
284
|
-
- [Invoices and Billing Cycles](/docs/invoices-and-billing-cycles) — Invoice types and charge timing
|
|
285
|
-
- [Manage Subscriptions](/docs/manage-subscriptions) — Create and manage customer subscriptions
|
|
286
|
-
- [Customer Portal](/docs/customer-portal) — Self-service billing portal for customers
|
|
287
|
-
- [Payment Providers](/docs/payment-providers) — How Commet routes payments through Commet, Stripe, or dLocal
|
|
288
|
-
- [Payment Orchestration](/docs/payment-orchestration) — Country routing, defaults, and provider-bound payment methods
|
|
@@ -65,9 +65,3 @@ For quarterly, semiannual, and yearly plans, overage is calculated and invoiced
|
|
|
65
65
|
|
|
66
66
|
- [What Invoices Do Customers Receive and When](/docs/what-invoices-do-customers-receive-and-when)
|
|
67
67
|
- [How Do Monthly, Quarterly, and Yearly Billing Work](/docs/how-do-monthly-quarterly-and-yearly-billing-work)
|
|
68
|
-
|
|
69
|
-
## Related
|
|
70
|
-
|
|
71
|
-
- [Handle Failed Payments](/docs/handle-failed-payments) — Retry flow and grace periods for failed charges
|
|
72
|
-
- [Consumption Models](/docs/consumption-models) — Metered, Credits, and Balance explained
|
|
73
|
-
- [Finance Overview](/docs/finance-overview) — How money flows through Commet
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Java
|
|
3
|
-
description:
|
|
3
|
+
description: Add billing and payments to your Java application with the Commet SDK, installed with Maven or Gradle.
|
|
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.
|
|
@@ -110,7 +110,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
110
110
|
// handle activation
|
|
111
111
|
}
|
|
112
112
|
```
|
|
113
|
-
|
|
114
|
-
## Related
|
|
115
|
-
|
|
116
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Astro
|
|
3
|
-
description: Add billing and payments to your Astro application.
|
|
3
|
+
description: Add billing and payments to your Astro application with the Commet SDK, using API routes to subscribe customers and track 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.
|
|
@@ -119,10 +119,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
119
119
|
return redirect(portal.portalUrl)
|
|
120
120
|
}
|
|
121
121
|
```
|
|
122
|
-
|
|
123
|
-
## Related
|
|
124
|
-
|
|
125
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
126
|
-
- [Track Usage](/docs/track-usage)
|
|
127
|
-
- [Customer Portal](/docs/customer-portal)
|
|
128
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Bun
|
|
3
|
-
description: Add billing and payments to your Bun application.
|
|
3
|
+
description: Add billing and payments to your Bun application with the Commet SDK, from subscriptions and feature access to the customer portal.
|
|
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.
|
|
@@ -103,10 +103,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
103
103
|
return Response.redirect(portal.portalUrl)
|
|
104
104
|
}
|
|
105
105
|
```
|
|
106
|
-
|
|
107
|
-
## Related
|
|
108
|
-
|
|
109
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
110
|
-
- [Track Usage](/docs/track-usage)
|
|
111
|
-
- [Customer Portal](/docs/customer-portal)
|
|
112
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Express
|
|
3
|
-
description: Add billing and payments to your Express application.
|
|
3
|
+
description: Add billing and payments to your Express application with the Commet SDK, using a router to subscribe customers and track 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
|
|
|
118
118
|
app.listen(3000)
|
|
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)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Hono
|
|
3
|
-
description: Add billing and payments to your Hono application.
|
|
3
|
+
description: Add billing and payments to your Hono application with the Commet SDK, running on Node.js or Bun.
|
|
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.
|
|
@@ -131,10 +131,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
131
131
|
|
|
132
132
|
export default app
|
|
133
133
|
```
|
|
134
|
-
|
|
135
|
-
## Related
|
|
136
|
-
|
|
137
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
138
|
-
- [Track Usage](/docs/track-usage)
|
|
139
|
-
- [Customer Portal](/docs/customer-portal)
|
|
140
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Next.js
|
|
3
|
-
description: Add billing and payments to your Next.js application.
|
|
3
|
+
description: Add billing and payments to your Next.js application with the Commet SDK, using server actions and a customer portal route.
|
|
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.
|
|
@@ -108,10 +108,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
108
108
|
```tsx
|
|
109
109
|
<a href="/api/commet/portal">Manage Billing</a>
|
|
110
110
|
```
|
|
111
|
-
|
|
112
|
-
## Related
|
|
113
|
-
|
|
114
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
115
|
-
- [Track Usage](/docs/track-usage)
|
|
116
|
-
- [Customer Portal](/docs/customer-portal)
|
|
117
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Nuxt
|
|
3
|
-
description: Add billing and payments to your Nuxt application.
|
|
3
|
+
description: Add billing and payments to your Nuxt application with the Commet SDK, using server API routes 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.
|
|
@@ -115,10 +115,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
115
115
|
return sendRedirect(event, portal.portalUrl)
|
|
116
116
|
})
|
|
117
117
|
```
|
|
118
|
-
|
|
119
|
-
## Related
|
|
120
|
-
|
|
121
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
122
|
-
- [Track Usage](/docs/track-usage)
|
|
123
|
-
- [Customer Portal](/docs/customer-portal)
|
|
124
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Integrate with Remix
|
|
3
|
-
description: Add billing and payments to your Remix application.
|
|
3
|
+
description: Add billing and payments to your Remix application with the Commet SDK, using actions and loaders 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.
|
|
@@ -126,10 +126,3 @@ npx skills add commet-labs/skills --skill commet
|
|
|
126
126
|
return redirect(portal.portalUrl)
|
|
127
127
|
}
|
|
128
128
|
```
|
|
129
|
-
|
|
130
|
-
## Related
|
|
131
|
-
|
|
132
|
-
- [Subscriptions](/docs/manage-subscriptions)
|
|
133
|
-
- [Track Usage](/docs/track-usage)
|
|
134
|
-
- [Customer Portal](/docs/customer-portal)
|
|
135
|
-
- [SDK Reference](/docs/sdk-reference)
|
|
@@ -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
|
|
@@ -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)
|
|
@@ -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
|