stripe 17.4.0 → 17.5.0-beta.1
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 +991 -109
- package/README.md +4 -4
- package/VERSION +1 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +17 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentAttemptRecords.js +17 -0
- package/cjs/resources/PaymentIntents.js +8 -0
- package/cjs/resources/PaymentRecords.js +29 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources.js +48 -10
- package/cjs/stripe.core.js +1 -1
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +17 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentAttemptRecords.js +14 -0
- package/esm/resources/PaymentIntents.js +8 -0
- package/esm/resources/PaymentRecords.js +26 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources.js +33 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +50 -5
- package/types/AccountSessionsResource.d.ts +360 -5
- package/types/Accounts.d.ts +184 -2
- package/types/AccountsResource.d.ts +496 -0
- package/types/Billing/MeterErrorReports.d.ts +106 -0
- package/types/BillingPortal/Configurations.d.ts +1 -1
- package/types/Capabilities.d.ts +1 -1
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Charges.d.ts +244 -2
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +321 -4
- package/types/Checkout/SessionsResource.d.ts +448 -6
- package/types/ConfirmationTokens.d.ts +99 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNotes.d.ts +21 -0
- package/types/CreditNotesResource.d.ts +51 -0
- package/types/CustomersResource.d.ts +7 -0
- package/types/EventTypes.d.ts +596 -0
- package/types/Events.d.ts +93 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +29 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Institutions.d.ts +93 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +49 -1
- package/types/FinancialConnections/SessionsResource.d.ts +38 -1
- package/types/FundingInstructions.d.ts +21 -0
- package/types/GiftCards/Cards.d.ts +118 -0
- package/types/GiftCards/CardsResource.d.ts +159 -0
- package/types/GiftCards/Transactions.d.ts +129 -0
- package/types/GiftCards/TransactionsResource.d.ts +201 -0
- package/types/InvoiceItems.d.ts +5 -0
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +28 -1
- package/types/InvoicePayments.d.ts +113 -0
- package/types/Invoices.d.ts +147 -2
- package/types/InvoicesResource.d.ts +5534 -1849
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +73 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/Settlements.d.ts +103 -0
- package/types/Issuing/Transactions.d.ts +2 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +33 -1
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1155 -0
- package/types/OrdersResource.d.ts +2913 -0
- package/types/PaymentAttemptRecords.d.ts +242 -0
- package/types/PaymentAttemptRecordsResource.d.ts +47 -0
- package/types/PaymentIntents.d.ts +676 -2
- package/types/PaymentIntentsResource.d.ts +8054 -3767
- package/types/PaymentLinks.d.ts +6 -0
- package/types/PaymentLinksResource.d.ts +18 -2
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
- package/types/PaymentMethods.d.ts +99 -0
- package/types/PaymentMethodsResource.d.ts +133 -0
- package/types/PaymentRecords.d.ts +259 -0
- package/types/PaymentRecordsResource.d.ts +455 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Products.d.ts +39 -0
- package/types/ProductsResource.d.ts +36 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1625 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +814 -0
- package/types/Quotes.d.ts +591 -1
- package/types/QuotesResource.d.ts +2526 -194
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +48 -0
- package/types/SetupIntents.d.ts +121 -1
- package/types/SetupIntentsResource.d.ts +645 -3
- package/types/Sources.d.ts +23 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +200 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +91 -1
- package/types/SubscriptionsResource.d.ts +369 -2
- package/types/Tax/Associations.d.ts +126 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/Terminal/LocationsResource.d.ts +1 -1
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +278 -0
- package/types/Terminal/ReadersResource.d.ts +215 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +104 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/WebhookEndpointsResource.d.ts +70 -0
- package/types/index.d.ts +62 -0
|
@@ -43,6 +43,11 @@ 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
|
+
|
|
46
51
|
/**
|
|
47
52
|
* 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`.
|
|
48
53
|
*/
|
|
@@ -111,12 +116,56 @@ declare module 'stripe' {
|
|
|
111
116
|
*/
|
|
112
117
|
discount?: string;
|
|
113
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Details to determine how long the discount should be applied for.
|
|
121
|
+
*/
|
|
122
|
+
discount_end?: Discount.DiscountEnd;
|
|
123
|
+
|
|
114
124
|
/**
|
|
115
125
|
* ID of the promotion code to create a new discount for.
|
|
116
126
|
*/
|
|
117
127
|
promotion_code?: string;
|
|
118
128
|
}
|
|
119
129
|
|
|
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
|
+
|
|
120
169
|
interface Period {
|
|
121
170
|
/**
|
|
122
171
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -196,6 +245,11 @@ declare module 'stripe' {
|
|
|
196
245
|
*/
|
|
197
246
|
expand?: Array<string>;
|
|
198
247
|
|
|
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
|
+
|
|
199
253
|
/**
|
|
200
254
|
* 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`.
|
|
201
255
|
*/
|
|
@@ -259,12 +313,56 @@ declare module 'stripe' {
|
|
|
259
313
|
*/
|
|
260
314
|
discount?: string;
|
|
261
315
|
|
|
316
|
+
/**
|
|
317
|
+
* Details to determine how long the discount should be applied for.
|
|
318
|
+
*/
|
|
319
|
+
discount_end?: Discount.DiscountEnd;
|
|
320
|
+
|
|
262
321
|
/**
|
|
263
322
|
* ID of the promotion code to create a new discount for.
|
|
264
323
|
*/
|
|
265
324
|
promotion_code?: string;
|
|
266
325
|
}
|
|
267
326
|
|
|
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
|
+
|
|
268
366
|
interface Period {
|
|
269
367
|
/**
|
|
270
368
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -68,6 +68,16 @@ declare module 'stripe' {
|
|
|
68
68
|
*/
|
|
69
69
|
livemode: boolean;
|
|
70
70
|
|
|
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
|
+
|
|
71
81
|
/**
|
|
72
82
|
* 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.
|
|
73
83
|
*/
|
|
@@ -149,6 +159,18 @@ declare module 'stripe' {
|
|
|
149
159
|
discount: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
150
160
|
}
|
|
151
161
|
|
|
162
|
+
interface MarginAmount {
|
|
163
|
+
/**
|
|
164
|
+
* The amount, in cents (or local equivalent), of the reduction in line item amount.
|
|
165
|
+
*/
|
|
166
|
+
amount: number;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The margin that was applied to get this margin amount.
|
|
170
|
+
*/
|
|
171
|
+
margin: string | Stripe.Margin;
|
|
172
|
+
}
|
|
173
|
+
|
|
152
174
|
interface Period {
|
|
153
175
|
/**
|
|
154
176
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -180,6 +202,11 @@ declare module 'stripe' {
|
|
|
180
202
|
*/
|
|
181
203
|
discount?: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
182
204
|
|
|
205
|
+
/**
|
|
206
|
+
* The margin that was applied to get this pretax credit amount.
|
|
207
|
+
*/
|
|
208
|
+
margin?: string | Stripe.Margin;
|
|
209
|
+
|
|
183
210
|
/**
|
|
184
211
|
* Type of the pretax credit amount referenced.
|
|
185
212
|
*/
|
|
@@ -187,7 +214,7 @@ declare module 'stripe' {
|
|
|
187
214
|
}
|
|
188
215
|
|
|
189
216
|
namespace PretaxCreditAmount {
|
|
190
|
-
type Type = 'credit_balance_transaction' | 'discount';
|
|
217
|
+
type Type = 'credit_balance_transaction' | 'discount' | 'margin';
|
|
191
218
|
}
|
|
192
219
|
|
|
193
220
|
interface ProrationDetails {
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
/**
|
|
6
|
+
* The invoice payment object
|
|
7
|
+
*/
|
|
8
|
+
interface InvoicePayment {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for the object.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
16
|
+
*/
|
|
17
|
+
object: 'invoice_payment';
|
|
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
|
+
/**
|
|
25
|
+
* 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
|
+
*/
|
|
27
|
+
amount_paid: number | null;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Amount intended to be paid toward this invoice, in cents (or local equivalent)
|
|
31
|
+
*/
|
|
32
|
+
amount_requested: number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
36
|
+
*/
|
|
37
|
+
created: number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 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).
|
|
41
|
+
*/
|
|
42
|
+
currency: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The invoice that was paid.
|
|
46
|
+
*/
|
|
47
|
+
invoice: string | Stripe.Invoice | Stripe.DeletedInvoice;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 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
|
+
*/
|
|
52
|
+
is_default: boolean | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
56
|
+
*/
|
|
57
|
+
livemode: boolean;
|
|
58
|
+
|
|
59
|
+
payment: InvoicePayment.Payment;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The status of the payment, one of `open`, `paid`, or `canceled`.
|
|
63
|
+
*/
|
|
64
|
+
status: string;
|
|
65
|
+
|
|
66
|
+
status_transitions: InvoicePayment.StatusTransitions;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
namespace InvoicePayment {
|
|
70
|
+
interface Payment {
|
|
71
|
+
/**
|
|
72
|
+
* ID of the successful charge for this payment when `type` is `charge`.
|
|
73
|
+
*/
|
|
74
|
+
charge?: string | Stripe.Charge;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.
|
|
78
|
+
*/
|
|
79
|
+
payment_intent?: string | Stripe.PaymentIntent;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* ID of the PaymentRecord associated with this payment when `type` is `payment_record`.
|
|
83
|
+
*/
|
|
84
|
+
payment_record?: string | Stripe.PaymentRecord;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Type of payment object associated with this invoice payment.
|
|
88
|
+
*/
|
|
89
|
+
type: Payment.Type;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
namespace Payment {
|
|
93
|
+
type Type =
|
|
94
|
+
| 'charge'
|
|
95
|
+
| 'out_of_band_payment'
|
|
96
|
+
| 'payment_intent'
|
|
97
|
+
| 'payment_record';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface StatusTransitions {
|
|
101
|
+
/**
|
|
102
|
+
* The time that the payment was canceled.
|
|
103
|
+
*/
|
|
104
|
+
canceled_at: number | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The time that the payment succeeded.
|
|
108
|
+
*/
|
|
109
|
+
paid_at: number | null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
package/types/Invoices.d.ts
CHANGED
|
@@ -89,6 +89,11 @@ declare module 'stripe' {
|
|
|
89
89
|
*/
|
|
90
90
|
amount_due: number;
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance.
|
|
94
|
+
*/
|
|
95
|
+
amount_overpaid?: number;
|
|
96
|
+
|
|
92
97
|
/**
|
|
93
98
|
* The amount, in cents (or local equivalent), that was paid.
|
|
94
99
|
*/
|
|
@@ -104,6 +109,11 @@ declare module 'stripe' {
|
|
|
104
109
|
*/
|
|
105
110
|
amount_shipping: number;
|
|
106
111
|
|
|
112
|
+
/**
|
|
113
|
+
* List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
|
|
114
|
+
*/
|
|
115
|
+
amounts_due?: Array<Invoice.AmountsDue> | null;
|
|
116
|
+
|
|
107
117
|
/**
|
|
108
118
|
* ID of the Connect Application that created the invoice.
|
|
109
119
|
*/
|
|
@@ -218,6 +228,11 @@ declare module 'stripe' {
|
|
|
218
228
|
*/
|
|
219
229
|
customer_tax_ids?: Array<Invoice.CustomerTaxId> | null;
|
|
220
230
|
|
|
231
|
+
/**
|
|
232
|
+
* The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
|
|
233
|
+
*/
|
|
234
|
+
default_margins?: Array<string | Stripe.Margin> | null;
|
|
235
|
+
|
|
221
236
|
/**
|
|
222
237
|
* ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
|
223
238
|
*/
|
|
@@ -347,6 +362,11 @@ declare module 'stripe' {
|
|
|
347
362
|
|
|
348
363
|
payment_settings: Invoice.PaymentSettings;
|
|
349
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Payments for this invoice
|
|
367
|
+
*/
|
|
368
|
+
payments?: ApiList<Stripe.InvoicePayment>;
|
|
369
|
+
|
|
350
370
|
/**
|
|
351
371
|
* End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
|
|
352
372
|
*/
|
|
@@ -461,6 +481,11 @@ declare module 'stripe' {
|
|
|
461
481
|
*/
|
|
462
482
|
total_excluding_tax: number | null;
|
|
463
483
|
|
|
484
|
+
/**
|
|
485
|
+
* The aggregate amounts calculated per margin across all line items.
|
|
486
|
+
*/
|
|
487
|
+
total_margin_amounts?: Array<Invoice.TotalMarginAmount> | null;
|
|
488
|
+
|
|
464
489
|
/**
|
|
465
490
|
* Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
|
|
466
491
|
*/
|
|
@@ -485,6 +510,52 @@ declare module 'stripe' {
|
|
|
485
510
|
}
|
|
486
511
|
|
|
487
512
|
namespace Invoice {
|
|
513
|
+
interface AmountsDue {
|
|
514
|
+
/**
|
|
515
|
+
* Incremental amount due for this payment in cents (or local equivalent).
|
|
516
|
+
*/
|
|
517
|
+
amount: number;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* The amount in cents (or local equivalent) that was paid for this payment.
|
|
521
|
+
*/
|
|
522
|
+
amount_paid: number;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* The difference between the payment's amount and amount_paid, in cents (or local equivalent).
|
|
526
|
+
*/
|
|
527
|
+
amount_remaining: number;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Number of days from when invoice is finalized until the payment is due.
|
|
531
|
+
*/
|
|
532
|
+
days_until_due: number | null;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
536
|
+
*/
|
|
537
|
+
description: string | null;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Date on which a payment plan's payment is due.
|
|
541
|
+
*/
|
|
542
|
+
due_date: number | null;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Timestamp when the payment was paid.
|
|
546
|
+
*/
|
|
547
|
+
paid_at: number | null;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* The status of the payment, one of `open`, `paid`, or `past_due`
|
|
551
|
+
*/
|
|
552
|
+
status: AmountsDue.Status;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
namespace AmountsDue {
|
|
556
|
+
type Status = 'open' | 'paid' | 'past_due';
|
|
557
|
+
}
|
|
558
|
+
|
|
488
559
|
interface AutomaticTax {
|
|
489
560
|
/**
|
|
490
561
|
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
@@ -725,6 +796,16 @@ declare module 'stripe' {
|
|
|
725
796
|
*/
|
|
726
797
|
message?: string;
|
|
727
798
|
|
|
799
|
+
/**
|
|
800
|
+
* For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
|
|
801
|
+
*/
|
|
802
|
+
network_advice_code?: string;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
|
|
806
|
+
*/
|
|
807
|
+
network_decline_code?: string;
|
|
808
|
+
|
|
728
809
|
/**
|
|
729
810
|
* If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
|
|
730
811
|
*/
|
|
@@ -847,11 +928,15 @@ declare module 'stripe' {
|
|
|
847
928
|
| 'email_invalid'
|
|
848
929
|
| 'expired_card'
|
|
849
930
|
| 'financial_connections_account_inactive'
|
|
931
|
+
| 'financial_connections_institution_unavailable'
|
|
850
932
|
| 'financial_connections_no_successful_transaction_refresh'
|
|
851
933
|
| 'forwarding_api_inactive'
|
|
852
934
|
| 'forwarding_api_invalid_parameter'
|
|
853
935
|
| 'forwarding_api_upstream_connection_error'
|
|
854
936
|
| 'forwarding_api_upstream_connection_timeout'
|
|
937
|
+
| 'gift_card_balance_insufficient'
|
|
938
|
+
| 'gift_card_code_exists'
|
|
939
|
+
| 'gift_card_inactive'
|
|
855
940
|
| 'idempotency_key_in_use'
|
|
856
941
|
| 'incorrect_address'
|
|
857
942
|
| 'incorrect_cvc'
|
|
@@ -941,6 +1026,7 @@ declare module 'stripe' {
|
|
|
941
1026
|
| 'return_intent_already_processed'
|
|
942
1027
|
| 'routing_number_invalid'
|
|
943
1028
|
| 'secret_key_required'
|
|
1029
|
+
| 'sensitive_data_access_expired'
|
|
944
1030
|
| 'sepa_unsupported_account'
|
|
945
1031
|
| 'setup_attempt_failed'
|
|
946
1032
|
| 'setup_intent_authentication_failure'
|
|
@@ -958,6 +1044,7 @@ declare module 'stripe' {
|
|
|
958
1044
|
| 'taxes_calculation_failed'
|
|
959
1045
|
| 'terminal_location_country_unsupported'
|
|
960
1046
|
| 'terminal_reader_busy'
|
|
1047
|
+
| 'terminal_reader_collected_data_invalid'
|
|
961
1048
|
| 'terminal_reader_hardware_fault'
|
|
962
1049
|
| 'terminal_reader_invalid_location_for_activation'
|
|
963
1050
|
| 'terminal_reader_invalid_location_for_payment'
|
|
@@ -1018,6 +1105,11 @@ declare module 'stripe' {
|
|
|
1018
1105
|
*/
|
|
1019
1106
|
customer_balance: PaymentMethodOptions.CustomerBalance | null;
|
|
1020
1107
|
|
|
1108
|
+
/**
|
|
1109
|
+
* If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
|
|
1110
|
+
*/
|
|
1111
|
+
id_bank_transfer?: PaymentMethodOptions.IdBankTransfer | null;
|
|
1112
|
+
|
|
1021
1113
|
/**
|
|
1022
1114
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
1023
1115
|
*/
|
|
@@ -1123,6 +1215,8 @@ declare module 'stripe' {
|
|
|
1123
1215
|
}
|
|
1124
1216
|
}
|
|
1125
1217
|
|
|
1218
|
+
interface IdBankTransfer {}
|
|
1219
|
+
|
|
1126
1220
|
interface Konbini {}
|
|
1127
1221
|
|
|
1128
1222
|
interface SepaDebit {}
|
|
@@ -1157,6 +1251,11 @@ declare module 'stripe' {
|
|
|
1157
1251
|
* The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
|
1158
1252
|
*/
|
|
1159
1253
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* The institution to use to filter for possible accounts to link.
|
|
1257
|
+
*/
|
|
1258
|
+
institution?: string;
|
|
1160
1259
|
}
|
|
1161
1260
|
|
|
1162
1261
|
namespace Filters {
|
|
@@ -1169,7 +1268,11 @@ declare module 'stripe' {
|
|
|
1169
1268
|
| 'payment_method'
|
|
1170
1269
|
| 'transactions';
|
|
1171
1270
|
|
|
1172
|
-
type Prefetch =
|
|
1271
|
+
type Prefetch =
|
|
1272
|
+
| 'balances'
|
|
1273
|
+
| 'inferred_balances'
|
|
1274
|
+
| 'ownership'
|
|
1275
|
+
| 'transactions';
|
|
1173
1276
|
}
|
|
1174
1277
|
|
|
1175
1278
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1187,11 +1290,13 @@ declare module 'stripe' {
|
|
|
1187
1290
|
| 'boleto'
|
|
1188
1291
|
| 'card'
|
|
1189
1292
|
| 'cashapp'
|
|
1293
|
+
| 'custom'
|
|
1190
1294
|
| 'customer_balance'
|
|
1191
1295
|
| 'eps'
|
|
1192
1296
|
| 'fpx'
|
|
1193
1297
|
| 'giropay'
|
|
1194
1298
|
| 'grabpay'
|
|
1299
|
+
| 'id_bank_transfer'
|
|
1195
1300
|
| 'ideal'
|
|
1196
1301
|
| 'jp_credit_transfer'
|
|
1197
1302
|
| 'kakao_pay'
|
|
@@ -1375,6 +1480,29 @@ declare module 'stripe' {
|
|
|
1375
1480
|
* *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
|
1376
1481
|
*/
|
|
1377
1482
|
metadata: Stripe.Metadata | null;
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
|
1486
|
+
*/
|
|
1487
|
+
pause_collection?: SubscriptionDetails.PauseCollection | null;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
namespace SubscriptionDetails {
|
|
1491
|
+
interface PauseCollection {
|
|
1492
|
+
/**
|
|
1493
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1494
|
+
*/
|
|
1495
|
+
behavior: PauseCollection.Behavior;
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* The time after which the subscription will resume collecting payments.
|
|
1499
|
+
*/
|
|
1500
|
+
resumes_at: number | null;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
namespace PauseCollection {
|
|
1504
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1505
|
+
}
|
|
1378
1506
|
}
|
|
1379
1507
|
|
|
1380
1508
|
interface ThresholdReason {
|
|
@@ -1415,6 +1543,18 @@ declare module 'stripe' {
|
|
|
1415
1543
|
discount: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
1416
1544
|
}
|
|
1417
1545
|
|
|
1546
|
+
interface TotalMarginAmount {
|
|
1547
|
+
/**
|
|
1548
|
+
* The amount, in cents (or local equivalent), of the reduction in line item amount.
|
|
1549
|
+
*/
|
|
1550
|
+
amount: number;
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* The margin that was applied to get this margin amount.
|
|
1554
|
+
*/
|
|
1555
|
+
margin: string | Stripe.Margin;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1418
1558
|
interface TotalPretaxCreditAmount {
|
|
1419
1559
|
/**
|
|
1420
1560
|
* The amount, in cents (or local equivalent), of the pretax credit amount.
|
|
@@ -1434,6 +1574,11 @@ declare module 'stripe' {
|
|
|
1434
1574
|
*/
|
|
1435
1575
|
discount?: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
1436
1576
|
|
|
1577
|
+
/**
|
|
1578
|
+
* The margin that was applied to get this pretax credit amount.
|
|
1579
|
+
*/
|
|
1580
|
+
margin?: string | Stripe.Margin;
|
|
1581
|
+
|
|
1437
1582
|
/**
|
|
1438
1583
|
* Type of the pretax credit amount referenced.
|
|
1439
1584
|
*/
|
|
@@ -1441,7 +1586,7 @@ declare module 'stripe' {
|
|
|
1441
1586
|
}
|
|
1442
1587
|
|
|
1443
1588
|
namespace TotalPretaxCreditAmount {
|
|
1444
|
-
type Type = 'credit_balance_transaction' | 'discount';
|
|
1589
|
+
type Type = 'credit_balance_transaction' | 'discount' | 'margin';
|
|
1445
1590
|
}
|
|
1446
1591
|
|
|
1447
1592
|
interface TotalTaxAmount {
|