@commet/node 9.8.0 → 9.9.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 +216 -23
- package/dist/index.d.ts +216 -23
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/docs/api-reference/customers.md +2 -0
- package/docs/api-reference/generated-webhooks.md +2 -2
- package/docs/api-reference/index.md +1 -1
- package/docs/api-reference/plans.md +8 -3
- package/docs/api-reference/subscriptions.md +7 -5
- package/docs/documentation/cli.md +60 -49
- package/docs/documentation/create-api-key.md +3 -1
- package/docs/documentation/customers/customer-portal.md +10 -2
- package/docs/documentation/customers/manage-customers.md +2 -1
- package/docs/documentation/finance/payouts.md +11 -0
- package/docs/documentation/finance/supported-countries.md +5 -5
- package/docs/documentation/invoicing/handle-failed-payments.md +9 -9
- package/docs/documentation/payments/accept-one-time-payments.md +1 -1
- package/docs/documentation/payments/payment-orchestration.md +2 -0
- package/docs/documentation/payments/payment-providers.md +46 -0
- package/docs/documentation/payments/transactions-refunds-and-retries.md +1 -1
- package/docs/documentation/plans/add-ons.md +1 -1
- package/docs/documentation/plans/consumption-models.md +44 -9
- package/docs/documentation/plans/credit-packs.md +49 -1
- package/docs/documentation/plans/one-time-payments.md +3 -3
- package/docs/documentation/plans/plan-groups.md +46 -10
- package/docs/documentation/platform/dashboard-metrics-and-events.md +40 -9
- package/docs/documentation/sales/connect-dub-affiliates.md +52 -0
- package/docs/documentation/sales/introductory-offers.md +7 -13
- package/docs/documentation/sales/offers.md +10 -6
- package/docs/documentation/sales/promo-codes.md +47 -17
- package/docs/documentation/sales/promotional-offers.md +6 -7
- package/docs/documentation/sales/regional-prices.md +16 -0
- package/docs/documentation/sales/trial-periods.md +67 -40
- package/docs/documentation/subscriptions/manage-subscriptions.md +65 -2
- package/docs/documentation/subscriptions/pay-in-advance.md +4 -7
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +20 -2
- package/docs/documentation/testing-sandbox.md +2 -0
- package/docs/documentation/usage/track-usage.md +23 -0
- package/docs/errors/index.md +1 -0
- package/docs/errors/plan_balance_limit_reached.md +22 -0
- package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +8 -8
- package/docs/knowledge-base/how-do-discounts-work.md +7 -5
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +14 -8
- package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +1 -1
- package/docs/knowledge-base/how-do-trial-periods-work.md +30 -24
- package/docs/knowledge-base/how-does-billing-work.md +1 -0
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +11 -9
- package/docs/manifest.json +12 -2
- package/docs/platform-documentation.md +1 -0
- package/docs/schemas.md +27 -14
- package/docs/webhooks/introduction.md +14 -12
- package/docs/webhooks.md +42 -6
- package/docs/webhooks.openapi.json +857 -745
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -194,6 +194,11 @@ interface BalanceTopup {
|
|
|
194
194
|
object: "balance_topup";
|
|
195
195
|
livemode: boolean;
|
|
196
196
|
}
|
|
197
|
+
interface BusinessTaxId {
|
|
198
|
+
country: string;
|
|
199
|
+
type: string;
|
|
200
|
+
value: string;
|
|
201
|
+
}
|
|
197
202
|
interface ClaimLink {
|
|
198
203
|
url: string;
|
|
199
204
|
/** @format date-time */
|
|
@@ -333,6 +338,7 @@ interface Customer {
|
|
|
333
338
|
email: string;
|
|
334
339
|
taxDocument: string | null;
|
|
335
340
|
documentType: string | null;
|
|
341
|
+
businessTaxId: BusinessTaxId | null;
|
|
336
342
|
timezone: string | null;
|
|
337
343
|
metadata: Record<string, unknown> | null;
|
|
338
344
|
/** @format date-time */
|
|
@@ -901,6 +907,7 @@ interface Plan {
|
|
|
901
907
|
isPublic: boolean;
|
|
902
908
|
isDefault: boolean;
|
|
903
909
|
isFree: boolean;
|
|
910
|
+
/** Credits and balance plans: true stops usage when the plan and purchased amounts run out; false lets usage continue and bills the missing amount as overage at the next renewal (credits at the price per credit). Trials and free plans always stop. */
|
|
904
911
|
blockOnExhaustion: boolean | null;
|
|
905
912
|
/** Credits plans only; null for other consumption models. What happens to unused plan credits at each reset. Purchased credits never expire and never count toward maxPlanCredits. */
|
|
906
913
|
unusedPlanCredits: {
|
|
@@ -917,6 +924,21 @@ interface Plan {
|
|
|
917
924
|
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
918
925
|
interval: "day" | "week";
|
|
919
926
|
} | null;
|
|
927
|
+
/** Balance plans only; null for other consumption models. What happens to unused plan balance at each reset. Purchased balance never expires and never counts toward maxPlanBalance. */
|
|
928
|
+
unusedPlanBalance: {
|
|
929
|
+
type: "expire";
|
|
930
|
+
} | {
|
|
931
|
+
type: "roll_over";
|
|
932
|
+
/** The most plan balance a subscription holds after a reset, in USD cents, including the balance that reset grants; balance above it expires. At least the included balance of every price. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. null means no limit other than the largest storable amount, 2,147,483,647 cents. */
|
|
933
|
+
maxPlanBalance: number | null;
|
|
934
|
+
} | null;
|
|
935
|
+
/** Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; null means no limit. */
|
|
936
|
+
planBalanceLimit: {
|
|
937
|
+
/** The most plan balance a subscription spends in one window, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. */
|
|
938
|
+
amount: number;
|
|
939
|
+
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
940
|
+
interval: "day" | "week";
|
|
941
|
+
} | null;
|
|
920
942
|
sortOrder: number;
|
|
921
943
|
planGroupId: string | null;
|
|
922
944
|
metadata: Record<string, unknown> | null;
|
|
@@ -1636,14 +1658,27 @@ interface Subscription {
|
|
|
1636
1658
|
} | null;
|
|
1637
1659
|
}>;
|
|
1638
1660
|
credits: {
|
|
1661
|
+
/** Plan credits left. Kept for compatibility; equal to `plan`. */
|
|
1639
1662
|
remaining: number;
|
|
1640
1663
|
included: number;
|
|
1664
|
+
/** Purchased credits: purchases and manual adjustments. Spent after plan credits and kept until the subscription ends. */
|
|
1641
1665
|
purchased: number;
|
|
1666
|
+
/** Plan credits left this period. Spent first and replaced or rolled over at each reset; negative while overage is owed. */
|
|
1667
|
+
plan: number;
|
|
1668
|
+
/** Credits available: `plan` plus `purchased`. */
|
|
1669
|
+
total: number;
|
|
1642
1670
|
} | null;
|
|
1643
1671
|
balance: {
|
|
1672
|
+
/** Balance available in minor units of the subscription currency. Kept for compatibility; equal to `total`. */
|
|
1644
1673
|
remaining: number;
|
|
1645
1674
|
included: number;
|
|
1646
1675
|
currency: string;
|
|
1676
|
+
/** Plan balance left this period, in minor units. Spent first and replaced or rolled over at each reset; negative while overage is owed. */
|
|
1677
|
+
plan: number;
|
|
1678
|
+
/** Purchased balance in minor units: top-ups and manual adjustments. Spent after the plan balance and kept until the subscription ends. */
|
|
1679
|
+
purchased: number;
|
|
1680
|
+
/** Balance available in minor units: `plan` plus `purchased`. */
|
|
1681
|
+
total: number;
|
|
1647
1682
|
} | null;
|
|
1648
1683
|
priceId: string | null;
|
|
1649
1684
|
object: "subscription";
|
|
@@ -1657,23 +1692,25 @@ interface SubscriptionAddon {
|
|
|
1657
1692
|
livemode: boolean;
|
|
1658
1693
|
}
|
|
1659
1694
|
interface SubscriptionAutoTopUp {
|
|
1660
|
-
/** Whether credits
|
|
1695
|
+
/** Whether top-ups run automatically: credits bought on a credits plan, balance added on a balance plan. Always false when the plan does not sell credits or has balance top-ups turned off. */
|
|
1661
1696
|
enabled: boolean;
|
|
1662
|
-
/**
|
|
1697
|
+
/** The available amount at or below which a top-up runs, or null when never configured: credits (plan plus purchased) on a credits plan, minor units of the subscription currency (plan plus purchased balance) on a balance plan. */
|
|
1663
1698
|
threshold: number | null;
|
|
1664
|
-
/** Credits each top-up buys, or null when never configured. */
|
|
1699
|
+
/** Credits each top-up buys on a credits plan, or null when never configured or on a balance plan. */
|
|
1665
1700
|
quantity: number | null;
|
|
1666
|
-
/**
|
|
1701
|
+
/** Minor units of the subscription currency each top-up adds on a balance plan, charged plus tax, or null when never configured or on a credits plan. */
|
|
1702
|
+
amount: number | null;
|
|
1703
|
+
/** Maximum top-ups per renewal period, or null when never configured. */
|
|
1667
1704
|
maxPerPeriod: number | null;
|
|
1668
|
-
/** active
|
|
1705
|
+
/** active tops up when the available amount reaches the threshold; paused stops after three consecutive failed top-ups, or after one whose charge could not be refunded, until the payment method changes, a credit purchase or balance top-up succeeds or it is saved enabled again; off tops up nothing. */
|
|
1669
1706
|
status: "active" | "paused" | "off";
|
|
1670
|
-
/** Top-ups
|
|
1707
|
+
/** Top-ups made in the current renewal period. */
|
|
1671
1708
|
topUpsThisPeriod: number;
|
|
1672
1709
|
/** When the top-up count of the period resets, or null before the subscription starts its first period. */
|
|
1673
1710
|
periodResetsAt: string | null;
|
|
1674
1711
|
/** The last top-up that failed, or null when none has failed. */
|
|
1675
1712
|
lastFailure: {
|
|
1676
|
-
reason: "payment_declined" | "no_payment_method" | "quantity_below_minimum" | "purchase_failed";
|
|
1713
|
+
reason: "payment_declined" | "no_payment_method" | "quantity_below_minimum" | "amount_below_minimum" | "purchase_failed";
|
|
1677
1714
|
/** @format date-time */
|
|
1678
1715
|
at: string;
|
|
1679
1716
|
} | null;
|
|
@@ -2025,6 +2062,8 @@ type UsageCheck = {
|
|
|
2025
2062
|
*/
|
|
2026
2063
|
resetsAt: string;
|
|
2027
2064
|
} | null;
|
|
2065
|
+
/** Whether usage stops when plan and purchased credits run out. False only when the plan allows overage, which is billed at its price per credit; trials and free plans always stop. */
|
|
2066
|
+
blockOnExhaustion: boolean;
|
|
2028
2067
|
object: "usage_check";
|
|
2029
2068
|
livemode: boolean;
|
|
2030
2069
|
} | {
|
|
@@ -2037,7 +2076,29 @@ type UsageCheck = {
|
|
|
2037
2076
|
consumptionModel: "balance";
|
|
2038
2077
|
unitPrice: number;
|
|
2039
2078
|
estimatedAmount: number;
|
|
2079
|
+
/** The available balance, plan plus purchased, in rate scale (10000 = 1.00 of the subscription currency). Equal to totalBalance. */
|
|
2040
2080
|
currentBalance: number;
|
|
2081
|
+
/** The plan part of the balance in rate scale. Consumed first, replaced or rolled over at each reset, and negative while overage is owed. */
|
|
2082
|
+
planBalance: number;
|
|
2083
|
+
/** The purchased part of the balance in rate scale: top-ups and adjustments. Consumed after the plan part and kept until the subscription ends. */
|
|
2084
|
+
purchasedBalance: number;
|
|
2085
|
+
/** planBalance plus purchasedBalance, in rate scale. */
|
|
2086
|
+
totalBalance: number;
|
|
2087
|
+
planBalanceLimit: {
|
|
2088
|
+
/** The most plan balance the subscription spends per window, in rate scale (10000 = 1.00 of the subscription currency). */
|
|
2089
|
+
amount: number;
|
|
2090
|
+
/** The window length: 24 hours for `day`, 7 days for `week`. */
|
|
2091
|
+
interval: "day" | "week";
|
|
2092
|
+
/** Plan balance spent in the current window, in rate scale. */
|
|
2093
|
+
spent: number;
|
|
2094
|
+
/** Plan balance the subscription can still spend in the current window, in rate scale. Purchased balance is not limited. */
|
|
2095
|
+
remaining: number;
|
|
2096
|
+
/**
|
|
2097
|
+
* When the next window starts and spending resets.
|
|
2098
|
+
* @format date-time
|
|
2099
|
+
*/
|
|
2100
|
+
resetsAt: string;
|
|
2101
|
+
} | null;
|
|
2041
2102
|
blockOnExhaustion: boolean;
|
|
2042
2103
|
currency: string;
|
|
2043
2104
|
object: "usage_check";
|
|
@@ -2078,6 +2139,22 @@ interface UsageEvent {
|
|
|
2078
2139
|
*/
|
|
2079
2140
|
resetsAt: string;
|
|
2080
2141
|
} | null;
|
|
2142
|
+
/** Balance consumption on a plan with a plan balance limit: the limit after this event. Omitted for credits and for plans without a limit. */
|
|
2143
|
+
planBalanceLimit?: {
|
|
2144
|
+
/** The most plan balance the subscription spends per window, in rate scale (10000 = 1.00 of the subscription currency). */
|
|
2145
|
+
amount: number;
|
|
2146
|
+
/** The window length: 24 hours for `day`, 7 days for `week`. */
|
|
2147
|
+
interval: "day" | "week";
|
|
2148
|
+
/** Plan balance spent in the current window, in rate scale. */
|
|
2149
|
+
spent: number;
|
|
2150
|
+
/** Plan balance the subscription can still spend in the current window, in rate scale. Purchased balance is not limited. */
|
|
2151
|
+
remaining: number;
|
|
2152
|
+
/**
|
|
2153
|
+
* When the next window starts and spending resets.
|
|
2154
|
+
* @format date-time
|
|
2155
|
+
*/
|
|
2156
|
+
resetsAt: string;
|
|
2157
|
+
} | null;
|
|
2081
2158
|
};
|
|
2082
2159
|
object: "usage_event";
|
|
2083
2160
|
livemode: boolean;
|
|
@@ -2124,7 +2201,14 @@ interface WebhookAddonRef {
|
|
|
2124
2201
|
name: string;
|
|
2125
2202
|
}
|
|
2126
2203
|
interface WebhookBalance {
|
|
2204
|
+
/** The available balance, plan plus purchased, in rate scale. Equal to totalBalance. */
|
|
2127
2205
|
currentBalance: number;
|
|
2206
|
+
/** The plan part in rate scale: spent first, replaced or rolled over at each reset, negative while overage is owed. */
|
|
2207
|
+
planBalance: number;
|
|
2208
|
+
/** The purchased part in rate scale: top-ups and manual adjustments, spent after the plan part and kept until the subscription ends. */
|
|
2209
|
+
purchasedBalance: number;
|
|
2210
|
+
/** planBalance plus purchasedBalance, in rate scale. */
|
|
2211
|
+
totalBalance: number;
|
|
2128
2212
|
}
|
|
2129
2213
|
interface WebhookBankRef {
|
|
2130
2214
|
bankName: string | null;
|
|
@@ -2450,6 +2534,8 @@ interface UpdateCustomerParams {
|
|
|
2450
2534
|
email?: string;
|
|
2451
2535
|
fullName?: string;
|
|
2452
2536
|
taxDocument?: string;
|
|
2537
|
+
/** Business tax ID, such as an EU VAT number or a Peruvian RUC, for the country of the customer's address. Accepted only where Commet collects tax; a valid ID replaces consumer tax with the business treatment. Send null to remove it. */
|
|
2538
|
+
businessTaxId?: string | null;
|
|
2453
2539
|
externalId?: string;
|
|
2454
2540
|
timezone?: Timezone;
|
|
2455
2541
|
metadata?: Record<string, unknown>;
|
|
@@ -2495,6 +2581,8 @@ interface CreateCustomerParams {
|
|
|
2495
2581
|
externalId?: string;
|
|
2496
2582
|
fullName?: string;
|
|
2497
2583
|
taxDocument?: string;
|
|
2584
|
+
/** Business tax ID, such as an EU VAT number or a Peruvian RUC, for the country of the customer's address. Accepted only where Commet collects tax; a valid ID replaces consumer tax with the business treatment. */
|
|
2585
|
+
businessTaxId?: string;
|
|
2498
2586
|
address?: {
|
|
2499
2587
|
line1: string;
|
|
2500
2588
|
line2?: string;
|
|
@@ -3073,6 +3161,23 @@ interface UpdatePlanParams {
|
|
|
3073
3161
|
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
3074
3162
|
interval: "day" | "week";
|
|
3075
3163
|
} | null;
|
|
3164
|
+
/** Balance plans only. What happens to unused plan balance at each reset. Existing subscriptions apply it from their next reset. */
|
|
3165
|
+
unusedPlanBalance?: {
|
|
3166
|
+
type: "expire";
|
|
3167
|
+
} | {
|
|
3168
|
+
type: "roll_over";
|
|
3169
|
+
/** The most plan balance a subscription holds after a reset, in USD cents, including the balance that reset grants; balance above it expires. At least the included balance of every price. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. null means no limit other than the largest storable amount, 2,147,483,647 cents. */
|
|
3170
|
+
maxPlanBalance: number | null;
|
|
3171
|
+
};
|
|
3172
|
+
/** Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; null removes the limit. Raising or removing it applies to existing subscriptions at once; lowering it, adding it or changing its interval applies from their next period. */
|
|
3173
|
+
planBalanceLimit?: {
|
|
3174
|
+
/** The most plan balance a subscription spends in one window, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. */
|
|
3175
|
+
amount: number;
|
|
3176
|
+
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
3177
|
+
interval: "day" | "week";
|
|
3178
|
+
} | null;
|
|
3179
|
+
/** Credits and balance plans only. false lets usage continue past the plan and purchased amounts and bills the missing amount as overage at the next renewal; a credits plan bills it at the price per credit and needs one. Trials and free plans always stop, so free plans accept only true. Existing subscriptions apply it from their next reset. */
|
|
3180
|
+
blockOnExhaustion?: boolean;
|
|
3076
3181
|
/** Make this plan the default plan of its plan group: customers created with that planGroupId start on it, and a paid plan of the group that ends from the customer portal, a revoked payment authorization or exhausted dunning moves to it instead of canceling. Requires a free plan in a plan group; replaces the group's previous default plan. false unmarks it. */
|
|
3077
3182
|
isDefault?: boolean;
|
|
3078
3183
|
}
|
|
@@ -3093,6 +3198,7 @@ interface CreatePlanParams {
|
|
|
3093
3198
|
consumptionModel?: "metered" | "credits" | "balance";
|
|
3094
3199
|
isPublic?: boolean;
|
|
3095
3200
|
isFree?: boolean;
|
|
3201
|
+
/** Credits and balance plans. Omitted, credits plans and free plans stop usage when the plan and purchased amounts run out, and paid balance plans bill the missing balance as overage. A new credits plan always stops usage: it allows overage only with a price per credit, which is set after creation, and then `PATCH /v1/plans/{id}` turns overage on. */
|
|
3096
3202
|
blockOnExhaustion?: boolean;
|
|
3097
3203
|
/** Credits plans only. What happens to unused plan credits at each reset; omitted means they expire. */
|
|
3098
3204
|
unusedPlanCredits?: {
|
|
@@ -3109,6 +3215,21 @@ interface CreatePlanParams {
|
|
|
3109
3215
|
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
3110
3216
|
interval: "day" | "week";
|
|
3111
3217
|
} | null;
|
|
3218
|
+
/** Balance plans only. What happens to unused plan balance at each reset; omitted means it expires. */
|
|
3219
|
+
unusedPlanBalance?: {
|
|
3220
|
+
type: "expire";
|
|
3221
|
+
} | {
|
|
3222
|
+
type: "roll_over";
|
|
3223
|
+
/** The most plan balance a subscription holds after a reset, in USD cents, including the balance that reset grants; balance above it expires. At least the included balance of every price. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. null means no limit other than the largest storable amount, 2,147,483,647 cents. */
|
|
3224
|
+
maxPlanBalance: number | null;
|
|
3225
|
+
};
|
|
3226
|
+
/** Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; omitted or null means no limit. */
|
|
3227
|
+
planBalanceLimit?: {
|
|
3228
|
+
/** The most plan balance a subscription spends in one window, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. */
|
|
3229
|
+
amount: number;
|
|
3230
|
+
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
3231
|
+
interval: "day" | "week";
|
|
3232
|
+
} | null;
|
|
3112
3233
|
planGroupId?: string;
|
|
3113
3234
|
/** Make this plan the default plan of its plan group: customers created with that planGroupId start on it, and a paid plan of the group that ends from the customer portal, a revoked payment authorization or exhausted dunning moves to it instead of canceling. Requires a free plan with a planGroupId; replaces the group's previous default plan. */
|
|
3114
3235
|
isDefault?: boolean;
|
|
@@ -3139,7 +3260,7 @@ declare class PlansResource {
|
|
|
3139
3260
|
setRegionalPricing(params: SetPlanRegionalPricingParams, options?: RequestOptions): Promise<PlanRegionalPricingResult>;
|
|
3140
3261
|
/** Get a plan with public price IDs and their automatic introductory offer IDs. */
|
|
3141
3262
|
get(params: GetPlanParams, options?: RequestOptions): Promise<Plan>;
|
|
3142
|
-
/** Update a plan's name, description, visibility, default status, metadata, what happens to its unused plan credits, or its plan credit limit. */
|
|
3263
|
+
/** Update a plan's name, description, visibility, default status, metadata, overage behavior, what happens to its unused plan credits or plan balance, or its plan credit or plan balance limit. */
|
|
3143
3264
|
update(params: UpdatePlanParams, options?: RequestOptions): Promise<Plan>;
|
|
3144
3265
|
/** Soft-delete a plan. */
|
|
3145
3266
|
delete(params: DeletePlanParams, options?: RequestOptions): Promise<DeletedObject>;
|
|
@@ -3152,7 +3273,7 @@ declare class PlansResource {
|
|
|
3152
3273
|
hasMore: boolean;
|
|
3153
3274
|
nextCursor?: string;
|
|
3154
3275
|
}>;
|
|
3155
|
-
/** Create a new plan with optional consumption model, visibility, and plan
|
|
3276
|
+
/** Create a new plan with optional consumption model, visibility, plan group assignment, overage behavior, and the rollover and spend limit of its plan credits or plan balance. */
|
|
3156
3277
|
create(params: CreatePlanParams, options?: RequestOptions): Promise<Plan>;
|
|
3157
3278
|
}
|
|
3158
3279
|
|
|
@@ -3340,7 +3461,10 @@ interface UpdateSubscriptionAutoTopUpParams {
|
|
|
3340
3461
|
id: string;
|
|
3341
3462
|
enabled?: boolean;
|
|
3342
3463
|
threshold?: number;
|
|
3464
|
+
/** Credits each top-up buys. Credits plans only. */
|
|
3343
3465
|
quantity?: number;
|
|
3466
|
+
/** Minor units of the subscription currency each top-up adds. Balance plans only. */
|
|
3467
|
+
amount?: number;
|
|
3344
3468
|
maxPerPeriod?: number;
|
|
3345
3469
|
}
|
|
3346
3470
|
interface AdjustBalanceParams {
|
|
@@ -3351,6 +3475,7 @@ interface AdjustBalanceParams {
|
|
|
3351
3475
|
}
|
|
3352
3476
|
interface TopupBalanceParams {
|
|
3353
3477
|
id: string;
|
|
3478
|
+
/** The amount to add, in minor units of the subscription currency (cents; whole units for zero-decimal currencies). */
|
|
3354
3479
|
amount: number;
|
|
3355
3480
|
}
|
|
3356
3481
|
interface CancelSubscriptionParams {
|
|
@@ -3463,6 +3588,8 @@ type CreateSubscriptionParams = {
|
|
|
3463
3588
|
initialSeats?: Record<string, number>;
|
|
3464
3589
|
/** Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present. */
|
|
3465
3590
|
provider?: "stripe" | "commet" | "dlocal" | string;
|
|
3591
|
+
/** Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments. */
|
|
3592
|
+
paymentMethodTypes?: Array<"card" | "oxxo" | "mercado_pago" | "google_pay" | "smartpix">;
|
|
3466
3593
|
name?: string;
|
|
3467
3594
|
/** @format date-time */
|
|
3468
3595
|
startDate?: string;
|
|
@@ -3485,6 +3612,8 @@ type CreateSubscriptionParams = {
|
|
|
3485
3612
|
initialSeats?: Record<string, number>;
|
|
3486
3613
|
/** Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present. */
|
|
3487
3614
|
provider?: "stripe" | "commet" | "dlocal" | string;
|
|
3615
|
+
/** Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments. */
|
|
3616
|
+
paymentMethodTypes?: Array<"card" | "oxxo" | "mercado_pago" | "google_pay" | "smartpix">;
|
|
3488
3617
|
name?: string;
|
|
3489
3618
|
/** @format date-time */
|
|
3490
3619
|
startDate?: string;
|
|
@@ -3507,6 +3636,8 @@ type CreateSubscriptionParams = {
|
|
|
3507
3636
|
initialSeats?: Record<string, number>;
|
|
3508
3637
|
/** Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present. */
|
|
3509
3638
|
provider?: "stripe" | "commet" | "dlocal" | string;
|
|
3639
|
+
/** Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments. */
|
|
3640
|
+
paymentMethodTypes?: Array<"card" | "oxxo" | "mercado_pago" | "google_pay" | "smartpix">;
|
|
3510
3641
|
name?: string;
|
|
3511
3642
|
/** @format date-time */
|
|
3512
3643
|
startDate?: string;
|
|
@@ -3529,6 +3660,8 @@ type CreateSubscriptionParams = {
|
|
|
3529
3660
|
initialSeats?: Record<string, number>;
|
|
3530
3661
|
/** Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present. */
|
|
3531
3662
|
provider?: "stripe" | "commet" | "dlocal" | string;
|
|
3663
|
+
/** Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments. */
|
|
3664
|
+
paymentMethodTypes?: Array<"card" | "oxxo" | "mercado_pago" | "google_pay" | "smartpix">;
|
|
3532
3665
|
name?: string;
|
|
3533
3666
|
/** @format date-time */
|
|
3534
3667
|
startDate?: string;
|
|
@@ -3551,6 +3684,8 @@ type CreateSubscriptionParams = {
|
|
|
3551
3684
|
initialSeats?: Record<string, number>;
|
|
3552
3685
|
/** Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present. */
|
|
3553
3686
|
provider?: "stripe" | "commet" | "dlocal" | string;
|
|
3687
|
+
/** Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments. */
|
|
3688
|
+
paymentMethodTypes?: Array<"card" | "oxxo" | "mercado_pago" | "google_pay" | "smartpix">;
|
|
3554
3689
|
name?: string;
|
|
3555
3690
|
/** @format date-time */
|
|
3556
3691
|
startDate?: string;
|
|
@@ -3574,6 +3709,8 @@ type CreateSubscriptionParams = {
|
|
|
3574
3709
|
initialSeats?: Record<string, number>;
|
|
3575
3710
|
/** Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present. */
|
|
3576
3711
|
provider?: "stripe" | "commet" | "dlocal" | string;
|
|
3712
|
+
/** Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments. */
|
|
3713
|
+
paymentMethodTypes?: Array<"card" | "oxxo" | "mercado_pago" | "google_pay" | "smartpix">;
|
|
3577
3714
|
name?: string;
|
|
3578
3715
|
/** @format date-time */
|
|
3579
3716
|
startDate?: string;
|
|
@@ -3597,13 +3734,13 @@ declare class SubscriptionsResource {
|
|
|
3597
3734
|
deactivateAddon(params: DeactivateAddonParams, options?: RequestOptions): Promise<DeletedSubscriptionAddon>;
|
|
3598
3735
|
/** Activate an add-on on a subscription. Charges a prorated amount for the current billing period. */
|
|
3599
3736
|
activateAddon(params: ActivateAddonParams, options?: RequestOptions): Promise<SubscriptionAddon>;
|
|
3600
|
-
/** Read whether the subscription
|
|
3737
|
+
/** Read whether the subscription tops up automatically with its saved payment method when its available credits or balance reach a threshold, with the top-ups used this period and the last failure. */
|
|
3601
3738
|
getAutoTopUp(params: GetSubscriptionAutoTopUpParams, options?: RequestOptions): Promise<SubscriptionAutoTopUp>;
|
|
3602
|
-
/** Turn automatic
|
|
3739
|
+
/** Turn automatic top-ups on or off and set the threshold, the size of each top-up and the maximum top-ups per period. Send only the fields that change. On a credits plan each top-up buys `quantity` credits; on a balance plan it adds `amount` in minor units of the subscription currency, plus tax, and `threshold` is in the same minor units. Enabling requires a plan that sells credits or has balance top-ups on. The size must be at least the plan's minimum when auto top-up is enabled or when the size changes, so turning it off keeps working after the minimum rises. Saving it enabled resumes a paused auto top-up. */
|
|
3603
3740
|
updateAutoTopUp(params: UpdateSubscriptionAutoTopUpParams, options?: RequestOptions): Promise<SubscriptionAutoTopUp>;
|
|
3604
3741
|
/** Adjust a subscription's balance or credits by a signed amount. Positive adds, negative subtracts. */
|
|
3605
3742
|
adjustBalance(params: AdjustBalanceParams, options?: RequestOptions): Promise<BalanceAdjustment>;
|
|
3606
|
-
/** Top up a subscription
|
|
3743
|
+
/** Top up a balance subscription. Charges the customer's payment method for the amount plus tax, adds it to the subscription's purchased balance (after paying back any overage owed on the plan balance), creates its invoice and emits `balance.topped_up`. Purchased balance is spent after the plan balance and is kept until the subscription ends. Rejected with 400 when the subscription is not on a balance plan, its plan has top-ups turned off, or the amount is below the effective minimum: the plan's minimum top-up in the subscription currency, raised to the currency's minimum charge. */
|
|
3607
3744
|
topupBalance(params: TopupBalanceParams, options?: RequestOptions): Promise<BalanceTopup>;
|
|
3608
3745
|
/** Cancel immediately or at period end and return the updated subscription. */
|
|
3609
3746
|
cancel(params: CancelSubscriptionParams, options?: RequestOptions): Promise<Subscription>;
|
|
@@ -3786,7 +3923,7 @@ declare class GeneratedResources {
|
|
|
3786
3923
|
protected initResources(http: CommetHTTPClient): void;
|
|
3787
3924
|
}
|
|
3788
3925
|
|
|
3789
|
-
type WebhookEvent = "subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "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" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "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";
|
|
3926
|
+
type WebhookEvent = "subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "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" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed";
|
|
3790
3927
|
/** Fired when a subscription record is created, usually with status pending_payment: the first charge has not been confirmed yet — do NOT grant access here; wait for subscription.activated. A trial whose price requires no payment method is created already trialing, together with trial.started. */
|
|
3791
3928
|
interface SubscriptionCreatedData {
|
|
3792
3929
|
/** The subscription ID. */
|
|
@@ -4578,6 +4715,17 @@ interface PaymentMethodUpdatedData {
|
|
|
4578
4715
|
/** Card display metadata for the new method: brand, last4, expMonth, expYear. Null when the method is not a card or its details cannot be retrieved. */
|
|
4579
4716
|
card: WebhookCardInfo | null;
|
|
4580
4717
|
}
|
|
4718
|
+
/** Fired when a saved payment method is removed from a customer: the customer unlinked it at the payment provider (for example, revoking a Mercado Pago authorization), or removed it through the customer portal. Removing a method never changes the customer's subscriptions; a renewal that finds no usable method follows the usual failed-payment recovery. */
|
|
4719
|
+
interface PaymentMethodDetachedData {
|
|
4720
|
+
/** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
|
|
4721
|
+
customerId: string;
|
|
4722
|
+
/** The payment method: card, oxxo, or mercado_pago. Null when unknown. */
|
|
4723
|
+
paymentMethod: PaymentMethod | null;
|
|
4724
|
+
/** Card display metadata of the removed method: brand, last4, expMonth, expYear. Null when the method is not a card or its details cannot be retrieved. */
|
|
4725
|
+
card: WebhookCardInfo | null;
|
|
4726
|
+
/** Why the method was removed: `unlinked_at_provider` when the customer revoked it at the payment provider, `removed_by_customer` when the customer removed it through the customer portal. */
|
|
4727
|
+
reason: "unlinked_at_provider" | "removed_by_customer";
|
|
4728
|
+
}
|
|
4581
4729
|
/** Fired when a customer is created, via the API (including batch create), SDK, or dashboard. The payload is the customer resource exactly as GET /customers returns it. */
|
|
4582
4730
|
interface CustomerCreatedData {
|
|
4583
4731
|
/** The Commet customer ID (cus_...). */
|
|
@@ -4592,6 +4740,15 @@ interface CustomerCreatedData {
|
|
|
4592
4740
|
taxDocument: string | null;
|
|
4593
4741
|
/** 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. */
|
|
4594
4742
|
documentType: string | null;
|
|
4743
|
+
/** The business tax ID saved for the customer (EU VAT number, Peruvian RUC), or null when the customer has none. */
|
|
4744
|
+
businessTaxId: {
|
|
4745
|
+
/** ISO-2 country the tax ID belongs to. */
|
|
4746
|
+
country: string;
|
|
4747
|
+
/** Tax ID type (e.g. eu_vat, pe_ruc). */
|
|
4748
|
+
type: string;
|
|
4749
|
+
/** The normalized tax ID. */
|
|
4750
|
+
value: string;
|
|
4751
|
+
} | null;
|
|
4595
4752
|
/** The customer's timezone. */
|
|
4596
4753
|
timezone: string | null;
|
|
4597
4754
|
/** Custom key-value metadata you attached to the customer. */
|
|
@@ -4615,6 +4772,15 @@ interface CustomerUpdatedData {
|
|
|
4615
4772
|
taxDocument: string | null;
|
|
4616
4773
|
/** 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. */
|
|
4617
4774
|
documentType: string | null;
|
|
4775
|
+
/** The business tax ID saved for the customer (EU VAT number, Peruvian RUC), or null when the customer has none. */
|
|
4776
|
+
businessTaxId: {
|
|
4777
|
+
/** ISO-2 country the tax ID belongs to. */
|
|
4778
|
+
country: string;
|
|
4779
|
+
/** Tax ID type (e.g. eu_vat, pe_ruc). */
|
|
4780
|
+
type: string;
|
|
4781
|
+
/** The normalized tax ID. */
|
|
4782
|
+
value: string;
|
|
4783
|
+
} | null;
|
|
4618
4784
|
/** The customer's timezone. */
|
|
4619
4785
|
timezone: string | null;
|
|
4620
4786
|
/** Custom key-value metadata you attached to the customer. */
|
|
@@ -4866,7 +5032,7 @@ interface CustomerStateChangedData {
|
|
|
4866
5032
|
seats: Array<WebhookSeatSummary>;
|
|
4867
5033
|
/** For credits plans: planCredits, purchasedCredits, totalCredits. Null otherwise. */
|
|
4868
5034
|
credits: WebhookCreditsBalance | null;
|
|
4869
|
-
/** For balance plans
|
|
5035
|
+
/** For balance plans, in rate scale (10000 = 1.00 of the subscription currency): currentBalance (the available total), planBalance, purchasedBalance and totalBalance. Null otherwise. */
|
|
4870
5036
|
balance: WebhookBalance | null;
|
|
4871
5037
|
}
|
|
4872
5038
|
/** Fired after a plan grant is durably created. The payload is the grant snapshot at creation. */
|
|
@@ -5079,7 +5245,7 @@ interface CreditsPurchasedData {
|
|
|
5079
5245
|
/** The number of credits purchased. */
|
|
5080
5246
|
credits: number;
|
|
5081
5247
|
}
|
|
5082
|
-
/** Fired when a subscription's
|
|
5248
|
+
/** Fired when a subscription's available credits (plan plus purchased) cross below 10% of their last refill: a period reset, a purchase or a manual adjustment. Emitted once per crossing, the same rule as balance.low. */
|
|
5083
5249
|
interface CreditsLowData {
|
|
5084
5250
|
/** The subscription ID. */
|
|
5085
5251
|
subscriptionId: string;
|
|
@@ -5087,12 +5253,12 @@ interface CreditsLowData {
|
|
|
5087
5253
|
customerId: string;
|
|
5088
5254
|
/** Total credits remaining (plan plus purchased). */
|
|
5089
5255
|
remainingCredits: number;
|
|
5090
|
-
/** The low-credit threshold that was crossed: 10% of the
|
|
5256
|
+
/** The low-credit threshold that was crossed: 10% of the last refill. */
|
|
5091
5257
|
thresholdCredits: number;
|
|
5092
|
-
/** The
|
|
5258
|
+
/** The credits added by the last refill: a period reset, a purchase or a manual adjustment. */
|
|
5093
5259
|
periodCredits: number;
|
|
5094
5260
|
}
|
|
5095
|
-
/** Fired
|
|
5261
|
+
/** Fired each time a subscription's available credits cross to zero or below. Usage that needs more credits than remain is rejected from this point, unless the plan allows overage, which is billed at its price per credit at the next renewal. Also fires customer.state_changed with trigger credits_depleted. */
|
|
5096
5262
|
interface CreditsDepletedData {
|
|
5097
5263
|
/** The subscription ID. */
|
|
5098
5264
|
subscriptionId: string;
|
|
@@ -5110,7 +5276,20 @@ interface CreditsExpiredData {
|
|
|
5110
5276
|
/** The plan credits that were discarded. */
|
|
5111
5277
|
expiredCredits: number;
|
|
5112
5278
|
}
|
|
5113
|
-
/** Fired when
|
|
5279
|
+
/** Fired when non-purchase balance is granted to a subscription: the plan balance at the start of each billing period, or a manual adjustment from the dashboard or the API, which goes to the purchased balance. Balance top-ups fire balance.topped_up instead. */
|
|
5280
|
+
interface BalanceGrantedData {
|
|
5281
|
+
/** The subscription ID. */
|
|
5282
|
+
subscriptionId: string;
|
|
5283
|
+
/** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
|
|
5284
|
+
customerId: string;
|
|
5285
|
+
/** The balance granted in rate scale (10000 = 1.00 of the subscription currency). */
|
|
5286
|
+
amount: number;
|
|
5287
|
+
/** The subscription currency. */
|
|
5288
|
+
currency: string;
|
|
5289
|
+
/** Why the balance was granted: period_reset or manual_adjustment. */
|
|
5290
|
+
reason: string;
|
|
5291
|
+
}
|
|
5292
|
+
/** Fired when a balance top-up succeeds: through the API, an automatic top-up or the customer portal. The amount goes to the purchased balance, which is spent after the plan balance and kept until the subscription ends. */
|
|
5114
5293
|
interface BalanceToppedUpData {
|
|
5115
5294
|
/** The subscription ID. */
|
|
5116
5295
|
subscriptionId: string;
|
|
@@ -5149,6 +5328,17 @@ interface BalanceDepletedData {
|
|
|
5149
5328
|
/** The subscription currency. */
|
|
5150
5329
|
currency: string;
|
|
5151
5330
|
}
|
|
5331
|
+
/** Fired at a reset when unused plan balance is discarded. On a plan whose unused plan balance expires, all of it expires at each reset. On a plan that rolls it over, a reset keeps it, up to the plan's maxPlanBalance when it has one, and only the excess expires. An overage debt invoiced at the renewal counts as nothing left over. Purchased balance never expires and is not affected. */
|
|
5332
|
+
interface BalanceExpiredData {
|
|
5333
|
+
/** The subscription ID. */
|
|
5334
|
+
subscriptionId: string;
|
|
5335
|
+
/** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
|
|
5336
|
+
customerId: string;
|
|
5337
|
+
/** The plan balance that was discarded, in rate scale (10000 = 1.00 of the subscription currency). */
|
|
5338
|
+
expiredAmount: number;
|
|
5339
|
+
/** The subscription currency. */
|
|
5340
|
+
currency: string;
|
|
5341
|
+
}
|
|
5152
5342
|
/** Fired when a metered feature's usage crosses 80% of its included quantity for the current period. Emitted once per feature per billing period, when the crossing happens. */
|
|
5153
5343
|
interface QuotaThresholdReachedData {
|
|
5154
5344
|
/** The subscription ID. */
|
|
@@ -5325,7 +5515,7 @@ interface WebhookEventEnvelope<E extends WebhookEvent, D> {
|
|
|
5325
5515
|
apiVersion: string;
|
|
5326
5516
|
data: D;
|
|
5327
5517
|
}
|
|
5328
|
-
type WebhookEventPayload = WebhookEventEnvelope<"subscription.created", SubscriptionCreatedData> | WebhookEventEnvelope<"subscription.activated", SubscriptionActivatedData> | WebhookEventEnvelope<"subscription.reactivated", SubscriptionReactivatedData> | WebhookEventEnvelope<"subscription.pause_scheduled", SubscriptionPauseScheduledData> | WebhookEventEnvelope<"subscription.pause_updated", SubscriptionPauseUpdatedData> | WebhookEventEnvelope<"subscription.pause_revoked", SubscriptionPauseRevokedData> | WebhookEventEnvelope<"subscription.paused", SubscriptionPausedData> | WebhookEventEnvelope<"subscription.resumed", SubscriptionResumedData> | WebhookEventEnvelope<"subscription.resume_failed", SubscriptionResumeFailedData> | 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<"plan_grant.created", PlanGrantCreatedData> | WebhookEventEnvelope<"plan_grant.updated", PlanGrantUpdatedData> | WebhookEventEnvelope<"plan_grant.expired", PlanGrantExpiredData> | WebhookEventEnvelope<"plan_grant.revoked", PlanGrantRevokedData> | 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>;
|
|
5518
|
+
type WebhookEventPayload = WebhookEventEnvelope<"subscription.created", SubscriptionCreatedData> | WebhookEventEnvelope<"subscription.activated", SubscriptionActivatedData> | WebhookEventEnvelope<"subscription.reactivated", SubscriptionReactivatedData> | WebhookEventEnvelope<"subscription.pause_scheduled", SubscriptionPauseScheduledData> | WebhookEventEnvelope<"subscription.pause_updated", SubscriptionPauseUpdatedData> | WebhookEventEnvelope<"subscription.pause_revoked", SubscriptionPauseRevokedData> | WebhookEventEnvelope<"subscription.paused", SubscriptionPausedData> | WebhookEventEnvelope<"subscription.resumed", SubscriptionResumedData> | WebhookEventEnvelope<"subscription.resume_failed", SubscriptionResumeFailedData> | 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<"payment_method.detached", PaymentMethodDetachedData> | WebhookEventEnvelope<"customer.created", CustomerCreatedData> | WebhookEventEnvelope<"customer.updated", CustomerUpdatedData> | WebhookEventEnvelope<"customer.state_changed", CustomerStateChangedData> | WebhookEventEnvelope<"plan_grant.created", PlanGrantCreatedData> | WebhookEventEnvelope<"plan_grant.updated", PlanGrantUpdatedData> | WebhookEventEnvelope<"plan_grant.expired", PlanGrantExpiredData> | WebhookEventEnvelope<"plan_grant.revoked", PlanGrantRevokedData> | WebhookEventEnvelope<"credits.granted", CreditsGrantedData> | WebhookEventEnvelope<"credits.purchased", CreditsPurchasedData> | WebhookEventEnvelope<"credits.low", CreditsLowData> | WebhookEventEnvelope<"credits.depleted", CreditsDepletedData> | WebhookEventEnvelope<"credits.expired", CreditsExpiredData> | WebhookEventEnvelope<"balance.granted", BalanceGrantedData> | WebhookEventEnvelope<"balance.topped_up", BalanceToppedUpData> | WebhookEventEnvelope<"balance.low", BalanceLowData> | WebhookEventEnvelope<"balance.depleted", BalanceDepletedData> | WebhookEventEnvelope<"balance.expired", BalanceExpiredData> | 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>;
|
|
5329
5519
|
interface WebhookEventDataMap {
|
|
5330
5520
|
"subscription.created": SubscriptionCreatedData;
|
|
5331
5521
|
"subscription.activated": SubscriptionActivatedData;
|
|
@@ -5367,6 +5557,7 @@ interface WebhookEventDataMap {
|
|
|
5367
5557
|
"invoice.upcoming": InvoiceUpcomingData;
|
|
5368
5558
|
"payment_method.attached": PaymentMethodAttachedData;
|
|
5369
5559
|
"payment_method.updated": PaymentMethodUpdatedData;
|
|
5560
|
+
"payment_method.detached": PaymentMethodDetachedData;
|
|
5370
5561
|
"customer.created": CustomerCreatedData;
|
|
5371
5562
|
"customer.updated": CustomerUpdatedData;
|
|
5372
5563
|
"customer.state_changed": CustomerStateChangedData;
|
|
@@ -5379,9 +5570,11 @@ interface WebhookEventDataMap {
|
|
|
5379
5570
|
"credits.low": CreditsLowData;
|
|
5380
5571
|
"credits.depleted": CreditsDepletedData;
|
|
5381
5572
|
"credits.expired": CreditsExpiredData;
|
|
5573
|
+
"balance.granted": BalanceGrantedData;
|
|
5382
5574
|
"balance.topped_up": BalanceToppedUpData;
|
|
5383
5575
|
"balance.low": BalanceLowData;
|
|
5384
5576
|
"balance.depleted": BalanceDepletedData;
|
|
5577
|
+
"balance.expired": BalanceExpiredData;
|
|
5385
5578
|
"quota.threshold_reached": QuotaThresholdReachedData;
|
|
5386
5579
|
"quota.exceeded": QuotaExceededData;
|
|
5387
5580
|
"seats.updated": SeatsUpdatedData;
|
|
@@ -5425,7 +5618,7 @@ interface GetWebhookEndpointParams {
|
|
|
5425
5618
|
interface UpdateWebhookEndpointParams {
|
|
5426
5619
|
id: string;
|
|
5427
5620
|
url?: string;
|
|
5428
|
-
events?: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "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" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "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">;
|
|
5621
|
+
events?: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "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" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">;
|
|
5429
5622
|
description?: string | null;
|
|
5430
5623
|
isActive?: boolean;
|
|
5431
5624
|
apiVersion?: string;
|
|
@@ -5442,7 +5635,7 @@ interface ListWebhookEndpointsParams {
|
|
|
5442
5635
|
}
|
|
5443
5636
|
interface CreateWebhookEndpointParams {
|
|
5444
5637
|
url: string;
|
|
5445
|
-
events: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "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" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "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">;
|
|
5638
|
+
events: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "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" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">;
|
|
5446
5639
|
description?: string;
|
|
5447
5640
|
apiVersion?: string;
|
|
5448
5641
|
}
|
|
@@ -5480,4 +5673,4 @@ declare function registerIntegration(name: string, version: string): void;
|
|
|
5480
5673
|
declare const API_VERSION = "2026-08-27";
|
|
5481
5674
|
declare const SDK_VERSION: string;
|
|
5482
5675
|
|
|
5483
|
-
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 ApplySubscriptionOfferParams, type BalanceAdjustment, type BalanceDepletedData, type BalanceLowData, type BalanceToppedUpData, type BalanceTopup, type BatchCreateCustomersParams, type BillingConfig, type BillingInterval, type BulkSetSeatsParams, type CancelPaymentParams, type CancelSubscriptionParams, type ChangePlanParams, type ChargePaymentParams, type CheckUsageAvailabilityParams, type CheckoutReadyData, type ClaimLink, Commet, CommetAPIError, type CommetClientOptions, CommetError, type CommetErrorContext, CommetValidationError, type ConsumptionModel, type CreateAddonParams, type CreateAdjustmentInvoiceParams, type CreateApiKeyParams, type CreateCreditPackParams, type CreateCustomerCreditParams, type CreateCustomerParams, type CreateFeatureParams, type CreateMarketParams, type CreateOfferParams, type CreatePaymentParams, type CreatePlanGrantParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePrepaidPeriodsCheckoutParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateSubscriptionRecoveryLinkParams, type CreateWebhookEndpointParams, type CreatedApiKey, type CreatedSubscription, type CreatedWebhook, type CreditGrant, type CreditPack, type CreditPackListItem, type CreditsDepletedData, type CreditsExpiredData, type CreditsGrantedData, type CreditsLowData, type CreditsPurchasedData, type Customer, type CustomerBatch, type CustomerCreatedData, type CustomerCredit, type CustomerCreditRevocation, type CustomerStateChangedData, type CustomerUpdatedData, type DeactivateAddonParams, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeleteMarketParams, type DeleteOfferParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteWebhookEndpointParams, type DeletedObject, type DeletedOffer, type DeletedPlanRegionalPricing, type DeletedSubscriptionAddon, type DownloadInvoiceParams, type Feature, type FeatureAccess, type FeatureDef, type FeatureType, type GetActiveSubscriptionParams, type GetAddonParams, type GetAllQuotaAllowancesParams, type GetAllSeatBalancesParams, type GetCustomerParams, type GetFeatureAccessParams, type GetFeatureParams, type GetInvoiceParams, type GetMarketParams, type GetOfferParams, type GetPaymentParams, type GetPlanGroupParams, type GetPlanParams, type GetPromoCodeParams, type GetQuotaAllowanceParams, type GetSeatBalanceParams, type GetSubscriptionAutoTopUpParams, type GetSubscriptionParams, type GetTransactionParams, type GetWebhookEndpointParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type Invoice, type InvoiceCreatedData, type InvoiceDownload, type InvoiceListItem, type InvoiceOverdueData, type InvoiceType, type InvoiceUpcomingData, type InvoiceVoidedData, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomerCreditsParams, type ListCustomersParams, type ListFeatureAccessParams, type ListInvoicesParams, type ListOffersParams, type ListPaymentsParams, type ListPlanGrantsParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhookEndpointsParams, type ManagedBy, type Market, type Offer, type PauseSubscriptionParams, type Payment, type PaymentDisputeResolvedData, type PaymentDisputedData, type PaymentFailedData, type PaymentLinkCanceledData, type PaymentLinkCompletedData, type PaymentLinkCreatedData, type PaymentLinkFailedData, type PaymentMethod, type PaymentMethodAttachedData, type PaymentMethodUpdateCheckout, type PaymentMethodUpdatedData, type PaymentProvider, type PaymentReceivedData, type PaymentRecoveredData, type PaymentRefundedData, type PaymentRetryFailedData, type Payout, type PayoutAvailableData, type PayoutBankAccount, type PayoutCreatedData, type PayoutFailedData, type PayoutPaidData, type Plan, type PlanChange, type PlanDef, type PlanFeature, type PlanFeatureValue, type PlanGrant, type PlanGrantCreatedData, type PlanGrantExpiredData, type PlanGrantRevokedData, type PlanGrantUpdatedData, type PlanGroup, type PlanGroupDetail, type PlanPrice, type PlanRegionalPricing, type PlanRegionalPricingResult, type PortalAccess, type PrepaidPeriodsCheckout, type PreviewChange, type PreviewChangePlanParams, type PriceDef, type PromoCode, type PurchaseCreditsParams, type QuotaExceededData, type QuotaThresholdReachedData, type ReactivateSubscriptionParams, type ReactivatedSubscription, type RecoveryLink, type Refund, type RefundTransactionParams, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveQuotaParams, type RemoveSeatsParams, type RemoveSubscriptionOfferParams, type RemovedPlanFeature, type RemovedPlanFromGroup, type ReorderPlansInGroupParams, type ReorderedPlans, type RequestOptions, type RequestPayoutParams, type RequestPortalAccessParams, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type ResumeSubscriptionParams, type RetryTransactionParams, type RevokeCustomerCreditParams, type RevokePlanGrantParams, type RevokeScheduledPlanChangeParams, type RevokeSubscriptionPauseParams, SDK_VERSION, type SeatBalance, type SeatBalanceCollection, type SeatEvent, type SeatsLimitReachedData, type SeatsUpdatedData, type SendInvoiceParams, type SentInvoice, type SetDefaultPlanPriceParams, type SetPlanRegionalPricingParams, type SetPlanVisibilityParams, type SetQuotaParams, type SetSeatsParams, type SetUsageParams, type SubPaymentMethod, type Subscription, type SubscriptionActivatedData, type SubscriptionAddon, type SubscriptionAutoTopUp, type SubscriptionCanceledData, type SubscriptionCancellationRevokedData, type SubscriptionCancellationScheduledData, type SubscriptionCreatedData, type SubscriptionOfferApplication, type SubscriptionOfferApplicationPhase, type SubscriptionPastDueData, type SubscriptionPauseRevokedData, type SubscriptionPauseScheduledData, type SubscriptionPauseUpdatedData, type SubscriptionPausedData, type SubscriptionPlanChangeRevokedData, type SubscriptionPlanChangeScheduledData, type SubscriptionPlanChangedData, type SubscriptionReactivatedData, type SubscriptionResume, type SubscriptionResumeFailedData, type SubscriptionResumedData, type SubscriptionStatus, type SubscriptionSummary, type SubscriptionUpdatedData, type TestClock, type TestClockRun, type TestWebhookEndpointParams, type Timezone, type TopupBalanceParams, type TrackUsageParams, type Transaction, type TransactionListItem, type TransactionRetry, type TransactionStatus, type TrialCheckoutReadyData, type TrialConvertedData, type TrialExpiredData, type TrialStartedData, type TrialWillEndData, type UncancelSubscriptionParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdateMarketParams, type UpdateOfferParams, type UpdatePaymentMethodParams, type UpdatePlanFeatureParams, type UpdatePlanGrantParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateSubscriptionAutoTopUpParams, type UpdateSubscriptionPauseParams, type UpdateWebhookEndpointParams, type UpsertRegionalPricesParams, type UsageAdjustment, type UsageCheck, type UsageEvent, type UsageQuota, type UsageQuotaEvent, type UsageRecordedData, type Webhook, type WebhookAddonRef, type WebhookBalance, type WebhookBankRef, type WebhookCardInfo, type WebhookCreditsBalance, type WebhookData, type WebhookEvent, type WebhookEventDataMap, type WebhookEventEnvelope, type WebhookEventHandler, type WebhookEventPayload, type WebhookPayload, type WebhookPlanGrantTimelineEvent, type WebhookPlanRef, type WebhookSeatSummary, type WebhookTest, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
|
5676
|
+
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 ApplySubscriptionOfferParams, type BalanceAdjustment, type BalanceDepletedData, type BalanceExpiredData, type BalanceGrantedData, type BalanceLowData, type BalanceToppedUpData, type BalanceTopup, type BatchCreateCustomersParams, type BillingConfig, type BillingInterval, type BulkSetSeatsParams, type BusinessTaxId, type CancelPaymentParams, type CancelSubscriptionParams, type ChangePlanParams, type ChargePaymentParams, type CheckUsageAvailabilityParams, type CheckoutReadyData, type ClaimLink, Commet, CommetAPIError, type CommetClientOptions, CommetError, type CommetErrorContext, CommetValidationError, type ConsumptionModel, type CreateAddonParams, type CreateAdjustmentInvoiceParams, type CreateApiKeyParams, type CreateCreditPackParams, type CreateCustomerCreditParams, type CreateCustomerParams, type CreateFeatureParams, type CreateMarketParams, type CreateOfferParams, type CreatePaymentParams, type CreatePlanGrantParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePrepaidPeriodsCheckoutParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateSubscriptionRecoveryLinkParams, type CreateWebhookEndpointParams, type CreatedApiKey, type CreatedSubscription, type CreatedWebhook, type CreditGrant, type CreditPack, type CreditPackListItem, type CreditsDepletedData, type CreditsExpiredData, type CreditsGrantedData, type CreditsLowData, type CreditsPurchasedData, type Customer, type CustomerBatch, type CustomerCreatedData, type CustomerCredit, type CustomerCreditRevocation, type CustomerStateChangedData, type CustomerUpdatedData, type DeactivateAddonParams, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeleteMarketParams, type DeleteOfferParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteWebhookEndpointParams, type DeletedObject, type DeletedOffer, type DeletedPlanRegionalPricing, type DeletedSubscriptionAddon, type DownloadInvoiceParams, type Feature, type FeatureAccess, type FeatureDef, type FeatureType, type GetActiveSubscriptionParams, type GetAddonParams, type GetAllQuotaAllowancesParams, type GetAllSeatBalancesParams, type GetCustomerParams, type GetFeatureAccessParams, type GetFeatureParams, type GetInvoiceParams, type GetMarketParams, type GetOfferParams, type GetPaymentParams, type GetPlanGroupParams, type GetPlanParams, type GetPromoCodeParams, type GetQuotaAllowanceParams, type GetSeatBalanceParams, type GetSubscriptionAutoTopUpParams, type GetSubscriptionParams, type GetTransactionParams, type GetWebhookEndpointParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type Invoice, type InvoiceCreatedData, type InvoiceDownload, type InvoiceListItem, type InvoiceOverdueData, type InvoiceType, type InvoiceUpcomingData, type InvoiceVoidedData, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomerCreditsParams, type ListCustomersParams, type ListFeatureAccessParams, type ListInvoicesParams, type ListOffersParams, type ListPaymentsParams, type ListPlanGrantsParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhookEndpointsParams, type ManagedBy, type Market, type Offer, type PauseSubscriptionParams, type Payment, type PaymentDisputeResolvedData, type PaymentDisputedData, type PaymentFailedData, type PaymentLinkCanceledData, type PaymentLinkCompletedData, type PaymentLinkCreatedData, type PaymentLinkFailedData, type PaymentMethod, type PaymentMethodAttachedData, type PaymentMethodDetachedData, type PaymentMethodUpdateCheckout, type PaymentMethodUpdatedData, type PaymentProvider, type PaymentReceivedData, type PaymentRecoveredData, type PaymentRefundedData, type PaymentRetryFailedData, type Payout, type PayoutAvailableData, type PayoutBankAccount, type PayoutCreatedData, type PayoutFailedData, type PayoutPaidData, type Plan, type PlanChange, type PlanDef, type PlanFeature, type PlanFeatureValue, type PlanGrant, type PlanGrantCreatedData, type PlanGrantExpiredData, type PlanGrantRevokedData, type PlanGrantUpdatedData, type PlanGroup, type PlanGroupDetail, type PlanPrice, type PlanRegionalPricing, type PlanRegionalPricingResult, type PortalAccess, type PrepaidPeriodsCheckout, type PreviewChange, type PreviewChangePlanParams, type PriceDef, type PromoCode, type PurchaseCreditsParams, type QuotaExceededData, type QuotaThresholdReachedData, type ReactivateSubscriptionParams, type ReactivatedSubscription, type RecoveryLink, type Refund, type RefundTransactionParams, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveQuotaParams, type RemoveSeatsParams, type RemoveSubscriptionOfferParams, type RemovedPlanFeature, type RemovedPlanFromGroup, type ReorderPlansInGroupParams, type ReorderedPlans, type RequestOptions, type RequestPayoutParams, type RequestPortalAccessParams, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type ResumeSubscriptionParams, type RetryTransactionParams, type RevokeCustomerCreditParams, type RevokePlanGrantParams, type RevokeScheduledPlanChangeParams, type RevokeSubscriptionPauseParams, SDK_VERSION, type SeatBalance, type SeatBalanceCollection, type SeatEvent, type SeatsLimitReachedData, type SeatsUpdatedData, type SendInvoiceParams, type SentInvoice, type SetDefaultPlanPriceParams, type SetPlanRegionalPricingParams, type SetPlanVisibilityParams, type SetQuotaParams, type SetSeatsParams, type SetUsageParams, type SubPaymentMethod, type Subscription, type SubscriptionActivatedData, type SubscriptionAddon, type SubscriptionAutoTopUp, type SubscriptionCanceledData, type SubscriptionCancellationRevokedData, type SubscriptionCancellationScheduledData, type SubscriptionCreatedData, type SubscriptionOfferApplication, type SubscriptionOfferApplicationPhase, type SubscriptionPastDueData, type SubscriptionPauseRevokedData, type SubscriptionPauseScheduledData, type SubscriptionPauseUpdatedData, type SubscriptionPausedData, type SubscriptionPlanChangeRevokedData, type SubscriptionPlanChangeScheduledData, type SubscriptionPlanChangedData, type SubscriptionReactivatedData, type SubscriptionResume, type SubscriptionResumeFailedData, type SubscriptionResumedData, type SubscriptionStatus, type SubscriptionSummary, type SubscriptionUpdatedData, type TestClock, type TestClockRun, type TestWebhookEndpointParams, type Timezone, type TopupBalanceParams, type TrackUsageParams, type Transaction, type TransactionListItem, type TransactionRetry, type TransactionStatus, type TrialCheckoutReadyData, type TrialConvertedData, type TrialExpiredData, type TrialStartedData, type TrialWillEndData, type UncancelSubscriptionParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdateMarketParams, type UpdateOfferParams, type UpdatePaymentMethodParams, type UpdatePlanFeatureParams, type UpdatePlanGrantParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateSubscriptionAutoTopUpParams, type UpdateSubscriptionPauseParams, type UpdateWebhookEndpointParams, type UpsertRegionalPricesParams, type UsageAdjustment, type UsageCheck, type UsageEvent, type UsageQuota, type UsageQuotaEvent, type UsageRecordedData, type Webhook, type WebhookAddonRef, type WebhookBalance, type WebhookBankRef, type WebhookCardInfo, type WebhookCreditsBalance, type WebhookData, type WebhookEvent, type WebhookEventDataMap, type WebhookEventEnvelope, type WebhookEventHandler, type WebhookEventPayload, type WebhookPayload, type WebhookPlanGrantTimelineEvent, type WebhookPlanRef, type WebhookSeatSummary, type WebhookTest, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|