stripe 16.4.0 → 16.6.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 +794 -109
- package/README.md +33 -0
- package/VERSION +1 -1
- package/cjs/RequestSender.js +66 -5
- package/cjs/StripeResource.js +1 -1
- package/cjs/apiVersion.js +2 -1
- package/cjs/multipart.js +1 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Billing/Alerts.js +27 -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/Checkout/Sessions.js +4 -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 +13 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/OAuth.js +1 -1
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +4 -0
- package/cjs/resources/QuotePhases.js +22 -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/Readers.js +12 -0
- package/cjs/resources.js +42 -10
- package/cjs/stripe.core.js +6 -3
- package/cjs/utils.js +30 -3
- package/esm/RequestSender.js +67 -6
- package/esm/StripeResource.js +2 -2
- package/esm/apiVersion.js +1 -0
- package/esm/multipart.js +2 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Billing/Alerts.js +24 -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/Checkout/Sessions.js +4 -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 +13 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/OAuth.js +2 -2
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +4 -0
- package/esm/resources/QuotePhases.js +19 -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/Readers.js +12 -0
- package/esm/resources.js +28 -0
- package/esm/stripe.core.js +6 -3
- package/esm/utils.js +27 -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 +45 -0
- package/types/AccountSessionsResource.d.ts +205 -0
- package/types/Accounts.d.ts +109 -4
- package/types/AccountsResource.d.ts +272 -26
- package/types/Billing/AlertTriggereds.d.ts +42 -0
- package/types/Billing/Alerts.d.ts +80 -0
- package/types/Billing/AlertsResource.d.ts +176 -0
- 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 +106 -3
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +28 -1
- package/types/Checkout/SessionsResource.d.ts +36 -1
- package/types/ConfirmationTokens.d.ts +80 -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 +2 -0
- package/types/Disputes.d.ts +177 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +477 -0
- package/types/Events.d.ts +86 -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/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 +22 -0
- package/types/InvoicePayments.d.ts +138 -0
- package/types/Invoices.d.ts +116 -1
- package/types/InvoicesResource.d.ts +5395 -1818
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
- package/types/LineItems.d.ts +7 -0
- 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 +1057 -0
- package/types/OrdersResource.d.ts +2711 -0
- package/types/PaymentIntents.d.ts +491 -2
- package/types/PaymentIntentsResource.d.ts +6884 -3356
- package/types/PaymentMethodConfigurations.d.ts +72 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +100 -0
- package/types/PaymentMethods.d.ts +80 -0
- package/types/PaymentMethodsResource.d.ts +110 -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/QuotePhases.d.ts +198 -0
- package/types/QuotePhasesResource.d.ts +67 -0
- package/types/QuotePreviewInvoices.d.ts +1528 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
- package/types/Quotes.d.ts +578 -1
- package/types/QuotesResource.d.ts +3174 -265
- package/types/RefundsResource.d.ts +1 -1
- package/types/SetupAttempts.d.ts +9 -0
- package/types/SetupIntents.d.ts +110 -1
- package/types/SetupIntentsResource.d.ts +498 -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 +164 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +46 -1
- package/types/SubscriptionsResource.d.ts +347 -2
- package/types/Tax/Associations.d.ts +126 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Calculations.d.ts +1 -1
- package/types/Tax/CalculationsResource.d.ts +1 -3
- package/types/Tax/Forms.d.ts +133 -0
- package/types/Tax/FormsResource.d.ts +90 -0
- package/types/Terminal/Readers.d.ts +278 -0
- package/types/Terminal/ReadersResource.d.ts +208 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/TokensResource.d.ts +7 -7
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +10 -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 +56 -0
- package/types/index.d.ts +71 -0
- package/types/lib.d.ts +12 -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.
|
|
@@ -66,6 +66,16 @@ declare module 'stripe' {
|
|
|
66
66
|
*/
|
|
67
67
|
livemode: boolean;
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* The amount of margin calculated per margin for this line item.
|
|
71
|
+
*/
|
|
72
|
+
margin_amounts?: Array<InvoiceLineItem.MarginAmount> | null;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 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.
|
|
76
|
+
*/
|
|
77
|
+
margins?: Array<string | Stripe.Margin> | null;
|
|
78
|
+
|
|
69
79
|
/**
|
|
70
80
|
* 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.
|
|
71
81
|
*/
|
|
@@ -142,6 +152,18 @@ declare module 'stripe' {
|
|
|
142
152
|
discount: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
143
153
|
}
|
|
144
154
|
|
|
155
|
+
interface MarginAmount {
|
|
156
|
+
/**
|
|
157
|
+
* The amount, in cents (or local equivalent), of the reduction in line item amount.
|
|
158
|
+
*/
|
|
159
|
+
amount: number;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The margin that was applied to get this margin amount.
|
|
163
|
+
*/
|
|
164
|
+
margin: string | Stripe.Margin;
|
|
165
|
+
}
|
|
166
|
+
|
|
145
167
|
interface Period {
|
|
146
168
|
/**
|
|
147
169
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -0,0 +1,138 @@
|
|
|
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
|
+
out_of_band_payment?: Payment.OutOfBandPayment;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 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.
|
|
80
|
+
*/
|
|
81
|
+
payment_intent?: string | Stripe.PaymentIntent;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Type of payment object associated with this invoice payment.
|
|
85
|
+
*/
|
|
86
|
+
type: Payment.Type;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
namespace Payment {
|
|
90
|
+
interface OutOfBandPayment {
|
|
91
|
+
/**
|
|
92
|
+
* Amount paid on this out of band payment, in cents (or local equivalent)
|
|
93
|
+
*/
|
|
94
|
+
amount: number;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 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).
|
|
98
|
+
*/
|
|
99
|
+
currency: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 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.
|
|
103
|
+
*/
|
|
104
|
+
metadata: Stripe.Metadata | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The type of money movement for this out of band payment record.
|
|
108
|
+
*/
|
|
109
|
+
money_movement_type: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The timestamp when this out of band payment was paid.
|
|
113
|
+
*/
|
|
114
|
+
paid_at: number | null;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The reference for this out of band payment record.
|
|
118
|
+
*/
|
|
119
|
+
payment_reference: string | null;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
type Type = 'charge' | 'out_of_band_payment' | 'payment_intent';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
interface StatusTransitions {
|
|
126
|
+
/**
|
|
127
|
+
* The time that the payment was canceled.
|
|
128
|
+
*/
|
|
129
|
+
canceled_at: number | null;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The time that the payment succeeded.
|
|
133
|
+
*/
|
|
134
|
+
paid_at: number | null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
package/types/Invoices.d.ts
CHANGED
|
@@ -104,6 +104,11 @@ declare module 'stripe' {
|
|
|
104
104
|
*/
|
|
105
105
|
amount_shipping: number;
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
|
|
109
|
+
*/
|
|
110
|
+
amounts_due?: Array<Invoice.AmountsDue> | null;
|
|
111
|
+
|
|
107
112
|
/**
|
|
108
113
|
* ID of the Connect Application that created the invoice.
|
|
109
114
|
*/
|
|
@@ -213,6 +218,11 @@ declare module 'stripe' {
|
|
|
213
218
|
*/
|
|
214
219
|
customer_tax_ids?: Array<Invoice.CustomerTaxId> | null;
|
|
215
220
|
|
|
221
|
+
/**
|
|
222
|
+
* The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
|
|
223
|
+
*/
|
|
224
|
+
default_margins?: Array<string | Stripe.Margin> | null;
|
|
225
|
+
|
|
216
226
|
/**
|
|
217
227
|
* 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.
|
|
218
228
|
*/
|
|
@@ -342,6 +352,11 @@ declare module 'stripe' {
|
|
|
342
352
|
|
|
343
353
|
payment_settings: Invoice.PaymentSettings;
|
|
344
354
|
|
|
355
|
+
/**
|
|
356
|
+
* Payments for this invoice
|
|
357
|
+
*/
|
|
358
|
+
payments?: ApiList<Stripe.InvoicePayment>;
|
|
359
|
+
|
|
345
360
|
/**
|
|
346
361
|
* 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.
|
|
347
362
|
*/
|
|
@@ -456,6 +471,11 @@ declare module 'stripe' {
|
|
|
456
471
|
*/
|
|
457
472
|
total_excluding_tax: number | null;
|
|
458
473
|
|
|
474
|
+
/**
|
|
475
|
+
* The aggregate amounts calculated per margin across all line items.
|
|
476
|
+
*/
|
|
477
|
+
total_margin_amounts?: Array<Invoice.TotalMarginAmount> | null;
|
|
478
|
+
|
|
459
479
|
/**
|
|
460
480
|
* The aggregate amounts calculated per tax rate for all line items.
|
|
461
481
|
*/
|
|
@@ -473,6 +493,52 @@ declare module 'stripe' {
|
|
|
473
493
|
}
|
|
474
494
|
|
|
475
495
|
namespace Invoice {
|
|
496
|
+
interface AmountsDue {
|
|
497
|
+
/**
|
|
498
|
+
* Incremental amount due for this payment in cents (or local equivalent).
|
|
499
|
+
*/
|
|
500
|
+
amount: number;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* The amount in cents (or local equivalent) that was paid for this payment.
|
|
504
|
+
*/
|
|
505
|
+
amount_paid: number;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* The difference between the payment's amount and amount_paid, in cents (or local equivalent).
|
|
509
|
+
*/
|
|
510
|
+
amount_remaining: number;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Number of days from when invoice is finalized until the payment is due.
|
|
514
|
+
*/
|
|
515
|
+
days_until_due: number | null;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
519
|
+
*/
|
|
520
|
+
description: string | null;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Date on which a payment plan's payment is due.
|
|
524
|
+
*/
|
|
525
|
+
due_date: number | null;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Timestamp when the payment was paid.
|
|
529
|
+
*/
|
|
530
|
+
paid_at: number | null;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* The status of the payment, one of `open`, `paid`, or `past_due`
|
|
534
|
+
*/
|
|
535
|
+
status: AmountsDue.Status;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
namespace AmountsDue {
|
|
539
|
+
type Status = 'open' | 'paid' | 'past_due';
|
|
540
|
+
}
|
|
541
|
+
|
|
476
542
|
interface AutomaticTax {
|
|
477
543
|
/**
|
|
478
544
|
* 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.
|
|
@@ -826,11 +892,15 @@ declare module 'stripe' {
|
|
|
826
892
|
| 'email_invalid'
|
|
827
893
|
| 'expired_card'
|
|
828
894
|
| 'financial_connections_account_inactive'
|
|
895
|
+
| 'financial_connections_institution_unavailable'
|
|
829
896
|
| 'financial_connections_no_successful_transaction_refresh'
|
|
830
897
|
| 'forwarding_api_inactive'
|
|
831
898
|
| 'forwarding_api_invalid_parameter'
|
|
832
899
|
| 'forwarding_api_upstream_connection_error'
|
|
833
900
|
| 'forwarding_api_upstream_connection_timeout'
|
|
901
|
+
| 'gift_card_balance_insufficient'
|
|
902
|
+
| 'gift_card_code_exists'
|
|
903
|
+
| 'gift_card_inactive'
|
|
834
904
|
| 'idempotency_key_in_use'
|
|
835
905
|
| 'incorrect_address'
|
|
836
906
|
| 'incorrect_cvc'
|
|
@@ -919,6 +989,7 @@ declare module 'stripe' {
|
|
|
919
989
|
| 'return_intent_already_processed'
|
|
920
990
|
| 'routing_number_invalid'
|
|
921
991
|
| 'secret_key_required'
|
|
992
|
+
| 'sensitive_data_access_expired'
|
|
922
993
|
| 'sepa_unsupported_account'
|
|
923
994
|
| 'setup_attempt_failed'
|
|
924
995
|
| 'setup_intent_authentication_failure'
|
|
@@ -1134,6 +1205,11 @@ declare module 'stripe' {
|
|
|
1134
1205
|
* The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
|
1135
1206
|
*/
|
|
1136
1207
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* The institution to use to filter for possible accounts to link.
|
|
1211
|
+
*/
|
|
1212
|
+
institution?: string;
|
|
1137
1213
|
}
|
|
1138
1214
|
|
|
1139
1215
|
namespace Filters {
|
|
@@ -1146,7 +1222,11 @@ declare module 'stripe' {
|
|
|
1146
1222
|
| 'payment_method'
|
|
1147
1223
|
| 'transactions';
|
|
1148
1224
|
|
|
1149
|
-
type Prefetch =
|
|
1225
|
+
type Prefetch =
|
|
1226
|
+
| 'balances'
|
|
1227
|
+
| 'inferred_balances'
|
|
1228
|
+
| 'ownership'
|
|
1229
|
+
| 'transactions';
|
|
1150
1230
|
}
|
|
1151
1231
|
|
|
1152
1232
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1337,6 +1417,29 @@ declare module 'stripe' {
|
|
|
1337
1417
|
* *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
|
1338
1418
|
*/
|
|
1339
1419
|
metadata: Stripe.Metadata | null;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* 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/billing/subscriptions/pause-payment).
|
|
1423
|
+
*/
|
|
1424
|
+
pause_collection?: SubscriptionDetails.PauseCollection | null;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
namespace SubscriptionDetails {
|
|
1428
|
+
interface PauseCollection {
|
|
1429
|
+
/**
|
|
1430
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1431
|
+
*/
|
|
1432
|
+
behavior: PauseCollection.Behavior;
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* The time after which the subscription will resume collecting payments.
|
|
1436
|
+
*/
|
|
1437
|
+
resumes_at: number | null;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
namespace PauseCollection {
|
|
1441
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1442
|
+
}
|
|
1340
1443
|
}
|
|
1341
1444
|
|
|
1342
1445
|
interface ThresholdReason {
|
|
@@ -1377,6 +1480,18 @@ declare module 'stripe' {
|
|
|
1377
1480
|
discount: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
1378
1481
|
}
|
|
1379
1482
|
|
|
1483
|
+
interface TotalMarginAmount {
|
|
1484
|
+
/**
|
|
1485
|
+
* The amount, in cents (or local equivalent), of the reduction in line item amount.
|
|
1486
|
+
*/
|
|
1487
|
+
amount: number;
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* The margin that was applied to get this margin amount.
|
|
1491
|
+
*/
|
|
1492
|
+
margin: string | Stripe.Margin;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1380
1495
|
interface TotalTaxAmount {
|
|
1381
1496
|
/**
|
|
1382
1497
|
* The amount, in cents (or local equivalent), of the tax.
|