@commet/node 9.0.0 → 9.1.1
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/README.md +2 -0
- package/dist/index.d.mts +332 -110
- package/dist/index.d.ts +332 -110
- package/dist/index.js +162 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -40
- package/dist/index.mjs.map +1 -1
- package/docs/README.md +20 -0
- package/docs/ai-onboarding/ai-onboarding.md +90 -0
- package/docs/ai-onboarding/billing-best-practices-skill.md +29 -0
- package/docs/ai-onboarding/commet-skill.md +58 -0
- package/docs/ai-onboarding/mcp-server.md +207 -0
- package/docs/ai-onboarding/meta.json +17 -0
- package/docs/ai-onboarding/pricing-models-skill.md +29 -0
- package/docs/ai-onboarding/subscription-patterns-skill.md +29 -0
- package/docs/api-reference/addons.md +127 -0
- package/docs/api-reference/api-keys.md +57 -0
- package/docs/api-reference/credit-packs.md +80 -0
- package/docs/api-reference/customers.md +274 -0
- package/docs/api-reference/feature-access.md +36 -0
- package/docs/api-reference/features.md +94 -0
- package/docs/api-reference/generated-webhooks.md +120 -0
- package/docs/api-reference/index.md +31 -0
- package/docs/api-reference/invoices.md +123 -0
- package/docs/api-reference/markets.md +92 -0
- package/docs/api-reference/meta.json +7 -0
- package/docs/api-reference/offers.md +104 -0
- package/docs/api-reference/payments.md +106 -0
- package/docs/api-reference/payouts.md +66 -0
- package/docs/api-reference/plan-groups.md +157 -0
- package/docs/api-reference/plans.md +358 -0
- package/docs/api-reference/portal.md +30 -0
- package/docs/api-reference/promo-codes.md +86 -0
- package/docs/api-reference/provisioning.md +19 -0
- package/docs/api-reference/quota.md +120 -0
- package/docs/api-reference/seats.md +123 -0
- package/docs/api-reference/subscriptions.md +387 -0
- package/docs/api-reference/test-clock.md +59 -0
- package/docs/api-reference/transactions.md +78 -0
- package/docs/api-reference/usage.md +83 -0
- package/docs/documentation/api-versioning.md +100 -0
- package/docs/documentation/better-auth.md +361 -0
- package/docs/documentation/choose-a-billing-model.md +38 -0
- package/docs/documentation/cli.md +1024 -0
- package/docs/documentation/create-api-key.md +47 -0
- package/docs/documentation/customers/customer-credits.md +48 -0
- package/docs/documentation/customers/customer-portal.md +107 -0
- package/docs/documentation/customers/manage-customers.md +346 -0
- package/docs/documentation/customers/meta.json +5 -0
- package/docs/documentation/error-handling.md +239 -0
- package/docs/documentation/examples.md +37 -0
- package/docs/documentation/finance/acceptable-use.md +145 -0
- package/docs/documentation/finance/finance-overview.md +32 -0
- package/docs/documentation/finance/local-currency-taxes.md +40 -0
- package/docs/documentation/finance/merchant-of-record.md +48 -0
- package/docs/documentation/finance/meta.json +13 -0
- package/docs/documentation/finance/payouts-verification.md +186 -0
- package/docs/documentation/finance/payouts.md +41 -0
- package/docs/documentation/finance/supported-countries.md +28 -0
- package/docs/documentation/go/integrate-with-encore.md +229 -0
- package/docs/documentation/go/integrate-with-go.md +258 -0
- package/docs/documentation/go/meta.json +5 -0
- package/docs/documentation/introduction.md +58 -0
- package/docs/documentation/invoicing/handle-failed-payments.md +283 -0
- package/docs/documentation/invoicing/invoices-and-billing-cycles.md +73 -0
- package/docs/documentation/invoicing/manage-invoices.md +340 -0
- package/docs/documentation/invoicing/meta.json +9 -0
- package/docs/documentation/java/integrate-with-java.md +117 -0
- package/docs/documentation/java/meta.json +5 -0
- package/docs/documentation/meta.json +36 -0
- package/docs/documentation/nodejs/integrate-with-astro.md +129 -0
- package/docs/documentation/nodejs/integrate-with-bun.md +113 -0
- package/docs/documentation/nodejs/integrate-with-express.md +127 -0
- package/docs/documentation/nodejs/integrate-with-hono.md +141 -0
- package/docs/documentation/nodejs/integrate-with-nextjs.md +118 -0
- package/docs/documentation/nodejs/integrate-with-nuxt.md +125 -0
- package/docs/documentation/nodejs/integrate-with-remix.md +136 -0
- package/docs/documentation/nodejs/integrate-with-sveltekit.md +127 -0
- package/docs/documentation/nodejs/meta.json +14 -0
- package/docs/documentation/payments/accept-one-time-payments.md +314 -0
- package/docs/documentation/payments/meta.json +10 -0
- package/docs/documentation/payments/payment-orchestration.md +43 -0
- package/docs/documentation/payments/payment-providers.md +59 -0
- package/docs/documentation/payments/transactions-refunds-and-retries.md +199 -0
- package/docs/documentation/php/integrate-with-laravel.md +222 -0
- package/docs/documentation/php/integrate-with-php.md +103 -0
- package/docs/documentation/php/integrate-with-symfony.md +214 -0
- package/docs/documentation/php/meta.json +9 -0
- package/docs/documentation/plans/add-ons.md +257 -0
- package/docs/documentation/plans/balance-and-top-ups.md +169 -0
- package/docs/documentation/plans/configure-features.md +335 -0
- package/docs/documentation/plans/consumption-models.md +93 -0
- package/docs/documentation/plans/create-plans.md +162 -0
- package/docs/documentation/plans/credit-packs.md +89 -0
- package/docs/documentation/plans/meta.json +14 -0
- package/docs/documentation/plans/one-time-payments.md +142 -0
- package/docs/documentation/plans/plan-groups.md +31 -0
- package/docs/documentation/platform/custom-domains.md +27 -0
- package/docs/documentation/platform/dashboard-metrics-and-events.md +25 -0
- package/docs/documentation/platform/members-and-permissions.md +21 -0
- package/docs/documentation/platform/meta.json +10 -0
- package/docs/documentation/platform/organization-settings.md +29 -0
- package/docs/documentation/python/integrate-with-django.md +161 -0
- package/docs/documentation/python/integrate-with-fastapi.md +164 -0
- package/docs/documentation/python/integrate-with-flask.md +153 -0
- package/docs/documentation/python/integrate-with-python.md +90 -0
- package/docs/documentation/python/meta.json +10 -0
- package/docs/documentation/sales/card-promotions.md +41 -0
- package/docs/documentation/sales/introductory-offers.md +64 -0
- package/docs/documentation/sales/meta.json +13 -0
- package/docs/documentation/sales/offers.md +65 -0
- package/docs/documentation/sales/promo-codes.md +65 -0
- package/docs/documentation/sales/promotional-offers.md +58 -0
- package/docs/documentation/sales/regional-prices.md +100 -0
- package/docs/documentation/sales/trial-periods.md +88 -0
- package/docs/documentation/sdk-reference.md +68 -0
- package/docs/documentation/subscriptions/manage-subscriptions.md +505 -0
- package/docs/documentation/subscriptions/meta.json +9 -0
- package/docs/documentation/subscriptions/plan-grants.md +124 -0
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +37 -0
- package/docs/documentation/testing-sandbox.md +251 -0
- package/docs/documentation/usage/ai-token-billing.md +294 -0
- package/docs/documentation/usage/meta.json +10 -0
- package/docs/documentation/usage/quota-management.md +341 -0
- package/docs/documentation/usage/seat-management.md +377 -0
- package/docs/documentation/usage/track-usage.md +282 -0
- package/docs/errors/addon_already_active.md +22 -0
- package/docs/errors/addon_has_activations.md +22 -0
- package/docs/errors/addon_not_active.md +22 -0
- package/docs/errors/addon_not_found.md +22 -0
- package/docs/errors/already_has_active_subscription.md +22 -0
- package/docs/errors/already_scheduled.md +22 -0
- package/docs/errors/api_key_not_found.md +22 -0
- package/docs/errors/card_promotions_not_available.md +22 -0
- package/docs/errors/charge_failed.md +22 -0
- package/docs/errors/charge_in_progress.md +22 -0
- package/docs/errors/claim_not_pending.md +22 -0
- package/docs/errors/credit_pack_not_found.md +22 -0
- package/docs/errors/customer_not_found.md +22 -0
- package/docs/errors/duplicate.md +22 -0
- package/docs/errors/endpoint_deprecated.md +22 -0
- package/docs/errors/endpoint_not_available.md +22 -0
- package/docs/errors/feature_already_exists.md +22 -0
- package/docs/errors/feature_disabled.md +22 -0
- package/docs/errors/feature_in_use.md +22 -0
- package/docs/errors/feature_not_found.md +22 -0
- package/docs/errors/feature_not_in_plan.md +22 -0
- package/docs/errors/forbidden.md +22 -0
- package/docs/errors/free_plan_change_not_supported.md +22 -0
- package/docs/errors/idempotency_in_progress.md +22 -0
- package/docs/errors/idempotency_key_mismatch.md +22 -0
- package/docs/errors/idempotency_unavailable.md +22 -0
- package/docs/errors/included_limit_reached.md +22 -0
- package/docs/errors/index.md +89 -0
- package/docs/errors/insufficient_balance.md +22 -0
- package/docs/errors/insufficient_credits.md +22 -0
- package/docs/errors/insufficient_seats.md +22 -0
- package/docs/errors/internal_error.md +22 -0
- package/docs/errors/invalid_json.md +22 -0
- package/docs/errors/invalid_subscription_status.md +22 -0
- package/docs/errors/invoice_not_found.md +22 -0
- package/docs/errors/market_group_in_use.md +22 -0
- package/docs/errors/market_group_not_found.md +22 -0
- package/docs/errors/market_in_use.md +22 -0
- package/docs/errors/market_not_found.md +22 -0
- package/docs/errors/missing_regional_price.md +22 -0
- package/docs/errors/model_not_found.md +22 -0
- package/docs/errors/no_active_subscription.md +22 -0
- package/docs/errors/no_change_requested.md +22 -0
- package/docs/errors/no_outstanding_invoice.md +22 -0
- package/docs/errors/no_payment_method.md +22 -0
- package/docs/errors/no_prices_configured.md +22 -0
- package/docs/errors/not_found.md +22 -0
- package/docs/errors/not_scheduled_for_cancellation.md +22 -0
- package/docs/errors/offer_not_applicable.md +22 -0
- package/docs/errors/offer_not_found.md +22 -0
- package/docs/errors/one_time_subscription_not_cancelable.md +22 -0
- package/docs/errors/organization_already_claimed.md +22 -0
- package/docs/errors/payment_failed.md +22 -0
- package/docs/errors/payment_method_not_found.md +22 -0
- package/docs/errors/payment_not_cancelable.md +22 -0
- package/docs/errors/payment_not_found.md +22 -0
- package/docs/errors/payouts_not_available_in_sandbox.md +22 -0
- package/docs/errors/plan_change_scheduled.md +22 -0
- package/docs/errors/plan_group_not_found.md +22 -0
- package/docs/errors/plan_not_found.md +22 -0
- package/docs/errors/plan_unavailable.md +22 -0
- package/docs/errors/plans_not_in_same_group.md +22 -0
- package/docs/errors/price_in_use.md +22 -0
- package/docs/errors/price_not_found.md +22 -0
- package/docs/errors/pricing_mode_mismatch.md +22 -0
- package/docs/errors/promo_code_expired.md +22 -0
- package/docs/errors/promo_code_not_found.md +22 -0
- package/docs/errors/provider_unsupported.md +22 -0
- package/docs/errors/rate_limited.md +22 -0
- package/docs/errors/sandbox_only.md +22 -0
- package/docs/errors/seat_limit_exceeded.md +22 -0
- package/docs/errors/subscription_activation_failed.md +22 -0
- package/docs/errors/subscription_already_canceled.md +22 -0
- package/docs/errors/subscription_cancel_failed.md +22 -0
- package/docs/errors/subscription_creation_failed.md +22 -0
- package/docs/errors/subscription_has_open_dispute.md +22 -0
- package/docs/errors/subscription_not_active.md +22 -0
- package/docs/errors/subscription_not_found.md +22 -0
- package/docs/errors/subscription_required.md +22 -0
- package/docs/errors/subscription_uncancel_failed.md +22 -0
- package/docs/errors/transaction_not_found.md +22 -0
- package/docs/errors/unauthorized.md +22 -0
- package/docs/errors/validation_error.md +22 -0
- package/docs/errors/webhook_not_found.md +22 -0
- package/docs/errors.md +34 -0
- package/docs/getting-started.md +35 -0
- package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +22 -0
- package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +20 -0
- package/docs/knowledge-base/how-do-discounts-work.md +65 -0
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +88 -0
- package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +77 -0
- package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +20 -0
- package/docs/knowledge-base/how-do-trial-periods-work.md +54 -0
- package/docs/knowledge-base/how-does-billing-work.md +73 -0
- package/docs/knowledge-base/how-does-payment-routing-work.md +17 -0
- package/docs/knowledge-base/how-does-quota-based-billing-work.md +106 -0
- package/docs/knowledge-base/how-does-seat-based-billing-work.md +88 -0
- package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +89 -0
- package/docs/knowledge-base/meta.json +29 -0
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +110 -0
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +40 -0
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +74 -0
- package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +21 -0
- package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +101 -0
- package/docs/manifest.json +1677 -0
- package/docs/meta.json +11 -0
- package/docs/platform-documentation.md +175 -0
- package/docs/schemas.md +995 -0
- package/docs/webhooks/addon-activated.md +44 -0
- package/docs/webhooks/addon-deactivated.md +40 -0
- package/docs/webhooks/balance-depleted.md +37 -0
- package/docs/webhooks/balance-low.md +39 -0
- package/docs/webhooks/balance-topped-up.md +41 -0
- package/docs/webhooks/checkout-ready.md +43 -0
- package/docs/webhooks/credits-depleted.md +35 -0
- package/docs/webhooks/credits-expired.md +35 -0
- package/docs/webhooks/credits-granted.md +37 -0
- package/docs/webhooks/credits-low.md +39 -0
- package/docs/webhooks/credits-purchased.md +41 -0
- package/docs/webhooks/customer-created.md +49 -0
- package/docs/webhooks/customer-state-changed.md +134 -0
- package/docs/webhooks/customer-updated.md +49 -0
- package/docs/webhooks/introduction.md +499 -0
- package/docs/webhooks/invoice-created.md +45 -0
- package/docs/webhooks/invoice-overdue.md +53 -0
- package/docs/webhooks/invoice-upcoming.md +43 -0
- package/docs/webhooks/invoice-voided.md +53 -0
- package/docs/webhooks/meta.json +78 -0
- package/docs/webhooks/payment-dispute-resolved.md +52 -0
- package/docs/webhooks/payment-disputed.md +49 -0
- package/docs/webhooks/payment-failed.md +37 -0
- package/docs/webhooks/payment-link-canceled.md +41 -0
- package/docs/webhooks/payment-link-completed.md +47 -0
- package/docs/webhooks/payment-link-created.md +41 -0
- package/docs/webhooks/payment-link-failed.md +45 -0
- package/docs/webhooks/payment-method-attached.md +40 -0
- package/docs/webhooks/payment-method-updated.md +38 -0
- package/docs/webhooks/payment-received.md +45 -0
- package/docs/webhooks/payment-recovered.md +39 -0
- package/docs/webhooks/payment-refunded.md +47 -0
- package/docs/webhooks/payment-retry-failed.md +39 -0
- package/docs/webhooks/payout-available.md +33 -0
- package/docs/webhooks/payout-created.md +48 -0
- package/docs/webhooks/payout-failed.md +52 -0
- package/docs/webhooks/payout-paid.md +48 -0
- package/docs/webhooks/quota-exceeded.md +44 -0
- package/docs/webhooks/quota-threshold-reached.md +41 -0
- package/docs/webhooks/seats-limit-reached.md +39 -0
- package/docs/webhooks/seats-updated.md +39 -0
- package/docs/webhooks/subscription-activated.md +43 -0
- package/docs/webhooks/subscription-canceled.md +57 -0
- package/docs/webhooks/subscription-cancellation-revoked.md +37 -0
- package/docs/webhooks/subscription-cancellation-scheduled.md +45 -0
- package/docs/webhooks/subscription-created.md +35 -0
- package/docs/webhooks/subscription-past-due.md +43 -0
- package/docs/webhooks/subscription-plan-change-revoked.md +50 -0
- package/docs/webhooks/subscription-plan-change-scheduled.md +55 -0
- package/docs/webhooks/subscription-plan-changed.md +43 -0
- package/docs/webhooks/subscription-reactivated.md +53 -0
- package/docs/webhooks/subscription-updated.md +39 -0
- package/docs/webhooks/trial-checkout-ready.md +39 -0
- package/docs/webhooks/trial-converted.md +39 -0
- package/docs/webhooks/trial-expired.md +39 -0
- package/docs/webhooks/trial-started.md +46 -0
- package/docs/webhooks/trial-will-end.md +41 -0
- package/docs/webhooks/usage-recorded.md +41 -0
- package/docs/webhooks.md +782 -0
- package/package.json +2 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Invoices
|
|
2
|
+
|
|
3
|
+
API version: `2026-07-31`
|
|
4
|
+
|
|
5
|
+
## getDownloadUrl
|
|
6
|
+
|
|
7
|
+
`commet.invoices.getDownloadUrl(params, options?)`
|
|
8
|
+
|
|
9
|
+
`POST /invoices/{id}/download-links` · operation `download-invoice`
|
|
10
|
+
|
|
11
|
+
Generate a signed URL to download the invoice as a PDF. The URL expires after 7 days.
|
|
12
|
+
|
|
13
|
+
### Parameters
|
|
14
|
+
|
|
15
|
+
- `id` (`string`, required)
|
|
16
|
+
|
|
17
|
+
### Request options
|
|
18
|
+
|
|
19
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
20
|
+
|
|
21
|
+
### Returns
|
|
22
|
+
|
|
23
|
+
`InvoiceDownload`
|
|
24
|
+
|
|
25
|
+
## get
|
|
26
|
+
|
|
27
|
+
`commet.invoices.get(params)`
|
|
28
|
+
|
|
29
|
+
`GET /invoices/{id}` · operation `get-invoice`
|
|
30
|
+
|
|
31
|
+
Retrieve a single invoice by its public ID, including line items.
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
|
|
35
|
+
- `id` (`string`, required)
|
|
36
|
+
|
|
37
|
+
### Returns
|
|
38
|
+
|
|
39
|
+
`Invoice`
|
|
40
|
+
|
|
41
|
+
## send
|
|
42
|
+
|
|
43
|
+
`commet.invoices.send(params, options?)`
|
|
44
|
+
|
|
45
|
+
`POST /invoices/{id}/send` · operation `send-invoice`
|
|
46
|
+
|
|
47
|
+
Send the invoice to the customer via email.
|
|
48
|
+
|
|
49
|
+
### Parameters
|
|
50
|
+
|
|
51
|
+
- `id` (`string`, required)
|
|
52
|
+
|
|
53
|
+
### Request options
|
|
54
|
+
|
|
55
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
56
|
+
|
|
57
|
+
### Returns
|
|
58
|
+
|
|
59
|
+
`SentInvoice`
|
|
60
|
+
|
|
61
|
+
## updateStatus
|
|
62
|
+
|
|
63
|
+
`commet.invoices.updateStatus(params, options?)`
|
|
64
|
+
|
|
65
|
+
`PATCH /invoices/{id}/status` · operation `update-invoice-status`
|
|
66
|
+
|
|
67
|
+
Mark an outstanding invoice as "paid" or "void" and return the updated invoice. Cannot change the status of already paid or voided invoices.
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
- `id` (`string`, required)
|
|
72
|
+
- `status` (`"paid" | "void"`, required)
|
|
73
|
+
|
|
74
|
+
### Request options
|
|
75
|
+
|
|
76
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
77
|
+
|
|
78
|
+
### Returns
|
|
79
|
+
|
|
80
|
+
`Invoice`
|
|
81
|
+
|
|
82
|
+
## list
|
|
83
|
+
|
|
84
|
+
`commet.invoices.list(params?)`
|
|
85
|
+
|
|
86
|
+
`GET /invoices` · operation `list-invoices`
|
|
87
|
+
|
|
88
|
+
List invoices with cursor-based pagination. Filter by customer, status, or subscription.
|
|
89
|
+
|
|
90
|
+
### Parameters
|
|
91
|
+
|
|
92
|
+
- `cursor` (`string`, optional)
|
|
93
|
+
- `limit` (`number`, optional)
|
|
94
|
+
- `customerId` (`string`, optional)
|
|
95
|
+
- `status` (`"draft" | "outstanding" | "paid" | "void" | "uncollectible"`, optional)
|
|
96
|
+
- `subscriptionId` (`string`, optional)
|
|
97
|
+
|
|
98
|
+
### Returns
|
|
99
|
+
|
|
100
|
+
`{ object: "list"; data: Array<InvoiceListItem>; hasMore: boolean; nextCursor?: string }`
|
|
101
|
+
|
|
102
|
+
## createAdjustment
|
|
103
|
+
|
|
104
|
+
`commet.invoices.createAdjustment(params, options?)`
|
|
105
|
+
|
|
106
|
+
`POST /invoices` · operation `create-adjustment-invoice`
|
|
107
|
+
|
|
108
|
+
Create a one-off adjustment invoice and return the created invoice. Use a negative amount for a credit.
|
|
109
|
+
|
|
110
|
+
### Parameters
|
|
111
|
+
|
|
112
|
+
- `customerId` (`string`, required)
|
|
113
|
+
- `amount` (`number`, required)
|
|
114
|
+
- `description` (`string`, required)
|
|
115
|
+
- `metadata` (`Record<string, unknown>`, optional)
|
|
116
|
+
|
|
117
|
+
### Request options
|
|
118
|
+
|
|
119
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
120
|
+
|
|
121
|
+
### Returns
|
|
122
|
+
|
|
123
|
+
`Invoice`
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Markets
|
|
2
|
+
|
|
3
|
+
API version: `2026-07-31`
|
|
4
|
+
|
|
5
|
+
## get
|
|
6
|
+
|
|
7
|
+
`commet.markets.get(params)`
|
|
8
|
+
|
|
9
|
+
`GET /markets/{id}` · operation `get-market`
|
|
10
|
+
|
|
11
|
+
Get one reusable market.
|
|
12
|
+
|
|
13
|
+
### Parameters
|
|
14
|
+
|
|
15
|
+
- `id` (`string`, required)
|
|
16
|
+
|
|
17
|
+
### Returns
|
|
18
|
+
|
|
19
|
+
`Market`
|
|
20
|
+
|
|
21
|
+
## update
|
|
22
|
+
|
|
23
|
+
`commet.markets.update(params, options?)`
|
|
24
|
+
|
|
25
|
+
`PATCH /markets/{id}` · operation `update-market`
|
|
26
|
+
|
|
27
|
+
Replace the name, countries, and metadata of a market.
|
|
28
|
+
|
|
29
|
+
### Parameters
|
|
30
|
+
|
|
31
|
+
- `id` (`string`, required)
|
|
32
|
+
- `name` (`string`, required)
|
|
33
|
+
- `countryCodes` (`Array<string>`, required)
|
|
34
|
+
- `metadata` (`Record<string, unknown>`, optional)
|
|
35
|
+
|
|
36
|
+
### Request options
|
|
37
|
+
|
|
38
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
39
|
+
|
|
40
|
+
### Returns
|
|
41
|
+
|
|
42
|
+
`Market`
|
|
43
|
+
|
|
44
|
+
## delete
|
|
45
|
+
|
|
46
|
+
`commet.markets.delete(params, options?)`
|
|
47
|
+
|
|
48
|
+
`DELETE /markets/{id}` · operation `delete-market`
|
|
49
|
+
|
|
50
|
+
Delete an unused market. Markets referenced by prices or subscriptions cannot be deleted.
|
|
51
|
+
|
|
52
|
+
### Parameters
|
|
53
|
+
|
|
54
|
+
- `id` (`string`, required)
|
|
55
|
+
|
|
56
|
+
### Returns
|
|
57
|
+
|
|
58
|
+
`DeletedObject`
|
|
59
|
+
|
|
60
|
+
## list
|
|
61
|
+
|
|
62
|
+
`commet.markets.list()`
|
|
63
|
+
|
|
64
|
+
`GET /markets` · operation `list-markets`
|
|
65
|
+
|
|
66
|
+
List reusable country groups that resolve market-specific prices independently from currency.
|
|
67
|
+
|
|
68
|
+
### Returns
|
|
69
|
+
|
|
70
|
+
`{ object: "list"; data: Array<Market>; hasMore: boolean; nextCursor?: string }`
|
|
71
|
+
|
|
72
|
+
## create
|
|
73
|
+
|
|
74
|
+
`commet.markets.create(params, options?)`
|
|
75
|
+
|
|
76
|
+
`POST /markets` · operation `create-market`
|
|
77
|
+
|
|
78
|
+
Create a reusable market without attaching it to a plan or price. Countries can belong to only one active market.
|
|
79
|
+
|
|
80
|
+
### Parameters
|
|
81
|
+
|
|
82
|
+
- `name` (`string`, required)
|
|
83
|
+
- `countryCodes` (`Array<string>`, required)
|
|
84
|
+
- `metadata` (`Record<string, unknown>`, optional)
|
|
85
|
+
|
|
86
|
+
### Request options
|
|
87
|
+
|
|
88
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
89
|
+
|
|
90
|
+
### Returns
|
|
91
|
+
|
|
92
|
+
`Market`
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Offers
|
|
2
|
+
|
|
3
|
+
API version: `2026-07-31`
|
|
4
|
+
|
|
5
|
+
## get
|
|
6
|
+
|
|
7
|
+
`commet.offers.get(params)`
|
|
8
|
+
|
|
9
|
+
`GET /offers/{id}` · operation `get-offer`
|
|
10
|
+
|
|
11
|
+
Retrieve reusable offer terms by public ID.
|
|
12
|
+
|
|
13
|
+
### Parameters
|
|
14
|
+
|
|
15
|
+
- `id` (`string`, required)
|
|
16
|
+
|
|
17
|
+
### Returns
|
|
18
|
+
|
|
19
|
+
`Offer`
|
|
20
|
+
|
|
21
|
+
## update
|
|
22
|
+
|
|
23
|
+
`commet.offers.update(params, options?)`
|
|
24
|
+
|
|
25
|
+
`PATCH /offers/{id}` · operation `update-offer`
|
|
26
|
+
|
|
27
|
+
Replace reusable offer terms. Existing applications keep their immutable accepted terms.
|
|
28
|
+
|
|
29
|
+
### Parameters
|
|
30
|
+
|
|
31
|
+
- `id` (`string`, required)
|
|
32
|
+
- `name` (`string`, required)
|
|
33
|
+
- `phases` (`Array<{ type: "free_trial"; durationDays: number } | { type: "percentage"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; percentage: number } | { type: "amount_off"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; amounts: Array<{ currency: string; amount: number }> } | { type: "fixed_price"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; prices: Array<{ currency: string; amount: number }> }>`, required)
|
|
34
|
+
- `metadata` (`Record<string, unknown>`, optional)
|
|
35
|
+
- `startsAt` (`string | null`, optional)
|
|
36
|
+
- `endsAt` (`string | null`, optional)
|
|
37
|
+
- `active` (`boolean`, optional)
|
|
38
|
+
|
|
39
|
+
### Request options
|
|
40
|
+
|
|
41
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
42
|
+
|
|
43
|
+
### Returns
|
|
44
|
+
|
|
45
|
+
`Offer`
|
|
46
|
+
|
|
47
|
+
## delete
|
|
48
|
+
|
|
49
|
+
`commet.offers.delete(params, options?)`
|
|
50
|
+
|
|
51
|
+
`DELETE /offers/{id}` · operation `delete-offer`
|
|
52
|
+
|
|
53
|
+
Soft-delete an Offer. Existing applications and their accepted terms remain available for billing and audit.
|
|
54
|
+
|
|
55
|
+
### Parameters
|
|
56
|
+
|
|
57
|
+
- `id` (`string`, required)
|
|
58
|
+
|
|
59
|
+
### Returns
|
|
60
|
+
|
|
61
|
+
`DeletedOffer`
|
|
62
|
+
|
|
63
|
+
## list
|
|
64
|
+
|
|
65
|
+
`commet.offers.list(params?)`
|
|
66
|
+
|
|
67
|
+
`GET /offers` · operation `list-offers`
|
|
68
|
+
|
|
69
|
+
List reusable offer terms. Offers are independent from plans, prices, eligibility, and distribution channels.
|
|
70
|
+
|
|
71
|
+
### Parameters
|
|
72
|
+
|
|
73
|
+
- `cursor` (`string`, optional)
|
|
74
|
+
- `limit` (`number`, optional)
|
|
75
|
+
- `active` (`boolean`, optional)
|
|
76
|
+
|
|
77
|
+
### Returns
|
|
78
|
+
|
|
79
|
+
`{ object: "list"; data: Array<Offer>; hasMore: boolean; nextCursor?: string }`
|
|
80
|
+
|
|
81
|
+
## create
|
|
82
|
+
|
|
83
|
+
`commet.offers.create(params, options?)`
|
|
84
|
+
|
|
85
|
+
`POST /offers` · operation `create-offer`
|
|
86
|
+
|
|
87
|
+
Create reusable offer terms without assigning a plan, price, eligibility rule, or distribution channel.
|
|
88
|
+
|
|
89
|
+
### Parameters
|
|
90
|
+
|
|
91
|
+
- `name` (`string`, required)
|
|
92
|
+
- `phases` (`Array<{ type: "free_trial"; durationDays: number } | { type: "percentage"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; percentage: number } | { type: "amount_off"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; amounts: Array<{ currency: string; amount: number }> } | { type: "fixed_price"; durationCycles: number | null; durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null; prices: Array<{ currency: string; amount: number }> }>`, required)
|
|
93
|
+
- `metadata` (`Record<string, unknown>`, optional)
|
|
94
|
+
- `startsAt` (`string | null`, optional)
|
|
95
|
+
- `endsAt` (`string | null`, optional)
|
|
96
|
+
- `active` (`boolean`, optional)
|
|
97
|
+
|
|
98
|
+
### Request options
|
|
99
|
+
|
|
100
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
101
|
+
|
|
102
|
+
### Returns
|
|
103
|
+
|
|
104
|
+
`Offer`
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Payments
|
|
2
|
+
|
|
3
|
+
API version: `2026-07-31`
|
|
4
|
+
|
|
5
|
+
## cancel
|
|
6
|
+
|
|
7
|
+
`commet.payments.cancel(params, options?)`
|
|
8
|
+
|
|
9
|
+
`POST /payments/{id}/cancel` · operation `cancel-payment`
|
|
10
|
+
|
|
11
|
+
Cancel a pending payment link so it can no longer be paid. Only a link that has not been paid or started processing can be canceled; canceling an already canceled link is a no-op. Charges cannot be canceled.
|
|
12
|
+
|
|
13
|
+
### Parameters
|
|
14
|
+
|
|
15
|
+
- `id` (`string`, required)
|
|
16
|
+
|
|
17
|
+
### Request options
|
|
18
|
+
|
|
19
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
20
|
+
|
|
21
|
+
### Returns
|
|
22
|
+
|
|
23
|
+
`Payment`
|
|
24
|
+
|
|
25
|
+
## get
|
|
26
|
+
|
|
27
|
+
`commet.payments.get(params)`
|
|
28
|
+
|
|
29
|
+
`GET /payments/{id}` · operation `get-payment`
|
|
30
|
+
|
|
31
|
+
Retrieve a payment by its public ID.
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
|
|
35
|
+
- `id` (`string`, required)
|
|
36
|
+
|
|
37
|
+
### Returns
|
|
38
|
+
|
|
39
|
+
`Payment`
|
|
40
|
+
|
|
41
|
+
## charge
|
|
42
|
+
|
|
43
|
+
`commet.payments.charge(params, options?)`
|
|
44
|
+
|
|
45
|
+
`POST /payments/charge` · operation `charge-payment`
|
|
46
|
+
|
|
47
|
+
Charge a customer's vaulted payment method off-session. Calculates tax, generates an invoice, and sends a receipt. Requires the customer to have a subscription in active, trialing, or past_due state.
|
|
48
|
+
|
|
49
|
+
### Parameters
|
|
50
|
+
|
|
51
|
+
- `customerId` (`string`, required)
|
|
52
|
+
- `amount` (`number`, required)
|
|
53
|
+
- `currency` (`string`, required)
|
|
54
|
+
- `description` (`string`, required)
|
|
55
|
+
- `metadata` (`Record<string, string>`, optional)
|
|
56
|
+
|
|
57
|
+
### Request options
|
|
58
|
+
|
|
59
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
60
|
+
|
|
61
|
+
### Returns
|
|
62
|
+
|
|
63
|
+
`Payment`
|
|
64
|
+
|
|
65
|
+
## list
|
|
66
|
+
|
|
67
|
+
`commet.payments.list(params?)`
|
|
68
|
+
|
|
69
|
+
`GET /payments` · operation `list-payments`
|
|
70
|
+
|
|
71
|
+
List payments with cursor-based pagination. Filter by customer.
|
|
72
|
+
|
|
73
|
+
### Parameters
|
|
74
|
+
|
|
75
|
+
- `cursor` (`string`, optional)
|
|
76
|
+
- `limit` (`number`, optional)
|
|
77
|
+
- `customerId` (`string`, optional)
|
|
78
|
+
|
|
79
|
+
### Returns
|
|
80
|
+
|
|
81
|
+
`{ object: "list"; data: Array<Payment>; hasMore: boolean; nextCursor?: string }`
|
|
82
|
+
|
|
83
|
+
## create
|
|
84
|
+
|
|
85
|
+
`commet.payments.create(params, options?)`
|
|
86
|
+
|
|
87
|
+
`POST /payments` · operation `create-payment`
|
|
88
|
+
|
|
89
|
+
Create a hosted payment link. Returns a url the customer opens to pay with any card. Calculates tax, generates an invoice, and vaults the payment method on confirmation. No subscription or plan required.
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
- `amount` (`number`, required)
|
|
94
|
+
- `currency` (`string`, required)
|
|
95
|
+
- `customerId` (`string`, optional)
|
|
96
|
+
- `description` (`string`, required)
|
|
97
|
+
- `successUrl` (`string`, optional)
|
|
98
|
+
- `metadata` (`Record<string, string>`, optional)
|
|
99
|
+
|
|
100
|
+
### Request options
|
|
101
|
+
|
|
102
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
103
|
+
|
|
104
|
+
### Returns
|
|
105
|
+
|
|
106
|
+
`Payment`
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Payouts
|
|
2
|
+
|
|
3
|
+
API version: `2026-07-31`
|
|
4
|
+
|
|
5
|
+
## addBankAccount
|
|
6
|
+
|
|
7
|
+
`commet.payouts.addBankAccount(params, options?)`
|
|
8
|
+
|
|
9
|
+
`POST /payouts/bank-accounts` · operation `add-payout-bank-account`
|
|
10
|
+
|
|
11
|
+
Add an additional destination bank account to the organization's existing payout account. Country and currency are resolved from the organization. The full account number is never returned — only `last4`.
|
|
12
|
+
|
|
13
|
+
### Parameters
|
|
14
|
+
|
|
15
|
+
- `accountNumber` (`string`, required)
|
|
16
|
+
- `accountHolderName` (`string`, required)
|
|
17
|
+
- `routingNumber` (`string`, optional)
|
|
18
|
+
- `accountType` (`"checking" | "savings"`, optional)
|
|
19
|
+
- `setDefault` (`boolean`, optional)
|
|
20
|
+
|
|
21
|
+
### Request options
|
|
22
|
+
|
|
23
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
24
|
+
|
|
25
|
+
### Returns
|
|
26
|
+
|
|
27
|
+
`PayoutBankAccount`
|
|
28
|
+
|
|
29
|
+
## request
|
|
30
|
+
|
|
31
|
+
`commet.payouts.request(params, options?)`
|
|
32
|
+
|
|
33
|
+
`POST /payouts` · operation `request-payout`
|
|
34
|
+
|
|
35
|
+
Withdraw available balance to the organization's verified payout account. `amount` is in cents (USD, minimum 1000 = $10). The payout is created in `pending` and settles to `paid` asynchronously as provider webhooks arrive.
|
|
36
|
+
|
|
37
|
+
### Parameters
|
|
38
|
+
|
|
39
|
+
- `amount` (`number`, required)
|
|
40
|
+
- `description` (`string`, optional)
|
|
41
|
+
|
|
42
|
+
### Request options
|
|
43
|
+
|
|
44
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
45
|
+
|
|
46
|
+
### Returns
|
|
47
|
+
|
|
48
|
+
`Payout`
|
|
49
|
+
|
|
50
|
+
## completeVerification
|
|
51
|
+
|
|
52
|
+
`commet.payouts.completeVerification(options?)`
|
|
53
|
+
|
|
54
|
+
`POST /payouts/verification` · operation `complete-payout-verification`
|
|
55
|
+
|
|
56
|
+
Deprecated. Complete business and identity verification in the Commet dashboard. This endpoint no longer accepts or processes KYC data.
|
|
57
|
+
|
|
58
|
+
Deprecated.
|
|
59
|
+
|
|
60
|
+
### Request options
|
|
61
|
+
|
|
62
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
63
|
+
|
|
64
|
+
### Returns
|
|
65
|
+
|
|
66
|
+
`void`
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Plan Groups
|
|
2
|
+
|
|
3
|
+
API version: `2026-07-31`
|
|
4
|
+
|
|
5
|
+
## removePlan
|
|
6
|
+
|
|
7
|
+
`commet.planGroups.removePlan(params, options?)`
|
|
8
|
+
|
|
9
|
+
`DELETE /plan-groups/{id}/plans/{planId}` · operation `remove-plan-from-group`
|
|
10
|
+
|
|
11
|
+
Remove a plan from a plan group.
|
|
12
|
+
|
|
13
|
+
### Parameters
|
|
14
|
+
|
|
15
|
+
- `id` (`string`, required)
|
|
16
|
+
- `planId` (`string`, required)
|
|
17
|
+
|
|
18
|
+
### Returns
|
|
19
|
+
|
|
20
|
+
`RemovedPlanFromGroup`
|
|
21
|
+
|
|
22
|
+
## reorderPlans
|
|
23
|
+
|
|
24
|
+
`commet.planGroups.reorderPlans(params, options?)`
|
|
25
|
+
|
|
26
|
+
`PUT /plan-groups/{id}/plans/reorder` · operation `reorder-plans-in-group`
|
|
27
|
+
|
|
28
|
+
Set the display order of plans within a group. All plan IDs in the group must be provided.
|
|
29
|
+
|
|
30
|
+
### Parameters
|
|
31
|
+
|
|
32
|
+
- `id` (`string`, required)
|
|
33
|
+
- `planIds` (`Array<string>`, required)
|
|
34
|
+
|
|
35
|
+
### Request options
|
|
36
|
+
|
|
37
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
38
|
+
|
|
39
|
+
### Returns
|
|
40
|
+
|
|
41
|
+
`ReorderedPlans`
|
|
42
|
+
|
|
43
|
+
## addPlan
|
|
44
|
+
|
|
45
|
+
`commet.planGroups.addPlan(params, options?)`
|
|
46
|
+
|
|
47
|
+
`POST /plan-groups/{id}/plans` · operation `add-plan-to-group`
|
|
48
|
+
|
|
49
|
+
Add an existing plan to a plan group with optional sort order.
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
- `id` (`string`, required)
|
|
54
|
+
- `planId` (`string`, required)
|
|
55
|
+
- `sortOrder` (`number`, optional)
|
|
56
|
+
|
|
57
|
+
### Request options
|
|
58
|
+
|
|
59
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
60
|
+
|
|
61
|
+
### Returns
|
|
62
|
+
|
|
63
|
+
`AddedPlanToGroup`
|
|
64
|
+
|
|
65
|
+
## get
|
|
66
|
+
|
|
67
|
+
`commet.planGroups.get(params)`
|
|
68
|
+
|
|
69
|
+
`GET /plan-groups/{id}` · operation `get-plan-group`
|
|
70
|
+
|
|
71
|
+
Retrieve a plan group by ID, including its plans ordered by sortOrder.
|
|
72
|
+
|
|
73
|
+
### Parameters
|
|
74
|
+
|
|
75
|
+
- `id` (`string`, required)
|
|
76
|
+
|
|
77
|
+
### Returns
|
|
78
|
+
|
|
79
|
+
`PlanGroupDetail`
|
|
80
|
+
|
|
81
|
+
## update
|
|
82
|
+
|
|
83
|
+
`commet.planGroups.update(params, options?)`
|
|
84
|
+
|
|
85
|
+
`PATCH /plan-groups/{id}` · operation `update-plan-group`
|
|
86
|
+
|
|
87
|
+
Update a plan group's name, description, or visibility.
|
|
88
|
+
|
|
89
|
+
### Parameters
|
|
90
|
+
|
|
91
|
+
- `id` (`string`, required)
|
|
92
|
+
- `name` (`string`, optional)
|
|
93
|
+
- `description` (`string | null`, optional)
|
|
94
|
+
- `isPublic` (`boolean`, optional)
|
|
95
|
+
|
|
96
|
+
### Request options
|
|
97
|
+
|
|
98
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
99
|
+
|
|
100
|
+
### Returns
|
|
101
|
+
|
|
102
|
+
`PlanGroup`
|
|
103
|
+
|
|
104
|
+
## delete
|
|
105
|
+
|
|
106
|
+
`commet.planGroups.delete(params, options?)`
|
|
107
|
+
|
|
108
|
+
`DELETE /plan-groups/{id}` · operation `delete-plan-group`
|
|
109
|
+
|
|
110
|
+
Delete a plan group. Plans in the group are unlinked, not deleted.
|
|
111
|
+
|
|
112
|
+
### Parameters
|
|
113
|
+
|
|
114
|
+
- `id` (`string`, required)
|
|
115
|
+
|
|
116
|
+
### Returns
|
|
117
|
+
|
|
118
|
+
`DeletedObject`
|
|
119
|
+
|
|
120
|
+
## list
|
|
121
|
+
|
|
122
|
+
`commet.planGroups.list(params?)`
|
|
123
|
+
|
|
124
|
+
`GET /plan-groups` · operation `list-plan-groups`
|
|
125
|
+
|
|
126
|
+
List plan groups with cursor-based pagination.
|
|
127
|
+
|
|
128
|
+
### Parameters
|
|
129
|
+
|
|
130
|
+
- `cursor` (`string`, optional)
|
|
131
|
+
- `limit` (`number`, optional)
|
|
132
|
+
|
|
133
|
+
### Returns
|
|
134
|
+
|
|
135
|
+
`{ object: "list"; data: Array<PlanGroup>; hasMore: boolean; nextCursor?: string }`
|
|
136
|
+
|
|
137
|
+
## create
|
|
138
|
+
|
|
139
|
+
`commet.planGroups.create(params, options?)`
|
|
140
|
+
|
|
141
|
+
`POST /plan-groups` · operation `create-plan-group`
|
|
142
|
+
|
|
143
|
+
Create a new plan group for organizing plans.
|
|
144
|
+
|
|
145
|
+
### Parameters
|
|
146
|
+
|
|
147
|
+
- `name` (`string`, required)
|
|
148
|
+
- `description` (`string`, optional)
|
|
149
|
+
- `isPublic` (`boolean`, optional)
|
|
150
|
+
|
|
151
|
+
### Request options
|
|
152
|
+
|
|
153
|
+
- `idempotencyKey` (`string`, optional) — Unique key used to safely retry this write for 24 hours without applying it twice.
|
|
154
|
+
|
|
155
|
+
### Returns
|
|
156
|
+
|
|
157
|
+
`PlanGroup`
|