stripe 18.6.0-alpha.1 → 18.6.0-alpha.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 18.6.0-alpha.2 - 2025-09-17
4
+
5
+ * [#2404](https://github.com/stripe/stripe-node/pull/2404) Update generated code for private-preview
6
+ * Add support for `retrieve` method on resource `V2.Core.ClaimableSandbox`
7
+ * Add support for `month_of_year` on `V2.Billing.Cadence#create.billing_cycle.month` and `V2.Billing.Cadence.billing_cycle.month`
8
+ * Add support for `claimed_at`, `expires_at`, `sandbox_details`, and `status` on `V2.Core.ClaimableSandbox`
9
+ * Remove support for `api_keys` on `V2.Core.ClaimableSandbox`
10
+ * Change type of `V2.Core.ClaimableSandbox.claim_url` from `string` to `nullable(string)`
11
+ * Add support for new value `current_billing_period_end` on enums `V2.Billing.Intent#create.actions[].deactivate.effective_at.type` and `V2.Billing.IntentAction.deactivate.effective_at.type`
12
+ * Add support for `will_activate_at` and `will_cancel_at` on `V2.Billing.PricingPlanSubscription.servicing_status_transitions` and `V2.Billing.RateCardSubscription.servicing_status_transitions`
13
+ * Add support for `category` and `priority` on `V2.Billing.ServiceAction#create.credit_grant_per_tenant`, `V2.Billing.ServiceAction#create.credit_grant`, `V2.Billing.ServiceAction.credit_grant_per_tenant`, and `V2.Billing.ServiceAction.credit_grant`
14
+ * Change `V2.Billing.LicenseFee#update.display_name` to be optional
15
+ * Add support for `invoices` on `EventsV2BillingCadenceBilledEvent`
16
+ * Add support for thin events `V2CoreClaimableSandboxClaimedEvent`, `V2CoreClaimableSandboxExpiredEvent`, `V2CoreClaimableSandboxExpiringEvent`, and `V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent` with related object `V2.Core.ClaimableSandbox`
17
+ * Remove support for thin event `V2BillingCadenceErroredEvent` with related object `V2.Billing.Cadence`
18
+
3
19
  ## 18.6.0-alpha.1 - 2025-08-27
4
20
  * [#2393](https://github.com/stripe/stripe-node/pull/2393) Use the right API version 2025-08-27.preview
5
21
  * [#2390](https://github.com/stripe/stripe-node/pull/2390) Update generated code for private-preview
package/VERSION CHANGED
@@ -1 +1 @@
1
- 18.6.0-alpha.1
1
+ 18.6.0-alpha.2
@@ -9,4 +9,8 @@ exports.ClaimableSandboxes = StripeResource_js_1.StripeResource.extend({
9
9
  method: 'POST',
10
10
  fullPath: '/v2/core/claimable_sandboxes',
11
11
  }),
12
+ retrieve: stripeMethod({
13
+ method: 'GET',
14
+ fullPath: '/v2/core/claimable_sandboxes/{id}',
15
+ }),
12
16
  });
@@ -36,7 +36,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
36
36
  ];
37
37
  const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
38
38
  function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
39
- Stripe.PACKAGE_VERSION = '18.6.0-alpha.1';
39
+ Stripe.PACKAGE_VERSION = '18.6.0-alpha.2';
40
40
  Stripe.API_VERSION = apiVersion_js_1.ApiVersion;
41
41
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
42
42
  Stripe.StripeResource = StripeResource_js_1.StripeResource;
@@ -6,4 +6,8 @@ export const ClaimableSandboxes = StripeResource.extend({
6
6
  method: 'POST',
7
7
  fullPath: '/v2/core/claimable_sandboxes',
8
8
  }),
9
+ retrieve: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v2/core/claimable_sandboxes/{id}',
12
+ }),
9
13
  });
@@ -33,7 +33,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
33
33
  ];
34
34
  const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
35
35
  export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
36
- Stripe.PACKAGE_VERSION = '18.6.0-alpha.1';
36
+ Stripe.PACKAGE_VERSION = '18.6.0-alpha.2';
37
37
  Stripe.API_VERSION = ApiVersion;
38
38
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
39
39
  Stripe.StripeResource = StripeResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "18.6.0-alpha.1",
3
+ "version": "18.6.0-alpha.2",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -141,6 +141,12 @@ declare module 'stripe' {
141
141
  */
142
142
  day_of_month: number;
143
143
 
144
+ /**
145
+ * The month to anchor the billing on for a type="month" billing cycle from
146
+ * 1-12. Occurrences are calculated from the month anchor.
147
+ */
148
+ month_of_year: number | null;
149
+
144
150
  /**
145
151
  * The time at which the billing cycle ends.
146
152
  */
@@ -108,6 +108,14 @@ declare module 'stripe' {
108
108
  */
109
109
  day_of_month: number;
110
110
 
111
+ /**
112
+ * The month to anchor the billing on for a type="month" billing cycle from
113
+ * 1-12. If not provided, this will default to the month the cadence was created.
114
+ * This setting can only be used for monthly billing cycles with `interval_count` of 2, 3, 4 or 6.
115
+ * All occurrences will be calculated from month provided.
116
+ */
117
+ month_of_year?: number;
118
+
111
119
  /**
112
120
  * The time at which the billing cycle ends.
113
121
  * This field is optional, and if not provided, it will default to
@@ -167,6 +167,7 @@ declare module 'stripe' {
167
167
 
168
168
  namespace EffectiveAt {
169
169
  type Type =
170
+ | 'current_billing_period_end'
170
171
  | 'current_billing_period_start'
171
172
  | 'on_reserve'
172
173
  | 'timestamp';
@@ -159,6 +159,7 @@ declare module 'stripe' {
159
159
 
160
160
  namespace EffectiveAt {
161
161
  type Type =
162
+ | 'current_billing_period_end'
162
163
  | 'current_billing_period_start'
163
164
  | 'on_reserve'
164
165
  | 'timestamp';
@@ -135,7 +135,7 @@ declare module 'stripe' {
135
135
  * This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices.
136
136
  * Maximum length of 250 characters.
137
137
  */
138
- display_name: string;
138
+ display_name?: string;
139
139
 
140
140
  /**
141
141
  * Changes the version that new license fee will use. Providing `live_version = "latest"` will set the
@@ -272,7 +272,7 @@ declare module 'stripe' {
272
272
  */
273
273
  update(
274
274
  id: string,
275
- params: LicenseFeeUpdateParams,
275
+ params?: LicenseFeeUpdateParams,
276
276
  options?: RequestOptions
277
277
  ): Promise<Stripe.Response<Stripe.V2.Billing.LicenseFee>>;
278
278
 
@@ -6,7 +6,7 @@ declare module 'stripe' {
6
6
  namespace Billing {
7
7
  interface MeterEventStreamCreateParams {
8
8
  /**
9
- * List of meter events to include in the request.
9
+ * List of meter events to include in the request. Supports up to 100 events per request.
10
10
  */
11
11
  events: Array<MeterEventStreamCreateParams.Event>;
12
12
  }
@@ -126,6 +126,16 @@ declare module 'stripe' {
126
126
  * When the servicing status transitioned to paused.
127
127
  */
128
128
  paused_at: string | null;
129
+
130
+ /**
131
+ * When the servicing is scheduled to transition to activate.
132
+ */
133
+ will_activate_at: string | null;
134
+
135
+ /**
136
+ * When the servicing is scheduled to cancel.
137
+ */
138
+ will_cancel_at: string | null;
129
139
  }
130
140
  }
131
141
  }
@@ -126,6 +126,16 @@ declare module 'stripe' {
126
126
  * When the servicing status transitioned to paused.
127
127
  */
128
128
  paused_at: string | null;
129
+
130
+ /**
131
+ * When the servicing is scheduled to transition to activate.
132
+ */
133
+ will_activate_at: string | null;
134
+
135
+ /**
136
+ * When the servicing is scheduled to cancel.
137
+ */
138
+ will_cancel_at: string | null;
129
139
  }
130
140
  }
131
141
  }
@@ -71,6 +71,11 @@ declare module 'stripe' {
71
71
  */
72
72
  applicability_config: CreditGrant.ApplicabilityConfig;
73
73
 
74
+ /**
75
+ * The category of the credit grant.
76
+ */
77
+ category: CreditGrant.Category | null;
78
+
74
79
  /**
75
80
  * The expiry configuration for the credit grant.
76
81
  */
@@ -80,6 +85,11 @@ declare module 'stripe' {
80
85
  * A descriptive name shown in dashboard.
81
86
  */
82
87
  name: string;
88
+
89
+ /**
90
+ * The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
91
+ */
92
+ priority: number | null;
83
93
  }
84
94
 
85
95
  namespace CreditGrant {
@@ -137,6 +147,8 @@ declare module 'stripe' {
137
147
  }
138
148
  }
139
149
 
150
+ type Category = 'paid' | 'promotional';
151
+
140
152
  interface ExpiryConfig {
141
153
  /**
142
154
  * The type of the expiry configuration. We currently support `end_of_service_period`.
@@ -156,6 +168,11 @@ declare module 'stripe' {
156
168
  */
157
169
  applicability_config: CreditGrantPerTenant.ApplicabilityConfig;
158
170
 
171
+ /**
172
+ * The category of the credit grant.
173
+ */
174
+ category: CreditGrantPerTenant.Category | null;
175
+
159
176
  /**
160
177
  * The expiry configuration for the credit grant.
161
178
  */
@@ -165,6 +182,11 @@ declare module 'stripe' {
165
182
  * Customer-facing name for the credit grant.
166
183
  */
167
184
  name: string;
185
+
186
+ /**
187
+ * The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
188
+ */
189
+ priority: number | null;
168
190
  }
169
191
 
170
192
  namespace CreditGrantPerTenant {
@@ -222,6 +244,8 @@ declare module 'stripe' {
222
244
  }
223
245
  }
224
246
 
247
+ type Category = 'paid' | 'promotional';
248
+
225
249
  interface ExpiryConfig {
226
250
  /**
227
251
  * The type of the expiry configuration. We currently support `end_of_service_period`.
@@ -48,6 +48,11 @@ declare module 'stripe' {
48
48
  */
49
49
  applicability_config: CreditGrant.ApplicabilityConfig;
50
50
 
51
+ /**
52
+ * The category of the credit grant.
53
+ */
54
+ category?: CreditGrant.Category;
55
+
51
56
  /**
52
57
  * The expiry configuration for the credit grant.
53
58
  */
@@ -57,6 +62,11 @@ declare module 'stripe' {
57
62
  * A descriptive name shown in dashboard.
58
63
  */
59
64
  name: string;
65
+
66
+ /**
67
+ * The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
68
+ */
69
+ priority?: number;
60
70
  }
61
71
 
62
72
  namespace CreditGrant {
@@ -114,6 +124,8 @@ declare module 'stripe' {
114
124
  }
115
125
  }
116
126
 
127
+ type Category = 'paid' | 'promotional';
128
+
117
129
  interface ExpiryConfig {
118
130
  /**
119
131
  * The type of the expiry configuration. We currently support `end_of_service_period`.
@@ -133,6 +145,11 @@ declare module 'stripe' {
133
145
  */
134
146
  applicability_config: CreditGrantPerTenant.ApplicabilityConfig;
135
147
 
148
+ /**
149
+ * The category of the credit grant.
150
+ */
151
+ category?: CreditGrantPerTenant.Category;
152
+
136
153
  /**
137
154
  * The expiry configuration for the credit grant.
138
155
  */
@@ -147,6 +164,11 @@ declare module 'stripe' {
147
164
  * Customer-facing name for the credit grant.
148
165
  */
149
166
  name: string;
167
+
168
+ /**
169
+ * The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
170
+ */
171
+ priority?: number;
150
172
  }
151
173
 
152
174
  namespace CreditGrantPerTenant {
@@ -204,6 +226,8 @@ declare module 'stripe' {
204
226
  }
205
227
  }
206
228
 
229
+ type Category = 'paid' | 'promotional';
230
+
207
231
  interface ExpiryConfig {
208
232
  /**
209
233
  * The type of the expiry configuration. We currently support `end_of_service_period`.
@@ -25,20 +25,26 @@ declare module 'stripe' {
25
25
  object: 'v2.core.claimable_sandbox';
26
26
 
27
27
  /**
28
- * Keys that can be used to set up an integration for this sandbox and operate on the account.
28
+ * URL for user to claim sandbox into their existing Stripe account.
29
+ * The value will be null if the sandbox status is `claimed` or `expired`.
29
30
  */
30
- api_keys: ClaimableSandbox.ApiKeys;
31
+ claim_url: string | null;
31
32
 
32
33
  /**
33
- * URL for user to claim sandbox into their existing Stripe account.
34
+ * The timestamp the sandbox was claimed. The value will be null if the sandbox status is not `claimed`.
34
35
  */
35
- claim_url: string;
36
+ claimed_at: string | null;
36
37
 
37
38
  /**
38
39
  * When the sandbox is created.
39
40
  */
40
41
  created: string;
41
42
 
43
+ /**
44
+ * The timestamp the sandbox will expire. The value will be null if the sandbox is `claimed`.
45
+ */
46
+ expires_at: string | null;
47
+
42
48
  /**
43
49
  * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
44
50
  */
@@ -48,27 +54,19 @@ declare module 'stripe' {
48
54
  * Values prefilled during the creation of the sandbox.
49
55
  */
50
56
  prefill: ClaimableSandbox.Prefill;
51
- }
52
-
53
- namespace ClaimableSandbox {
54
- interface ApiKeys {
55
- /**
56
- * Used to communicate with [Stripe's MCP server](https://docs.stripe.com/mcp).
57
- * This allows LLM agents to securely operate on a Stripe account.
58
- */
59
- mcp: string | null;
60
57
 
61
- /**
62
- * Publicly accessible in a web or mobile app client-side code.
63
- */
64
- publishable: string;
58
+ /**
59
+ * Data about the Stripe sandbox object.
60
+ */
61
+ sandbox_details: ClaimableSandbox.SandboxDetails;
65
62
 
66
- /**
67
- * Should be stored securely in server-side code (such as an environment variable).
68
- */
69
- secret: string;
70
- }
63
+ /**
64
+ * Status of the sandbox. One of `unclaimed`, `expired`, `claimed`.
65
+ */
66
+ status: ClaimableSandbox.Status;
67
+ }
71
68
 
69
+ namespace ClaimableSandbox {
72
70
  interface Prefill {
73
71
  /**
74
72
  * Country in which the account holder resides, or in which the business is legally established.
@@ -342,6 +340,46 @@ declare module 'stripe' {
342
340
  | 'zm'
343
341
  | 'zw';
344
342
  }
343
+
344
+ interface SandboxDetails {
345
+ /**
346
+ * The sandbox's Stripe account ID.
347
+ */
348
+ account: string;
349
+
350
+ /**
351
+ * Keys that can be used to set up an integration for this sandbox and operate on the account.
352
+ */
353
+ api_keys: SandboxDetails.ApiKeys | null;
354
+
355
+ /**
356
+ * The livemode sandbox Stripe account ID. This field is only set if the user activates their sandbox
357
+ * and chooses to install your platform's Stripe App in their live account.
358
+ */
359
+ owner_account: string | null;
360
+ }
361
+
362
+ namespace SandboxDetails {
363
+ interface ApiKeys {
364
+ /**
365
+ * Used to communicate with [Stripe's MCP server](https://docs.stripe.com/mcp).
366
+ * This allows LLM agents to securely operate on a Stripe account.
367
+ */
368
+ mcp: string | null;
369
+
370
+ /**
371
+ * Publicly accessible in a web or mobile app client-side code.
372
+ */
373
+ publishable: string;
374
+
375
+ /**
376
+ * Should be stored securely in server-side code (such as an environment variable).
377
+ */
378
+ secret: string;
379
+ }
380
+ }
381
+
382
+ type Status = 'claimed' | 'expired' | 'unclaimed';
345
383
  }
346
384
  }
347
385
  }
@@ -293,6 +293,10 @@ declare module 'stripe' {
293
293
  }
294
294
  }
295
295
 
296
+ namespace Core {
297
+ interface ClaimableSandboxRetrieveParams {}
298
+ }
299
+
296
300
  namespace Core {
297
301
  class ClaimableSandboxesResource {
298
302
  /**
@@ -303,6 +307,21 @@ declare module 'stripe' {
303
307
  params: ClaimableSandboxCreateParams,
304
308
  options?: RequestOptions
305
309
  ): Promise<Stripe.Response<Stripe.V2.Core.ClaimableSandbox>>;
310
+
311
+ /**
312
+ * Retrieves the details of a claimable sandbox that was previously been created.
313
+ * Supply the unique claimable sandbox ID that was returned from your creation request,
314
+ * and Stripe will return the corresponding sandbox information.
315
+ */
316
+ retrieve(
317
+ id: string,
318
+ params?: ClaimableSandboxRetrieveParams,
319
+ options?: RequestOptions
320
+ ): Promise<Stripe.Response<Stripe.V2.Core.ClaimableSandbox>>;
321
+ retrieve(
322
+ id: string,
323
+ options?: RequestOptions
324
+ ): Promise<Stripe.Response<Stripe.V2.Core.ClaimableSandbox>>;
306
325
  }
307
326
  }
308
327
  }
@@ -8,7 +8,6 @@ declare module 'stripe' {
8
8
  | Stripe.Events.V2BillingCadenceBilledEvent
9
9
  | Stripe.Events.V2BillingCadenceCanceledEvent
10
10
  | Stripe.Events.V2BillingCadenceCreatedEvent
11
- | Stripe.Events.V2BillingCadenceErroredEvent
12
11
  | Stripe.Events.V2BillingLicenseFeeCreatedEvent
13
12
  | Stripe.Events.V2BillingLicenseFeeUpdatedEvent
14
13
  | Stripe.Events.V2BillingLicenseFeeVersionCreatedEvent
@@ -61,6 +60,10 @@ declare module 'stripe' {
61
60
  | Stripe.Events.V2CoreAccountPersonCreatedEvent
62
61
  | Stripe.Events.V2CoreAccountPersonDeletedEvent
63
62
  | Stripe.Events.V2CoreAccountPersonUpdatedEvent
63
+ | Stripe.Events.V2CoreClaimableSandboxClaimedEvent
64
+ | Stripe.Events.V2CoreClaimableSandboxExpiredEvent
65
+ | Stripe.Events.V2CoreClaimableSandboxExpiringEvent
66
+ | Stripe.Events.V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent
64
67
  | Stripe.Events.V2CoreEventDestinationPingEvent
65
68
  | Stripe.Events.V2CoreHealthApiErrorFiringEvent
66
69
  | Stripe.Events.V2CoreHealthApiErrorResolvedEvent
@@ -130,7 +133,6 @@ declare module 'stripe' {
130
133
  | Stripe.Events.PushedV2BillingCadenceBilledEvent
131
134
  | Stripe.Events.PushedV2BillingCadenceCanceledEvent
132
135
  | Stripe.Events.PushedV2BillingCadenceCreatedEvent
133
- | Stripe.Events.PushedV2BillingCadenceErroredEvent
134
136
  | Stripe.Events.PushedV2BillingLicenseFeeCreatedEvent
135
137
  | Stripe.Events.PushedV2BillingLicenseFeeUpdatedEvent
136
138
  | Stripe.Events.PushedV2BillingLicenseFeeVersionCreatedEvent
@@ -183,6 +185,10 @@ declare module 'stripe' {
183
185
  | Stripe.Events.PushedV2CoreAccountPersonCreatedEvent
184
186
  | Stripe.Events.PushedV2CoreAccountPersonDeletedEvent
185
187
  | Stripe.Events.PushedV2CoreAccountPersonUpdatedEvent
188
+ | Stripe.Events.PushedV2CoreClaimableSandboxClaimedEvent
189
+ | Stripe.Events.PushedV2CoreClaimableSandboxExpiredEvent
190
+ | Stripe.Events.PushedV2CoreClaimableSandboxExpiringEvent
191
+ | Stripe.Events.PushedV2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent
186
192
  | Stripe.Events.PushedV2CoreEventDestinationPingEvent
187
193
  | Stripe.Events.PushedV2CoreHealthApiErrorFiringEvent
188
194
  | Stripe.Events.PushedV2CoreHealthApiErrorResolvedEvent
@@ -472,6 +478,8 @@ declare module 'stripe' {
472
478
  */
473
479
  export interface V2BillingCadenceBilledEvent extends V2.EventBase {
474
480
  type: 'v2.billing.cadence.billed';
481
+ // Retrieves data specific to this event.
482
+ data: V2BillingCadenceBilledEvent.Data;
475
483
  // Object containing the reference to API resource relevant to the event.
476
484
  related_object: Event.RelatedObject;
477
485
  // Retrieves the object associated with the event.
@@ -486,6 +494,15 @@ declare module 'stripe' {
486
494
  pull(): Promise<V2BillingCadenceBilledEvent>;
487
495
  }
488
496
 
497
+ namespace V2BillingCadenceBilledEvent {
498
+ export interface Data {
499
+ /**
500
+ * The IDs of the invoices that were generated by the tick for this Cadence.
501
+ */
502
+ invoices: Array<string>;
503
+ }
504
+ }
505
+
489
506
  /**
490
507
  * Occurs when a billing Cadence is canceled.
491
508
  */
@@ -535,25 +552,6 @@ declare module 'stripe' {
535
552
  }
536
553
  }
537
554
 
538
- /**
539
- * Occurs when a billing Cadence encounters an error during a tick.
540
- */
541
- export interface V2BillingCadenceErroredEvent extends V2.EventBase {
542
- type: 'v2.billing.cadence.errored';
543
- // Object containing the reference to API resource relevant to the event.
544
- related_object: Event.RelatedObject;
545
- // Retrieves the object associated with the event.
546
- fetchRelatedObject(): Promise<V2.Billing.Cadence>;
547
- }
548
- export interface PushedV2BillingCadenceErroredEvent extends V2.EventBase {
549
- type: 'v2.billing.cadence.errored';
550
- // Object containing the reference to API resource relevant to the event.
551
- related_object: Event.RelatedObject;
552
- // Retrieves the object associated with the event.
553
- fetchRelatedObject(): Promise<V2.Billing.Cadence>;
554
- pull(): Promise<V2BillingCadenceErroredEvent>;
555
- }
556
-
557
555
  /**
558
556
  * Occurs when a LicenseFee is created.
559
557
  */
@@ -1898,6 +1896,89 @@ declare module 'stripe' {
1898
1896
  }
1899
1897
  }
1900
1898
 
1899
+ /**
1900
+ * Occurs when a claimable sandbox is claimed.
1901
+ */
1902
+ export interface V2CoreClaimableSandboxClaimedEvent extends V2.EventBase {
1903
+ type: 'v2.core.claimable_sandbox.claimed';
1904
+ // Object containing the reference to API resource relevant to the event.
1905
+ related_object: Event.RelatedObject;
1906
+ // Retrieves the object associated with the event.
1907
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1908
+ }
1909
+ export interface PushedV2CoreClaimableSandboxClaimedEvent
1910
+ extends V2.EventBase {
1911
+ type: 'v2.core.claimable_sandbox.claimed';
1912
+ // Object containing the reference to API resource relevant to the event.
1913
+ related_object: Event.RelatedObject;
1914
+ // Retrieves the object associated with the event.
1915
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1916
+ pull(): Promise<V2CoreClaimableSandboxClaimedEvent>;
1917
+ }
1918
+
1919
+ /**
1920
+ * Occurs when a claimable sandbox expires.
1921
+ */
1922
+ export interface V2CoreClaimableSandboxExpiredEvent extends V2.EventBase {
1923
+ type: 'v2.core.claimable_sandbox.expired';
1924
+ // Object containing the reference to API resource relevant to the event.
1925
+ related_object: Event.RelatedObject;
1926
+ // Retrieves the object associated with the event.
1927
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1928
+ }
1929
+ export interface PushedV2CoreClaimableSandboxExpiredEvent
1930
+ extends V2.EventBase {
1931
+ type: 'v2.core.claimable_sandbox.expired';
1932
+ // Object containing the reference to API resource relevant to the event.
1933
+ related_object: Event.RelatedObject;
1934
+ // Retrieves the object associated with the event.
1935
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1936
+ pull(): Promise<V2CoreClaimableSandboxExpiredEvent>;
1937
+ }
1938
+
1939
+ /**
1940
+ * Occurs when a claimable sandbox is expiring in 7 days.
1941
+ */
1942
+ export interface V2CoreClaimableSandboxExpiringEvent extends V2.EventBase {
1943
+ type: 'v2.core.claimable_sandbox.expiring';
1944
+ // Object containing the reference to API resource relevant to the event.
1945
+ related_object: Event.RelatedObject;
1946
+ // Retrieves the object associated with the event.
1947
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1948
+ }
1949
+ export interface PushedV2CoreClaimableSandboxExpiringEvent
1950
+ extends V2.EventBase {
1951
+ type: 'v2.core.claimable_sandbox.expiring';
1952
+ // Object containing the reference to API resource relevant to the event.
1953
+ related_object: Event.RelatedObject;
1954
+ // Retrieves the object associated with the event.
1955
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1956
+ pull(): Promise<V2CoreClaimableSandboxExpiringEvent>;
1957
+ }
1958
+
1959
+ /**
1960
+ * Occurs when a claimable sandbox is activated by the user with the intention to go live and your Stripe app is installed on the live account.
1961
+ */
1962
+ export interface V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent
1963
+ extends V2.EventBase {
1964
+ type: 'v2.core.claimable_sandbox.sandbox_details_owner_account_updated';
1965
+ // Object containing the reference to API resource relevant to the event.
1966
+ related_object: Event.RelatedObject;
1967
+ // Retrieves the object associated with the event.
1968
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1969
+ }
1970
+ export interface PushedV2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent
1971
+ extends V2.EventBase {
1972
+ type: 'v2.core.claimable_sandbox.sandbox_details_owner_account_updated';
1973
+ // Object containing the reference to API resource relevant to the event.
1974
+ related_object: Event.RelatedObject;
1975
+ // Retrieves the object associated with the event.
1976
+ fetchRelatedObject(): Promise<V2.Core.ClaimableSandbox>;
1977
+ pull(): Promise<
1978
+ V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent
1979
+ >;
1980
+ }
1981
+
1901
1982
  /**
1902
1983
  * A ping event used to test the connection to an EventDestination.
1903
1984
  */
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ export const ApiVersion = '2025-08-27.preview';
package/types/lib.d.ts CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
  import {Agent} from 'http';
5
5
 
6
+ import {ApiVersion} from './apiVersion';
7
+
6
8
  declare module 'stripe' {
7
9
  namespace Stripe {
8
10
  type StripeResourceClass = typeof StripeResource;
@@ -27,7 +29,7 @@ declare module 'stripe' {
27
29
  }): (...args: any[]) => Response<ResponseObject>; //eslint-disable-line @typescript-eslint/no-explicit-any
28
30
  static MAX_BUFFERED_REQUEST_METRICS: number;
29
31
  }
30
- export type LatestApiVersion = '2025-08-27.preview';
32
+ export type LatestApiVersion = typeof ApiVersion;
31
33
  export const API_VERSION: string;
32
34
  export type HttpAgent = Agent;
33
35
  export type HttpProtocol = 'http' | 'https';
@@ -8,8 +8,10 @@
8
8
  ///<reference types=".." />
9
9
  import Stripe from 'stripe';
10
10
 
11
+ import {ApiVersion} from '../apiVersion';
12
+
11
13
  let stripe = new Stripe('sk_test_123', {
12
- apiVersion: '2025-08-27.preview',
14
+ apiVersion: ApiVersion,
13
15
  });
14
16
 
15
17
  stripe = new Stripe('sk_test_123');
@@ -26,7 +28,7 @@ stripe = new Stripe('sk_test_123', {
26
28
 
27
29
  // Check config object.
28
30
  stripe = new Stripe('sk_test_123', {
29
- apiVersion: '2025-08-27.preview',
31
+ apiVersion: ApiVersion,
30
32
  typescript: true,
31
33
  maxNetworkRetries: 1,
32
34
  timeout: 1000,
@@ -44,7 +46,7 @@ stripe = new Stripe('sk_test_123', {
44
46
  description: 'test',
45
47
  };
46
48
  const opts: Stripe.RequestOptions = {
47
- apiVersion: '2025-08-27.preview',
49
+ apiVersion: ApiVersion,
48
50
  };
49
51
  const customer: Stripe.Customer = await stripe.customers.create(params, opts);
50
52