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
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
interface InvoicePaymentRetrieveParams {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies which fields in the response should be expanded.
|
|
8
|
+
*/
|
|
9
|
+
expand?: Array<string>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface InvoicePaymentListParams extends PaginationParams {
|
|
13
|
+
/**
|
|
14
|
+
* Specifies which fields in the response should be expanded.
|
|
15
|
+
*/
|
|
16
|
+
expand?: Array<string>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The identifier of the invoice whose payments to return.
|
|
20
|
+
*/
|
|
21
|
+
invoice?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The payment details of the invoice payments to return.
|
|
25
|
+
*/
|
|
26
|
+
payment?: InvoicePaymentListParams.Payment;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The status of the invoice payments to return.
|
|
30
|
+
*/
|
|
31
|
+
status?: InvoicePaymentListParams.Status;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
namespace InvoicePaymentListParams {
|
|
35
|
+
interface Payment {
|
|
36
|
+
/**
|
|
37
|
+
* Only return invoice payments associated by this payment intent ID.
|
|
38
|
+
*/
|
|
39
|
+
payment_intent?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Only return invoice payments associated by this payment type.
|
|
43
|
+
*/
|
|
44
|
+
type: 'payment_intent';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type Status = 'canceled' | 'open' | 'paid';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
class InvoicePaymentsResource {
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves the invoice payment with the given ID.
|
|
53
|
+
*/
|
|
54
|
+
retrieve(
|
|
55
|
+
id: string,
|
|
56
|
+
params?: InvoicePaymentRetrieveParams,
|
|
57
|
+
options?: RequestOptions
|
|
58
|
+
): Promise<Stripe.Response<Stripe.InvoicePayment>>;
|
|
59
|
+
retrieve(
|
|
60
|
+
id: string,
|
|
61
|
+
options?: RequestOptions
|
|
62
|
+
): Promise<Stripe.Response<Stripe.InvoicePayment>>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.
|
|
66
|
+
*/
|
|
67
|
+
list(
|
|
68
|
+
params?: InvoicePaymentListParams,
|
|
69
|
+
options?: RequestOptions
|
|
70
|
+
): ApiListPromise<Stripe.InvoicePayment>;
|
|
71
|
+
list(options?: RequestOptions): ApiListPromise<Stripe.InvoicePayment>;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
package/types/Invoices.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare module 'stripe' {
|
|
|
60
60
|
/**
|
|
61
61
|
* Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.
|
|
62
62
|
*/
|
|
63
|
-
id
|
|
63
|
+
id?: string;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* String representing the object's type. Objects of the same type share the same value.
|
|
@@ -90,9 +90,9 @@ declare module 'stripe' {
|
|
|
90
90
|
amount_due: number;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* Amount that was overpaid on the invoice.
|
|
93
|
+
* Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
|
|
94
94
|
*/
|
|
95
|
-
amount_overpaid
|
|
95
|
+
amount_overpaid: number;
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* The amount, in cents (or local equivalent), that was paid.
|
|
@@ -109,11 +109,6 @@ declare module 'stripe' {
|
|
|
109
109
|
*/
|
|
110
110
|
amount_shipping: number;
|
|
111
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
|
-
|
|
117
112
|
/**
|
|
118
113
|
* ID of the Connect Application that created the invoice.
|
|
119
114
|
*/
|
|
@@ -123,11 +118,6 @@ declare module 'stripe' {
|
|
|
123
118
|
| Stripe.DeletedApplication
|
|
124
119
|
| null;
|
|
125
120
|
|
|
126
|
-
/**
|
|
127
|
-
* The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
|
|
128
|
-
*/
|
|
129
|
-
application_fee_amount: number | null;
|
|
130
|
-
|
|
131
121
|
/**
|
|
132
122
|
* Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
|
|
133
123
|
*/
|
|
@@ -164,14 +154,14 @@ declare module 'stripe' {
|
|
|
164
154
|
billing_reason: Invoice.BillingReason | null;
|
|
165
155
|
|
|
166
156
|
/**
|
|
167
|
-
*
|
|
157
|
+
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
|
|
168
158
|
*/
|
|
169
|
-
|
|
159
|
+
collection_method: Invoice.CollectionMethod;
|
|
170
160
|
|
|
171
161
|
/**
|
|
172
|
-
*
|
|
162
|
+
* The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
|
|
173
163
|
*/
|
|
174
|
-
|
|
164
|
+
confirmation_secret?: Invoice.ConfirmationSecret | null;
|
|
175
165
|
|
|
176
166
|
/**
|
|
177
167
|
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
@@ -228,11 +218,6 @@ declare module 'stripe' {
|
|
|
228
218
|
*/
|
|
229
219
|
customer_tax_ids?: Array<Invoice.CustomerTaxId> | null;
|
|
230
220
|
|
|
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
|
-
|
|
236
221
|
/**
|
|
237
222
|
* 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.
|
|
238
223
|
*/
|
|
@@ -258,11 +243,6 @@ declare module 'stripe' {
|
|
|
258
243
|
*/
|
|
259
244
|
description: string | null;
|
|
260
245
|
|
|
261
|
-
/**
|
|
262
|
-
* Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
|
|
263
|
-
*/
|
|
264
|
-
discount: Stripe.Discount | null;
|
|
265
|
-
|
|
266
246
|
/**
|
|
267
247
|
* The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
|
|
268
248
|
*/
|
|
@@ -346,19 +326,9 @@ declare module 'stripe' {
|
|
|
346
326
|
on_behalf_of: string | Stripe.Account | null;
|
|
347
327
|
|
|
348
328
|
/**
|
|
349
|
-
*
|
|
350
|
-
*/
|
|
351
|
-
paid: boolean;
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
|
|
329
|
+
* The parent that generated this invoice
|
|
355
330
|
*/
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
|
|
360
|
-
*/
|
|
361
|
-
payment_intent: string | Stripe.PaymentIntent | null;
|
|
331
|
+
parent: Invoice.Parent | null;
|
|
362
332
|
|
|
363
333
|
payment_settings: Invoice.PaymentSettings;
|
|
364
334
|
|
|
@@ -387,11 +357,6 @@ declare module 'stripe' {
|
|
|
387
357
|
*/
|
|
388
358
|
pre_payment_credit_notes_amount: number;
|
|
389
359
|
|
|
390
|
-
/**
|
|
391
|
-
* The quote this invoice was generated from.
|
|
392
|
-
*/
|
|
393
|
-
quote: string | Stripe.Quote | null;
|
|
394
|
-
|
|
395
360
|
/**
|
|
396
361
|
* This is the transaction number that appears on email receipts sent for this invoice.
|
|
397
362
|
*/
|
|
@@ -429,21 +394,6 @@ declare module 'stripe' {
|
|
|
429
394
|
|
|
430
395
|
status_transitions: Invoice.StatusTransitions;
|
|
431
396
|
|
|
432
|
-
/**
|
|
433
|
-
* The subscription that this invoice was prepared for, if any.
|
|
434
|
-
*/
|
|
435
|
-
subscription: string | Stripe.Subscription | null;
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Details about the subscription that created this invoice.
|
|
439
|
-
*/
|
|
440
|
-
subscription_details: Invoice.SubscriptionDetails | null;
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
|
444
|
-
*/
|
|
445
|
-
subscription_proration_date?: number;
|
|
446
|
-
|
|
447
397
|
/**
|
|
448
398
|
* Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
|
|
449
399
|
*/
|
|
@@ -454,11 +404,6 @@ declare module 'stripe' {
|
|
|
454
404
|
*/
|
|
455
405
|
subtotal_excluding_tax: number | null;
|
|
456
406
|
|
|
457
|
-
/**
|
|
458
|
-
* The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
|
|
459
|
-
*/
|
|
460
|
-
tax: number | null;
|
|
461
|
-
|
|
462
407
|
/**
|
|
463
408
|
* ID of the test clock this invoice belongs to.
|
|
464
409
|
*/
|
|
@@ -481,11 +426,6 @@ declare module 'stripe' {
|
|
|
481
426
|
*/
|
|
482
427
|
total_excluding_tax: number | null;
|
|
483
428
|
|
|
484
|
-
/**
|
|
485
|
-
* The aggregate amounts calculated per margin across all line items.
|
|
486
|
-
*/
|
|
487
|
-
total_margin_amounts?: Array<Invoice.TotalMarginAmount> | null;
|
|
488
|
-
|
|
489
429
|
/**
|
|
490
430
|
* 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.
|
|
491
431
|
*/
|
|
@@ -494,14 +434,9 @@ declare module 'stripe' {
|
|
|
494
434
|
> | null;
|
|
495
435
|
|
|
496
436
|
/**
|
|
497
|
-
* The aggregate
|
|
498
|
-
*/
|
|
499
|
-
total_tax_amounts: Array<Invoice.TotalTaxAmount>;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
|
|
437
|
+
* The aggregate tax information of all line items.
|
|
503
438
|
*/
|
|
504
|
-
|
|
439
|
+
total_taxes: Array<Invoice.TotalTax> | null;
|
|
505
440
|
|
|
506
441
|
/**
|
|
507
442
|
* Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
|
|
@@ -510,52 +445,6 @@ declare module 'stripe' {
|
|
|
510
445
|
}
|
|
511
446
|
|
|
512
447
|
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
|
-
|
|
559
448
|
interface AutomaticTax {
|
|
560
449
|
/**
|
|
561
450
|
* If Stripe disabled automatic tax, this enum describes why.
|
|
@@ -615,6 +504,18 @@ declare module 'stripe' {
|
|
|
615
504
|
|
|
616
505
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
617
506
|
|
|
507
|
+
interface ConfirmationSecret {
|
|
508
|
+
/**
|
|
509
|
+
* The client_secret of the payment that Stripe creates for the invoice after finalization.
|
|
510
|
+
*/
|
|
511
|
+
client_secret: string;
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
|
|
515
|
+
*/
|
|
516
|
+
type: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
618
519
|
interface CustomerShipping {
|
|
619
520
|
address?: Stripe.Address;
|
|
620
521
|
|
|
@@ -961,15 +862,12 @@ declare module 'stripe' {
|
|
|
961
862
|
| 'email_invalid'
|
|
962
863
|
| 'expired_card'
|
|
963
864
|
| 'financial_connections_account_inactive'
|
|
964
|
-
| 'financial_connections_institution_unavailable'
|
|
965
865
|
| 'financial_connections_no_successful_transaction_refresh'
|
|
966
866
|
| 'forwarding_api_inactive'
|
|
967
867
|
| 'forwarding_api_invalid_parameter'
|
|
868
|
+
| 'forwarding_api_retryable_upstream_error'
|
|
968
869
|
| 'forwarding_api_upstream_connection_error'
|
|
969
870
|
| 'forwarding_api_upstream_connection_timeout'
|
|
970
|
-
| 'gift_card_balance_insufficient'
|
|
971
|
-
| 'gift_card_code_exists'
|
|
972
|
-
| 'gift_card_inactive'
|
|
973
871
|
| 'idempotency_key_in_use'
|
|
974
872
|
| 'incorrect_address'
|
|
975
873
|
| 'incorrect_cvc'
|
|
@@ -1059,12 +957,12 @@ declare module 'stripe' {
|
|
|
1059
957
|
| 'return_intent_already_processed'
|
|
1060
958
|
| 'routing_number_invalid'
|
|
1061
959
|
| 'secret_key_required'
|
|
1062
|
-
| 'sensitive_data_access_expired'
|
|
1063
960
|
| 'sepa_unsupported_account'
|
|
1064
961
|
| 'setup_attempt_failed'
|
|
1065
962
|
| 'setup_intent_authentication_failure'
|
|
1066
963
|
| 'setup_intent_invalid_parameter'
|
|
1067
964
|
| 'setup_intent_mandate_invalid'
|
|
965
|
+
| 'setup_intent_mobile_wallet_unsupported'
|
|
1068
966
|
| 'setup_intent_setup_attempt_expired'
|
|
1069
967
|
| 'setup_intent_unexpected_state'
|
|
1070
968
|
| 'shipping_address_invalid'
|
|
@@ -1077,7 +975,6 @@ declare module 'stripe' {
|
|
|
1077
975
|
| 'taxes_calculation_failed'
|
|
1078
976
|
| 'terminal_location_country_unsupported'
|
|
1079
977
|
| 'terminal_reader_busy'
|
|
1080
|
-
| 'terminal_reader_collected_data_invalid'
|
|
1081
978
|
| 'terminal_reader_hardware_fault'
|
|
1082
979
|
| 'terminal_reader_invalid_location_for_activation'
|
|
1083
980
|
| 'terminal_reader_invalid_location_for_payment'
|
|
@@ -1099,6 +996,52 @@ declare module 'stripe' {
|
|
|
1099
996
|
| 'invalid_request_error';
|
|
1100
997
|
}
|
|
1101
998
|
|
|
999
|
+
interface Parent {
|
|
1000
|
+
/**
|
|
1001
|
+
* Details about the quote that generated this invoice
|
|
1002
|
+
*/
|
|
1003
|
+
quote_details: Parent.QuoteDetails | null;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Details about the subscription that generated this invoice
|
|
1007
|
+
*/
|
|
1008
|
+
subscription_details: Parent.SubscriptionDetails | null;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* The type of parent that generated this invoice
|
|
1012
|
+
*/
|
|
1013
|
+
type: Parent.Type;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
namespace Parent {
|
|
1017
|
+
interface QuoteDetails {
|
|
1018
|
+
/**
|
|
1019
|
+
* The quote that generated this invoice
|
|
1020
|
+
*/
|
|
1021
|
+
quote: string;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
interface SubscriptionDetails {
|
|
1025
|
+
/**
|
|
1026
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
|
|
1027
|
+
* *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
|
1028
|
+
*/
|
|
1029
|
+
metadata: Stripe.Metadata | null;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* The subscription that generated this invoice
|
|
1033
|
+
*/
|
|
1034
|
+
subscription: string | Stripe.Subscription;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
|
1038
|
+
*/
|
|
1039
|
+
subscription_proration_date?: number;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
type Type = 'quote_details' | 'subscription_details';
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1102
1045
|
interface PaymentSettings {
|
|
1103
1046
|
/**
|
|
1104
1047
|
* ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
|
|
@@ -1138,11 +1081,6 @@ declare module 'stripe' {
|
|
|
1138
1081
|
*/
|
|
1139
1082
|
customer_balance: PaymentMethodOptions.CustomerBalance | null;
|
|
1140
1083
|
|
|
1141
|
-
/**
|
|
1142
|
-
* 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.
|
|
1143
|
-
*/
|
|
1144
|
-
id_bank_transfer?: PaymentMethodOptions.IdBankTransfer | null;
|
|
1145
|
-
|
|
1146
1084
|
/**
|
|
1147
1085
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
1148
1086
|
*/
|
|
@@ -1248,8 +1186,6 @@ declare module 'stripe' {
|
|
|
1248
1186
|
}
|
|
1249
1187
|
}
|
|
1250
1188
|
|
|
1251
|
-
interface IdBankTransfer {}
|
|
1252
|
-
|
|
1253
1189
|
interface Konbini {}
|
|
1254
1190
|
|
|
1255
1191
|
interface SepaDebit {}
|
|
@@ -1284,11 +1220,6 @@ declare module 'stripe' {
|
|
|
1284
1220
|
* The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
|
1285
1221
|
*/
|
|
1286
1222
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1287
|
-
|
|
1288
|
-
/**
|
|
1289
|
-
* The institution to use to filter for possible accounts to link.
|
|
1290
|
-
*/
|
|
1291
|
-
institution?: string;
|
|
1292
1223
|
}
|
|
1293
1224
|
|
|
1294
1225
|
namespace Filters {
|
|
@@ -1301,11 +1232,7 @@ declare module 'stripe' {
|
|
|
1301
1232
|
| 'payment_method'
|
|
1302
1233
|
| 'transactions';
|
|
1303
1234
|
|
|
1304
|
-
type Prefetch =
|
|
1305
|
-
| 'balances'
|
|
1306
|
-
| 'inferred_balances'
|
|
1307
|
-
| 'ownership'
|
|
1308
|
-
| 'transactions';
|
|
1235
|
+
type Prefetch = 'balances' | 'ownership' | 'transactions';
|
|
1309
1236
|
}
|
|
1310
1237
|
|
|
1311
1238
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1323,21 +1250,21 @@ declare module 'stripe' {
|
|
|
1323
1250
|
| 'boleto'
|
|
1324
1251
|
| 'card'
|
|
1325
1252
|
| 'cashapp'
|
|
1326
|
-
| 'custom'
|
|
1327
1253
|
| 'customer_balance'
|
|
1328
1254
|
| 'eps'
|
|
1329
1255
|
| 'fpx'
|
|
1330
1256
|
| 'giropay'
|
|
1331
1257
|
| 'grabpay'
|
|
1332
|
-
| 'id_bank_transfer'
|
|
1333
1258
|
| 'ideal'
|
|
1334
1259
|
| 'jp_credit_transfer'
|
|
1335
1260
|
| 'kakao_pay'
|
|
1261
|
+
| 'klarna'
|
|
1336
1262
|
| 'konbini'
|
|
1337
1263
|
| 'kr_card'
|
|
1338
1264
|
| 'link'
|
|
1339
1265
|
| 'multibanco'
|
|
1340
1266
|
| 'naver_pay'
|
|
1267
|
+
| 'nz_bank_account'
|
|
1341
1268
|
| 'p24'
|
|
1342
1269
|
| 'payco'
|
|
1343
1270
|
| 'paynow'
|
|
@@ -1507,37 +1434,6 @@ declare module 'stripe' {
|
|
|
1507
1434
|
voided_at: number | null;
|
|
1508
1435
|
}
|
|
1509
1436
|
|
|
1510
|
-
interface SubscriptionDetails {
|
|
1511
|
-
/**
|
|
1512
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
|
|
1513
|
-
* *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
|
1514
|
-
*/
|
|
1515
|
-
metadata: Stripe.Metadata | null;
|
|
1516
|
-
|
|
1517
|
-
/**
|
|
1518
|
-
* 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).
|
|
1519
|
-
*/
|
|
1520
|
-
pause_collection?: SubscriptionDetails.PauseCollection | null;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
namespace SubscriptionDetails {
|
|
1524
|
-
interface PauseCollection {
|
|
1525
|
-
/**
|
|
1526
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1527
|
-
*/
|
|
1528
|
-
behavior: PauseCollection.Behavior;
|
|
1529
|
-
|
|
1530
|
-
/**
|
|
1531
|
-
* The time after which the subscription will resume collecting payments.
|
|
1532
|
-
*/
|
|
1533
|
-
resumes_at: number | null;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
namespace PauseCollection {
|
|
1537
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
1437
|
interface ThresholdReason {
|
|
1542
1438
|
/**
|
|
1543
1439
|
* The total invoice amount threshold boundary if it triggered the threshold invoice.
|
|
@@ -1576,18 +1472,6 @@ declare module 'stripe' {
|
|
|
1576
1472
|
discount: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
1577
1473
|
}
|
|
1578
1474
|
|
|
1579
|
-
interface TotalMarginAmount {
|
|
1580
|
-
/**
|
|
1581
|
-
* The amount, in cents (or local equivalent), of the reduction in line item amount.
|
|
1582
|
-
*/
|
|
1583
|
-
amount: number;
|
|
1584
|
-
|
|
1585
|
-
/**
|
|
1586
|
-
* The margin that was applied to get this margin amount.
|
|
1587
|
-
*/
|
|
1588
|
-
margin: string | Stripe.Margin;
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
1475
|
interface TotalPretaxCreditAmount {
|
|
1592
1476
|
/**
|
|
1593
1477
|
* The amount, in cents (or local equivalent), of the pretax credit amount.
|
|
@@ -1607,11 +1491,6 @@ declare module 'stripe' {
|
|
|
1607
1491
|
*/
|
|
1608
1492
|
discount?: string | Stripe.Discount | Stripe.DeletedDiscount;
|
|
1609
1493
|
|
|
1610
|
-
/**
|
|
1611
|
-
* The margin that was applied to get this pretax credit amount.
|
|
1612
|
-
*/
|
|
1613
|
-
margin?: string | Stripe.Margin;
|
|
1614
|
-
|
|
1615
1494
|
/**
|
|
1616
1495
|
* Type of the pretax credit amount referenced.
|
|
1617
1496
|
*/
|
|
@@ -1619,39 +1498,45 @@ declare module 'stripe' {
|
|
|
1619
1498
|
}
|
|
1620
1499
|
|
|
1621
1500
|
namespace TotalPretaxCreditAmount {
|
|
1622
|
-
type Type = 'credit_balance_transaction' | 'discount'
|
|
1501
|
+
type Type = 'credit_balance_transaction' | 'discount';
|
|
1623
1502
|
}
|
|
1624
1503
|
|
|
1625
|
-
interface
|
|
1504
|
+
interface TotalTax {
|
|
1626
1505
|
/**
|
|
1627
|
-
* The amount, in cents (or local equivalent)
|
|
1506
|
+
* The amount of the tax, in cents (or local equivalent).
|
|
1628
1507
|
*/
|
|
1629
1508
|
amount: number;
|
|
1630
1509
|
|
|
1631
1510
|
/**
|
|
1632
|
-
* Whether this tax
|
|
1511
|
+
* Whether this tax is inclusive or exclusive.
|
|
1633
1512
|
*/
|
|
1634
|
-
|
|
1513
|
+
tax_behavior: TotalTax.TaxBehavior;
|
|
1635
1514
|
|
|
1636
1515
|
/**
|
|
1637
|
-
*
|
|
1516
|
+
* Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
|
|
1638
1517
|
*/
|
|
1639
|
-
|
|
1518
|
+
tax_rate_details: TotalTax.TaxRateDetails | null;
|
|
1640
1519
|
|
|
1641
1520
|
/**
|
|
1642
1521
|
* 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.
|
|
1643
1522
|
*/
|
|
1644
|
-
taxability_reason:
|
|
1523
|
+
taxability_reason: TotalTax.TaxabilityReason;
|
|
1645
1524
|
|
|
1646
1525
|
/**
|
|
1647
1526
|
* The amount on which tax is calculated, in cents (or local equivalent).
|
|
1648
1527
|
*/
|
|
1649
1528
|
taxable_amount: number | null;
|
|
1529
|
+
|
|
1530
|
+
/**
|
|
1531
|
+
* The type of tax information.
|
|
1532
|
+
*/
|
|
1533
|
+
type: 'tax_rate_details';
|
|
1650
1534
|
}
|
|
1651
1535
|
|
|
1652
|
-
namespace
|
|
1536
|
+
namespace TotalTax {
|
|
1653
1537
|
type TaxabilityReason =
|
|
1654
1538
|
| 'customer_exempt'
|
|
1539
|
+
| 'not_available'
|
|
1655
1540
|
| 'not_collecting'
|
|
1656
1541
|
| 'not_subject_to_tax'
|
|
1657
1542
|
| 'not_supported'
|
|
@@ -1666,18 +1551,12 @@ declare module 'stripe' {
|
|
|
1666
1551
|
| 'standard_rated'
|
|
1667
1552
|
| 'taxable_basis_reduced'
|
|
1668
1553
|
| 'zero_rated';
|
|
1669
|
-
}
|
|
1670
1554
|
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
|
|
1674
|
-
*/
|
|
1675
|
-
amount: number | null;
|
|
1555
|
+
type TaxBehavior = 'exclusive' | 'inclusive';
|
|
1676
1556
|
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
destination: string | Stripe.Account;
|
|
1557
|
+
interface TaxRateDetails {
|
|
1558
|
+
tax_rate: string;
|
|
1559
|
+
}
|
|
1681
1560
|
}
|
|
1682
1561
|
}
|
|
1683
1562
|
}
|