@commet/node 7.3.0 → 7.4.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 CHANGED
@@ -140,7 +140,7 @@ type ResolvedPlanCode<TConfig> = [InferPlanCodes<TConfig>] extends [
140
140
  type SubscriptionStatus = "draft" | "pending_payment" | "trialing" | "active" | "past_due" | "canceled";
141
141
  type BillingInterval = "weekly" | "monthly" | "quarterly" | "yearly" | "one_time";
142
142
  type ConsumptionModel = "metered" | "credits" | "balance";
143
- type InvoiceType = "recurring" | "overage" | "plan_change" | "adjustment" | "credit_purchase" | "balance_topup" | "addon_activation" | "one_time_payment";
143
+ type InvoiceType = "recurring" | "overage" | "plan_change" | "adjustment" | "credit_purchase" | "balance_topup" | "addon_activation" | "one_time_payment" | "reactivation";
144
144
  type TransactionStatus = "pending" | "succeeded" | "failed" | "refunded" | "disputed";
145
145
  type FeatureType = "boolean" | "usage" | "seats" | "quota";
146
146
  type DiscountType = "percentage" | "amount";
@@ -292,6 +292,8 @@ interface Customer {
292
292
  externalId: string | null;
293
293
  fullName: string | null;
294
294
  email: string;
295
+ taxDocument: string | null;
296
+ documentType: string | null;
295
297
  timezone: string | null;
296
298
  metadata: Record<string, unknown> | null;
297
299
  /** @format date-time */
@@ -315,6 +317,7 @@ interface CustomerBatch {
315
317
  externalId?: string;
316
318
  email: string;
317
319
  fullName?: string | null;
320
+ taxDocument?: string | null;
318
321
  timezone?: string;
319
322
  metadata?: Record<string, unknown> | null;
320
323
  address?: {
@@ -473,7 +476,7 @@ interface Payment {
473
476
  customerId: string | null;
474
477
  kind: "link" | "charge";
475
478
  status: "pending" | "processing" | "succeeded" | "requires_action" | "failed" | "canceled";
476
- provider: "stripe" | "commet";
479
+ provider: "stripe" | "commet" | "dlocal";
477
480
  amountSubtotal: number;
478
481
  taxAmount: number;
479
482
  amountTotal: number;
@@ -921,7 +924,7 @@ interface Transaction {
921
924
  invoiceId: string | null;
922
925
  grossAmount: number;
923
926
  subtotal: number;
924
- taxAmount: number;
927
+ taxAmount: number | null;
925
928
  currency: string;
926
929
  status: TransactionStatus;
927
930
  customerEmail: string | null;
@@ -981,6 +984,54 @@ interface UsageQuotaEvent {
981
984
  object: "usage_quota";
982
985
  livemode: boolean;
983
986
  }
987
+ interface WebhookAddonRef {
988
+ id: string;
989
+ name: string;
990
+ }
991
+ interface WebhookBalance {
992
+ currentBalance: number;
993
+ }
994
+ interface WebhookBankRef {
995
+ bankName: string | null;
996
+ last4: string;
997
+ }
998
+ interface WebhookCardInfo {
999
+ brand: string;
1000
+ last4: string;
1001
+ expMonth: number;
1002
+ expYear: number;
1003
+ }
1004
+ interface WebhookCreditsBalance {
1005
+ planCredits: number;
1006
+ purchasedCredits: number;
1007
+ totalCredits: number;
1008
+ }
1009
+ interface WebhookFeatureAccess {
1010
+ code: string;
1011
+ name: string;
1012
+ type: string;
1013
+ allowed: boolean;
1014
+ enabled: boolean | null;
1015
+ current: number | null;
1016
+ included: number | null;
1017
+ remaining: number | null;
1018
+ overageQuantity: number | null;
1019
+ overageUnitPrice: number | null;
1020
+ unlimited: boolean | null;
1021
+ overageEnabled: boolean | null;
1022
+ billedQuantity: number | null;
1023
+ }
1024
+ interface WebhookPlanRef {
1025
+ id: string;
1026
+ name: string;
1027
+ }
1028
+ interface WebhookSeatSummary {
1029
+ code: string;
1030
+ current: number | null;
1031
+ included: number | null;
1032
+ remaining: number | null;
1033
+ unlimited: boolean | null;
1034
+ }
984
1035
 
985
1036
  declare class CommetHTTPClient {
986
1037
  private config;
@@ -1123,6 +1174,7 @@ interface CreateCustomerParams {
1123
1174
  id?: string;
1124
1175
  externalId?: string;
1125
1176
  fullName?: string;
1177
+ taxDocument?: string;
1126
1178
  address?: {
1127
1179
  line1: string;
1128
1180
  line2?: string;
@@ -1144,6 +1196,7 @@ interface UpdateCustomerParams {
1144
1196
  id: string;
1145
1197
  email?: string;
1146
1198
  fullName?: string;
1199
+ taxDocument?: string;
1147
1200
  externalId?: string;
1148
1201
  timezone?: Timezone;
1149
1202
  metadata?: Record<string, unknown>;
@@ -1163,6 +1216,7 @@ interface BatchCreateCustomersParams {
1163
1216
  id?: string;
1164
1217
  externalId?: string;
1165
1218
  fullName?: string;
1219
+ taxDocument?: string;
1166
1220
  timezone?: Timezone;
1167
1221
  metadata?: Record<string, unknown>;
1168
1222
  address?: {
@@ -1668,7 +1722,11 @@ declare class PromoCodesResource {
1668
1722
  list(params?: ListPromoCodesParams, options?: RequestOptions): Promise<ApiResponse<Array<PromoCode>>>;
1669
1723
  /** Retrieve a promo code by its public ID. */
1670
1724
  get(params: GetPromoCodeParams, options?: RequestOptions): Promise<ApiResponse<PromoCode>>;
1671
- /** Create a new promo code. Optionally restrict to specific plans. */
1725
+ /**
1726
+ * Create a new promo code. Optionally restrict to specific plans.
1727
+ *
1728
+ * **100% discounts are not supported.** Percentage codes must be strictly less than 100% (`discountValue` < 10000 basis points). For full waivers, use an introductory offer on the plan instead. At checkout, any code — percentage or fixed amount — that would reduce the total below the currency's minimum charge ($0.50 USD equivalent) is silently dropped.
1729
+ */
1672
1730
  create(params: CreatePromoCodeParams, options?: RequestOptions): Promise<ApiResponse<PromoCode>>;
1673
1731
  /** Update a promo code's redemption limits, expiration, active status, or plan restrictions. */
1674
1732
  update(params: UpdatePromoCodeParams, options?: RequestOptions): Promise<ApiResponse<PromoCode>>;
@@ -1853,7 +1911,7 @@ declare class SubscriptionsResource {
1853
1911
  cancel(params: CancelSubscriptionParams, options?: RequestOptions): Promise<ApiResponse<CanceledSubscription>>;
1854
1912
  /** Revert a scheduled cancellation. Only works when canceledAt is set but status is not yet 'canceled'. */
1855
1913
  uncancel(params: UncancelSubscriptionParams, options?: RequestOptions): Promise<ApiResponse<UncanceledSubscription>>;
1856
- /** Retries the outstanding renewal charge for a past_due subscription. On a successful charge the subscription recovers to active and a payment.recovered webhook is delivered; a declined charge returns an error and the subscription stays past_due. */
1914
+ /** Reactivates a subscription. A past_due subscription retries its outstanding renewal charge (recovering to active on success). A canceled subscription generates a fresh invoice, charges the saved card, and resets the billing period. On a successful charge the subscription becomes active; a declined charge returns an error with a recoveryUrl in the error details that can be sent to the customer to update their card. */
1857
1915
  reactivate(params: ReactivateSubscriptionParams, options?: RequestOptions): Promise<ApiResponse<ReactivatedSubscription>>;
1858
1916
  /** Generates a hosted, signed recovery link that lets the customer pay the outstanding renewal charge for a past_due subscription. Unlike reactivate, which charges server-to-server, this returns a link the merchant can deliver through their own email, SMS, or dashboard. The link carries a self-contained signed token and stays valid until the charge is paid or the subscription is no longer past due. */
1859
1917
  createRecoveryLink(params: CreateSubscriptionRecoveryLinkParams, options?: RequestOptions): Promise<ApiResponse<RecoveryLink>>;
@@ -2019,56 +2077,7 @@ declare class UsageResource {
2019
2077
  check(params: CheckUsageParams, options?: RequestOptions): Promise<ApiResponse<UsageCheckResult>>;
2020
2078
  }
2021
2079
 
2022
- interface WebhookPlanRef {
2023
- id: string;
2024
- name: string;
2025
- }
2026
- interface WebhookAddonRef {
2027
- id: string;
2028
- name: string;
2029
- }
2030
- interface WebhookCardInfo {
2031
- brand: string;
2032
- last4: string;
2033
- expMonth: number;
2034
- expYear: number;
2035
- }
2036
- interface WebhookBankRef {
2037
- bankName: string;
2038
- last4: string;
2039
- }
2040
- interface WebhookFeatureAccess {
2041
- code: string;
2042
- name: string;
2043
- type: string;
2044
- allowed: boolean;
2045
- enabled: boolean | null;
2046
- current: number | null;
2047
- included: number | null;
2048
- remaining: number | null;
2049
- overageQuantity: number | null;
2050
- overageUnitPrice: number | null;
2051
- unlimited: boolean | null;
2052
- overageEnabled: boolean | null;
2053
- billedQuantity: number | null;
2054
- }
2055
- interface WebhookSeatSummary {
2056
- code: string;
2057
- current: number | null;
2058
- included: number | null;
2059
- remaining: number | null;
2060
- unlimited: boolean | null;
2061
- }
2062
- interface WebhookCreditsBalance {
2063
- planCredits: number;
2064
- purchasedCredits: number;
2065
- totalCredits: number;
2066
- }
2067
- interface WebhookBalance {
2068
- currentBalance: number;
2069
- }
2070
-
2071
- type WebhookEvent = "subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.upcoming" | "invoice.overdue" | "invoice.voided" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "usage.recorded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed";
2080
+ type WebhookEvent = "subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed";
2072
2081
  /** Fired when a subscription record is created with status pending_payment. The first charge has not been confirmed yet — do NOT grant access here. Wait for subscription.activated. */
2073
2082
  interface SubscriptionCreatedData {
2074
2083
  /** The subscription ID. */
@@ -2079,10 +2088,10 @@ interface SubscriptionCreatedData {
2079
2088
  planId: string;
2080
2089
  /** The plan name. */
2081
2090
  planName: string;
2082
- /** Current status. One of: draft, pending_payment, trialing, active, past_due, canceled, expired. Grant access only when trialing or active. */
2091
+ /** Current status. One of: draft, pending_payment, trialing, active, past_due, canceled. Access is granted while trialing, active, or past_due — past_due is a permissive grace window during dunning, where you decide whether to keep serving the customer or block them. */
2083
2092
  status: string;
2084
2093
  /** ISO 8601 datetime when the subscription starts. */
2085
- startDate: string | null;
2094
+ startDate: string;
2086
2095
  /** Optional custom name for the subscription. */
2087
2096
  name: string | null;
2088
2097
  }
@@ -2092,12 +2101,12 @@ interface SubscriptionActivatedData {
2092
2101
  subscriptionId: string;
2093
2102
  /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2094
2103
  customerId: string;
2095
- /** Current status. One of: draft, pending_payment, trialing, active, past_due, canceled, expired. Grant access only when trialing or active. */
2104
+ /** Current status. One of: draft, pending_payment, trialing, active, past_due, canceled. Access is granted while trialing, active, or past_due — past_due is a permissive grace window during dunning, where you decide whether to keep serving the customer or block them. */
2096
2105
  status: string;
2097
2106
  /** ISO 8601 start of the current billing period. */
2098
- currentPeriodStart: string | null;
2107
+ currentPeriodStart?: string;
2099
2108
  /** ISO 8601 end of the current billing period. */
2100
- currentPeriodEnd: string | null;
2109
+ currentPeriodEnd?: string;
2101
2110
  /** Optional custom name for the subscription. */
2102
2111
  name: string | null;
2103
2112
  /** The invoice ID for this payment. */
@@ -2109,18 +2118,18 @@ interface SubscriptionActivatedData {
2109
2118
  /** The invoice currency code. */
2110
2119
  invoiceCurrency: string;
2111
2120
  }
2112
- /** Fired when a canceled subscription is reactivated and its reactivation charge succeeds. The subscription returns to active with a fresh invoice and a billing period anchored to the reactivation date. */
2121
+ /** Fired when a canceled subscription is reactivated and its reactivation charge succeeds. The subscription returns to active with a fresh invoice and a billing period anchored to the reactivation date. Distinct from subscription.activated (first activation) and payment.recovered (past_due recovery, which keeps the original anchor). */
2113
2122
  interface SubscriptionReactivatedData {
2114
2123
  /** The subscription ID. */
2115
2124
  subscriptionId: string;
2116
2125
  /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2117
2126
  customerId: string;
2118
- /** Current status. Always "active" for this event. */
2127
+ /** Always "active" for this event. Restore access here. */
2119
2128
  status: string;
2120
2129
  /** ISO 8601 start of the new billing period, anchored to the reactivation date. */
2121
- currentPeriodStart: string | null;
2130
+ currentPeriodStart?: string;
2122
2131
  /** ISO 8601 end of the new billing period. */
2123
- currentPeriodEnd: string | null;
2132
+ currentPeriodEnd?: string;
2124
2133
  /** Optional custom name for the subscription. */
2125
2134
  name: string | null;
2126
2135
  /** The fresh reactivation invoice ID. */
@@ -2141,11 +2150,11 @@ interface SubscriptionCanceledData {
2141
2150
  /** Always "canceled" for this event. Revoke access when you receive this. */
2142
2151
  status: string;
2143
2152
  /** ISO 8601 datetime when the customer originally requested cancellation. */
2144
- canceledAt: string;
2153
+ canceledAt?: string;
2145
2154
  /** The reason for cancellation, if provided. */
2146
2155
  cancelReason: string | null;
2147
2156
  /** ISO 8601 datetime when the subscription ended (matches the billing period end). */
2148
- endDate: string;
2157
+ endDate?: string;
2149
2158
  }
2150
2159
  /** Fired when subscription details change. The most common trigger is scheduling a cancellation — when a customer cancels, the status stays "active" until the billing period ends, but canceledAt and endDate are set immediately. Use this event to show "your subscription will end on {endDate}" in your UI. Access should NOT be revoked here — wait for subscription.canceled. */
2151
2160
  interface SubscriptionUpdatedData {
@@ -2156,11 +2165,11 @@ interface SubscriptionUpdatedData {
2156
2165
  /** Current status. When cancellation is scheduled, this is still "active" — the subscription remains usable until endDate. */
2157
2166
  status: string;
2158
2167
  /** ISO 8601 datetime when cancellation was requested. Present when cancellation is scheduled, null otherwise. */
2159
- canceledAt: string | null;
2168
+ canceledAt?: string;
2160
2169
  /** The reason for cancellation, if provided. */
2161
2170
  cancelReason: string | null;
2162
2171
  /** ISO 8601 datetime when the subscription will end. Present when cancellation is scheduled — this is the date access should be revoked (via subscription.canceled). */
2163
- endDate: string | null;
2172
+ endDate?: string;
2164
2173
  }
2165
2174
  /** Fired when a subscription changes from one plan to another, including upgrades, downgrades, and billing interval changes. Access does not change on this event — the subscription stays active. */
2166
2175
  interface SubscriptionPlanChangedData {
@@ -2175,11 +2184,11 @@ interface SubscriptionPlanChangedData {
2175
2184
  /** The billing interval (monthly, yearly). */
2176
2185
  billingInterval: string | null;
2177
2186
  /** Prorated credit in cents from the previous plan. */
2178
- credit: number | null;
2187
+ credit: number;
2179
2188
  /** Prorated charge in cents for the new plan. */
2180
- charge: number | null;
2189
+ charge: number;
2181
2190
  /** Total amount charged in cents. */
2182
- totalCharged: number | null;
2191
+ totalCharged: number;
2183
2192
  }
2184
2193
  /** Fired when a cancellation is scheduled for the end of the billing period. The subscription stays active until effectiveAt — do NOT revoke access here. subscription.updated also fires for backward compatibility. */
2185
2194
  interface SubscriptionCancellationScheduledData {
@@ -2190,7 +2199,7 @@ interface SubscriptionCancellationScheduledData {
2190
2199
  /** Still "active" — the subscription remains usable until effectiveAt. */
2191
2200
  status: string;
2192
2201
  /** ISO 8601 datetime when the cancellation was requested. */
2193
- canceledAt: string;
2202
+ canceledAt?: string;
2194
2203
  /** The reason for cancellation, if provided. */
2195
2204
  cancelReason: string | null;
2196
2205
  /** ISO 8601 datetime when the cancellation will execute (the billing period end). subscription.canceled fires at this moment. */
@@ -2205,7 +2214,7 @@ interface SubscriptionCancellationRevokedData {
2205
2214
  /** Current status — typically "active". The scheduled cancellation no longer applies. */
2206
2215
  status: string;
2207
2216
  /** ISO 8601 end of the current billing period, which continues normally. */
2208
- currentPeriodEnd: string | null;
2217
+ currentPeriodEnd?: string;
2209
2218
  }
2210
2219
  /** Fired when a plan change (downgrade or shorter interval) is scheduled for the end of the billing period. The subscription stays on the current plan until effectiveAt, when subscription.plan_changed fires. */
2211
2220
  interface SubscriptionPlanChangeScheduledData {
@@ -2355,34 +2364,34 @@ interface PaymentReceivedData {
2355
2364
  /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2356
2365
  customerId: string;
2357
2366
  /** The subscription ID. */
2358
- subscriptionId: string;
2367
+ subscriptionId: string | null;
2359
2368
  /** The payment transaction ID. */
2360
- paymentTransactionId: string;
2369
+ paymentTransactionId: string | null;
2361
2370
  /** Gross amount in cents before fees. */
2362
- grossAmount: number;
2371
+ grossAmount: number | null;
2363
2372
  /** The payment currency code. */
2364
- currency: string;
2373
+ currency: string | null;
2365
2374
  /** Net amount after fees in cents. */
2366
- orgNetAmount: number;
2375
+ orgNetAmount: number | null;
2367
2376
  /** The customer email used for this payment. */
2368
2377
  customerEmail: string | null;
2369
2378
  /** ISO 8601 datetime when the payment was received. */
2370
- paidAt: string | null;
2379
+ paidAt?: string;
2371
2380
  }
2372
2381
  /** Fired when a recurring charge fails. This event is for recurring charge failures only — card declines during initial checkout do not trigger this event. */
2373
2382
  interface PaymentFailedData {
2374
2383
  /** The invoice ID, if available. */
2375
- invoiceId: string | null;
2384
+ invoiceId: string;
2376
2385
  /** The human-readable invoice number, if available. */
2377
- invoiceNumber: string | null;
2386
+ invoiceNumber: string;
2378
2387
  /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2379
2388
  customerId: string;
2380
2389
  /** The subscription ID, if the invoice is linked to a subscription. */
2381
2390
  subscriptionId: string | null;
2382
2391
  /** The failure code from the payment processor. */
2383
- failureCode: string | null;
2392
+ failureCode: string;
2384
2393
  /** A human-readable failure message. */
2385
- failureMessage: string | null;
2394
+ failureMessage: string;
2386
2395
  }
2387
2396
  /** Fired when an outstanding invoice that previously failed is successfully paid — automatically on retry or by the customer through the portal. The subscription returns to active at the same time; use this event to close the dunning flow you opened on payment.failed. */
2388
2397
  interface PaymentRecoveredData {
@@ -2397,7 +2406,7 @@ interface PaymentRecoveredData {
2397
2406
  /** The subscription ID, if the invoice is linked to a subscription. */
2398
2407
  subscriptionId: string | null;
2399
2408
  }
2400
- /** Fired after all dunning retries are exhausted and the subscription is canceled. Use it to close the recovery loop opened by payment.failed. */
2409
+ /** Fired when all dunning retries are exhausted and the subscription is canceled. This is the terminal event of the dunning flow payment.recovered will not follow. Revoke access when you receive this. */
2401
2410
  interface PaymentRetryFailedData {
2402
2411
  /** The invoice whose retries were exhausted. */
2403
2412
  invoiceId: string;
@@ -2414,6 +2423,8 @@ interface PaymentRetryFailedData {
2414
2423
  interface PaymentRefundedData {
2415
2424
  /** The refunded payment transaction ID. */
2416
2425
  paymentTransactionId: string;
2426
+ /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2427
+ paymentLinkId: string | null;
2417
2428
  /** The invoice the payment collected, or null for payments without an invoice. */
2418
2429
  invoiceId: string | null;
2419
2430
  /** The human-readable invoice number, if available. */
@@ -2431,6 +2442,8 @@ interface PaymentRefundedData {
2431
2442
  interface PaymentDisputedData {
2432
2443
  /** The disputed payment transaction ID. */
2433
2444
  paymentTransactionId: string;
2445
+ /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2446
+ paymentLinkId: string | null;
2434
2447
  /** The invoice the payment collected, or null for payments without an invoice. */
2435
2448
  invoiceId: string | null;
2436
2449
  /** The human-readable invoice number, if available. */
@@ -2450,6 +2463,8 @@ interface PaymentDisputedData {
2450
2463
  interface PaymentDisputeResolvedData {
2451
2464
  /** The disputed payment transaction ID. */
2452
2465
  paymentTransactionId: string;
2466
+ /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2467
+ paymentLinkId: string | null;
2453
2468
  /** The invoice the payment collected, or null for payments without an invoice. */
2454
2469
  invoiceId: string | null;
2455
2470
  /** The human-readable invoice number, if available. */
@@ -2501,7 +2516,7 @@ interface PaymentLinkCompletedData {
2501
2516
  /** The human-readable invoice number. */
2502
2517
  invoiceNumber: string;
2503
2518
  /** The payment transaction ID for the settled charge. */
2504
- paymentTransactionId: string;
2519
+ paymentTransactionId: string | null;
2505
2520
  }
2506
2521
  /** Fired when a payment link charge attempt is declined. The link stays open and can be paid again — a failed link is retryable. */
2507
2522
  interface PaymentLinkFailedData {
@@ -2518,9 +2533,9 @@ interface PaymentLinkFailedData {
2518
2533
  /** The customer ID, or null when the link is not tied to a customer. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2519
2534
  customerId: string | null;
2520
2535
  /** The failure code from the payment processor. */
2521
- failureCode: string | null;
2536
+ failureCode: string;
2522
2537
  /** A human-readable failure message. */
2523
- failureMessage: string | null;
2538
+ failureMessage: string;
2524
2539
  }
2525
2540
  /** Fired when a pending payment link is canceled before being paid. A canceled link can no longer be paid. */
2526
2541
  interface PaymentLinkCanceledData {
@@ -2546,13 +2561,13 @@ interface InvoiceCreatedData {
2546
2561
  /** The invoice status (e.g. pending, paid). */
2547
2562
  invoiceStatus: string;
2548
2563
  /** ISO 8601 start of the billing period. */
2549
- periodStart: string | null;
2564
+ periodStart: string;
2550
2565
  /** ISO 8601 end of the billing period. */
2551
- periodEnd: string | null;
2566
+ periodEnd: string;
2552
2567
  /** ISO 8601 date the invoice was issued. */
2553
- issueDate: string | null;
2568
+ issueDate: string;
2554
2569
  /** ISO 8601 date the invoice is due. */
2555
- dueDate: string | null;
2570
+ dueDate: string;
2556
2571
  /** The invoice currency code. */
2557
2572
  currency: string;
2558
2573
  /** Subtotal in cents (100 = $1.00). */
@@ -2564,38 +2579,21 @@ interface InvoiceCreatedData {
2564
2579
  /** The subscription ID, if the invoice is linked to a subscription. */
2565
2580
  subscriptionId: string | null;
2566
2581
  }
2567
- /** Predictive event fired once, 3 days before an active subscription renews. Use it to notify the customer before they are charged. Carries no amount usage-based charges are only final at renewal, when invoice.created delivers the actual invoice. */
2568
- interface InvoiceUpcomingData {
2569
- /** The subscription ID. */
2570
- subscriptionId: string;
2571
- /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2572
- customerId: string;
2573
- /** Always "active" for this event. */
2574
- status: string;
2575
- /** The plan ID. */
2576
- planId: string;
2577
- /** The plan name. */
2578
- planName: string;
2579
- /** The billing interval (monthly, yearly). */
2580
- billingInterval: string | null;
2581
- /** ISO 8601 datetime when the current period ends and the renewal invoice is issued. */
2582
- currentPeriodEnd: string;
2583
- }
2584
- /** Fired once when an outstanding invoice passes its due date without payment. The invoice keeps its outstanding status — overdue is a fact about the due date, not a new status. Use it to start your own dunning flow. */
2585
- interface InvoiceOverdueData {
2582
+ /** Fired when an invoice is voided nullified before collection, either manually or automatically when its subscription is canceled. Voiding is terminal: a void invoice is never retried or collected. */
2583
+ interface InvoiceVoidedData {
2586
2584
  /** The invoice ID. */
2587
2585
  invoiceId: string;
2588
2586
  /** The human-readable invoice number. */
2589
2587
  invoiceNumber: string;
2590
- /** Always "outstanding" for this event. */
2588
+ /** Always "void" for this event. */
2591
2589
  invoiceStatus: string;
2592
2590
  /** ISO 8601 start of the billing period. */
2593
- periodStart: string | null;
2591
+ periodStart: string;
2594
2592
  /** ISO 8601 end of the billing period. */
2595
- periodEnd: string | null;
2593
+ periodEnd: string;
2596
2594
  /** ISO 8601 date the invoice was issued. */
2597
- issueDate: string | null;
2598
- /** ISO 8601 date the invoice was due — now in the past. */
2595
+ issueDate: string;
2596
+ /** ISO 8601 date the invoice was due. */
2599
2597
  dueDate: string;
2600
2598
  /** The invoice currency code. */
2601
2599
  currency: string;
@@ -2608,22 +2606,22 @@ interface InvoiceOverdueData {
2608
2606
  /** The subscription ID, if the invoice is linked to a subscription. */
2609
2607
  subscriptionId: string | null;
2610
2608
  }
2611
- /** Fired when an invoice is voided nullified before collection, either manually or automatically when its subscription is canceled. Voiding is terminal: a void invoice is never retried or collected. */
2612
- interface InvoiceVoidedData {
2609
+ /** Fired once when an outstanding invoice passes its due date without payment. The invoice keeps its outstanding status overdue is a fact about the due date, not a new status. Use it to start your own dunning flow. */
2610
+ interface InvoiceOverdueData {
2613
2611
  /** The invoice ID. */
2614
2612
  invoiceId: string;
2615
2613
  /** The human-readable invoice number. */
2616
2614
  invoiceNumber: string;
2617
- /** Always "void" for this event. */
2615
+ /** Always "outstanding" for this event. */
2618
2616
  invoiceStatus: string;
2619
2617
  /** ISO 8601 start of the billing period. */
2620
- periodStart: string | null;
2618
+ periodStart: string;
2621
2619
  /** ISO 8601 end of the billing period. */
2622
- periodEnd: string | null;
2620
+ periodEnd: string;
2623
2621
  /** ISO 8601 date the invoice was issued. */
2624
- issueDate: string | null;
2625
- /** ISO 8601 date the invoice was due. */
2626
- dueDate: string | null;
2622
+ issueDate: string;
2623
+ /** ISO 8601 date the invoice was due — now in the past. */
2624
+ dueDate: string;
2627
2625
  /** The invoice currency code. */
2628
2626
  currency: string;
2629
2627
  /** Subtotal in cents (100 = $1.00). */
@@ -2635,6 +2633,23 @@ interface InvoiceVoidedData {
2635
2633
  /** The subscription ID, if the invoice is linked to a subscription. */
2636
2634
  subscriptionId: string | null;
2637
2635
  }
2636
+ /** Predictive event fired once, 3 days before an active subscription renews. Use it to notify the customer before they are charged. Carries no amount — usage-based charges are only final at renewal, when invoice.created delivers the actual invoice. */
2637
+ interface InvoiceUpcomingData {
2638
+ /** The subscription ID. */
2639
+ subscriptionId: string;
2640
+ /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2641
+ customerId: string;
2642
+ /** Always "active" for this event. */
2643
+ status: string;
2644
+ /** The plan ID. */
2645
+ planId: string;
2646
+ /** The plan name. */
2647
+ planName: string;
2648
+ /** The billing interval (monthly, yearly). */
2649
+ billingInterval: string | null;
2650
+ /** ISO 8601 datetime when the current period ends and the renewal invoice is issued. */
2651
+ currentPeriodEnd: string;
2652
+ }
2638
2653
  /** Fired when Commet records a payment method for a subscription: after a paid checkout, when a trial starts with a card on file, or when a zero-total checkout completes. The card object carries display metadata only — full numbers never leave the payment provider. */
2639
2654
  interface PaymentMethodAttachedData {
2640
2655
  /** The subscription the payment method was saved for. */
@@ -2661,6 +2676,10 @@ interface CustomerCreatedData {
2661
2676
  fullName: string | null;
2662
2677
  /** The customer's email. */
2663
2678
  email: string;
2679
+ /** The customer's tax identification number, if provided. */
2680
+ taxDocument: string | null;
2681
+ /** The local tax document type label inferred from the customer's country (e.g. CUIT, RFC, RUT), or null when no tax document was provided. */
2682
+ documentType: string | null;
2664
2683
  /** The customer's timezone. */
2665
2684
  timezone: string | null;
2666
2685
  /** Custom key-value metadata you attached to the customer. */
@@ -2680,6 +2699,10 @@ interface CustomerUpdatedData {
2680
2699
  fullName: string | null;
2681
2700
  /** The customer's email. */
2682
2701
  email: string;
2702
+ /** The customer's tax identification number, if provided. */
2703
+ taxDocument: string | null;
2704
+ /** The local tax document type label inferred from the customer's country (e.g. CUIT, RFC, RUT), or null when no tax document was provided. */
2705
+ documentType: string | null;
2683
2706
  /** The customer's timezone. */
2684
2707
  timezone: string | null;
2685
2708
  /** Custom key-value metadata you attached to the customer. */
@@ -2695,7 +2718,7 @@ interface CustomerStateChangedData {
2695
2718
  customerId: string;
2696
2719
  /** What caused the transition. One of: subscription_created, subscription_activated, subscription_canceled, plan_change, past_due, trial_started, trial_converted, trial_expired, cancellation_scheduled, cancellation_revoked, seats_updated, addon_activated, addon_deactivated, credits_depleted, balance_depleted, quota_exceeded. */
2697
2720
  trigger: string;
2698
- /** The customer's current subscription status, or "none" when no live subscription exists. Grant access only when trialing or active. */
2721
+ /** The customer's current subscription status, or "none" when no live subscription exists. Access is granted while trialing, active, or past_due — past_due is a permissive grace window during dunning. */
2699
2722
  status: string;
2700
2723
  /** The live subscription ID, or null when status is none. */
2701
2724
  subscriptionId: string | null;
@@ -2842,21 +2865,6 @@ interface QuotaExceededData {
2842
2865
  /** ISO 8601 start of the usage period. */
2843
2866
  periodStart: string;
2844
2867
  }
2845
- /** Fired for every processed usage event. HIGH VOLUME: this fires once per tracked event, so it is excluded from family select-all in the dashboard — subscribe to it explicitly and make sure your endpoint can absorb your own ingest rate. */
2846
- interface UsageRecordedData {
2847
- /** The usage event ID. */
2848
- usageEventId: string;
2849
- /** The subscription ID. */
2850
- subscriptionId: string;
2851
- /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2852
- customerId: string;
2853
- /** The feature code the usage was tracked against. */
2854
- featureCode: string;
2855
- /** The recorded quantity. For AI model events this is the total token count. */
2856
- value: number;
2857
- /** ISO 8601 timestamp of the usage event. */
2858
- ts: string;
2859
- }
2860
2868
  /** Fired when a customer's seat count changes for a seats-type feature — via the SDK seats endpoints or the dashboard. Also fires customer.state_changed with trigger seats_updated. */
2861
2869
  interface SeatsUpdatedData {
2862
2870
  /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
@@ -2909,6 +2917,21 @@ interface AddonDeactivatedData {
2909
2917
  /** The feature the add-on unlocked or extended. */
2910
2918
  featureCode: string;
2911
2919
  }
2920
+ /** Fired for every processed usage event. HIGH VOLUME: this fires once per tracked event, so it is excluded from family select-all in the dashboard — subscribe to it explicitly and make sure your endpoint can absorb your own ingest rate. */
2921
+ interface UsageRecordedData {
2922
+ /** The subscription ID. */
2923
+ subscriptionId: string;
2924
+ /** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
2925
+ customerId: string;
2926
+ /** The usage event ID. */
2927
+ usageEventId: string;
2928
+ /** The feature code the usage was tracked against. */
2929
+ featureCode: string;
2930
+ /** The recorded quantity. For AI model events this is the total token count. */
2931
+ value: number;
2932
+ /** ISO 8601 timestamp of the usage event. */
2933
+ ts: string;
2934
+ }
2912
2935
  /** Organization-level event about YOUR money as the merchant. Fired when payment funds the provider was holding become available to pay out to your bank. */
2913
2936
  interface PayoutAvailableData {
2914
2937
  /** Your full available payout balance in cents (100 = $1.00) at the time of the event — not just the newly released funds. */
@@ -2986,7 +3009,7 @@ interface WebhookEventEnvelope<E extends WebhookEvent, D> {
2986
3009
  apiVersion: string;
2987
3010
  data: D;
2988
3011
  }
2989
- type WebhookEventPayload = WebhookEventEnvelope<"subscription.created", SubscriptionCreatedData> | WebhookEventEnvelope<"subscription.activated", SubscriptionActivatedData> | WebhookEventEnvelope<"subscription.reactivated", SubscriptionReactivatedData> | WebhookEventEnvelope<"subscription.canceled", SubscriptionCanceledData> | WebhookEventEnvelope<"subscription.updated", SubscriptionUpdatedData> | WebhookEventEnvelope<"subscription.plan_changed", SubscriptionPlanChangedData> | WebhookEventEnvelope<"subscription.cancellation_scheduled", SubscriptionCancellationScheduledData> | WebhookEventEnvelope<"subscription.cancellation_revoked", SubscriptionCancellationRevokedData> | WebhookEventEnvelope<"subscription.plan_change_scheduled", SubscriptionPlanChangeScheduledData> | WebhookEventEnvelope<"subscription.plan_change_revoked", SubscriptionPlanChangeRevokedData> | WebhookEventEnvelope<"subscription.past_due", SubscriptionPastDueData> | WebhookEventEnvelope<"trial.started", TrialStartedData> | WebhookEventEnvelope<"trial.converted", TrialConvertedData> | WebhookEventEnvelope<"trial.expired", TrialExpiredData> | WebhookEventEnvelope<"trial.will_end", TrialWillEndData> | WebhookEventEnvelope<"trial.checkout_ready", TrialCheckoutReadyData> | WebhookEventEnvelope<"checkout.ready", CheckoutReadyData> | WebhookEventEnvelope<"payment.received", PaymentReceivedData> | WebhookEventEnvelope<"payment.failed", PaymentFailedData> | WebhookEventEnvelope<"payment.recovered", PaymentRecoveredData> | WebhookEventEnvelope<"payment.retry_failed", PaymentRetryFailedData> | WebhookEventEnvelope<"payment.refunded", PaymentRefundedData> | WebhookEventEnvelope<"payment.disputed", PaymentDisputedData> | WebhookEventEnvelope<"payment.dispute_resolved", PaymentDisputeResolvedData> | WebhookEventEnvelope<"payment_link.created", PaymentLinkCreatedData> | WebhookEventEnvelope<"payment_link.completed", PaymentLinkCompletedData> | WebhookEventEnvelope<"payment_link.failed", PaymentLinkFailedData> | WebhookEventEnvelope<"payment_link.canceled", PaymentLinkCanceledData> | WebhookEventEnvelope<"invoice.created", InvoiceCreatedData> | WebhookEventEnvelope<"invoice.upcoming", InvoiceUpcomingData> | WebhookEventEnvelope<"invoice.overdue", InvoiceOverdueData> | WebhookEventEnvelope<"invoice.voided", InvoiceVoidedData> | WebhookEventEnvelope<"payment_method.attached", PaymentMethodAttachedData> | WebhookEventEnvelope<"payment_method.updated", PaymentMethodUpdatedData> | WebhookEventEnvelope<"customer.created", CustomerCreatedData> | WebhookEventEnvelope<"customer.updated", CustomerUpdatedData> | WebhookEventEnvelope<"customer.state_changed", CustomerStateChangedData> | WebhookEventEnvelope<"credits.granted", CreditsGrantedData> | WebhookEventEnvelope<"credits.purchased", CreditsPurchasedData> | WebhookEventEnvelope<"credits.low", CreditsLowData> | WebhookEventEnvelope<"credits.depleted", CreditsDepletedData> | WebhookEventEnvelope<"credits.expired", CreditsExpiredData> | WebhookEventEnvelope<"balance.topped_up", BalanceToppedUpData> | WebhookEventEnvelope<"balance.low", BalanceLowData> | WebhookEventEnvelope<"balance.depleted", BalanceDepletedData> | WebhookEventEnvelope<"quota.threshold_reached", QuotaThresholdReachedData> | WebhookEventEnvelope<"quota.exceeded", QuotaExceededData> | WebhookEventEnvelope<"usage.recorded", UsageRecordedData> | WebhookEventEnvelope<"seats.updated", SeatsUpdatedData> | WebhookEventEnvelope<"seats.limit_reached", SeatsLimitReachedData> | WebhookEventEnvelope<"addon.activated", AddonActivatedData> | WebhookEventEnvelope<"addon.deactivated", AddonDeactivatedData> | WebhookEventEnvelope<"payout.available", PayoutAvailableData> | WebhookEventEnvelope<"payout.created", PayoutCreatedData> | WebhookEventEnvelope<"payout.paid", PayoutPaidData> | WebhookEventEnvelope<"payout.failed", PayoutFailedData>;
3012
+ type WebhookEventPayload = WebhookEventEnvelope<"subscription.created", SubscriptionCreatedData> | WebhookEventEnvelope<"subscription.activated", SubscriptionActivatedData> | WebhookEventEnvelope<"subscription.reactivated", SubscriptionReactivatedData> | WebhookEventEnvelope<"subscription.canceled", SubscriptionCanceledData> | WebhookEventEnvelope<"subscription.updated", SubscriptionUpdatedData> | WebhookEventEnvelope<"subscription.plan_changed", SubscriptionPlanChangedData> | WebhookEventEnvelope<"subscription.cancellation_scheduled", SubscriptionCancellationScheduledData> | WebhookEventEnvelope<"subscription.cancellation_revoked", SubscriptionCancellationRevokedData> | WebhookEventEnvelope<"subscription.plan_change_scheduled", SubscriptionPlanChangeScheduledData> | WebhookEventEnvelope<"subscription.plan_change_revoked", SubscriptionPlanChangeRevokedData> | WebhookEventEnvelope<"subscription.past_due", SubscriptionPastDueData> | WebhookEventEnvelope<"trial.started", TrialStartedData> | WebhookEventEnvelope<"trial.converted", TrialConvertedData> | WebhookEventEnvelope<"trial.expired", TrialExpiredData> | WebhookEventEnvelope<"trial.will_end", TrialWillEndData> | WebhookEventEnvelope<"trial.checkout_ready", TrialCheckoutReadyData> | WebhookEventEnvelope<"checkout.ready", CheckoutReadyData> | WebhookEventEnvelope<"payment.received", PaymentReceivedData> | WebhookEventEnvelope<"payment.failed", PaymentFailedData> | WebhookEventEnvelope<"payment.recovered", PaymentRecoveredData> | WebhookEventEnvelope<"payment.retry_failed", PaymentRetryFailedData> | WebhookEventEnvelope<"payment.refunded", PaymentRefundedData> | WebhookEventEnvelope<"payment.disputed", PaymentDisputedData> | WebhookEventEnvelope<"payment.dispute_resolved", PaymentDisputeResolvedData> | WebhookEventEnvelope<"payment_link.created", PaymentLinkCreatedData> | WebhookEventEnvelope<"payment_link.completed", PaymentLinkCompletedData> | WebhookEventEnvelope<"payment_link.failed", PaymentLinkFailedData> | WebhookEventEnvelope<"payment_link.canceled", PaymentLinkCanceledData> | WebhookEventEnvelope<"invoice.created", InvoiceCreatedData> | WebhookEventEnvelope<"invoice.voided", InvoiceVoidedData> | WebhookEventEnvelope<"invoice.overdue", InvoiceOverdueData> | WebhookEventEnvelope<"invoice.upcoming", InvoiceUpcomingData> | WebhookEventEnvelope<"payment_method.attached", PaymentMethodAttachedData> | WebhookEventEnvelope<"payment_method.updated", PaymentMethodUpdatedData> | WebhookEventEnvelope<"customer.created", CustomerCreatedData> | WebhookEventEnvelope<"customer.updated", CustomerUpdatedData> | WebhookEventEnvelope<"customer.state_changed", CustomerStateChangedData> | WebhookEventEnvelope<"credits.granted", CreditsGrantedData> | WebhookEventEnvelope<"credits.purchased", CreditsPurchasedData> | WebhookEventEnvelope<"credits.low", CreditsLowData> | WebhookEventEnvelope<"credits.depleted", CreditsDepletedData> | WebhookEventEnvelope<"credits.expired", CreditsExpiredData> | WebhookEventEnvelope<"balance.topped_up", BalanceToppedUpData> | WebhookEventEnvelope<"balance.low", BalanceLowData> | WebhookEventEnvelope<"balance.depleted", BalanceDepletedData> | WebhookEventEnvelope<"quota.threshold_reached", QuotaThresholdReachedData> | WebhookEventEnvelope<"quota.exceeded", QuotaExceededData> | WebhookEventEnvelope<"seats.updated", SeatsUpdatedData> | WebhookEventEnvelope<"seats.limit_reached", SeatsLimitReachedData> | WebhookEventEnvelope<"addon.activated", AddonActivatedData> | WebhookEventEnvelope<"addon.deactivated", AddonDeactivatedData> | WebhookEventEnvelope<"usage.recorded", UsageRecordedData> | WebhookEventEnvelope<"payout.available", PayoutAvailableData> | WebhookEventEnvelope<"payout.created", PayoutCreatedData> | WebhookEventEnvelope<"payout.paid", PayoutPaidData> | WebhookEventEnvelope<"payout.failed", PayoutFailedData>;
2990
3013
  interface WebhookEventDataMap {
2991
3014
  "subscription.created": SubscriptionCreatedData;
2992
3015
  "subscription.activated": SubscriptionActivatedData;
@@ -3017,9 +3040,9 @@ interface WebhookEventDataMap {
3017
3040
  "payment_link.failed": PaymentLinkFailedData;
3018
3041
  "payment_link.canceled": PaymentLinkCanceledData;
3019
3042
  "invoice.created": InvoiceCreatedData;
3020
- "invoice.upcoming": InvoiceUpcomingData;
3021
- "invoice.overdue": InvoiceOverdueData;
3022
3043
  "invoice.voided": InvoiceVoidedData;
3044
+ "invoice.overdue": InvoiceOverdueData;
3045
+ "invoice.upcoming": InvoiceUpcomingData;
3023
3046
  "payment_method.attached": PaymentMethodAttachedData;
3024
3047
  "payment_method.updated": PaymentMethodUpdatedData;
3025
3048
  "customer.created": CustomerCreatedData;
@@ -3035,11 +3058,11 @@ interface WebhookEventDataMap {
3035
3058
  "balance.depleted": BalanceDepletedData;
3036
3059
  "quota.threshold_reached": QuotaThresholdReachedData;
3037
3060
  "quota.exceeded": QuotaExceededData;
3038
- "usage.recorded": UsageRecordedData;
3039
3061
  "seats.updated": SeatsUpdatedData;
3040
3062
  "seats.limit_reached": SeatsLimitReachedData;
3041
3063
  "addon.activated": AddonActivatedData;
3042
3064
  "addon.deactivated": AddonDeactivatedData;
3065
+ "usage.recorded": UsageRecordedData;
3043
3066
  "payout.available": PayoutAvailableData;
3044
3067
  "payout.created": PayoutCreatedData;
3045
3068
  "payout.paid": PayoutPaidData;
@@ -3167,7 +3190,7 @@ declare function createCommet<const TConfig extends BillingConfig>(_billingConfi
3167
3190
 
3168
3191
  declare function registerIntegration(name: string, version: string): void;
3169
3192
 
3170
- declare const API_VERSION = "2026-06-10";
3193
+ declare const API_VERSION = "2026-06-23";
3171
3194
  declare const SDK_VERSION: string;
3172
3195
 
3173
3196
  export { API_VERSION, type ActivateAddonParams, type ActiveAddon, type AddPayoutBankAccountParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddQuotaParams, type AddSeatsParams, type AddedPlanToGroup, type Addon, type AddonActivatedData, type AddonDeactivatedData, type AdjustBalanceParams, type AdvanceTestClockParams, type ApiErrorDetail, type ApiKey, type ApiResponse, type BalanceAdjustment, type BalanceDepletedData, type BalanceLowData, type BalanceToppedUpData, type BalanceTopup, type BatchCreateCustomersParams, type BillingConfig, type BillingInterval, type BulkSeatUpdate, type BulkSetSeatsParams, type CanUseFeatureParams, type CancelPaymentParams, type CancelSubscriptionParams, type CanceledSubscription, type ChangePlanParams, type ChargePaymentParams, type CheckUsageParams, type CheckoutReadyData, Commet, CommetAPIError, type CommetClientOptions, CommetError, CommetValidationError, type CompletePayoutVerificationParams, type ConsumptionModel, type CreateAddonParams, type CreateAdjustmentInvoiceParams, type CreateApiKeyParams, type CreateCreditPackParams, type CreateCustomerParams, type CreateFeatureParams, type CreatePaymentParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateSubscriptionRecoveryLinkParams, type CreateWebhookParams, type CreatedApiKey, type CreatedInvoice, type CreditGrant, type CreditPack, type CreditsDepletedData, type CreditsExpiredData, type CreditsGrantedData, type CreditsLowData, type CreditsPurchasedData, type Currency, type Customer, type CustomerBatch, type CustomerCreatedData, type CustomerID, type CustomerStateChangedData, type CustomerUpdatedData, type DeactivateAddonParams, type DefaultPlanPrice, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteWebhookParams, type DeletedObject, type DeletedPlanRegionalPricing, type DeletedSubscriptionAddon, type DiscountType, type DownloadInvoiceParams, type EventID, type Feature, type FeatureAccess, type FeatureDef, type FeatureLookup, type FeatureType, type GetActiveSubscriptionParams, type GetAddonParams, type GetAllQuotaAllowancesParams, type GetAllSeatBalancesParams, type GetCustomerParams, type GetFeatureAccessParams, type GetFeatureParams, type GetInvoiceParams, type GetPaymentParams, type GetPlanGroupParams, type GetPlanParams, type GetPromoCodeParams, type GetQuotaAllowanceParams, type GetSeatBalanceParams, type GetSubscriptionParams, type GetTransactionParams, type GetWebhookParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type Invoice, type InvoiceCreatedData, type InvoiceDownload, type InvoiceOverdueData, type InvoiceStatus, type InvoiceType, type InvoiceUpcomingData, type InvoiceVoidedData, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomersParams, type ListFeatureAccessParams, type ListInvoicesParams, type ListPaymentsParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhooksParams, type PaginatedList, type PaginatedResponse, type Payment, type PaymentDisputeResolvedData, type PaymentDisputedData, type PaymentFailedData, type PaymentLinkCanceledData, type PaymentLinkCompletedData, type PaymentLinkCreatedData, type PaymentLinkFailedData, type PaymentMethodAttachedData, type PaymentMethodUpdateCheckout, type PaymentMethodUpdatedData, type PaymentReceivedData, type PaymentRecoveredData, type PaymentRefundedData, type PaymentRetryFailedData, type Payout, type PayoutAvailableData, type PayoutBankAccount, type PayoutCreatedData, type PayoutFailedData, type PayoutPaidData, type PayoutVerification, type Plan, type PlanChange, type PlanDef, type PlanFeature, type PlanFeatureValue, type PlanGroup, type PlanPrice, type PlanRegionalPricing, type PlanRegionalPricingResult, type PlanVisibility, type PortalAccess, type PreviewChange, type PreviewChangePlanParams, type PriceDef, type PromoCode, type PurchaseCreditsParams, type QuotaExceededData, type QuotaThresholdReachedData, type ReactivateSubscriptionParams, type ReactivatedSubscription, type RecoveryLink, type RefundTransactionParams, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveQuotaParams, type RemoveSeatsParams, type RemovedPlanFeature, type RemovedPlanFromGroup, type ReorderPlansInGroupParams, type ReorderedPlans, type RequestOptions, type RequestPayoutParams, type RequestPortalAccessParams, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type RetryTransactionParams, SDK_VERSION, type SeatBalance, type SeatBalanceListItem, type SeatEvent, type SeatsLimitReachedData, type SeatsUpdatedData, type SendInvoiceParams, type SentInvoice, type SetDefaultPlanPriceParams, type SetPlanRegionalPricingParams, type SetPlanVisibilityParams, type SetQuotaParams, type SetSeatsParams, type Subscription, type SubscriptionActivatedData, type SubscriptionAddon, type SubscriptionCanceledData, type SubscriptionCancellationRevokedData, type SubscriptionCancellationScheduledData, type SubscriptionCreatedData, type SubscriptionPastDueData, type SubscriptionPlanChangeRevokedData, type SubscriptionPlanChangeScheduledData, type SubscriptionPlanChangedData, type SubscriptionReactivatedData, type SubscriptionStatus, type SubscriptionUpdatedData, type TestClock, type TestClockBilling, type TestWebhookParams, type Timezone, type TopupBalanceParams, type TrackModelTokensParams, type TrackParams, type TrackUsageParams, type Transaction, type TransactionRefund, type TransactionRetry, type TransactionStatus, type TrialCheckoutReadyData, type TrialConvertedData, type TrialExpiredData, type TrialStartedData, type TrialWillEndData, type UncancelSubscriptionParams, type UncanceledSubscription, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdatePaymentMethodParams, type UpdatePlanFeatureParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateWebhookParams, type UpsertRegionalPricesParams, type UsageCheckDenialReason, type UsageCheckResult, type UsageEvent, type UsageEventProperty, type UsageQuota, type UsageQuotaEvent, type UsageRecordedData, type WebhookAddonRef, type WebhookBalance, type WebhookBankRef, type WebhookCardInfo, type WebhookCreditsBalance, type WebhookData, type WebhookEndpoint, type WebhookEndpointCreated, type WebhookEvent, type WebhookEventDataMap, type WebhookEventEnvelope, type WebhookEventHandler, type WebhookEventPayload, type WebhookFeatureAccess, type WebhookPayload, type WebhookPlanRef, type WebhookSeatSummary, type WebhookTestResult, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };