@commet/node 9.6.0 → 9.7.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.
Files changed (86) hide show
  1. package/dist/index.d.mts +51 -12
  2. package/dist/index.d.ts +51 -12
  3. package/dist/index.js +11 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +11 -2
  6. package/dist/index.mjs.map +1 -1
  7. package/docs/ai-onboarding/commet-skill.md +1 -1
  8. package/docs/ai-onboarding/mcp-server.md +1 -1
  9. package/docs/api-reference/index.md +1 -1
  10. package/docs/api-reference/subscriptions.md +26 -1
  11. package/docs/documentation/better-auth.md +1 -8
  12. package/docs/documentation/customers/customer-portal.md +1 -7
  13. package/docs/documentation/customers/manage-customers.md +0 -6
  14. package/docs/documentation/error-handling.md +1 -1
  15. package/docs/documentation/finance/acceptable-use.md +1 -6
  16. package/docs/documentation/finance/finance-overview.md +0 -5
  17. package/docs/documentation/finance/local-currency-taxes.md +0 -6
  18. package/docs/documentation/finance/merchant-of-record.md +0 -7
  19. package/docs/documentation/finance/payouts-verification.md +0 -5
  20. package/docs/documentation/finance/payouts.md +0 -6
  21. package/docs/documentation/finance/supported-countries.md +1 -6
  22. package/docs/documentation/go/integrate-with-encore.md +1 -8
  23. package/docs/documentation/go/integrate-with-go.md +1 -8
  24. package/docs/documentation/invoicing/handle-failed-payments.md +3 -9
  25. package/docs/documentation/invoicing/invoices-and-billing-cycles.md +0 -6
  26. package/docs/documentation/java/integrate-with-java.md +1 -5
  27. package/docs/documentation/nodejs/integrate-with-astro.md +1 -8
  28. package/docs/documentation/nodejs/integrate-with-bun.md +1 -8
  29. package/docs/documentation/nodejs/integrate-with-express.md +1 -8
  30. package/docs/documentation/nodejs/integrate-with-hono.md +1 -8
  31. package/docs/documentation/nodejs/integrate-with-nextjs.md +1 -8
  32. package/docs/documentation/nodejs/integrate-with-nuxt.md +1 -8
  33. package/docs/documentation/nodejs/integrate-with-remix.md +1 -8
  34. package/docs/documentation/nodejs/integrate-with-sveltekit.md +1 -8
  35. package/docs/documentation/payments/accept-one-time-payments.md +0 -8
  36. package/docs/documentation/payments/payment-orchestration.md +0 -6
  37. package/docs/documentation/payments/payment-providers.md +0 -6
  38. package/docs/documentation/php/integrate-with-laravel.md +1 -8
  39. package/docs/documentation/php/integrate-with-php.md +1 -7
  40. package/docs/documentation/php/integrate-with-symfony.md +1 -8
  41. package/docs/documentation/plans/add-ons.md +0 -8
  42. package/docs/documentation/plans/configure-features.md +1 -8
  43. package/docs/documentation/plans/consumption-models.md +0 -7
  44. package/docs/documentation/plans/create-plans.md +0 -9
  45. package/docs/documentation/plans/credit-packs.md +0 -7
  46. package/docs/documentation/plans/one-time-payments.md +36 -7
  47. package/docs/documentation/plans/plan-groups.md +0 -6
  48. package/docs/documentation/python/integrate-with-django.md +1 -8
  49. package/docs/documentation/python/integrate-with-fastapi.md +1 -8
  50. package/docs/documentation/python/integrate-with-flask.md +1 -8
  51. package/docs/documentation/python/integrate-with-python.md +1 -8
  52. package/docs/documentation/sales/introductory-offers.md +1 -9
  53. package/docs/documentation/sales/offers.md +0 -8
  54. package/docs/documentation/sales/promo-codes.md +0 -7
  55. package/docs/documentation/sales/promotional-offers.md +0 -7
  56. package/docs/documentation/sales/regional-prices.md +0 -7
  57. package/docs/documentation/sales/trial-periods.md +0 -8
  58. package/docs/documentation/sdk-reference.md +1 -1
  59. package/docs/documentation/subscriptions/manage-subscriptions.md +2 -9
  60. package/docs/documentation/subscriptions/pay-in-advance.md +161 -0
  61. package/docs/documentation/subscriptions/plan-grants.md +0 -6
  62. package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +1 -7
  63. package/docs/documentation/testing-sandbox.md +1 -1
  64. package/docs/documentation/usage/ai-token-billing.md +0 -6
  65. package/docs/documentation/usage/quota-management.md +1 -7
  66. package/docs/documentation/usage/seat-management.md +1 -7
  67. package/docs/documentation/usage/track-usage.md +1 -7
  68. package/docs/knowledge-base/how-do-discounts-work.md +0 -8
  69. package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +1 -7
  70. package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +0 -6
  71. package/docs/knowledge-base/how-do-trial-periods-work.md +1 -8
  72. package/docs/knowledge-base/how-does-billing-work.md +1 -1
  73. package/docs/knowledge-base/how-does-quota-based-billing-work.md +1 -7
  74. package/docs/knowledge-base/how-does-seat-based-billing-work.md +1 -7
  75. package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +0 -6
  76. package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +0 -6
  77. package/docs/knowledge-base/what-happens-when-a-payment-fails.md +1 -7
  78. package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +1 -7
  79. package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +1 -7
  80. package/docs/manifest.json +8 -1
  81. package/docs/platform-documentation.md +1 -0
  82. package/docs/schemas.md +13 -4
  83. package/docs/webhooks/introduction.md +3 -3
  84. package/docs/webhooks.md +4 -4
  85. package/docs/webhooks.openapi.json +15 -5
  86. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Quota
3
- description: How quota-based billing works for your customers
3
+ description: Quota plans include units of a durable resource and bill extra units at the highest balance held in the period, so deleting units never lowers the charge.
4
4
  ---
5
5
 
6
6
  Plans can include a quota of a durable resource at no extra cost — tasks, WhatsApp numbers, parallel automations. When your customer goes over the included amount, they're charged per extra unit. Unlike a usage meter that only counts up, a quota balance rises and falls as customers create and delete.
@@ -97,9 +97,3 @@ They pay today: $64.50
97
97
  > **Note**
98
98
  >
99
99
  > Your customer's 25 tasks are now covered by the Scale plan's 50 included tasks. They stop paying for extra tasks entirely.
100
-
101
- ## Related
102
-
103
- - [Proration](/docs/how-is-proration-calculated-when-changing-plans) — How mid-cycle charges are calculated
104
- - [Pricing Changes](/docs/what-happens-when-you-change-your-prices) — How price changes apply to existing customers
105
- - [Billing Intervals](/docs/how-do-monthly-quarterly-and-yearly-billing-work) — When quota is charged on quarterly and yearly plans
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Seats
3
- description: How seat-based billing works for your customers
3
+ description: How included and extra seats are charged, when changes to seats or seat prices take effect, and how upgrades treat seats.
4
4
  ---
5
5
 
6
6
  Plans can include a number of seats at no extra cost. When your customer uses more seats than included, they're charged per extra seat.
@@ -79,9 +79,3 @@ They pay today: $249.50
79
79
  > **Note**
80
80
  >
81
81
  > Your customer's 8 seats are now covered by the Business plan's 10 included seats. If they had 12 seats, the 2 above the included 10 would be billed for the full new period in advance: 2 × $20 = $40.
82
-
83
- ## Related
84
-
85
- - [Proration](/docs/how-is-proration-calculated-when-changing-plans) — How mid-cycle charges are calculated
86
- - [Pricing Changes](/docs/what-happens-when-you-change-your-prices) — How price changes apply to existing customers
87
- - [Billing Intervals](/docs/how-do-monthly-quarterly-and-yearly-billing-work) — When seats are charged on quarterly and yearly plans
@@ -80,9 +80,3 @@ Downgrades take effect **at renewal**. Your customer already paid for the curren
80
80
  ## Why Free → Paid Isn't Prorated
81
81
 
82
82
  When your customer moves from a free plan to a paid plan, there's no credit to give — the free plan costs $0. They simply pay the full price of the new plan from that day.
83
-
84
- ## Related
85
-
86
- - [Plan Changes](/docs/what-happens-when-a-customer-changes-plans) — When proration applies and when it doesn't
87
- - [Seats](/docs/how-does-seat-based-billing-work) — How seat-based billing works with upgrades
88
- - [Invoices](/docs/what-invoices-do-customers-receive-and-when) — What invoices your customers receive
@@ -103,9 +103,3 @@ You raise Plan Pro from 5,000 API calls to 10,000.
103
103
 
104
104
  All customers — new and existing — get 10,000 right away.
105
105
  ```
106
-
107
- ## Related
108
-
109
- - [Proration](/docs/how-is-proration-calculated-when-changing-plans) — Exactly how mid-cycle charges are calculated
110
- - [Pricing Changes](/docs/what-happens-when-you-change-your-prices) — What happens when you change prices without changing plans
111
- - [Billing Intervals](/docs/how-do-monthly-quarterly-and-yearly-billing-work) — How quarterly and yearly billing works
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Payment Failures
3
- description: What happens when your customer's payment fails
3
+ description: Usage and seats keep working while Commet retries a failed charge on days 1, 3, 5 and 7, and the subscription is canceled if every retry fails.
4
4
  ---
5
5
 
6
6
  When a payment fails, your customer's usage and seats keep working while Commet retries the charge — but new purchases are blocked. If all retries fail, their subscription is canceled.
@@ -31,9 +31,3 @@ All retries fail
31
31
  ## First Charge After a Trial
32
32
 
33
33
  A retryable provider decline on the first paid invoice follows the same `past_due` dunning schedule. If the charge cannot start because the payment method is missing or the customer must take an action, the subscription remains `pending_payment` and checkout is used to complete payment instead of starting dunning.
34
-
35
- ## Related
36
-
37
- - [Invoices](/docs/what-invoices-do-customers-receive-and-when) — What invoices your customers receive
38
- - [Trials](/docs/how-do-trial-periods-work) — What happens if the first charge after a trial fails
39
- - [Plan Changes](/docs/what-happens-when-a-customer-changes-plans) — How a canceled customer can come back
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Pricing Changes
3
- description: What happens to your customers when you change your prices
3
+ description: New customers pay new prices at once; existing customers get decreases now and increases at renewal, and base plan prices always change at renewal.
4
4
  ---
5
5
 
6
6
  When you change a price, **new customers pay the new price immediately**. For existing customers, the rule is asymmetric: **decreases apply immediately, increases apply at renewal**.
@@ -65,9 +65,3 @@ You lower it from $35/seat to $25/seat.
65
65
 
66
66
  This month → 3 × $25 = $75 — applied immediately
67
67
  ```
68
-
69
- ## Related
70
-
71
- - [Plan Changes](/docs/what-happens-when-a-customer-changes-plans) — What happens when your customer upgrades or downgrades
72
- - [Proration](/docs/how-is-proration-calculated-when-changing-plans) — How mid-cycle charges are calculated
73
- - [Seats](/docs/how-does-seat-based-billing-work) — How seat-based billing works
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Invoices
3
- description: What invoices your customers receive and when
3
+ description: Every invoice your customers can receive, from recurring and overage invoices to plan changes, credit purchases and top-ups, and when each is issued.
4
4
  ---
5
5
 
6
6
  Your customers receive invoices automatically based on what happens in their subscription. Here's every type of invoice they might see and when it's generated.
@@ -92,9 +92,3 @@ Every invoice is built from these line types:
92
92
  - `balance_overage`: Balance spent past zero, when the plan allows it.
93
93
  - `addon_base`: Add-on charge at renewal.
94
94
  - `one_time`: Standalone one-time payment.
95
-
96
- ## Related
97
-
98
- - [Billing Intervals](/docs/how-do-monthly-quarterly-and-yearly-billing-work) — When quarterly, semiannual, and yearly customers get charged
99
- - [Proration](/docs/how-is-proration-calculated-when-changing-plans) — How mid-cycle charges are calculated
100
- - [Plan Changes](/docs/what-happens-when-a-customer-changes-plans) — When plan change invoices are created
@@ -12,7 +12,7 @@
12
12
  "platformDocumentation": {
13
13
  "source": "commet-labs/docs",
14
14
  "index": "platform-documentation.md",
15
- "count": 95,
15
+ "count": 96,
16
16
  "entries": [
17
17
  "documentation/introduction.md",
18
18
  "documentation/create-api-key.md",
@@ -54,6 +54,7 @@
54
54
  "documentation/sales/regional-prices.md",
55
55
  "documentation/sales/trial-periods.md",
56
56
  "documentation/subscriptions/manage-subscriptions.md",
57
+ "documentation/subscriptions/pay-in-advance.md",
57
58
  "documentation/subscriptions/plan-grants.md",
58
59
  "documentation/subscriptions/upgrade-and-downgrade-plans.md",
59
60
  "documentation/usage/track-usage.md",
@@ -1352,6 +1353,12 @@
1352
1353
  "method": "POST",
1353
1354
  "path": "/subscriptions/{id}/payment-method/update"
1354
1355
  },
1356
+ {
1357
+ "name": "createPrepaidPeriodsCheckout",
1358
+ "operationId": "create-prepaid-periods-checkout",
1359
+ "method": "POST",
1360
+ "path": "/subscriptions/{id}/prepaid-periods"
1361
+ },
1355
1362
  {
1356
1363
  "name": "previewChange",
1357
1364
  "operationId": "preview-change-plan",
@@ -42,6 +42,7 @@ This documentation snapshot is serialized from the source of commet.co/docs and
42
42
  - [documentation/sales/regional-prices.md](./documentation/sales/regional-prices.md)
43
43
  - [documentation/sales/trial-periods.md](./documentation/sales/trial-periods.md)
44
44
  - [documentation/subscriptions/manage-subscriptions.md](./documentation/subscriptions/manage-subscriptions.md)
45
+ - [documentation/subscriptions/pay-in-advance.md](./documentation/subscriptions/pay-in-advance.md)
45
46
  - [documentation/subscriptions/plan-grants.md](./documentation/subscriptions/plan-grants.md)
46
47
  - [documentation/subscriptions/upgrade-and-downgrade-plans.md](./documentation/subscriptions/upgrade-and-downgrade-plans.md)
47
48
  - [documentation/usage/track-usage.md](./documentation/usage/track-usage.md)
package/docs/schemas.md CHANGED
@@ -38,12 +38,15 @@ Generated from Commet API version `2026-08-27`.
38
38
  - `"one_time_payment"`
39
39
  - `"reactivation"`
40
40
  - `"resume"`
41
+ - `"prepayment"`
41
42
 
42
43
  ### PaymentMethod
43
44
 
44
45
  - `"card"`
45
46
  - `"oxxo"`
46
47
  - `"mercado_pago"`
48
+ - `"google_pay"`
49
+ - `"smartpix"`
47
50
 
48
51
  ### PaymentProvider
49
52
 
@@ -375,7 +378,7 @@ Variants:
375
378
  - `planName` (`string | null`, required)
376
379
  - `poNumber` (`string | null`, required)
377
380
  - `reference` (`string | null`, required)
378
- - `lineItems` (`Array<{ lineType: "plan_base" | "feature_overage" | "feature_seats" | "feature_quota" | "discount" | "promo_code_discount" | "credit" | "balance_overage" | "addon_base" | "one_time"; featureName: string | null; description: string; quantity: number; unitAmount: number; amount: number; includedAmount: number | null; usedAmount: number | null; overageAmount: number | null; discountType: string | null; discountValue: number | null; discountName: string | null; chargeType: "standard" | "advance" | "true_up" }>`, required)
381
+ - `lineItems` (`Array<{ lineType: "plan_base" | "feature_overage" | "feature_seats" | "feature_quota" | "discount" | "promo_code_discount" | "credit" | "balance_overage" | "addon_base" | "one_time" | "prepaid_period"; featureName: string | null; description: string; quantity: number; unitAmount: number; amount: number; includedAmount: number | null; usedAmount: number | null; overageAmount: number | null; discountType: string | null; discountValue: number | null; discountName: string | null; chargeType: "standard" | "advance" | "true_up" }>`, required)
379
382
  - `object` (`"invoice"`, required)
380
383
  - `livemode` (`boolean`, required)
381
384
 
@@ -437,7 +440,7 @@ Variants:
437
440
 
438
441
  ### Payment
439
442
 
440
- - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
443
+ - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment" | "addon_activation" | "prepayment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
441
444
  - `id` (`string`, required)
442
445
  - `customerId` (`string | null`, required)
443
446
  - `kind` (`"link" | "charge"`, required)
@@ -623,6 +626,12 @@ Variants:
623
626
  - `object` (`"portal_session"`, required)
624
627
  - `livemode` (`boolean`, required)
625
628
 
629
+ ### PrepaidPeriodsCheckout
630
+
631
+ - `checkoutUrl` (`string`, required)
632
+ - `object` (`"checkout_session"`, required)
633
+ - `livemode` (`boolean`, required)
634
+
626
635
  ### PreviewChange
627
636
 
628
637
  - `currency` (`string`, required)
@@ -858,7 +867,7 @@ Variants:
858
867
 
859
868
  ### Transaction
860
869
 
861
- - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
870
+ - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment" | "addon_activation" | "prepayment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
862
871
  - `id` (`string`, required)
863
872
  - `invoiceId` (`string | null`, required)
864
873
  - `grossAmount` (`number | null`, required) — Gross amount in USD cents. Null when the provider has not reported an honest USD figure; see presentmentAmount.
@@ -881,7 +890,7 @@ Variants:
881
890
 
882
891
  ### TransactionListItem
883
892
 
884
- - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
893
+ - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment" | "addon_activation" | "prepayment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
885
894
  - `id` (`string`, required)
886
895
  - `invoiceId` (`string | null`, required)
887
896
  - `grossAmount` (`number | null`, required) — Gross amount in USD cents. Null when the provider has not reported an honest USD figure; see presentmentAmount.
@@ -446,7 +446,7 @@ Commet sends these headers with every webhook request:
446
446
 
447
447
  ## Retry policy
448
448
 
449
- If your endpoint returns a non-2xx status or times out (10 seconds), Commet retries with exponential backoff. The initial delivery counts as the first attempt, followed by up to 7 retries — 8 attempts in total over a window of roughly 8 hours:
449
+ If your endpoint returns a non-2xx status or times out (10 seconds), Commet retries with exponential backoff capped at 1 hour. The initial delivery counts as the first attempt, followed by up to 7 retries — 8 attempts in total over a window of roughly 4 hours:
450
450
 
451
451
  | Retry | Delay after previous attempt |
452
452
  | --------- | ---------------------------- |
@@ -455,8 +455,8 @@ If your endpoint returns a non-2xx status or times out (10 seconds), Commet retr
455
455
  | 3rd retry | 15 minutes |
456
456
  | 4th retry | 30 minutes |
457
457
  | 5th retry | 1 hour |
458
- | 6th retry | 2 hours |
459
- | 7th retry | 4 hours |
458
+ | 6th retry | 1 hour |
459
+ | 7th retry | 1 hour |
460
460
 
461
461
  After 8 failed attempts (the initial delivery plus 7 retries), the delivery is marked as failed and we email your organization's notification recipient with the endpoint URL, event type, and the last response we received (HTTP status or error code).
462
462
 
package/docs/webhooks.md CHANGED
@@ -316,7 +316,7 @@ Fired every time a payment settles successfully — the first payment and every
316
316
 
317
317
  ### Data
318
318
 
319
- - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
319
+ - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment" | "addon_activation" | "prepayment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
320
320
  - `invoiceId` (`string`, required) — The invoice ID.
321
321
  - `invoiceNumber` (`string`, required) — The human-readable invoice number.
322
322
  - `invoiceTotal` (`number`, required) — Invoice total in cents (100 = $1.00).
@@ -338,7 +338,7 @@ Fired when an invoice-linked subscription charge fails.
338
338
 
339
339
  ### Data
340
340
 
341
- - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
341
+ - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment" | "addon_activation" | "prepayment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
342
342
  - `invoiceId` (`string`, required) — The invoice ID, if available.
343
343
  - `invoiceNumber` (`string`, required) — The human-readable invoice number, if available.
344
344
  - `customerId` (`string`, required) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
@@ -448,7 +448,7 @@ Fired when a payment link is paid. The charge settled and a one-time invoice was
448
448
 
449
449
  ### Data
450
450
 
451
- - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
451
+ - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment" | "addon_activation" | "prepayment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
452
452
  - `paymentId` (`string`, required) — The payment link ID.
453
453
  - `status` (`string`, required) — The link status. Always "succeeded" for this event.
454
454
  - `amount` (`number`, required) — The collected amount in cents (100 = $1.00).
@@ -467,7 +467,7 @@ Fired when a payment link charge attempt is declined. The link stays open and ca
467
467
 
468
468
  ### Data
469
469
 
470
- - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
470
+ - `paymentContext` (`{ reason: "first_subscription_payment" | "trial_conversion" | "recurring_billing" | "plan_change" | "reactivation" | "subscription_resume" | "one_time_payment" | "overage" | "adjustment" | "addon_activation" | "prepayment"; paymentLinkId: string | null; recovery: { type: "payment_recovery" } | { type: "dunning_retry"; attempt: number; maxAttempts: number } | null } | null`, required) — Charge context captured for new payments. Null for historical payments with no captured context.
471
471
  - `paymentId` (`string`, required) — The payment link ID.
472
472
  - `status` (`string`, required) — The link status. Always "failed" for this event.
473
473
  - `amount` (`number`, required) — The amount that was attempted in cents (100 = $1.00).
@@ -3054,7 +3054,9 @@
3054
3054
  "subscription_resume",
3055
3055
  "one_time_payment",
3056
3056
  "overage",
3057
- "adjustment"
3057
+ "adjustment",
3058
+ "addon_activation",
3059
+ "prepayment"
3058
3060
  ],
3059
3061
  "description": "The original reason for the charge. Recovery never replaces this reason."
3060
3062
  },
@@ -3393,7 +3395,9 @@
3393
3395
  "subscription_resume",
3394
3396
  "one_time_payment",
3395
3397
  "overage",
3396
- "adjustment"
3398
+ "adjustment",
3399
+ "addon_activation",
3400
+ "prepayment"
3397
3401
  ],
3398
3402
  "description": "The original reason for the charge. Recovery never replaces this reason."
3399
3403
  },
@@ -4663,7 +4667,9 @@
4663
4667
  "subscription_resume",
4664
4668
  "one_time_payment",
4665
4669
  "overage",
4666
- "adjustment"
4670
+ "adjustment",
4671
+ "addon_activation",
4672
+ "prepayment"
4667
4673
  ],
4668
4674
  "description": "The original reason for the charge. Recovery never replaces this reason."
4669
4675
  },
@@ -4944,7 +4950,9 @@
4944
4950
  "subscription_resume",
4945
4951
  "one_time_payment",
4946
4952
  "overage",
4947
- "adjustment"
4953
+ "adjustment",
4954
+ "addon_activation",
4955
+ "prepayment"
4948
4956
  ],
4949
4957
  "description": "The original reason for the charge. Recovery never replaces this reason."
4950
4958
  },
@@ -10774,7 +10782,9 @@
10774
10782
  "enum": [
10775
10783
  "card",
10776
10784
  "oxxo",
10777
- "mercado_pago"
10785
+ "mercado_pago",
10786
+ "google_pay",
10787
+ "smartpix"
10778
10788
  ]
10779
10789
  },
10780
10790
  "SubPaymentMethod": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commet/node",
3
- "version": "9.6.0",
3
+ "version": "9.7.0",
4
4
  "description": "Commet SDK for Node.js - Billing and usage tracking",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",