@commet/node 7.4.0 → 7.5.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
@@ -142,6 +142,7 @@ type BillingInterval = "weekly" | "monthly" | "quarterly" | "yearly" | "one_time
142
142
  type ConsumptionModel = "metered" | "credits" | "balance";
143
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
+ type PaymentProvider = "stripe" | "commet" | "dlocal";
145
146
  type FeatureType = "boolean" | "usage" | "seats" | "quota";
146
147
  type DiscountType = "percentage" | "amount";
147
148
  type Timezone = "UTC" | "America/New_York" | "America/Chicago" | "America/Denver" | "America/Los_Angeles" | "America/Sao_Paulo" | "America/Mexico_City" | "America/Buenos_Aires" | "America/Santiago" | "America/Bogota" | "America/Lima" | "America/Asuncion" | "Europe/London" | "Europe/Paris" | "Europe/Berlin" | "Europe/Madrid" | "Asia/Tokyo" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Dubai" | "Australia/Sydney";
@@ -476,7 +477,7 @@ interface Payment {
476
477
  customerId: string | null;
477
478
  kind: "link" | "charge";
478
479
  status: "pending" | "processing" | "succeeded" | "requires_action" | "failed" | "canceled";
479
- provider: "stripe" | "commet" | "dlocal";
480
+ provider: PaymentProvider;
480
481
  amountSubtotal: number;
481
482
  taxAmount: number;
482
483
  amountTotal: number;
@@ -926,6 +927,8 @@ interface Transaction {
926
927
  subtotal: number;
927
928
  taxAmount: number | null;
928
929
  currency: string;
930
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
931
+ provider: PaymentProvider;
929
932
  status: TransactionStatus;
930
933
  customerEmail: string | null;
931
934
  customerName: string | null;
@@ -1683,6 +1686,7 @@ declare class PlansResource {
1683
1686
  interface RequestPortalAccessParams {
1684
1687
  email?: string;
1685
1688
  customerId?: string;
1689
+ returnUrl?: string;
1686
1690
  }
1687
1691
  declare class PortalResource {
1688
1692
  private httpClient;
@@ -2095,7 +2099,7 @@ interface SubscriptionCreatedData {
2095
2099
  /** Optional custom name for the subscription. */
2096
2100
  name: string | null;
2097
2101
  }
2098
- /** Fired when the first charge succeeds and status becomes active (or trialing if a trial is configured). This is where you grant access. */
2102
+ /** Fired once, when the subscription's first charge succeeds and it becomes active this is where you grant access. Never re-fired on renewals; use payment.received for per-charge notifications. */
2099
2103
  interface SubscriptionActivatedData {
2100
2104
  /** The subscription ID. */
2101
2105
  subscriptionId: string;
@@ -2353,7 +2357,7 @@ interface CheckoutReadyData {
2353
2357
  /** The hosted checkout URL to share with the customer. */
2354
2358
  checkoutUrl: string;
2355
2359
  }
2356
- /** Fired when a recurring payment is successfully processed. This event is for recurring charges only the first checkout payment triggers subscription.activated instead. */
2360
+ /** Fired every time a payment settles successfully the first payment and every renewal alike. subscription.activated fires alongside it only on the first one. */
2357
2361
  interface PaymentReceivedData {
2358
2362
  /** The invoice ID. */
2359
2363
  invoiceId: string;
@@ -2367,6 +2371,8 @@ interface PaymentReceivedData {
2367
2371
  subscriptionId: string | null;
2368
2372
  /** The payment transaction ID. */
2369
2373
  paymentTransactionId: string | null;
2374
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. Null for billing-only charges with no Commet ledger row. */
2375
+ provider: PaymentProvider | null;
2370
2376
  /** Gross amount in cents before fees. */
2371
2377
  grossAmount: number | null;
2372
2378
  /** The payment currency code. */
@@ -2392,6 +2398,8 @@ interface PaymentFailedData {
2392
2398
  failureCode: string;
2393
2399
  /** A human-readable failure message. */
2394
2400
  failureMessage: string;
2401
+ /** A ready-to-use link the customer can follow to retry this payment, or null when no recovery path applies. For a first failed charge (pending_payment) it is the checkout URL; for a failed renewal (past_due) it is a signed recovery link — no separate createRecoveryLink call needed. */
2402
+ recoveryUrl: string | null;
2395
2403
  }
2396
2404
  /** 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. */
2397
2405
  interface PaymentRecoveredData {
@@ -2423,6 +2431,8 @@ interface PaymentRetryFailedData {
2423
2431
  interface PaymentRefundedData {
2424
2432
  /** The refunded payment transaction ID. */
2425
2433
  paymentTransactionId: string;
2434
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2435
+ provider: PaymentProvider;
2426
2436
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2427
2437
  paymentLinkId: string | null;
2428
2438
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2442,6 +2452,8 @@ interface PaymentRefundedData {
2442
2452
  interface PaymentDisputedData {
2443
2453
  /** The disputed payment transaction ID. */
2444
2454
  paymentTransactionId: string;
2455
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2456
+ provider: PaymentProvider;
2445
2457
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2446
2458
  paymentLinkId: string | null;
2447
2459
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2463,6 +2475,8 @@ interface PaymentDisputedData {
2463
2475
  interface PaymentDisputeResolvedData {
2464
2476
  /** The disputed payment transaction ID. */
2465
2477
  paymentTransactionId: string;
2478
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2479
+ provider: PaymentProvider;
2466
2480
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2467
2481
  paymentLinkId: string | null;
2468
2482
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -3193,4 +3207,4 @@ declare function registerIntegration(name: string, version: string): void;
3193
3207
  declare const API_VERSION = "2026-06-23";
3194
3208
  declare const SDK_VERSION: string;
3195
3209
 
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 };
3210
+ 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 PaymentProvider, 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 };
package/dist/index.d.ts CHANGED
@@ -142,6 +142,7 @@ type BillingInterval = "weekly" | "monthly" | "quarterly" | "yearly" | "one_time
142
142
  type ConsumptionModel = "metered" | "credits" | "balance";
143
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
+ type PaymentProvider = "stripe" | "commet" | "dlocal";
145
146
  type FeatureType = "boolean" | "usage" | "seats" | "quota";
146
147
  type DiscountType = "percentage" | "amount";
147
148
  type Timezone = "UTC" | "America/New_York" | "America/Chicago" | "America/Denver" | "America/Los_Angeles" | "America/Sao_Paulo" | "America/Mexico_City" | "America/Buenos_Aires" | "America/Santiago" | "America/Bogota" | "America/Lima" | "America/Asuncion" | "Europe/London" | "Europe/Paris" | "Europe/Berlin" | "Europe/Madrid" | "Asia/Tokyo" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Dubai" | "Australia/Sydney";
@@ -476,7 +477,7 @@ interface Payment {
476
477
  customerId: string | null;
477
478
  kind: "link" | "charge";
478
479
  status: "pending" | "processing" | "succeeded" | "requires_action" | "failed" | "canceled";
479
- provider: "stripe" | "commet" | "dlocal";
480
+ provider: PaymentProvider;
480
481
  amountSubtotal: number;
481
482
  taxAmount: number;
482
483
  amountTotal: number;
@@ -926,6 +927,8 @@ interface Transaction {
926
927
  subtotal: number;
927
928
  taxAmount: number | null;
928
929
  currency: string;
930
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
931
+ provider: PaymentProvider;
929
932
  status: TransactionStatus;
930
933
  customerEmail: string | null;
931
934
  customerName: string | null;
@@ -1683,6 +1686,7 @@ declare class PlansResource {
1683
1686
  interface RequestPortalAccessParams {
1684
1687
  email?: string;
1685
1688
  customerId?: string;
1689
+ returnUrl?: string;
1686
1690
  }
1687
1691
  declare class PortalResource {
1688
1692
  private httpClient;
@@ -2095,7 +2099,7 @@ interface SubscriptionCreatedData {
2095
2099
  /** Optional custom name for the subscription. */
2096
2100
  name: string | null;
2097
2101
  }
2098
- /** Fired when the first charge succeeds and status becomes active (or trialing if a trial is configured). This is where you grant access. */
2102
+ /** Fired once, when the subscription's first charge succeeds and it becomes active this is where you grant access. Never re-fired on renewals; use payment.received for per-charge notifications. */
2099
2103
  interface SubscriptionActivatedData {
2100
2104
  /** The subscription ID. */
2101
2105
  subscriptionId: string;
@@ -2353,7 +2357,7 @@ interface CheckoutReadyData {
2353
2357
  /** The hosted checkout URL to share with the customer. */
2354
2358
  checkoutUrl: string;
2355
2359
  }
2356
- /** Fired when a recurring payment is successfully processed. This event is for recurring charges only the first checkout payment triggers subscription.activated instead. */
2360
+ /** Fired every time a payment settles successfully the first payment and every renewal alike. subscription.activated fires alongside it only on the first one. */
2357
2361
  interface PaymentReceivedData {
2358
2362
  /** The invoice ID. */
2359
2363
  invoiceId: string;
@@ -2367,6 +2371,8 @@ interface PaymentReceivedData {
2367
2371
  subscriptionId: string | null;
2368
2372
  /** The payment transaction ID. */
2369
2373
  paymentTransactionId: string | null;
2374
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. Null for billing-only charges with no Commet ledger row. */
2375
+ provider: PaymentProvider | null;
2370
2376
  /** Gross amount in cents before fees. */
2371
2377
  grossAmount: number | null;
2372
2378
  /** The payment currency code. */
@@ -2392,6 +2398,8 @@ interface PaymentFailedData {
2392
2398
  failureCode: string;
2393
2399
  /** A human-readable failure message. */
2394
2400
  failureMessage: string;
2401
+ /** A ready-to-use link the customer can follow to retry this payment, or null when no recovery path applies. For a first failed charge (pending_payment) it is the checkout URL; for a failed renewal (past_due) it is a signed recovery link — no separate createRecoveryLink call needed. */
2402
+ recoveryUrl: string | null;
2395
2403
  }
2396
2404
  /** 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. */
2397
2405
  interface PaymentRecoveredData {
@@ -2423,6 +2431,8 @@ interface PaymentRetryFailedData {
2423
2431
  interface PaymentRefundedData {
2424
2432
  /** The refunded payment transaction ID. */
2425
2433
  paymentTransactionId: string;
2434
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2435
+ provider: PaymentProvider;
2426
2436
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2427
2437
  paymentLinkId: string | null;
2428
2438
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2442,6 +2452,8 @@ interface PaymentRefundedData {
2442
2452
  interface PaymentDisputedData {
2443
2453
  /** The disputed payment transaction ID. */
2444
2454
  paymentTransactionId: string;
2455
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2456
+ provider: PaymentProvider;
2445
2457
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2446
2458
  paymentLinkId: string | null;
2447
2459
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2463,6 +2475,8 @@ interface PaymentDisputedData {
2463
2475
  interface PaymentDisputeResolvedData {
2464
2476
  /** The disputed payment transaction ID. */
2465
2477
  paymentTransactionId: string;
2478
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2479
+ provider: PaymentProvider;
2466
2480
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2467
2481
  paymentLinkId: string | null;
2468
2482
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -3193,4 +3207,4 @@ declare function registerIntegration(name: string, version: string): void;
3193
3207
  declare const API_VERSION = "2026-06-23";
3194
3208
  declare const SDK_VERSION: string;
3195
3209
 
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 };
3210
+ 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 PaymentProvider, 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 };
package/dist/index.js CHANGED
@@ -880,7 +880,7 @@ var CommetValidationError = class extends CommetError {
880
880
 
881
881
  // src/version.ts
882
882
  var API_VERSION = "2026-06-23";
883
- var SDK_VERSION = "7.4.0";
883
+ var SDK_VERSION = "7.5.0";
884
884
 
885
885
  // src/utils/telemetry.ts
886
886
  var registeredIntegrations = /* @__PURE__ */ new Set();