@commet/node 7.4.0 → 7.6.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;
@@ -2117,6 +2121,8 @@ interface SubscriptionActivatedData {
2117
2121
  invoiceTotal: number;
2118
2122
  /** The invoice currency code. */
2119
2123
  invoiceCurrency: string;
2124
+ /** The payment provider that processed the activating charge: stripe, commet, or dlocal. Null when the subscription activated without a charge (zero-total or setup-based activation). */
2125
+ provider: PaymentProvider | null;
2120
2126
  }
2121
2127
  /** Fired when a canceled subscription is reactivated and its reactivation charge succeeds. The subscription returns to active with a fresh invoice and a billing period anchored to the reactivation date. Distinct from subscription.activated (first activation) and payment.recovered (past_due recovery, which keeps the original anchor). */
2122
2128
  interface SubscriptionReactivatedData {
@@ -2140,6 +2146,8 @@ interface SubscriptionReactivatedData {
2140
2146
  invoiceTotal: number;
2141
2147
  /** The invoice currency code. */
2142
2148
  invoiceCurrency: string;
2149
+ /** The payment provider that processed the reactivation charge: stripe, commet, or dlocal. */
2150
+ provider: PaymentProvider;
2143
2151
  }
2144
2152
  /** Fired when a subscription is actually terminated at the end of the billing period. The status is now canceled and access should be revoked. This event is NOT fired when cancellation is scheduled — that triggers subscription.updated instead. See the cancellation lifecycle below. */
2145
2153
  interface SubscriptionCanceledData {
@@ -2353,7 +2361,7 @@ interface CheckoutReadyData {
2353
2361
  /** The hosted checkout URL to share with the customer. */
2354
2362
  checkoutUrl: string;
2355
2363
  }
2356
- /** Fired when a recurring payment is successfully processed. This event is for recurring charges only the first checkout payment triggers subscription.activated instead. */
2364
+ /** 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
2365
  interface PaymentReceivedData {
2358
2366
  /** The invoice ID. */
2359
2367
  invoiceId: string;
@@ -2367,6 +2375,8 @@ interface PaymentReceivedData {
2367
2375
  subscriptionId: string | null;
2368
2376
  /** The payment transaction ID. */
2369
2377
  paymentTransactionId: string | null;
2378
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. Null for billing-only charges with no Commet ledger row. */
2379
+ provider: PaymentProvider | null;
2370
2380
  /** Gross amount in cents before fees. */
2371
2381
  grossAmount: number | null;
2372
2382
  /** The payment currency code. */
@@ -2392,6 +2402,8 @@ interface PaymentFailedData {
2392
2402
  failureCode: string;
2393
2403
  /** A human-readable failure message. */
2394
2404
  failureMessage: string;
2405
+ /** 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. */
2406
+ recoveryUrl: string | null;
2395
2407
  }
2396
2408
  /** 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
2409
  interface PaymentRecoveredData {
@@ -2423,6 +2435,8 @@ interface PaymentRetryFailedData {
2423
2435
  interface PaymentRefundedData {
2424
2436
  /** The refunded payment transaction ID. */
2425
2437
  paymentTransactionId: string;
2438
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2439
+ provider: PaymentProvider;
2426
2440
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2427
2441
  paymentLinkId: string | null;
2428
2442
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2442,6 +2456,8 @@ interface PaymentRefundedData {
2442
2456
  interface PaymentDisputedData {
2443
2457
  /** The disputed payment transaction ID. */
2444
2458
  paymentTransactionId: string;
2459
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2460
+ provider: PaymentProvider;
2445
2461
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2446
2462
  paymentLinkId: string | null;
2447
2463
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2463,6 +2479,8 @@ interface PaymentDisputedData {
2463
2479
  interface PaymentDisputeResolvedData {
2464
2480
  /** The disputed payment transaction ID. */
2465
2481
  paymentTransactionId: string;
2482
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2483
+ provider: PaymentProvider;
2466
2484
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2467
2485
  paymentLinkId: string | null;
2468
2486
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -3193,4 +3211,4 @@ declare function registerIntegration(name: string, version: string): void;
3193
3211
  declare const API_VERSION = "2026-06-23";
3194
3212
  declare const SDK_VERSION: string;
3195
3213
 
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 };
3214
+ 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;
@@ -2117,6 +2121,8 @@ interface SubscriptionActivatedData {
2117
2121
  invoiceTotal: number;
2118
2122
  /** The invoice currency code. */
2119
2123
  invoiceCurrency: string;
2124
+ /** The payment provider that processed the activating charge: stripe, commet, or dlocal. Null when the subscription activated without a charge (zero-total or setup-based activation). */
2125
+ provider: PaymentProvider | null;
2120
2126
  }
2121
2127
  /** Fired when a canceled subscription is reactivated and its reactivation charge succeeds. The subscription returns to active with a fresh invoice and a billing period anchored to the reactivation date. Distinct from subscription.activated (first activation) and payment.recovered (past_due recovery, which keeps the original anchor). */
2122
2128
  interface SubscriptionReactivatedData {
@@ -2140,6 +2146,8 @@ interface SubscriptionReactivatedData {
2140
2146
  invoiceTotal: number;
2141
2147
  /** The invoice currency code. */
2142
2148
  invoiceCurrency: string;
2149
+ /** The payment provider that processed the reactivation charge: stripe, commet, or dlocal. */
2150
+ provider: PaymentProvider;
2143
2151
  }
2144
2152
  /** Fired when a subscription is actually terminated at the end of the billing period. The status is now canceled and access should be revoked. This event is NOT fired when cancellation is scheduled — that triggers subscription.updated instead. See the cancellation lifecycle below. */
2145
2153
  interface SubscriptionCanceledData {
@@ -2353,7 +2361,7 @@ interface CheckoutReadyData {
2353
2361
  /** The hosted checkout URL to share with the customer. */
2354
2362
  checkoutUrl: string;
2355
2363
  }
2356
- /** Fired when a recurring payment is successfully processed. This event is for recurring charges only the first checkout payment triggers subscription.activated instead. */
2364
+ /** 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
2365
  interface PaymentReceivedData {
2358
2366
  /** The invoice ID. */
2359
2367
  invoiceId: string;
@@ -2367,6 +2375,8 @@ interface PaymentReceivedData {
2367
2375
  subscriptionId: string | null;
2368
2376
  /** The payment transaction ID. */
2369
2377
  paymentTransactionId: string | null;
2378
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. Null for billing-only charges with no Commet ledger row. */
2379
+ provider: PaymentProvider | null;
2370
2380
  /** Gross amount in cents before fees. */
2371
2381
  grossAmount: number | null;
2372
2382
  /** The payment currency code. */
@@ -2392,6 +2402,8 @@ interface PaymentFailedData {
2392
2402
  failureCode: string;
2393
2403
  /** A human-readable failure message. */
2394
2404
  failureMessage: string;
2405
+ /** 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. */
2406
+ recoveryUrl: string | null;
2395
2407
  }
2396
2408
  /** 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
2409
  interface PaymentRecoveredData {
@@ -2423,6 +2435,8 @@ interface PaymentRetryFailedData {
2423
2435
  interface PaymentRefundedData {
2424
2436
  /** The refunded payment transaction ID. */
2425
2437
  paymentTransactionId: string;
2438
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2439
+ provider: PaymentProvider;
2426
2440
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2427
2441
  paymentLinkId: string | null;
2428
2442
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2442,6 +2456,8 @@ interface PaymentRefundedData {
2442
2456
  interface PaymentDisputedData {
2443
2457
  /** The disputed payment transaction ID. */
2444
2458
  paymentTransactionId: string;
2459
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2460
+ provider: PaymentProvider;
2445
2461
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2446
2462
  paymentLinkId: string | null;
2447
2463
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -2463,6 +2479,8 @@ interface PaymentDisputedData {
2463
2479
  interface PaymentDisputeResolvedData {
2464
2480
  /** The disputed payment transaction ID. */
2465
2481
  paymentTransactionId: string;
2482
+ /** The payment provider the charge was routed to: stripe, commet, or dlocal. */
2483
+ provider: PaymentProvider;
2466
2484
  /** The payment link the payment originated from, or null when the payment did not come from a payment link. */
2467
2485
  paymentLinkId: string | null;
2468
2486
  /** The invoice the payment collected, or null for payments without an invoice. */
@@ -3193,4 +3211,4 @@ declare function registerIntegration(name: string, version: string): void;
3193
3211
  declare const API_VERSION = "2026-06-23";
3194
3212
  declare const SDK_VERSION: string;
3195
3213
 
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 };
3214
+ 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.6.0";
884
884
 
885
885
  // src/utils/telemetry.ts
886
886
  var registeredIntegrations = /* @__PURE__ */ new Set();