stripe 19.4.0-alpha.1 → 19.4.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 +32 -0
- package/OPENAPI_VERSION +1 -1
- package/README.md +2 -0
- package/VERSION +1 -1
- package/cjs/RequestSender.js +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/Issuing/Programs.js +22 -0
- package/cjs/resources.js +2 -2
- package/cjs/stripe.core.js +1 -1
- package/esm/RequestSender.js +1 -1
- package/esm/apiVersion.js +1 -1
- package/esm/resources/Issuing/Programs.js +19 -0
- package/esm/resources.js +2 -2
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountsResource.d.ts +88 -0
- package/types/DelegatedCheckout/RequestedSessions.d.ts +24 -0
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +6 -0
- package/types/Discounts.d.ts +10 -0
- package/types/InvoiceItems.d.ts +13 -0
- package/types/InvoiceLineItems.d.ts +13 -0
- package/types/Invoices.d.ts +13 -0
- package/types/InvoicesResource.d.ts +86 -1
- package/types/Issuing/Programs.d.ts +42 -0
- package/types/Issuing/ProgramsResource.d.ts +96 -0
- package/types/Persons.d.ts +28 -0
- package/types/QuotePreviewInvoices.d.ts +13 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +200 -0
- package/types/Quotes.d.ts +388 -0
- package/types/QuotesResource.d.ts +642 -54
- package/types/SubscriptionSchedules.d.ts +198 -0
- package/types/SubscriptionSchedulesResource.d.ts +176 -0
- package/types/Subscriptions.d.ts +109 -1
- package/types/SubscriptionsResource.d.ts +14 -2
- package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +30 -0
- package/types/TokensResource.d.ts +44 -0
- package/types/apiVersion.d.ts +1 -1
- package/types/index.d.ts +3 -5
- package/cjs/resources/V2/Tax/AutomaticRules.js +0 -22
- package/esm/resources/V2/Tax/AutomaticRules.js +0 -19
- package/types/V2/Tax/AutomaticRules.d.ts +0 -53
- package/types/V2/Tax/AutomaticRulesResource.d.ts +0 -102
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Issuing {
|
|
6
|
+
/**
|
|
7
|
+
* An Issuing `Program` represents a card program that the user has access to.
|
|
8
|
+
*/
|
|
9
|
+
interface Program {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the object.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
17
|
+
*/
|
|
18
|
+
object: 'issuing.program';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
22
|
+
*/
|
|
23
|
+
created: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not this is the "default" issuing program new cards are created on. Only one active `is_default` program at the same time.
|
|
27
|
+
*/
|
|
28
|
+
is_default: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
32
|
+
*/
|
|
33
|
+
metadata: Stripe.Metadata;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The platform's Issuing Program for which this program is associated.
|
|
37
|
+
*/
|
|
38
|
+
platform_program: string | null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Issuing {
|
|
6
|
+
interface ProgramCreateParams {
|
|
7
|
+
/**
|
|
8
|
+
* The program to use as the parent for the new program to create.
|
|
9
|
+
*/
|
|
10
|
+
platform_program: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Specifies which fields in the response should be expanded.
|
|
14
|
+
*/
|
|
15
|
+
expand?: Array<string>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* If true, makes the specified program the default for the given account.
|
|
19
|
+
*/
|
|
20
|
+
is_default?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface ProgramRetrieveParams {
|
|
24
|
+
/**
|
|
25
|
+
* Specifies which fields in the response should be expanded.
|
|
26
|
+
*/
|
|
27
|
+
expand?: Array<string>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface ProgramUpdateParams {
|
|
31
|
+
/**
|
|
32
|
+
* Specifies which fields in the response should be expanded.
|
|
33
|
+
*/
|
|
34
|
+
expand?: Array<string>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* If true, makes the specified program the default.
|
|
38
|
+
*/
|
|
39
|
+
is_default?: boolean;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
43
|
+
*/
|
|
44
|
+
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface ProgramListParams extends PaginationParams {
|
|
48
|
+
/**
|
|
49
|
+
* Specifies which fields in the response should be expanded.
|
|
50
|
+
*/
|
|
51
|
+
expand?: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
class ProgramsResource {
|
|
55
|
+
/**
|
|
56
|
+
* Create a Program object.
|
|
57
|
+
*/
|
|
58
|
+
create(
|
|
59
|
+
params: ProgramCreateParams,
|
|
60
|
+
options?: RequestOptions
|
|
61
|
+
): Promise<Stripe.Response<Stripe.Issuing.Program>>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves the program specified by the given id.
|
|
65
|
+
*/
|
|
66
|
+
retrieve(
|
|
67
|
+
id: string,
|
|
68
|
+
params?: ProgramRetrieveParams,
|
|
69
|
+
options?: RequestOptions
|
|
70
|
+
): Promise<Stripe.Response<Stripe.Issuing.Program>>;
|
|
71
|
+
retrieve(
|
|
72
|
+
id: string,
|
|
73
|
+
options?: RequestOptions
|
|
74
|
+
): Promise<Stripe.Response<Stripe.Issuing.Program>>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Updates a Program object.
|
|
78
|
+
*/
|
|
79
|
+
update(
|
|
80
|
+
id: string,
|
|
81
|
+
params?: ProgramUpdateParams,
|
|
82
|
+
options?: RequestOptions
|
|
83
|
+
): Promise<Stripe.Response<Stripe.Issuing.Program>>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* List all of the programs the given Issuing user has access to.
|
|
87
|
+
*/
|
|
88
|
+
list(
|
|
89
|
+
params?: ProgramListParams,
|
|
90
|
+
options?: RequestOptions
|
|
91
|
+
): ApiListPromise<Stripe.Issuing.Program>;
|
|
92
|
+
list(options?: RequestOptions): ApiListPromise<Stripe.Issuing.Program>;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
package/types/Persons.d.ts
CHANGED
|
@@ -165,6 +165,10 @@ declare module 'stripe' {
|
|
|
165
165
|
*/
|
|
166
166
|
requirements?: Person.Requirements | null;
|
|
167
167
|
|
|
168
|
+
self_reported_income?: Person.SelfReportedIncome;
|
|
169
|
+
|
|
170
|
+
self_reported_monthly_housing_payment?: Person.SelfReportedMonthlyHousingPayment;
|
|
171
|
+
|
|
168
172
|
/**
|
|
169
173
|
* Whether the last four digits of the person's Social Security number have been provided (U.S. only).
|
|
170
174
|
*/
|
|
@@ -670,6 +674,30 @@ declare module 'stripe' {
|
|
|
670
674
|
}
|
|
671
675
|
}
|
|
672
676
|
|
|
677
|
+
interface SelfReportedIncome {
|
|
678
|
+
/**
|
|
679
|
+
* Amount in the minor currency unit (e.g., cents for USD)
|
|
680
|
+
*/
|
|
681
|
+
amount: number;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
685
|
+
*/
|
|
686
|
+
currency: string;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
interface SelfReportedMonthlyHousingPayment {
|
|
690
|
+
/**
|
|
691
|
+
* Amount in the minor currency unit (e.g., cents for USD)
|
|
692
|
+
*/
|
|
693
|
+
amount: number;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
697
|
+
*/
|
|
698
|
+
currency: string;
|
|
699
|
+
}
|
|
700
|
+
|
|
673
701
|
interface UsCfpbData {
|
|
674
702
|
/**
|
|
675
703
|
* The persons ethnicity details
|
|
@@ -1093,6 +1093,11 @@ declare module 'stripe' {
|
|
|
1093
1093
|
* The type of parent that generated this invoice
|
|
1094
1094
|
*/
|
|
1095
1095
|
type: Parent.Type;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Details about the schedule that generated this invoice
|
|
1099
|
+
*/
|
|
1100
|
+
schedule_details?: Parent.ScheduleDetails | null;
|
|
1096
1101
|
}
|
|
1097
1102
|
|
|
1098
1103
|
namespace Parent {
|
|
@@ -1110,6 +1115,13 @@ declare module 'stripe' {
|
|
|
1110
1115
|
quote: string;
|
|
1111
1116
|
}
|
|
1112
1117
|
|
|
1118
|
+
interface ScheduleDetails {
|
|
1119
|
+
/**
|
|
1120
|
+
* The schedule that generated this invoice
|
|
1121
|
+
*/
|
|
1122
|
+
schedule: string;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1113
1125
|
interface SubscriptionDetails {
|
|
1114
1126
|
/**
|
|
1115
1127
|
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
|
|
@@ -1154,6 +1166,7 @@ declare module 'stripe' {
|
|
|
1154
1166
|
type Type =
|
|
1155
1167
|
| 'billing_cadence_details'
|
|
1156
1168
|
| 'quote_details'
|
|
1169
|
+
| 'schedule_details'
|
|
1157
1170
|
| 'subscription_details';
|
|
1158
1171
|
}
|
|
1159
1172
|
|
|
@@ -37,6 +37,13 @@ declare module 'stripe' {
|
|
|
37
37
|
*/
|
|
38
38
|
billing_mode: QuotePreviewSubscriptionSchedule.BillingMode;
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Billing schedules for this subscription schedule.
|
|
42
|
+
*/
|
|
43
|
+
billing_schedules?: Array<
|
|
44
|
+
QuotePreviewSubscriptionSchedule.BillingSchedule
|
|
45
|
+
> | null;
|
|
46
|
+
|
|
40
47
|
/**
|
|
41
48
|
* Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
|
42
49
|
*/
|
|
@@ -79,6 +86,11 @@ declare module 'stripe' {
|
|
|
79
86
|
*/
|
|
80
87
|
last_price_migration_error?: QuotePreviewSubscriptionSchedule.LastPriceMigrationError | null;
|
|
81
88
|
|
|
89
|
+
/**
|
|
90
|
+
* The most recent invoice this subscription schedule has generated.
|
|
91
|
+
*/
|
|
92
|
+
latest_invoice?: string | Stripe.Invoice | null;
|
|
93
|
+
|
|
82
94
|
/**
|
|
83
95
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
84
96
|
*/
|
|
@@ -181,6 +193,187 @@ declare module 'stripe' {
|
|
|
181
193
|
type Type = 'classic' | 'flexible';
|
|
182
194
|
}
|
|
183
195
|
|
|
196
|
+
interface BillingSchedule {
|
|
197
|
+
/**
|
|
198
|
+
* Specifies which subscription items the billing schedule applies to.
|
|
199
|
+
*/
|
|
200
|
+
applies_to: Array<BillingSchedule.AppliesTo> | null;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Specifies the billing period.
|
|
204
|
+
*/
|
|
205
|
+
bill_until: BillingSchedule.BillUntil;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Unique identifier for the billing schedule.
|
|
209
|
+
*/
|
|
210
|
+
key: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Specifies the start of the billing period.
|
|
214
|
+
*/
|
|
215
|
+
bill_from?: BillingSchedule.BillFrom | null;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
namespace BillingSchedule {
|
|
219
|
+
interface AppliesTo {
|
|
220
|
+
/**
|
|
221
|
+
* The billing schedule will apply to the subscription item with the given price ID.
|
|
222
|
+
*/
|
|
223
|
+
price: string | Stripe.Price | null;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Controls which subscription items the billing schedule applies to.
|
|
227
|
+
*/
|
|
228
|
+
type: 'price';
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
interface BillFrom {
|
|
232
|
+
/**
|
|
233
|
+
* Use an index to specify the position of an amendment to start prebilling with.
|
|
234
|
+
*/
|
|
235
|
+
amendment_start: BillFrom.AmendmentStart | null;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The time the billing schedule applies from.
|
|
239
|
+
*/
|
|
240
|
+
computed_timestamp: number | null;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Lets you bill the period starting from a particular Quote line.
|
|
244
|
+
*/
|
|
245
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Timestamp is calculated from the request time.
|
|
249
|
+
*/
|
|
250
|
+
relative: BillFrom.Relative | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
|
|
254
|
+
*/
|
|
255
|
+
timestamp: number | null;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
|
|
259
|
+
*/
|
|
260
|
+
type: BillFrom.Type;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
namespace BillFrom {
|
|
264
|
+
interface AmendmentStart {
|
|
265
|
+
/**
|
|
266
|
+
* Use an index to specify the position of an amendment to start prebilling with.
|
|
267
|
+
*/
|
|
268
|
+
index: number;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
interface LineStartsAt {
|
|
272
|
+
/**
|
|
273
|
+
* Unique identifier for the object.
|
|
274
|
+
*/
|
|
275
|
+
id: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
interface Relative {
|
|
279
|
+
/**
|
|
280
|
+
* Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
|
|
281
|
+
*/
|
|
282
|
+
interval: Relative.Interval;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The multiplier applied to the interval.
|
|
286
|
+
*/
|
|
287
|
+
interval_count: number | null;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
namespace Relative {
|
|
291
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
type Type =
|
|
295
|
+
| 'amendment_start'
|
|
296
|
+
| 'line_starts_at'
|
|
297
|
+
| 'now'
|
|
298
|
+
| 'pause_collection_start'
|
|
299
|
+
| 'quote_acceptance_date'
|
|
300
|
+
| 'relative'
|
|
301
|
+
| 'timestamp';
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
interface BillUntil {
|
|
305
|
+
/**
|
|
306
|
+
* The timestamp the billing schedule will apply until.
|
|
307
|
+
*/
|
|
308
|
+
computed_timestamp: number;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Specifies the billing period.
|
|
312
|
+
*/
|
|
313
|
+
duration: BillUntil.Duration | null;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* If specified, the billing schedule will apply until the specified timestamp.
|
|
317
|
+
*/
|
|
318
|
+
timestamp: number | null;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
322
|
+
*/
|
|
323
|
+
type: BillUntil.Type;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Use an index to specify the position of an amendment to end prebilling with.
|
|
327
|
+
*/
|
|
328
|
+
amendment_end?: BillUntil.AmendmentEnd | null;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Lets you bill the period ending at a particular Quote line.
|
|
332
|
+
*/
|
|
333
|
+
line_ends_at?: BillUntil.LineEndsAt | null;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
namespace BillUntil {
|
|
337
|
+
interface AmendmentEnd {
|
|
338
|
+
/**
|
|
339
|
+
* Use an index to specify the position of an amendment to end prebilling with.
|
|
340
|
+
*/
|
|
341
|
+
index: number;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
interface Duration {
|
|
345
|
+
/**
|
|
346
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
347
|
+
*/
|
|
348
|
+
interval: Duration.Interval;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The multiplier applied to the interval.
|
|
352
|
+
*/
|
|
353
|
+
interval_count: number | null;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
namespace Duration {
|
|
357
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
interface LineEndsAt {
|
|
361
|
+
/**
|
|
362
|
+
* Unique identifier for the object.
|
|
363
|
+
*/
|
|
364
|
+
id: string;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
type Type =
|
|
368
|
+
| 'amendment_end'
|
|
369
|
+
| 'duration'
|
|
370
|
+
| 'line_ends_at'
|
|
371
|
+
| 'schedule_end'
|
|
372
|
+
| 'timestamp'
|
|
373
|
+
| 'upcoming_invoice';
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
184
377
|
interface CurrentPhase {
|
|
185
378
|
/**
|
|
186
379
|
* The end of this phase of the subscription schedule.
|
|
@@ -237,6 +430,11 @@ declare module 'stripe' {
|
|
|
237
430
|
* The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
|
238
431
|
*/
|
|
239
432
|
transfer_data: DefaultSettings.TransferData | null;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
436
|
+
*/
|
|
437
|
+
phase_effective_at?: DefaultSettings.PhaseEffectiveAt | null;
|
|
240
438
|
}
|
|
241
439
|
|
|
242
440
|
namespace DefaultSettings {
|
|
@@ -325,6 +523,8 @@ declare module 'stripe' {
|
|
|
325
523
|
}
|
|
326
524
|
}
|
|
327
525
|
|
|
526
|
+
type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
|
|
527
|
+
|
|
328
528
|
interface TransferData {
|
|
329
529
|
/**
|
|
330
530
|
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
|