stripe 17.8.0-beta.1 → 18.0.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/CHANGELOG.md +246 -1075
- package/OPENAPI_VERSION +1 -1
- package/README.md +0 -1
- package/VERSION +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
- package/cjs/resources/Invoices.js +0 -26
- package/cjs/resources/PaymentIntents.js +0 -8
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionItems.js +0 -9
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources/Terminal/Readers.js +0 -12
- package/cjs/resources/TestHelpers/Terminal/Readers.js +0 -8
- package/cjs/resources.js +12 -48
- package/cjs/stripe.core.js +3 -14
- package/esm/apiVersion.js +1 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
- package/esm/resources/Invoices.js +0 -26
- package/esm/resources/PaymentIntents.js +0 -8
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionItems.js +0 -9
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/Terminal/Readers.js +0 -12
- package/esm/resources/TestHelpers/Terminal/Readers.js +0 -8
- package/esm/resources.js +1 -33
- package/esm/stripe.core.js +3 -14
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +0 -45
- package/types/AccountSessionsResource.d.ts +0 -243
- package/types/Accounts.d.ts +48 -211
- package/types/AccountsResource.d.ts +86 -503
- package/types/ApplicationFees.d.ts +1 -1
- package/types/BalanceTransactions.d.ts +3 -1
- package/types/BalanceTransactionsResource.d.ts +1 -1
- package/types/BankAccounts.d.ts +9 -1
- package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -2
- package/types/Billing/CreditGrants.d.ts +2 -2
- package/types/Billing/CreditGrantsResource.d.ts +2 -2
- package/types/Billing/Meters.d.ts +1 -1
- package/types/Billing/MetersResource.d.ts +2 -2
- package/types/Capabilities.d.ts +8 -0
- package/types/Cards.d.ts +1 -9
- package/types/Charges.d.ts +56 -153
- package/types/ChargesResource.d.ts +1 -1295
- package/types/Checkout/Sessions.d.ts +62 -336
- package/types/Checkout/SessionsResource.d.ts +69 -287
- package/types/ConfirmationTokens.d.ts +50 -99
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNoteLineItems.d.ts +24 -22
- package/types/CreditNotes.d.ts +26 -23
- package/types/CreditNotesResource.d.ts +0 -15
- package/types/CustomerBalanceTransactions.d.ts +8 -1
- package/types/Customers.d.ts +3 -3
- package/types/CustomersResource.d.ts +3 -21
- package/types/EventTypes.d.ts +85 -545
- package/types/Events.d.ts +8 -93
- package/types/FinancialConnections/Accounts.d.ts +1 -29
- package/types/FinancialConnections/AccountsResource.d.ts +3 -35
- package/types/FinancialConnections/Sessions.d.ts +1 -49
- package/types/FinancialConnections/SessionsResource.d.ts +1 -38
- package/types/InvoiceItems.d.ts +60 -31
- package/types/InvoiceItemsResource.d.ts +26 -120
- package/types/InvoiceLineItems.d.ts +154 -91
- package/types/InvoicePayments.d.ts +2 -16
- package/types/InvoicePaymentsResource.d.ts +74 -0
- package/types/Invoices.d.ts +93 -214
- package/types/InvoicesResource.d.ts +307 -6599
- package/types/Issuing/Authorizations.d.ts +1 -1
- package/types/Issuing/AuthorizationsResource.d.ts +1 -1
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/Transactions.d.ts +0 -2
- package/types/Issuing/TransactionsResource.d.ts +0 -5
- package/types/LineItems.d.ts +0 -32
- package/types/Mandates.d.ts +8 -77
- package/types/PaymentIntents.d.ts +56 -648
- package/types/PaymentIntentsResource.d.ts +4120 -8122
- package/types/PaymentLinks.d.ts +49 -6
- package/types/PaymentLinksResource.d.ts +77 -12
- package/types/PaymentMethodConfigurations.d.ts +63 -135
- package/types/PaymentMethodConfigurationsResource.d.ts +116 -216
- package/types/PaymentMethodDomainsResource.d.ts +6 -6
- package/types/PaymentMethods.d.ts +50 -99
- package/types/PaymentMethodsResource.d.ts +53 -148
- package/types/Persons.d.ts +17 -9
- package/types/Plans.d.ts +0 -7
- package/types/PlansResource.d.ts +0 -7
- package/types/Prices.d.ts +0 -33
- package/types/PricesResource.d.ts +2 -35
- package/types/Products.d.ts +0 -39
- package/types/ProductsResource.d.ts +0 -36
- package/types/Quotes.d.ts +1 -591
- package/types/QuotesResource.d.ts +200 -2532
- package/types/Refunds.d.ts +18 -14
- package/types/Reviews.d.ts +3 -2
- package/types/SetupAttempts.d.ts +15 -38
- package/types/SetupIntents.d.ts +3 -111
- package/types/SetupIntentsResource.d.ts +155 -642
- package/types/Sources.d.ts +0 -29
- package/types/SubscriptionItems.d.ts +9 -34
- package/types/SubscriptionItemsResource.d.ts +2 -203
- package/types/SubscriptionSchedules.d.ts +0 -251
- package/types/SubscriptionSchedulesResource.d.ts +9 -1333
- package/types/Subscriptions.d.ts +4 -124
- package/types/SubscriptionsResource.d.ts +10 -455
- package/types/Tax/RegistrationsResource.d.ts +1 -1
- package/types/Terminal/Configurations.d.ts +86 -3
- package/types/Terminal/ConfigurationsResource.d.ts +192 -2
- package/types/Terminal/Readers.d.ts +0 -290
- package/types/Terminal/ReadersResource.d.ts +0 -215
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +50 -103
- package/types/TestHelpers/Terminal/ReadersResource.d.ts +0 -53
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/TokensResource.d.ts +6 -1
- package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
- package/types/Treasury/FinancialAccounts.d.ts +0 -5
- package/types/Treasury/FinancialAccountsResource.d.ts +1 -38
- package/types/Treasury/OutboundTransfers.d.ts +0 -26
- package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
- package/types/Treasury/ReceivedCredits.d.ts +0 -26
- package/types/Treasury/ReceivedDebits.d.ts +0 -31
- package/types/V2/Core/EventDestinationsResource.d.ts +0 -5
- package/types/V2/Core/EventsResource.d.ts +0 -5
- package/types/V2/EventDestinations.d.ts +1 -1
- package/types/V2/Events.d.ts +1 -1
- package/types/WebhookEndpointsResource.d.ts +19 -71
- package/types/index.d.ts +2 -64
- package/types/lib.d.ts +1 -1
- package/types/test/typescriptTest.ts +3 -6
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/Capital/FinancingOffers.js +0 -21
- package/cjs/resources/Capital/FinancingSummary.js +0 -12
- package/cjs/resources/Capital/FinancingTransactions.js +0 -17
- package/cjs/resources/FinancialConnections/Institutions.js +0 -17
- package/cjs/resources/GiftCards/Cards.js +0 -23
- package/cjs/resources/GiftCards/Transactions.js +0 -33
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/PaymentRecords.js +0 -29
- package/cjs/resources/Tax/Associations.js +0 -9
- package/cjs/resources/Tax/Forms.js +0 -20
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/Capital/FinancingOffers.js +0 -18
- package/esm/resources/Capital/FinancingSummary.js +0 -9
- package/esm/resources/Capital/FinancingTransactions.js +0 -14
- package/esm/resources/FinancialConnections/Institutions.js +0 -14
- package/esm/resources/GiftCards/Cards.js +0 -20
- package/esm/resources/GiftCards/Transactions.js +0 -30
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/PaymentRecords.js +0 -26
- package/esm/resources/Tax/Associations.js +0 -6
- package/esm/resources/Tax/Forms.js +0 -17
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/Billing/MeterErrorReports.d.ts +0 -106
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/Deprecations.d.ts +0 -215
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -93
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/GiftCards/Cards.d.ts +0 -118
- package/types/GiftCards/CardsResource.d.ts +0 -159
- package/types/GiftCards/Transactions.d.ts +0 -129
- package/types/GiftCards/TransactionsResource.d.ts +0 -201
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
- package/types/Issuing/Settlements.d.ts +0 -103
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1189
- package/types/OrdersResource.d.ts +0 -2981
- package/types/PaymentAttemptRecords.d.ts +0 -242
- package/types/PaymentAttemptRecordsResource.d.ts +0 -47
- package/types/PaymentRecords.d.ts +0 -242
- package/types/PaymentRecordsResource.d.ts +0 -455
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1658
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -824
- package/types/Tax/Associations.d.ts +0 -126
- package/types/Tax/AssociationsResource.d.ts +0 -29
- package/types/Tax/Forms.d.ts +0 -220
- package/types/Tax/FormsResource.d.ts +0 -107
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
- package/types/UsageRecordSummaries.d.ts +0 -56
- package/types/UsageRecords.d.ts +0 -45
|
@@ -43,11 +43,6 @@ declare module 'stripe' {
|
|
|
43
43
|
*/
|
|
44
44
|
invoice?: string;
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
|
|
48
|
-
*/
|
|
49
|
-
margins?: Array<string>;
|
|
50
|
-
|
|
51
46
|
/**
|
|
52
47
|
* 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`.
|
|
53
48
|
*/
|
|
@@ -59,14 +54,14 @@ declare module 'stripe' {
|
|
|
59
54
|
period?: InvoiceItemCreateParams.Period;
|
|
60
55
|
|
|
61
56
|
/**
|
|
62
|
-
*
|
|
57
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
|
63
58
|
*/
|
|
64
|
-
|
|
59
|
+
price_data?: InvoiceItemCreateParams.PriceData;
|
|
65
60
|
|
|
66
61
|
/**
|
|
67
|
-
*
|
|
62
|
+
* The pricing information for the invoice item.
|
|
68
63
|
*/
|
|
69
|
-
|
|
64
|
+
pricing?: InvoiceItemCreateParams.Pricing;
|
|
70
65
|
|
|
71
66
|
/**
|
|
72
67
|
* Non-negative integer. The quantity of units for the invoice item.
|
|
@@ -94,12 +89,7 @@ declare module 'stripe' {
|
|
|
94
89
|
tax_rates?: Array<string>;
|
|
95
90
|
|
|
96
91
|
/**
|
|
97
|
-
* The
|
|
98
|
-
*/
|
|
99
|
-
unit_amount?: number;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
92
|
+
* The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
|
|
103
93
|
*/
|
|
104
94
|
unit_amount_decimal?: string;
|
|
105
95
|
}
|
|
@@ -116,56 +106,12 @@ declare module 'stripe' {
|
|
|
116
106
|
*/
|
|
117
107
|
discount?: string;
|
|
118
108
|
|
|
119
|
-
/**
|
|
120
|
-
* Details to determine how long the discount should be applied for.
|
|
121
|
-
*/
|
|
122
|
-
discount_end?: Discount.DiscountEnd;
|
|
123
|
-
|
|
124
109
|
/**
|
|
125
110
|
* ID of the promotion code to create a new discount for.
|
|
126
111
|
*/
|
|
127
112
|
promotion_code?: string;
|
|
128
113
|
}
|
|
129
114
|
|
|
130
|
-
namespace Discount {
|
|
131
|
-
interface DiscountEnd {
|
|
132
|
-
/**
|
|
133
|
-
* Time span for the redeemed discount.
|
|
134
|
-
*/
|
|
135
|
-
duration?: DiscountEnd.Duration;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
139
|
-
*/
|
|
140
|
-
timestamp?: number;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* The type of calculation made to determine when the discount ends.
|
|
144
|
-
*/
|
|
145
|
-
type: DiscountEnd.Type;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
namespace DiscountEnd {
|
|
149
|
-
interface Duration {
|
|
150
|
-
/**
|
|
151
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
152
|
-
*/
|
|
153
|
-
interval: Duration.Interval;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
157
|
-
*/
|
|
158
|
-
interval_count: number;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
namespace Duration {
|
|
162
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
type Type = 'duration' | 'timestamp';
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
115
|
interface Period {
|
|
170
116
|
/**
|
|
171
117
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -185,7 +131,7 @@ declare module 'stripe' {
|
|
|
185
131
|
currency: string;
|
|
186
132
|
|
|
187
133
|
/**
|
|
188
|
-
* The ID of the
|
|
134
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
189
135
|
*/
|
|
190
136
|
product: string;
|
|
191
137
|
|
|
@@ -209,6 +155,13 @@ declare module 'stripe' {
|
|
|
209
155
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
210
156
|
}
|
|
211
157
|
|
|
158
|
+
interface Pricing {
|
|
159
|
+
/**
|
|
160
|
+
* The ID of the price object.
|
|
161
|
+
*/
|
|
162
|
+
price?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
212
165
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
213
166
|
}
|
|
214
167
|
|
|
@@ -245,11 +198,6 @@ declare module 'stripe' {
|
|
|
245
198
|
*/
|
|
246
199
|
expand?: Array<string>;
|
|
247
200
|
|
|
248
|
-
/**
|
|
249
|
-
* The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
|
|
250
|
-
*/
|
|
251
|
-
margins?: Stripe.Emptyable<Array<string>>;
|
|
252
|
-
|
|
253
201
|
/**
|
|
254
202
|
* 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`.
|
|
255
203
|
*/
|
|
@@ -261,14 +209,14 @@ declare module 'stripe' {
|
|
|
261
209
|
period?: InvoiceItemUpdateParams.Period;
|
|
262
210
|
|
|
263
211
|
/**
|
|
264
|
-
*
|
|
212
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
|
265
213
|
*/
|
|
266
|
-
|
|
214
|
+
price_data?: InvoiceItemUpdateParams.PriceData;
|
|
267
215
|
|
|
268
216
|
/**
|
|
269
|
-
*
|
|
217
|
+
* The pricing information for the invoice item.
|
|
270
218
|
*/
|
|
271
|
-
|
|
219
|
+
pricing?: InvoiceItemUpdateParams.Pricing;
|
|
272
220
|
|
|
273
221
|
/**
|
|
274
222
|
* Non-negative integer. The quantity of units for the invoice item.
|
|
@@ -291,12 +239,7 @@ declare module 'stripe' {
|
|
|
291
239
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
292
240
|
|
|
293
241
|
/**
|
|
294
|
-
* The
|
|
295
|
-
*/
|
|
296
|
-
unit_amount?: number;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
242
|
+
* The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
|
|
300
243
|
*/
|
|
301
244
|
unit_amount_decimal?: string;
|
|
302
245
|
}
|
|
@@ -313,56 +256,12 @@ declare module 'stripe' {
|
|
|
313
256
|
*/
|
|
314
257
|
discount?: string;
|
|
315
258
|
|
|
316
|
-
/**
|
|
317
|
-
* Details to determine how long the discount should be applied for.
|
|
318
|
-
*/
|
|
319
|
-
discount_end?: Discount.DiscountEnd;
|
|
320
|
-
|
|
321
259
|
/**
|
|
322
260
|
* ID of the promotion code to create a new discount for.
|
|
323
261
|
*/
|
|
324
262
|
promotion_code?: string;
|
|
325
263
|
}
|
|
326
264
|
|
|
327
|
-
namespace Discount {
|
|
328
|
-
interface DiscountEnd {
|
|
329
|
-
/**
|
|
330
|
-
* Time span for the redeemed discount.
|
|
331
|
-
*/
|
|
332
|
-
duration?: DiscountEnd.Duration;
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
336
|
-
*/
|
|
337
|
-
timestamp?: number;
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* The type of calculation made to determine when the discount ends.
|
|
341
|
-
*/
|
|
342
|
-
type: DiscountEnd.Type;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
namespace DiscountEnd {
|
|
346
|
-
interface Duration {
|
|
347
|
-
/**
|
|
348
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
349
|
-
*/
|
|
350
|
-
interval: Duration.Interval;
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
354
|
-
*/
|
|
355
|
-
interval_count: number;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
namespace Duration {
|
|
359
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
type Type = 'duration' | 'timestamp';
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
265
|
interface Period {
|
|
367
266
|
/**
|
|
368
267
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -382,7 +281,7 @@ declare module 'stripe' {
|
|
|
382
281
|
currency: string;
|
|
383
282
|
|
|
384
283
|
/**
|
|
385
|
-
* The ID of the
|
|
284
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
386
285
|
*/
|
|
387
286
|
product: string;
|
|
388
287
|
|
|
@@ -406,6 +305,13 @@ declare module 'stripe' {
|
|
|
406
305
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
407
306
|
}
|
|
408
307
|
|
|
308
|
+
interface Pricing {
|
|
309
|
+
/**
|
|
310
|
+
* The ID of the price object.
|
|
311
|
+
*/
|
|
312
|
+
price?: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
409
315
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
410
316
|
}
|
|
411
317
|
|
|
@@ -23,11 +23,6 @@ declare module 'stripe' {
|
|
|
23
23
|
*/
|
|
24
24
|
amount: number;
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
* The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.
|
|
28
|
-
*/
|
|
29
|
-
amount_excluding_tax: number | null;
|
|
30
|
-
|
|
31
26
|
/**
|
|
32
27
|
* 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).
|
|
33
28
|
*/
|
|
@@ -58,37 +53,22 @@ declare module 'stripe' {
|
|
|
58
53
|
*/
|
|
59
54
|
invoice: string | null;
|
|
60
55
|
|
|
61
|
-
/**
|
|
62
|
-
* The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.
|
|
63
|
-
*/
|
|
64
|
-
invoice_item?: string | Stripe.InvoiceItem;
|
|
65
|
-
|
|
66
56
|
/**
|
|
67
57
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
68
58
|
*/
|
|
69
59
|
livemode: boolean;
|
|
70
60
|
|
|
71
|
-
/**
|
|
72
|
-
* The amount of margin calculated per margin for this line item.
|
|
73
|
-
*/
|
|
74
|
-
margin_amounts?: Array<InvoiceLineItem.MarginAmount> | null;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin.
|
|
78
|
-
*/
|
|
79
|
-
margins?: Array<string | Stripe.Margin> | null;
|
|
80
|
-
|
|
81
61
|
/**
|
|
82
62
|
* 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. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
|
|
83
63
|
*/
|
|
84
64
|
metadata: Stripe.Metadata;
|
|
85
65
|
|
|
86
|
-
period: InvoiceLineItem.Period;
|
|
87
|
-
|
|
88
66
|
/**
|
|
89
|
-
* The
|
|
67
|
+
* The parent that generated this invoice
|
|
90
68
|
*/
|
|
91
|
-
|
|
69
|
+
parent: InvoiceLineItem.Parent | null;
|
|
70
|
+
|
|
71
|
+
period: InvoiceLineItem.Period;
|
|
92
72
|
|
|
93
73
|
/**
|
|
94
74
|
* Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
|
|
@@ -96,54 +76,21 @@ declare module 'stripe' {
|
|
|
96
76
|
pretax_credit_amounts: Array<InvoiceLineItem.PretaxCreditAmount> | null;
|
|
97
77
|
|
|
98
78
|
/**
|
|
99
|
-
* The
|
|
79
|
+
* The pricing information of the line item.
|
|
100
80
|
*/
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Whether this is a proration.
|
|
105
|
-
*/
|
|
106
|
-
proration: boolean;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Additional details for proration line items
|
|
110
|
-
*/
|
|
111
|
-
proration_details: InvoiceLineItem.ProrationDetails | null;
|
|
81
|
+
pricing: InvoiceLineItem.Pricing | null;
|
|
112
82
|
|
|
113
83
|
/**
|
|
114
84
|
* The quantity of the subscription, if the line item is a subscription or a proration.
|
|
115
85
|
*/
|
|
116
86
|
quantity: number | null;
|
|
117
87
|
|
|
118
|
-
/**
|
|
119
|
-
* The subscription that the invoice item pertains to, if any.
|
|
120
|
-
*/
|
|
121
88
|
subscription: string | Stripe.Subscription | null;
|
|
122
89
|
|
|
123
90
|
/**
|
|
124
|
-
* The
|
|
125
|
-
*/
|
|
126
|
-
subscription_item?: string | Stripe.SubscriptionItem;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The amount of tax calculated per tax rate for this line item
|
|
130
|
-
*/
|
|
131
|
-
tax_amounts: Array<InvoiceLineItem.TaxAmount>;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* The tax rates which apply to the line item.
|
|
135
|
-
*/
|
|
136
|
-
tax_rates: Array<Stripe.TaxRate>;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
|
|
140
|
-
*/
|
|
141
|
-
type: InvoiceLineItem.Type;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.
|
|
91
|
+
* The tax information of the line item.
|
|
145
92
|
*/
|
|
146
|
-
|
|
93
|
+
taxes: Array<InvoiceLineItem.Tax> | null;
|
|
147
94
|
}
|
|
148
95
|
|
|
149
96
|
namespace InvoiceLineItem {
|
|
@@ -159,16 +106,120 @@ declare module 'stripe' {
|
|
|
159
106
|
discount: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
160
107
|
}
|
|
161
108
|
|
|
162
|
-
interface
|
|
109
|
+
interface Parent {
|
|
163
110
|
/**
|
|
164
|
-
*
|
|
111
|
+
* Details about the invoice item that generated this line item
|
|
165
112
|
*/
|
|
166
|
-
|
|
113
|
+
invoice_item_details: Parent.InvoiceItemDetails | null;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Details about the subscription item that generated this line item
|
|
117
|
+
*/
|
|
118
|
+
subscription_item_details: Parent.SubscriptionItemDetails | null;
|
|
167
119
|
|
|
168
120
|
/**
|
|
169
|
-
* The
|
|
121
|
+
* The type of parent that generated this line item
|
|
170
122
|
*/
|
|
171
|
-
|
|
123
|
+
type: Parent.Type;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
namespace Parent {
|
|
127
|
+
interface InvoiceItemDetails {
|
|
128
|
+
/**
|
|
129
|
+
* The invoice item that generated this line item
|
|
130
|
+
*/
|
|
131
|
+
invoice_item: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Whether this is a proration
|
|
135
|
+
*/
|
|
136
|
+
proration: boolean;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Additional details for proration line items
|
|
140
|
+
*/
|
|
141
|
+
proration_details: InvoiceItemDetails.ProrationDetails | null;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The subscription that the invoice item belongs to
|
|
145
|
+
*/
|
|
146
|
+
subscription: string | null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
namespace InvoiceItemDetails {
|
|
150
|
+
interface ProrationDetails {
|
|
151
|
+
/**
|
|
152
|
+
* For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
|
|
153
|
+
*/
|
|
154
|
+
credited_items: ProrationDetails.CreditedItems | null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
namespace ProrationDetails {
|
|
158
|
+
interface CreditedItems {
|
|
159
|
+
/**
|
|
160
|
+
* Invoice containing the credited invoice line items
|
|
161
|
+
*/
|
|
162
|
+
invoice: string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Credited invoice line items
|
|
166
|
+
*/
|
|
167
|
+
invoice_line_items: Array<string>;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
interface SubscriptionItemDetails {
|
|
173
|
+
/**
|
|
174
|
+
* The invoice item that generated this line item
|
|
175
|
+
*/
|
|
176
|
+
invoice_item: string | null;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Whether this is a proration
|
|
180
|
+
*/
|
|
181
|
+
proration: boolean;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Additional details for proration line items
|
|
185
|
+
*/
|
|
186
|
+
proration_details: SubscriptionItemDetails.ProrationDetails | null;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The subscription that the subscription item belongs to
|
|
190
|
+
*/
|
|
191
|
+
subscription: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The subscription item that generated this line item
|
|
195
|
+
*/
|
|
196
|
+
subscription_item: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
namespace SubscriptionItemDetails {
|
|
200
|
+
interface ProrationDetails {
|
|
201
|
+
/**
|
|
202
|
+
* For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
|
|
203
|
+
*/
|
|
204
|
+
credited_items: ProrationDetails.CreditedItems | null;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
namespace ProrationDetails {
|
|
208
|
+
interface CreditedItems {
|
|
209
|
+
/**
|
|
210
|
+
* Invoice containing the credited invoice line items
|
|
211
|
+
*/
|
|
212
|
+
invoice: string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Credited invoice line items
|
|
216
|
+
*/
|
|
217
|
+
invoice_line_items: Array<string>;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
type Type = 'invoice_item_details' | 'subscription_item_details';
|
|
172
223
|
}
|
|
173
224
|
|
|
174
225
|
interface Period {
|
|
@@ -202,11 +253,6 @@ declare module 'stripe' {
|
|
|
202
253
|
*/
|
|
203
254
|
discount?: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
204
255
|
|
|
205
|
-
/**
|
|
206
|
-
* The margin that was applied to get this pretax credit amount.
|
|
207
|
-
*/
|
|
208
|
-
margin?: string | Stripe.Margin;
|
|
209
|
-
|
|
210
256
|
/**
|
|
211
257
|
* Type of the pretax credit amount referenced.
|
|
212
258
|
*/
|
|
@@ -214,60 +260,73 @@ declare module 'stripe' {
|
|
|
214
260
|
}
|
|
215
261
|
|
|
216
262
|
namespace PretaxCreditAmount {
|
|
217
|
-
type Type = 'credit_balance_transaction' | 'discount'
|
|
263
|
+
type Type = 'credit_balance_transaction' | 'discount';
|
|
218
264
|
}
|
|
219
265
|
|
|
220
|
-
interface
|
|
266
|
+
interface Pricing {
|
|
267
|
+
price_details?: Pricing.PriceDetails;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The type of the pricing details.
|
|
271
|
+
*/
|
|
272
|
+
type: 'price_details';
|
|
273
|
+
|
|
221
274
|
/**
|
|
222
|
-
*
|
|
275
|
+
* The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places.
|
|
223
276
|
*/
|
|
224
|
-
|
|
277
|
+
unit_amount_decimal: string | null;
|
|
225
278
|
}
|
|
226
279
|
|
|
227
|
-
namespace
|
|
228
|
-
interface
|
|
280
|
+
namespace Pricing {
|
|
281
|
+
interface PriceDetails {
|
|
229
282
|
/**
|
|
230
|
-
*
|
|
283
|
+
* The ID of the price this item is associated with.
|
|
231
284
|
*/
|
|
232
|
-
|
|
285
|
+
price: string;
|
|
233
286
|
|
|
234
287
|
/**
|
|
235
|
-
*
|
|
288
|
+
* The ID of the product this item is associated with.
|
|
236
289
|
*/
|
|
237
|
-
|
|
290
|
+
product: string;
|
|
238
291
|
}
|
|
239
292
|
}
|
|
240
293
|
|
|
241
|
-
interface
|
|
294
|
+
interface Tax {
|
|
242
295
|
/**
|
|
243
|
-
* The amount, in cents (or local equivalent)
|
|
296
|
+
* The amount of the tax, in cents (or local equivalent).
|
|
244
297
|
*/
|
|
245
298
|
amount: number;
|
|
246
299
|
|
|
247
300
|
/**
|
|
248
|
-
* Whether this tax
|
|
301
|
+
* Whether this tax is inclusive or exclusive.
|
|
249
302
|
*/
|
|
250
|
-
|
|
303
|
+
tax_behavior: Tax.TaxBehavior;
|
|
251
304
|
|
|
252
305
|
/**
|
|
253
|
-
*
|
|
306
|
+
* Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
|
|
254
307
|
*/
|
|
255
|
-
|
|
308
|
+
tax_rate_details: Tax.TaxRateDetails | null;
|
|
256
309
|
|
|
257
310
|
/**
|
|
258
311
|
* The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
|
259
312
|
*/
|
|
260
|
-
taxability_reason:
|
|
313
|
+
taxability_reason: Tax.TaxabilityReason;
|
|
261
314
|
|
|
262
315
|
/**
|
|
263
316
|
* The amount on which tax is calculated, in cents (or local equivalent).
|
|
264
317
|
*/
|
|
265
318
|
taxable_amount: number | null;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The type of tax information.
|
|
322
|
+
*/
|
|
323
|
+
type: 'tax_rate_details';
|
|
266
324
|
}
|
|
267
325
|
|
|
268
|
-
namespace
|
|
326
|
+
namespace Tax {
|
|
269
327
|
type TaxabilityReason =
|
|
270
328
|
| 'customer_exempt'
|
|
329
|
+
| 'not_available'
|
|
271
330
|
| 'not_collecting'
|
|
272
331
|
| 'not_subject_to_tax'
|
|
273
332
|
| 'not_supported'
|
|
@@ -282,9 +341,13 @@ declare module 'stripe' {
|
|
|
282
341
|
| 'standard_rated'
|
|
283
342
|
| 'taxable_basis_reduced'
|
|
284
343
|
| 'zero_rated';
|
|
285
|
-
}
|
|
286
344
|
|
|
287
|
-
|
|
345
|
+
type TaxBehavior = 'exclusive' | 'inclusive';
|
|
346
|
+
|
|
347
|
+
interface TaxRateDetails {
|
|
348
|
+
tax_rate: string;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
288
351
|
}
|
|
289
352
|
}
|
|
290
353
|
}
|
|
@@ -16,11 +16,6 @@ declare module 'stripe' {
|
|
|
16
16
|
*/
|
|
17
17
|
object: 'invoice_payment';
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Excess payment that was received for this invoice and credited to the customer's `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more.
|
|
21
|
-
*/
|
|
22
|
-
amount_overpaid: number | null;
|
|
23
|
-
|
|
24
19
|
/**
|
|
25
20
|
* Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent's `amount_received` is not sufficient to pay all of the invoices that it is attached to.
|
|
26
21
|
*/
|
|
@@ -49,7 +44,7 @@ declare module 'stripe' {
|
|
|
49
44
|
/**
|
|
50
45
|
* Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice's `amount_remaining`. The PaymentIntent associated with the default payment can't be edited or canceled directly.
|
|
51
46
|
*/
|
|
52
|
-
is_default: boolean
|
|
47
|
+
is_default: boolean;
|
|
53
48
|
|
|
54
49
|
/**
|
|
55
50
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
@@ -78,11 +73,6 @@ declare module 'stripe' {
|
|
|
78
73
|
*/
|
|
79
74
|
payment_intent?: string | Stripe.PaymentIntent;
|
|
80
75
|
|
|
81
|
-
/**
|
|
82
|
-
* ID of the PaymentRecord associated with this payment when `type` is `payment_record`.
|
|
83
|
-
*/
|
|
84
|
-
payment_record?: string | Stripe.PaymentRecord;
|
|
85
|
-
|
|
86
76
|
/**
|
|
87
77
|
* Type of payment object associated with this invoice payment.
|
|
88
78
|
*/
|
|
@@ -90,11 +80,7 @@ declare module 'stripe' {
|
|
|
90
80
|
}
|
|
91
81
|
|
|
92
82
|
namespace Payment {
|
|
93
|
-
type Type =
|
|
94
|
-
| 'charge'
|
|
95
|
-
| 'out_of_band_payment'
|
|
96
|
-
| 'payment_intent'
|
|
97
|
-
| 'payment_record';
|
|
83
|
+
type Type = 'charge' | 'payment_intent';
|
|
98
84
|
}
|
|
99
85
|
|
|
100
86
|
interface StatusTransitions {
|