@commet/node 9.6.0 → 9.8.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 +258 -51
- package/dist/index.d.ts +258 -51
- package/dist/index.js +47 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -11
- package/dist/index.mjs.map +1 -1
- package/docs/ai-onboarding/commet-skill.md +1 -1
- package/docs/ai-onboarding/mcp-server.md +2 -2
- package/docs/api-reference/customers.md +4 -2
- package/docs/api-reference/index.md +2 -2
- package/docs/api-reference/offers.md +2 -2
- package/docs/api-reference/plans.md +9 -1
- package/docs/api-reference/promo-codes.md +3 -1
- package/docs/api-reference/subscriptions.md +106 -8
- package/docs/api-reference/usage.md +0 -4
- 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/errors/customer_deleted.md +22 -0
- package/docs/errors/index.md +4 -0
- package/docs/errors/managed_by_integration.md +22 -0
- package/docs/errors/no_scheduled_plan_change.md +22 -0
- package/docs/errors/plan_credit_limit_reached.md +22 -0
- 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 +51 -2
- package/docs/platform-documentation.md +1 -0
- package/docs/schemas.md +46 -8
- package/docs/webhooks/introduction.md +3 -3
- package/docs/webhooks.md +15 -15
- 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?
|
|
@@ -199,7 +199,7 @@ The following Commet-specific tools remain available:
|
|
|
199
199
|
| `get_current_organization` | Get the organization used by API tools |
|
|
200
200
|
| `search_docs` | Search the live Commet documentation by semantic query |
|
|
201
201
|
|
|
202
|
-
The previous
|
|
202
|
+
The previous endpoint, `https://commet.co/mcp`, is retired. It no longer exposes tools: it tells the connected agent to reconnect at `https://commet.co/mcp/v2`. Replace the URL in your client configuration and sign in again.
|
|
203
203
|
|
|
204
204
|
> **Warning**
|
|
205
205
|
>
|
|
@@ -213,11 +213,12 @@ Update a customer's name, external ID, or metadata.
|
|
|
213
213
|
|
|
214
214
|
`POST /customers/batch` · operation `batch-create-customers`
|
|
215
215
|
|
|
216
|
-
Create up to 100 customers in a single request.
|
|
216
|
+
Create up to 100 customers in a single request. With planGroupId, each customer without an open subscription starts on that group's starting plan (see planGroupId), and the entry of a deleted customer fails with customer_deleted.
|
|
217
217
|
|
|
218
218
|
### Parameters
|
|
219
219
|
|
|
220
220
|
- `customers` (`Array<{ email: string; id?: string; externalId?: string; fullName?: string; taxDocument?: string; timezone?: Timezone; metadata?: Record<string, unknown>; address?: { line1: string; line2?: string; city: string; state?: string; postalCode: string; country: string; region?: string } }>`, required)
|
|
221
|
+
- `planGroupId` (`string`, optional) — Plan group whose starting plan the customer starts on when it has no open subscription: its signup trial, a trial without a payment method, when the group has one and the customer never had that plan, otherwise its default plan. A customer who already had the signup trial plan in a group without a default plan starts on none. Without it, no plan is assigned.
|
|
221
222
|
|
|
222
223
|
### Request options
|
|
223
224
|
|
|
@@ -251,7 +252,7 @@ List customers with cursor-based pagination.
|
|
|
251
252
|
|
|
252
253
|
`POST /customers` · operation `create-customer`
|
|
253
254
|
|
|
254
|
-
Create a new customer. Idempotent when customerId is provided.
|
|
255
|
+
Create a new customer. Idempotent when customerId is provided. With planGroupId, a customer without an open subscription starts on that group's starting plan (see planGroupId), and the externalId of a deleted customer is rejected.
|
|
255
256
|
|
|
256
257
|
### Parameters
|
|
257
258
|
|
|
@@ -264,6 +265,7 @@ Create a new customer. Idempotent when customerId is provided.
|
|
|
264
265
|
- `email` (`string`, required)
|
|
265
266
|
- `timezone` (`Timezone`, optional)
|
|
266
267
|
- `metadata` (`Record<string, unknown>`, optional)
|
|
268
|
+
- `planGroupId` (`string`, optional) — Plan group whose starting plan the customer starts on when it has no open subscription: its signup trial, a trial without a payment method, when the group has one and the customer never had that plan, otherwise its default plan. A customer who already had the signup trial plan in a group without a default plan starts on none. Without it, no plan is assigned.
|
|
267
269
|
|
|
268
270
|
### Request options
|
|
269
271
|
|
|
@@ -5,7 +5,7 @@ Generated from Commet API version `2026-08-27`.
|
|
|
5
5
|
Use this reference for the exact resources, methods, parameters, and return types available in the installed SDK.
|
|
6
6
|
|
|
7
7
|
- [Schemas](../schemas.md) — generated models and enums
|
|
8
|
-
- [API errors](../errors/index.md) —
|
|
8
|
+
- [API errors](../errors/index.md) — 87 version-matched error references
|
|
9
9
|
- [Addons](./addons.md) — 6 operations
|
|
10
10
|
- [Api Keys](./api-keys.md) — 3 operations
|
|
11
11
|
- [Provisioning](./provisioning.md) — 1 operations
|
|
@@ -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) — 26 operations
|
|
27
27
|
- [Test Clock](./test-clock.md) — 3 operations
|
|
28
28
|
- [Transactions](./transactions.md) — 4 operations
|
|
29
29
|
- [Usage](./usage.md) — 3 operations
|
|
@@ -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: "
|
|
33
|
+
- `phases` (`Array<{ 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: "
|
|
92
|
+
- `phases` (`Array<{ 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)
|
|
@@ -148,6 +148,7 @@ Update a base price or market price variant. Removing a base market override is
|
|
|
148
148
|
- `price` (`number`, optional)
|
|
149
149
|
- `isDefault` (`boolean`, optional)
|
|
150
150
|
- `trialDays` (`number`, optional)
|
|
151
|
+
- `trialRequiresPaymentMethod` (`boolean`, optional) — Set to false so the price's free trial starts without a payment method. Requires trialDays on the price.
|
|
151
152
|
- `includedBalance` (`number | null`, optional)
|
|
152
153
|
- `includedCredits` (`number | null`, optional)
|
|
153
154
|
- `metadata` (`Record<string, unknown>`, optional) — Metadata keys to merge into the existing price metadata.
|
|
@@ -193,6 +194,7 @@ Add a base price or a selectable market price variant. Variants inherit their ba
|
|
|
193
194
|
- `metadata` (`Record<string, unknown>`, optional)
|
|
194
195
|
- `price` (`number`, optional)
|
|
195
196
|
- `trialDays` (`number`, optional)
|
|
197
|
+
- `trialRequiresPaymentMethod` (`boolean`, optional) — Set to false so the price's free trial starts without a payment method. Requires trialDays on the price.
|
|
196
198
|
- `isDefault` (`boolean`, optional)
|
|
197
199
|
- `includedBalance` (`number | null`, optional)
|
|
198
200
|
- `includedCredits` (`number | null`, optional)
|
|
@@ -258,7 +260,7 @@ Get a plan with public price IDs and their automatic introductory offer IDs.
|
|
|
258
260
|
|
|
259
261
|
`PATCH /plans/{id}` · operation `update-plan`
|
|
260
262
|
|
|
261
|
-
Update a plan's name, description, visibility, or
|
|
263
|
+
Update a plan's name, description, visibility, default status, metadata, what happens to its unused plan credits, or its plan credit limit.
|
|
262
264
|
|
|
263
265
|
### Parameters
|
|
264
266
|
|
|
@@ -267,6 +269,9 @@ Update a plan's name, description, visibility, or metadata.
|
|
|
267
269
|
- `description` (`string | null`, optional)
|
|
268
270
|
- `metadata` (`Record<string, unknown>`, optional)
|
|
269
271
|
- `isPublic` (`boolean`, optional)
|
|
272
|
+
- `unusedPlanCredits` (`{ type: "expire" } | { type: "roll_over"; maxPlanCredits: number | null }`, optional) — Credits plans only. What happens to unused plan credits at each reset. Existing subscriptions apply it from their next reset.
|
|
273
|
+
- `planCreditLimit` (`{ credits: number; interval: "day" | "week" } | null`, optional) — Credits plans only. The most plan credits a subscription spends per day or per week; null removes the limit. Raising or removing it applies to existing subscriptions at once; lowering it, adding it or changing its interval applies from their next period.
|
|
274
|
+
- `isDefault` (`boolean`, optional) — Make this plan the default plan of its plan group: customers created with that planGroupId start on it, and a paid plan of the group that ends from the customer portal, a revoked payment authorization or exhausted dunning moves to it instead of canceling. Requires a free plan in a plan group; replaces the group's previous default plan. false unmarks it.
|
|
270
275
|
|
|
271
276
|
### Request options
|
|
272
277
|
|
|
@@ -346,7 +351,10 @@ Create a new plan with optional consumption model, visibility, and plan group as
|
|
|
346
351
|
- `isPublic` (`boolean`, optional)
|
|
347
352
|
- `isFree` (`boolean`, optional)
|
|
348
353
|
- `blockOnExhaustion` (`boolean`, optional)
|
|
354
|
+
- `unusedPlanCredits` (`{ type: "expire" } | { type: "roll_over"; maxPlanCredits: number | null }`, optional) — Credits plans only. What happens to unused plan credits at each reset; omitted means they expire.
|
|
355
|
+
- `planCreditLimit` (`{ credits: number; interval: "day" | "week" } | null`, optional) — Credits plans only. The most plan credits a subscription spends per day or per week; omitted or null means no limit.
|
|
349
356
|
- `planGroupId` (`string`, optional)
|
|
357
|
+
- `isDefault` (`boolean`, optional) — Make this plan the default plan of its plan group: customers created with that planGroupId start on it, and a paid plan of the group that ends from the customer portal, a revoked payment authorization or exhausted dunning moves to it instead of canceling. Requires a free plan with a planGroupId; replaces the group's previous default plan.
|
|
350
358
|
- `metadata` (`Record<string, unknown>`, optional)
|
|
351
359
|
|
|
352
360
|
### Request options
|
|
@@ -34,6 +34,7 @@ Update a promo code's billing interval, redemption limits, expiration, active st
|
|
|
34
34
|
- `expiresAt` (`string | null`, optional)
|
|
35
35
|
- `active` (`boolean`, optional)
|
|
36
36
|
- `planIds` (`Array<string>`, optional)
|
|
37
|
+
- `firstPurchaseOnly` (`boolean`, optional) — Whether the code only applies to a customer's first purchase: one with no paid invoice above zero and no paid subscription.
|
|
37
38
|
|
|
38
39
|
### Request options
|
|
39
40
|
|
|
@@ -66,7 +67,7 @@ List promo codes with cursor-based pagination.
|
|
|
66
67
|
|
|
67
68
|
`POST /promo-codes` · operation `create-promo-code`
|
|
68
69
|
|
|
69
|
-
Create a distribution code for an existing Offer with one or more sequential discount phases
|
|
70
|
+
Create a distribution code for an existing Offer with one or more sequential discount phases. The code owns redemption restrictions.
|
|
70
71
|
|
|
71
72
|
### Parameters
|
|
72
73
|
|
|
@@ -76,6 +77,7 @@ Create a distribution code for an existing Offer with one or more sequential dis
|
|
|
76
77
|
- `maxRedemptions` (`number`, optional)
|
|
77
78
|
- `expiresAt` (`string`, optional)
|
|
78
79
|
- `planIds` (`Array<string>`, optional)
|
|
80
|
+
- `firstPurchaseOnly` (`boolean`, optional) — Whether the code only applies to a customer's first purchase: one with no paid invoice above zero and no paid subscription. Defaults to false.
|
|
79
81
|
|
|
80
82
|
### Request options
|
|
81
83
|
|
|
@@ -40,6 +40,46 @@ Activate an add-on on a subscription. Charges a prorated amount for the current
|
|
|
40
40
|
|
|
41
41
|
`SubscriptionAddon`
|
|
42
42
|
|
|
43
|
+
## getAutoTopUp
|
|
44
|
+
|
|
45
|
+
`commet.subscriptions.getAutoTopUp(params)`
|
|
46
|
+
|
|
47
|
+
`GET /subscriptions/{id}/auto-top-up` · operation `get-subscription-auto-top-up`
|
|
48
|
+
|
|
49
|
+
Read whether the subscription buys credits automatically with its saved payment method when credits reach a threshold, with the top-ups used this period and the last failure.
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
- `id` (`string`, required)
|
|
54
|
+
|
|
55
|
+
### Returns
|
|
56
|
+
|
|
57
|
+
`SubscriptionAutoTopUp`
|
|
58
|
+
|
|
59
|
+
## updateAutoTopUp
|
|
60
|
+
|
|
61
|
+
`commet.subscriptions.updateAutoTopUp(params, options?)`
|
|
62
|
+
|
|
63
|
+
`PATCH /subscriptions/{id}/auto-top-up` · operation `update-subscription-auto-top-up`
|
|
64
|
+
|
|
65
|
+
Turn automatic credit purchases on or off and set the threshold, the credits each top-up buys and the maximum top-ups per period. Send only the fields that change. Enabling requires a plan that sells credits. The quantity must be at least the plan's purchase minimum when auto top-up is enabled or when the quantity changes, so turning it off keeps working after the minimum rises. Saving it enabled resumes a paused auto top-up.
|
|
66
|
+
|
|
67
|
+
### Parameters
|
|
68
|
+
|
|
69
|
+
- `id` (`string`, required)
|
|
70
|
+
- `enabled` (`boolean`, optional)
|
|
71
|
+
- `threshold` (`number`, optional)
|
|
72
|
+
- `quantity` (`number`, optional)
|
|
73
|
+
- `maxPerPeriod` (`number`, optional)
|
|
74
|
+
|
|
75
|
+
### Request options
|
|
76
|
+
|
|
77
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
78
|
+
|
|
79
|
+
### Returns
|
|
80
|
+
|
|
81
|
+
`SubscriptionAutoTopUp`
|
|
82
|
+
|
|
43
83
|
## adjustBalance
|
|
44
84
|
|
|
45
85
|
`commet.subscriptions.adjustBalance(params, options?)`
|
|
@@ -112,7 +152,7 @@ Cancel immediately or at period end and return the updated subscription.
|
|
|
112
152
|
|
|
113
153
|
`POST /subscriptions/{id}/change-plan` · operation `change-plan`
|
|
114
154
|
|
|
115
|
-
Upgrade or change billing interval immediately, optionally applying an Offer. Scheduled changes
|
|
155
|
+
Upgrade or change billing interval immediately, optionally applying an Offer by offerId or the Offer of a promoCode. Scheduled changes accept neither offerId nor promoCode. From a free plan, a promoCode opens the checkout with the code applied and counts its use when the checkout is paid; without offerId or promoCode, a destination price whose free trial requires no payment method starts that trial right away without checkout. During a trial without a payment method, an immediate change returns 409 no_payment_method; scheduled changes still apply.
|
|
116
156
|
|
|
117
157
|
### Parameters
|
|
118
158
|
|
|
@@ -121,6 +161,11 @@ Upgrade or change billing interval immediately, optionally applying an Offer. Sc
|
|
|
121
161
|
- `newBillingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"`, optional)
|
|
122
162
|
- `successUrl` (`string`, optional)
|
|
123
163
|
- `offerId` (`string`, optional)
|
|
164
|
+
- `promoCode` (`string`, optional)
|
|
165
|
+
|
|
166
|
+
### Valid parameter combinations
|
|
167
|
+
|
|
168
|
+
- `promoCode`
|
|
124
169
|
|
|
125
170
|
### Request options
|
|
126
171
|
|
|
@@ -136,12 +181,18 @@ Upgrade or change billing interval immediately, optionally applying an Offer. Sc
|
|
|
136
181
|
|
|
137
182
|
`POST /subscriptions/{id}/credits` · operation `purchase-credits`
|
|
138
183
|
|
|
139
|
-
Purchase a credit pack
|
|
184
|
+
Purchase a fixed credit pack or choose a whole credit quantity at the subscription plan price and minimum. Charges the saved payment method and adds purchased credits.
|
|
140
185
|
|
|
141
186
|
### Parameters
|
|
142
187
|
|
|
143
188
|
- `id` (`string`, required)
|
|
144
|
-
- `creditPackId` (`string`,
|
|
189
|
+
- `creditPackId` (`string`, optional)
|
|
190
|
+
- `quantity` (`number`, optional)
|
|
191
|
+
|
|
192
|
+
### Valid parameter combinations
|
|
193
|
+
|
|
194
|
+
- `creditPackId`
|
|
195
|
+
- `quantity`
|
|
145
196
|
|
|
146
197
|
### Request options
|
|
147
198
|
|
|
@@ -157,7 +208,7 @@ Purchase a credit pack for a subscription. Charges the customer and adds credits
|
|
|
157
208
|
|
|
158
209
|
`PUT /subscriptions/{id}/offer` · operation `apply-subscription-offer`
|
|
159
210
|
|
|
160
|
-
Apply a direct Offer to a subscription. On a pending
|
|
211
|
+
Apply a direct Offer to a subscription. On a pending checkout it quotes or replaces the checkout discount, which starts after the plan price trial when there is one, and the existing checkout URL remains unchanged. On an active subscription it applies the Offer immediately with its discount phases starting at the next billing cycle; the call is rejected while another applied Offer still has active or upcoming discount phases.
|
|
161
212
|
|
|
162
213
|
### Parameters
|
|
163
214
|
|
|
@@ -254,7 +305,7 @@ Revoke a pause before it becomes effective. Active pauses must be resumed instea
|
|
|
254
305
|
|
|
255
306
|
`POST /subscriptions/{id}/payment-method/update` · operation `update-payment-method`
|
|
256
307
|
|
|
257
|
-
Creates a hosted checkout
|
|
308
|
+
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
309
|
|
|
259
310
|
### Parameters
|
|
260
311
|
|
|
@@ -269,13 +320,36 @@ Creates a hosted checkout session for the customer to update the subscription's
|
|
|
269
320
|
|
|
270
321
|
`PaymentMethodUpdateCheckout`
|
|
271
322
|
|
|
323
|
+
## createPrepaidPeriodsCheckout
|
|
324
|
+
|
|
325
|
+
`commet.subscriptions.createPrepaidPeriodsCheckout(params, options?)`
|
|
326
|
+
|
|
327
|
+
`POST /subscriptions/{id}/prepaid-periods` · operation `create-prepaid-periods-checkout`
|
|
328
|
+
|
|
329
|
+
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.
|
|
330
|
+
|
|
331
|
+
### Parameters
|
|
332
|
+
|
|
333
|
+
- `id` (`string`, required)
|
|
334
|
+
- `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.
|
|
335
|
+
- `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.
|
|
336
|
+
- `successUrl` (`string`, optional)
|
|
337
|
+
|
|
338
|
+
### Request options
|
|
339
|
+
|
|
340
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
341
|
+
|
|
342
|
+
### Returns
|
|
343
|
+
|
|
344
|
+
`PrepaidPeriodsCheckout`
|
|
345
|
+
|
|
272
346
|
## previewChange
|
|
273
347
|
|
|
274
348
|
`commet.subscriptions.previewChange(params, options?)`
|
|
275
349
|
|
|
276
350
|
`POST /subscriptions/{id}/preview-change` · operation `preview-change-plan`
|
|
277
351
|
|
|
278
|
-
Preview proration details for an immediate plan change without applying it. Free-to-paid changes are never scheduled and the change-plan endpoint
|
|
352
|
+
Preview proration details for an immediate plan change without applying it. Free-to-paid changes are never scheduled and the change-plan endpoint returns hosted checkout for them, except a change without offerId or promoCode to a price whose free trial needs no payment method, for a customer who never had that plan: it starts the trial at once, so the preview reports nothing due today. For paid plans, interval direction takes precedence: a longer interval is immediate and a shorter interval is scheduled. When the interval is unchanged, a higher-sort-order plan is immediate and a lower-sort-order plan is scheduled. A paid-to-free change is always scheduled. Returns credit, charge, and net amount. The target plan must belong to the same plan group as the current plan, otherwise a 400 with code `plans_not_in_same_group` is returned. A change between two free plans has nothing to prorate and returns a zero-amount estimate. Scheduled changes return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. Pass offerId to quote the destination plan with an Offer, or promoCode to quote it with the Offer of a promo code validated with the checkout's rules.
|
|
279
353
|
|
|
280
354
|
### Parameters
|
|
281
355
|
|
|
@@ -283,6 +357,12 @@ Preview proration details for an immediate plan change without applying it. Free
|
|
|
283
357
|
- `planId` (`string`, required)
|
|
284
358
|
- `billingInterval` (`"weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time"`, optional)
|
|
285
359
|
- `offerId` (`string`, optional)
|
|
360
|
+
- `promoCode` (`string`, optional)
|
|
361
|
+
|
|
362
|
+
### Valid parameter combinations
|
|
363
|
+
|
|
364
|
+
- `planId`
|
|
365
|
+
- `planId` + `promoCode`
|
|
286
366
|
|
|
287
367
|
### Request options
|
|
288
368
|
|
|
@@ -369,6 +449,22 @@ Get a subscription by its public ID, regardless of status (including pending_pay
|
|
|
369
449
|
|
|
370
450
|
`Subscription`
|
|
371
451
|
|
|
452
|
+
## revokeScheduledPlanChange
|
|
453
|
+
|
|
454
|
+
`commet.subscriptions.revokeScheduledPlanChange(params, options?)`
|
|
455
|
+
|
|
456
|
+
`DELETE /subscriptions/{id}/scheduled-plan-change` · operation `revoke-scheduled-plan-change`
|
|
457
|
+
|
|
458
|
+
Revoke the plan or interval change scheduled for the end of the period, so the subscription stays on its current plan. Returns the updated subscription.
|
|
459
|
+
|
|
460
|
+
### Parameters
|
|
461
|
+
|
|
462
|
+
- `id` (`string`, required)
|
|
463
|
+
|
|
464
|
+
### Returns
|
|
465
|
+
|
|
466
|
+
`Subscription`
|
|
467
|
+
|
|
372
468
|
## uncancel
|
|
373
469
|
|
|
374
470
|
`commet.subscriptions.uncancel(params, options?)`
|
|
@@ -428,7 +524,7 @@ List all subscriptions. Filter by customer ID or status.
|
|
|
428
524
|
|
|
429
525
|
`POST /subscriptions` · operation `create-subscription`
|
|
430
526
|
|
|
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.
|
|
527
|
+
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. When the price's free trial requires no payment method, the subscription starts trialing right away with no checkout (checkoutUrl null, hasPaymentMethod false); it cannot be combined with offerId, promoCode, cardPromotionId or provider, and an organization that cannot charge yet receives 403.
|
|
432
528
|
|
|
433
529
|
### Parameters
|
|
434
530
|
|
|
@@ -440,9 +536,11 @@ Create a subscription for a customer. Commet selects the default price when pric
|
|
|
440
536
|
- `name` (`string`, optional)
|
|
441
537
|
- `startDate` (`string`, optional)
|
|
442
538
|
- `successUrl` (`string`, optional)
|
|
539
|
+
- `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.
|
|
540
|
+
- `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
541
|
- `offerId` (`string`, optional)
|
|
444
542
|
- `promoCode` (`string`, optional)
|
|
445
|
-
- `customTrialDays` (`number`, optional)
|
|
543
|
+
- `customTrialDays` (`number`, optional) — Trial length in days, replacing the price's trial. A customer who already had this plan, in a trial or paying, gets no trial and goes through the regular checkout.
|
|
446
544
|
- `skipTrial` (`boolean`, optional)
|
|
447
545
|
- `planId` (`string`, optional)
|
|
448
546
|
- `planCode` (`string`, optional)
|
|
@@ -16,10 +16,6 @@ Check if a customer can consume a feature before actual consumption. Returns ava
|
|
|
16
16
|
- `featureCode` (`string`, required)
|
|
17
17
|
- `quantity` (`number`, optional)
|
|
18
18
|
|
|
19
|
-
### Request options
|
|
20
|
-
|
|
21
|
-
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
22
|
-
|
|
23
19
|
### Returns
|
|
24
20
|
|
|
25
21
|
`UsageCheck`
|
|
@@ -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)
|