stripe 18.4.0-beta.2 → 18.4.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 +37 -1293
- package/OPENAPI_VERSION +1 -1
- package/README.md +0 -1
- package/VERSION +1 -1
- package/cjs/Error.js +1 -107
- package/cjs/apiVersion.js +3 -2
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
- package/cjs/resources/PaymentIntents.js +0 -13
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources.js +10 -98
- package/cjs/stripe.core.js +2 -1
- package/esm/Error.js +0 -93
- package/esm/apiVersion.js +2 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
- package/esm/resources/PaymentIntents.js +0 -13
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources.js +1 -82
- package/esm/stripe.core.js +2 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +4 -6
- package/types/AccountSessions.d.ts +30 -45
- package/types/AccountSessionsResource.d.ts +36 -264
- package/types/Accounts.d.ts +2 -213
- package/types/AccountsResource.d.ts +3 -547
- package/types/Billing/CreditBalanceSummary.d.ts +0 -5
- package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
- package/types/Billing/CreditGrants.d.ts +0 -5
- package/types/Billing/CreditGrantsResource.d.ts +2 -12
- package/types/BillingPortal/Configurations.d.ts +21 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +48 -0
- package/types/BillingPortal/Sessions.d.ts +0 -5
- package/types/BillingPortal/SessionsResource.d.ts +4 -12
- package/types/Capabilities.d.ts +1 -6
- package/types/Cards.d.ts +0 -5
- package/types/CashBalances.d.ts +0 -5
- package/types/Charges.d.ts +10 -171
- package/types/ChargesResource.d.ts +0 -1406
- package/types/Checkout/Sessions.d.ts +20 -310
- package/types/Checkout/SessionsResource.d.ts +21 -326
- package/types/ConfirmationTokens.d.ts +3 -128
- package/types/Coupons.d.ts +0 -33
- package/types/CouponsResource.d.ts +0 -21
- package/types/CreditNoteLineItems.d.ts +0 -17
- package/types/CreditNotes.d.ts +0 -5
- package/types/CreditNotesResource.d.ts +0 -5
- package/types/CustomerBalanceTransactions.d.ts +0 -2
- package/types/CustomerCashBalanceTransactions.d.ts +0 -2
- package/types/CustomerSessions.d.ts +0 -5
- package/types/CustomerSessionsResource.d.ts +1 -6
- package/types/Customers.d.ts +1 -3
- package/types/CustomersResource.d.ts +0 -8
- package/types/Discounts.d.ts +0 -10
- package/types/Disputes.d.ts +1 -8
- package/types/Errors.d.ts +2 -81
- package/types/EventTypes.d.ts +0 -664
- package/types/Events.d.ts +14 -123
- package/types/FinancialConnections/Accounts.d.ts +1 -36
- package/types/FinancialConnections/AccountsResource.d.ts +3 -40
- package/types/FinancialConnections/Sessions.d.ts +1 -51
- package/types/FinancialConnections/SessionsResource.d.ts +1 -43
- package/types/Identity/VerificationSessions.d.ts +2 -7
- package/types/Identity/VerificationSessionsResource.d.ts +0 -7
- package/types/InvoiceItems.d.ts +0 -10
- package/types/InvoiceItemsResource.d.ts +7 -118
- package/types/InvoiceLineItems.d.ts +1 -45
- package/types/InvoicePayments.d.ts +0 -5
- package/types/InvoicePaymentsResource.d.ts +74 -0
- package/types/Invoices.d.ts +3 -133
- package/types/InvoicesResource.d.ts +31 -1433
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/Transactions.d.ts +0 -5
- package/types/Issuing/TransactionsResource.d.ts +0 -5
- package/types/LineItems.d.ts +0 -49
- package/types/Mandates.d.ts +0 -77
- package/types/PaymentIntents.d.ts +3 -769
- package/types/PaymentIntentsResource.d.ts +4133 -8848
- package/types/PaymentLinks.d.ts +5 -6
- package/types/PaymentLinksResource.d.ts +102 -15
- package/types/PaymentMethodConfigurations.d.ts +0 -180
- package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
- package/types/PaymentMethods.d.ts +3 -128
- package/types/PaymentMethodsResource.d.ts +3 -168
- package/types/Payouts.d.ts +0 -5
- package/types/PayoutsResource.d.ts +0 -5
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/PromotionCodes.d.ts +0 -5
- package/types/PromotionCodesResource.d.ts +0 -10
- package/types/Quotes.d.ts +1 -594
- package/types/QuotesResource.d.ts +281 -2623
- package/types/Radar/ValueLists.d.ts +1 -1
- package/types/Radar/ValueListsResource.d.ts +1 -1
- package/types/Refunds.d.ts +1 -15
- package/types/Reporting/ReportRunsResource.d.ts +1 -0
- package/types/Reviews.d.ts +2 -2
- package/types/SetupAttempts.d.ts +2 -48
- package/types/SetupIntents.d.ts +2 -118
- package/types/SetupIntentsResource.d.ts +3 -730
- package/types/Sources.d.ts +0 -29
- package/types/SubscriptionItems.d.ts +0 -21
- package/types/SubscriptionItemsResource.d.ts +2 -111
- package/types/SubscriptionSchedules.d.ts +0 -205
- package/types/SubscriptionSchedulesResource.d.ts +41 -1224
- package/types/Subscriptions.d.ts +1 -97
- package/types/SubscriptionsResource.d.ts +12 -391
- package/types/Tax/Registrations.d.ts +228 -27
- package/types/Tax/RegistrationsResource.d.ts +648 -27
- package/types/TaxIds.d.ts +0 -10
- package/types/TaxIdsResource.d.ts +0 -10
- package/types/Terminal/Configurations.d.ts +76 -0
- package/types/Terminal/ConfigurationsResource.d.ts +176 -0
- package/types/Terminal/Readers.d.ts +0 -20
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -126
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/Transfers.d.ts +0 -5
- package/types/TransfersResource.d.ts +0 -5
- package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
- package/types/Treasury/FinancialAccounts.d.ts +0 -5
- package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
- 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/EventTypes.d.ts +4 -957
- package/types/WebhookEndpointsResource.d.ts +2 -79
- package/types/index.d.ts +2 -138
- package/types/lib.d.ts +2 -11
- package/types/test/typescriptTest.ts +3 -3
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/BalanceSettings.js +0 -10
- 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/ExternalAccounts.js +0 -23
- package/cjs/resources/FinancialConnections/Institutions.js +0 -17
- package/cjs/resources/FxQuotes.js +0 -15
- 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/Privacy/RedactionJobs.js +0 -42
- 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/cjs/resources/V2/Core/AccountLinks.js +0 -9
- package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
- package/cjs/resources/V2/Core/Accounts.js +0 -25
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -25
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
- package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
- package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -25
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/BalanceSettings.js +0 -7
- 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/ExternalAccounts.js +0 -20
- package/esm/resources/FinancialConnections/Institutions.js +0 -14
- package/esm/resources/FxQuotes.js +0 -12
- 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/Privacy/RedactionJobs.js +0 -39
- 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/esm/resources/V2/Core/AccountLinks.js +0 -6
- package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
- package/esm/resources/V2/Core/Accounts.js +0 -22
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
- package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -22
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
- package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
- package/esm/resources/V2/Payments/OffSessionPayments.js +0 -22
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/BalanceSettings.d.ts +0 -89
- package/types/BalanceSettingsResource.d.ts +0 -108
- 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/ExternalAccountsResource.d.ts +0 -304
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -98
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/FxQuotes.d.ts +0 -153
- package/types/FxQuotesResource.d.ts +0 -130
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
- 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 -113
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1163
- package/types/OrdersResource.d.ts +0 -3139
- package/types/PaymentAttemptRecords.d.ts +0 -2161
- package/types/PaymentAttemptRecordsResource.d.ts +0 -47
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
- package/types/PaymentRecords.d.ts +0 -2154
- package/types/PaymentRecordsResource.d.ts +0 -455
- package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
- package/types/Privacy/RedactionJobs.d.ts +0 -111
- package/types/Privacy/RedactionJobsResource.d.ts +0 -230
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1696
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -845
- package/types/Tax/Associations.d.ts +0 -82
- 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/V2/Core/AccountLinks.d.ts +0 -106
- package/types/V2/Core/AccountLinksResource.d.ts +0 -90
- package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3780
- package/types/V2/Core/Accounts.d.ts +0 -8791
- package/types/V2/Core/AccountsResource.d.ts +0 -10582
- package/types/V2/Core/Persons.d.ts +0 -1872
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
- package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
- package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -580
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -326
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -289
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -168
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -208
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -151
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -87
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -262
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -155
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
- package/types/V2/MoneyManagement/Transactions.d.ts +0 -170
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
- package/types/V2/Payments/OffSessionPayments.d.ts +0 -162
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -159
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
|
@@ -8,18 +8,13 @@ declare module 'stripe' {
|
|
|
8
8
|
*/
|
|
9
9
|
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
|
13
|
-
*/
|
|
14
|
-
amounts_due?: Stripe.Emptyable<Array<InvoiceCreateParams.AmountsDue>>;
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
|
18
13
|
*/
|
|
19
14
|
application_fee_amount?: number;
|
|
20
15
|
|
|
21
16
|
/**
|
|
22
|
-
* Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
|
17
|
+
* Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false.
|
|
23
18
|
*/
|
|
24
19
|
auto_advance?: boolean;
|
|
25
20
|
|
|
@@ -29,7 +24,7 @@ declare module 'stripe' {
|
|
|
29
24
|
automatic_tax?: InvoiceCreateParams.AutomaticTax;
|
|
30
25
|
|
|
31
26
|
/**
|
|
32
|
-
* The time when this invoice should be scheduled to finalize. The invoice
|
|
27
|
+
* The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state.
|
|
33
28
|
*/
|
|
34
29
|
automatically_finalizes_at?: number;
|
|
35
30
|
|
|
@@ -53,21 +48,11 @@ declare module 'stripe' {
|
|
|
53
48
|
*/
|
|
54
49
|
customer?: string;
|
|
55
50
|
|
|
56
|
-
/**
|
|
57
|
-
* The ID of the account who will be billed.
|
|
58
|
-
*/
|
|
59
|
-
customer_account?: string;
|
|
60
|
-
|
|
61
51
|
/**
|
|
62
52
|
* The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
|
63
53
|
*/
|
|
64
54
|
days_until_due?: number;
|
|
65
55
|
|
|
66
|
-
/**
|
|
67
|
-
* The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
|
68
|
-
*/
|
|
69
|
-
default_margins?: Array<string>;
|
|
70
|
-
|
|
71
56
|
/**
|
|
72
57
|
* 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.
|
|
73
58
|
*/
|
|
@@ -180,28 +165,6 @@ declare module 'stripe' {
|
|
|
180
165
|
}
|
|
181
166
|
|
|
182
167
|
namespace InvoiceCreateParams {
|
|
183
|
-
interface AmountsDue {
|
|
184
|
-
/**
|
|
185
|
-
* The amount in cents (or local equivalent).
|
|
186
|
-
*/
|
|
187
|
-
amount: number;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Number of days from when invoice is finalized until the payment is due.
|
|
191
|
-
*/
|
|
192
|
-
days_until_due?: number;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
196
|
-
*/
|
|
197
|
-
description: string;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Date on which a payment plan's payment is due.
|
|
201
|
-
*/
|
|
202
|
-
due_date?: number;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
168
|
interface AutomaticTax {
|
|
206
169
|
/**
|
|
207
170
|
* 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.
|
|
@@ -257,56 +220,12 @@ declare module 'stripe' {
|
|
|
257
220
|
*/
|
|
258
221
|
discount?: string;
|
|
259
222
|
|
|
260
|
-
/**
|
|
261
|
-
* Details to determine how long the discount should be applied for.
|
|
262
|
-
*/
|
|
263
|
-
discount_end?: Discount.DiscountEnd;
|
|
264
|
-
|
|
265
223
|
/**
|
|
266
224
|
* ID of the promotion code to create a new discount for.
|
|
267
225
|
*/
|
|
268
226
|
promotion_code?: string;
|
|
269
227
|
}
|
|
270
228
|
|
|
271
|
-
namespace Discount {
|
|
272
|
-
interface DiscountEnd {
|
|
273
|
-
/**
|
|
274
|
-
* Time span for the redeemed discount.
|
|
275
|
-
*/
|
|
276
|
-
duration?: DiscountEnd.Duration;
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
280
|
-
*/
|
|
281
|
-
timestamp?: number;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* The type of calculation made to determine when the discount ends.
|
|
285
|
-
*/
|
|
286
|
-
type: DiscountEnd.Type;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
namespace DiscountEnd {
|
|
290
|
-
interface Duration {
|
|
291
|
-
/**
|
|
292
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
293
|
-
*/
|
|
294
|
-
interval: Duration.Interval;
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
298
|
-
*/
|
|
299
|
-
interval_count: number;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
namespace Duration {
|
|
303
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
type Type = 'duration' | 'timestamp';
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
229
|
interface FromInvoice {
|
|
311
230
|
/**
|
|
312
231
|
* The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
|
|
@@ -378,13 +297,6 @@ declare module 'stripe' {
|
|
|
378
297
|
PaymentMethodOptions.CustomerBalance
|
|
379
298
|
>;
|
|
380
299
|
|
|
381
|
-
/**
|
|
382
|
-
* 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.
|
|
383
|
-
*/
|
|
384
|
-
id_bank_transfer?: Stripe.Emptyable<
|
|
385
|
-
PaymentMethodOptions.IdBankTransfer
|
|
386
|
-
>;
|
|
387
|
-
|
|
388
300
|
/**
|
|
389
301
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
390
302
|
*/
|
|
@@ -444,7 +356,7 @@ declare module 'stripe' {
|
|
|
444
356
|
|
|
445
357
|
interface Card {
|
|
446
358
|
/**
|
|
447
|
-
* Installment configuration for payments attempted on this invoice
|
|
359
|
+
* Installment configuration for payments attempted on this invoice.
|
|
448
360
|
*
|
|
449
361
|
* For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
|
450
362
|
*/
|
|
@@ -532,8 +444,6 @@ declare module 'stripe' {
|
|
|
532
444
|
}
|
|
533
445
|
}
|
|
534
446
|
|
|
535
|
-
interface IdBankTransfer {}
|
|
536
|
-
|
|
537
447
|
interface Konbini {}
|
|
538
448
|
|
|
539
449
|
interface SepaDebit {}
|
|
@@ -574,11 +484,6 @@ declare module 'stripe' {
|
|
|
574
484
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
575
485
|
*/
|
|
576
486
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* ID of the institution to use to filter for selectable accounts.
|
|
580
|
-
*/
|
|
581
|
-
institution?: string;
|
|
582
487
|
}
|
|
583
488
|
|
|
584
489
|
namespace Filters {
|
|
@@ -591,11 +496,7 @@ declare module 'stripe' {
|
|
|
591
496
|
| 'payment_method'
|
|
592
497
|
| 'transactions';
|
|
593
498
|
|
|
594
|
-
type Prefetch =
|
|
595
|
-
| 'balances'
|
|
596
|
-
| 'inferred_balances'
|
|
597
|
-
| 'ownership'
|
|
598
|
-
| 'transactions';
|
|
499
|
+
type Prefetch = 'balances' | 'ownership' | 'transactions';
|
|
599
500
|
}
|
|
600
501
|
|
|
601
502
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -615,13 +516,11 @@ declare module 'stripe' {
|
|
|
615
516
|
| 'card'
|
|
616
517
|
| 'cashapp'
|
|
617
518
|
| 'crypto'
|
|
618
|
-
| 'custom'
|
|
619
519
|
| 'customer_balance'
|
|
620
520
|
| 'eps'
|
|
621
521
|
| 'fpx'
|
|
622
522
|
| 'giropay'
|
|
623
523
|
| 'grabpay'
|
|
624
|
-
| 'id_bank_transfer'
|
|
625
524
|
| 'ideal'
|
|
626
525
|
| 'jp_credit_transfer'
|
|
627
526
|
| 'kakao_pay'
|
|
@@ -641,7 +540,6 @@ declare module 'stripe' {
|
|
|
641
540
|
| 'sepa_credit_transfer'
|
|
642
541
|
| 'sepa_debit'
|
|
643
542
|
| 'sofort'
|
|
644
|
-
| 'stripe_balance'
|
|
645
543
|
| 'swish'
|
|
646
544
|
| 'us_bank_account'
|
|
647
545
|
| 'wechat_pay';
|
|
@@ -869,11 +767,6 @@ declare module 'stripe' {
|
|
|
869
767
|
*/
|
|
870
768
|
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
871
769
|
|
|
872
|
-
/**
|
|
873
|
-
* List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
|
874
|
-
*/
|
|
875
|
-
amounts_due?: Stripe.Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
|
|
876
|
-
|
|
877
770
|
/**
|
|
878
771
|
* A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
|
879
772
|
*/
|
|
@@ -890,7 +783,7 @@ declare module 'stripe' {
|
|
|
890
783
|
automatic_tax?: InvoiceUpdateParams.AutomaticTax;
|
|
891
784
|
|
|
892
785
|
/**
|
|
893
|
-
* The time when this invoice should be scheduled to finalize. The invoice
|
|
786
|
+
* The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false.
|
|
894
787
|
*/
|
|
895
788
|
automatically_finalizes_at?: number;
|
|
896
789
|
|
|
@@ -909,11 +802,6 @@ declare module 'stripe' {
|
|
|
909
802
|
*/
|
|
910
803
|
days_until_due?: number;
|
|
911
804
|
|
|
912
|
-
/**
|
|
913
|
-
* The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
|
914
|
-
*/
|
|
915
|
-
default_margins?: Stripe.Emptyable<Array<string>>;
|
|
916
|
-
|
|
917
805
|
/**
|
|
918
806
|
* 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.
|
|
919
807
|
*/
|
|
@@ -1011,28 +899,6 @@ declare module 'stripe' {
|
|
|
1011
899
|
}
|
|
1012
900
|
|
|
1013
901
|
namespace InvoiceUpdateParams {
|
|
1014
|
-
interface AmountsDue {
|
|
1015
|
-
/**
|
|
1016
|
-
* The amount in cents (or local equivalent).
|
|
1017
|
-
*/
|
|
1018
|
-
amount: number;
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* Number of days from when invoice is finalized until the payment is due.
|
|
1022
|
-
*/
|
|
1023
|
-
days_until_due?: number;
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
1027
|
-
*/
|
|
1028
|
-
description: string;
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* Date on which a payment plan's payment is due.
|
|
1032
|
-
*/
|
|
1033
|
-
due_date?: number;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
902
|
interface AutomaticTax {
|
|
1037
903
|
/**
|
|
1038
904
|
* 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.
|
|
@@ -1088,56 +954,12 @@ declare module 'stripe' {
|
|
|
1088
954
|
*/
|
|
1089
955
|
discount?: string;
|
|
1090
956
|
|
|
1091
|
-
/**
|
|
1092
|
-
* Details to determine how long the discount should be applied for.
|
|
1093
|
-
*/
|
|
1094
|
-
discount_end?: Discount.DiscountEnd;
|
|
1095
|
-
|
|
1096
957
|
/**
|
|
1097
958
|
* ID of the promotion code to create a new discount for.
|
|
1098
959
|
*/
|
|
1099
960
|
promotion_code?: string;
|
|
1100
961
|
}
|
|
1101
962
|
|
|
1102
|
-
namespace Discount {
|
|
1103
|
-
interface DiscountEnd {
|
|
1104
|
-
/**
|
|
1105
|
-
* Time span for the redeemed discount.
|
|
1106
|
-
*/
|
|
1107
|
-
duration?: DiscountEnd.Duration;
|
|
1108
|
-
|
|
1109
|
-
/**
|
|
1110
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1111
|
-
*/
|
|
1112
|
-
timestamp?: number;
|
|
1113
|
-
|
|
1114
|
-
/**
|
|
1115
|
-
* The type of calculation made to determine when the discount ends.
|
|
1116
|
-
*/
|
|
1117
|
-
type: DiscountEnd.Type;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
namespace DiscountEnd {
|
|
1121
|
-
interface Duration {
|
|
1122
|
-
/**
|
|
1123
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1124
|
-
*/
|
|
1125
|
-
interval: Duration.Interval;
|
|
1126
|
-
|
|
1127
|
-
/**
|
|
1128
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1129
|
-
*/
|
|
1130
|
-
interval_count: number;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
namespace Duration {
|
|
1134
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
type Type = 'duration' | 'timestamp';
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
963
|
interface Issuer {
|
|
1142
964
|
/**
|
|
1143
965
|
* The connected account being referenced when `type` is `account`.
|
|
@@ -1197,13 +1019,6 @@ declare module 'stripe' {
|
|
|
1197
1019
|
PaymentMethodOptions.CustomerBalance
|
|
1198
1020
|
>;
|
|
1199
1021
|
|
|
1200
|
-
/**
|
|
1201
|
-
* 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.
|
|
1202
|
-
*/
|
|
1203
|
-
id_bank_transfer?: Stripe.Emptyable<
|
|
1204
|
-
PaymentMethodOptions.IdBankTransfer
|
|
1205
|
-
>;
|
|
1206
|
-
|
|
1207
1022
|
/**
|
|
1208
1023
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
1209
1024
|
*/
|
|
@@ -1263,7 +1078,7 @@ declare module 'stripe' {
|
|
|
1263
1078
|
|
|
1264
1079
|
interface Card {
|
|
1265
1080
|
/**
|
|
1266
|
-
* Installment configuration for payments attempted on this invoice
|
|
1081
|
+
* Installment configuration for payments attempted on this invoice.
|
|
1267
1082
|
*
|
|
1268
1083
|
* For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
|
1269
1084
|
*/
|
|
@@ -1351,8 +1166,6 @@ declare module 'stripe' {
|
|
|
1351
1166
|
}
|
|
1352
1167
|
}
|
|
1353
1168
|
|
|
1354
|
-
interface IdBankTransfer {}
|
|
1355
|
-
|
|
1356
1169
|
interface Konbini {}
|
|
1357
1170
|
|
|
1358
1171
|
interface SepaDebit {}
|
|
@@ -1393,11 +1206,6 @@ declare module 'stripe' {
|
|
|
1393
1206
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
1394
1207
|
*/
|
|
1395
1208
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1396
|
-
|
|
1397
|
-
/**
|
|
1398
|
-
* ID of the institution to use to filter for selectable accounts.
|
|
1399
|
-
*/
|
|
1400
|
-
institution?: string;
|
|
1401
1209
|
}
|
|
1402
1210
|
|
|
1403
1211
|
namespace Filters {
|
|
@@ -1410,11 +1218,7 @@ declare module 'stripe' {
|
|
|
1410
1218
|
| 'payment_method'
|
|
1411
1219
|
| 'transactions';
|
|
1412
1220
|
|
|
1413
|
-
type Prefetch =
|
|
1414
|
-
| 'balances'
|
|
1415
|
-
| 'inferred_balances'
|
|
1416
|
-
| 'ownership'
|
|
1417
|
-
| 'transactions';
|
|
1221
|
+
type Prefetch = 'balances' | 'ownership' | 'transactions';
|
|
1418
1222
|
}
|
|
1419
1223
|
|
|
1420
1224
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1434,13 +1238,11 @@ declare module 'stripe' {
|
|
|
1434
1238
|
| 'card'
|
|
1435
1239
|
| 'cashapp'
|
|
1436
1240
|
| 'crypto'
|
|
1437
|
-
| 'custom'
|
|
1438
1241
|
| 'customer_balance'
|
|
1439
1242
|
| 'eps'
|
|
1440
1243
|
| 'fpx'
|
|
1441
1244
|
| 'giropay'
|
|
1442
1245
|
| 'grabpay'
|
|
1443
|
-
| 'id_bank_transfer'
|
|
1444
1246
|
| 'ideal'
|
|
1445
1247
|
| 'jp_credit_transfer'
|
|
1446
1248
|
| 'kakao_pay'
|
|
@@ -1460,7 +1262,6 @@ declare module 'stripe' {
|
|
|
1460
1262
|
| 'sepa_credit_transfer'
|
|
1461
1263
|
| 'sepa_debit'
|
|
1462
1264
|
| 'sofort'
|
|
1463
|
-
| 'stripe_balance'
|
|
1464
1265
|
| 'swish'
|
|
1465
1266
|
| 'us_bank_account'
|
|
1466
1267
|
| 'wechat_pay';
|
|
@@ -1689,11 +1490,6 @@ declare module 'stripe' {
|
|
|
1689
1490
|
*/
|
|
1690
1491
|
customer?: string;
|
|
1691
1492
|
|
|
1692
|
-
/**
|
|
1693
|
-
* Only return invoices for the account specified by this account ID.
|
|
1694
|
-
*/
|
|
1695
|
-
customer_account?: string;
|
|
1696
|
-
|
|
1697
1493
|
due_date?: Stripe.RangeQueryParam | number;
|
|
1698
1494
|
|
|
1699
1495
|
/**
|
|
@@ -1766,11 +1562,6 @@ declare module 'stripe' {
|
|
|
1766
1562
|
*/
|
|
1767
1563
|
invoice_item?: string;
|
|
1768
1564
|
|
|
1769
|
-
/**
|
|
1770
|
-
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
1771
|
-
*/
|
|
1772
|
-
margins?: Stripe.Emptyable<Array<string>>;
|
|
1773
|
-
|
|
1774
1565
|
/**
|
|
1775
1566
|
* 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`.
|
|
1776
1567
|
*/
|
|
@@ -1819,56 +1610,12 @@ declare module 'stripe' {
|
|
|
1819
1610
|
*/
|
|
1820
1611
|
discount?: string;
|
|
1821
1612
|
|
|
1822
|
-
/**
|
|
1823
|
-
* Details to determine how long the discount should be applied for.
|
|
1824
|
-
*/
|
|
1825
|
-
discount_end?: Discount.DiscountEnd;
|
|
1826
|
-
|
|
1827
1613
|
/**
|
|
1828
1614
|
* ID of the promotion code to create a new discount for.
|
|
1829
1615
|
*/
|
|
1830
1616
|
promotion_code?: string;
|
|
1831
1617
|
}
|
|
1832
1618
|
|
|
1833
|
-
namespace Discount {
|
|
1834
|
-
interface DiscountEnd {
|
|
1835
|
-
/**
|
|
1836
|
-
* Time span for the redeemed discount.
|
|
1837
|
-
*/
|
|
1838
|
-
duration?: DiscountEnd.Duration;
|
|
1839
|
-
|
|
1840
|
-
/**
|
|
1841
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1842
|
-
*/
|
|
1843
|
-
timestamp?: number;
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* The type of calculation made to determine when the discount ends.
|
|
1847
|
-
*/
|
|
1848
|
-
type: DiscountEnd.Type;
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
namespace DiscountEnd {
|
|
1852
|
-
interface Duration {
|
|
1853
|
-
/**
|
|
1854
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1855
|
-
*/
|
|
1856
|
-
interval: Duration.Interval;
|
|
1857
|
-
|
|
1858
|
-
/**
|
|
1859
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1860
|
-
*/
|
|
1861
|
-
interval_count: number;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
namespace Duration {
|
|
1865
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
type Type = 'duration' | 'timestamp';
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
1619
|
interface Period {
|
|
1873
1620
|
/**
|
|
1874
1621
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -2070,11 +1817,6 @@ declare module 'stripe' {
|
|
|
2070
1817
|
}
|
|
2071
1818
|
|
|
2072
1819
|
interface InvoiceAttachPaymentParams {
|
|
2073
|
-
/**
|
|
2074
|
-
* The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
|
2075
|
-
*/
|
|
2076
|
-
amount_requested?: number;
|
|
2077
|
-
|
|
2078
1820
|
/**
|
|
2079
1821
|
* Specifies which fields in the response should be expanded.
|
|
2080
1822
|
*/
|
|
@@ -2084,50 +1826,6 @@ declare module 'stripe' {
|
|
|
2084
1826
|
* The ID of the PaymentIntent to attach to the invoice.
|
|
2085
1827
|
*/
|
|
2086
1828
|
payment_intent?: string;
|
|
2087
|
-
|
|
2088
|
-
/**
|
|
2089
|
-
* The ID of the PaymentRecord to attach to the invoice.
|
|
2090
|
-
*/
|
|
2091
|
-
payment_record?: string;
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* The PaymentRecord data for attaching an out of band payment to the invoice.
|
|
2095
|
-
*/
|
|
2096
|
-
payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
namespace InvoiceAttachPaymentParams {
|
|
2100
|
-
interface PaymentRecordData {
|
|
2101
|
-
/**
|
|
2102
|
-
* The amount that was paid out of band.
|
|
2103
|
-
*/
|
|
2104
|
-
amount: number;
|
|
2105
|
-
|
|
2106
|
-
/**
|
|
2107
|
-
* The currency that was paid out of band.
|
|
2108
|
-
*/
|
|
2109
|
-
currency: string;
|
|
2110
|
-
|
|
2111
|
-
/**
|
|
2112
|
-
* 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`.
|
|
2113
|
-
*/
|
|
2114
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2115
|
-
|
|
2116
|
-
/**
|
|
2117
|
-
* The type of money movement for this out of band payment record.
|
|
2118
|
-
*/
|
|
2119
|
-
money_movement_type: string;
|
|
2120
|
-
|
|
2121
|
-
/**
|
|
2122
|
-
* The timestamp when this out of band payment was paid.
|
|
2123
|
-
*/
|
|
2124
|
-
paid_at?: number;
|
|
2125
|
-
|
|
2126
|
-
/**
|
|
2127
|
-
* The reference for this out of band payment record.
|
|
2128
|
-
*/
|
|
2129
|
-
payment_reference?: string;
|
|
2130
|
-
}
|
|
2131
1829
|
}
|
|
2132
1830
|
|
|
2133
1831
|
interface InvoiceCreatePreviewParams {
|
|
@@ -2146,11 +1844,6 @@ declare module 'stripe' {
|
|
|
2146
1844
|
*/
|
|
2147
1845
|
customer?: string;
|
|
2148
1846
|
|
|
2149
|
-
/**
|
|
2150
|
-
* The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2151
|
-
*/
|
|
2152
|
-
customer_account?: string;
|
|
2153
|
-
|
|
2154
1847
|
/**
|
|
2155
1848
|
* Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2156
1849
|
*/
|
|
@@ -2430,56 +2123,12 @@ declare module 'stripe' {
|
|
|
2430
2123
|
*/
|
|
2431
2124
|
discount?: string;
|
|
2432
2125
|
|
|
2433
|
-
/**
|
|
2434
|
-
* Details to determine how long the discount should be applied for.
|
|
2435
|
-
*/
|
|
2436
|
-
discount_end?: Discount.DiscountEnd;
|
|
2437
|
-
|
|
2438
2126
|
/**
|
|
2439
2127
|
* ID of the promotion code to create a new discount for.
|
|
2440
2128
|
*/
|
|
2441
2129
|
promotion_code?: string;
|
|
2442
2130
|
}
|
|
2443
2131
|
|
|
2444
|
-
namespace Discount {
|
|
2445
|
-
interface DiscountEnd {
|
|
2446
|
-
/**
|
|
2447
|
-
* Time span for the redeemed discount.
|
|
2448
|
-
*/
|
|
2449
|
-
duration?: DiscountEnd.Duration;
|
|
2450
|
-
|
|
2451
|
-
/**
|
|
2452
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2453
|
-
*/
|
|
2454
|
-
timestamp?: number;
|
|
2455
|
-
|
|
2456
|
-
/**
|
|
2457
|
-
* The type of calculation made to determine when the discount ends.
|
|
2458
|
-
*/
|
|
2459
|
-
type: DiscountEnd.Type;
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
namespace DiscountEnd {
|
|
2463
|
-
interface Duration {
|
|
2464
|
-
/**
|
|
2465
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2466
|
-
*/
|
|
2467
|
-
interval: Duration.Interval;
|
|
2468
|
-
|
|
2469
|
-
/**
|
|
2470
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2471
|
-
*/
|
|
2472
|
-
interval_count: number;
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
namespace Duration {
|
|
2476
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2479
|
-
type Type = 'duration' | 'timestamp';
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
2132
|
interface InvoiceItem {
|
|
2484
2133
|
/**
|
|
2485
2134
|
* The integer amount in cents (or local equivalent) of previewed invoice item.
|
|
@@ -2574,56 +2223,12 @@ declare module 'stripe' {
|
|
|
2574
2223
|
*/
|
|
2575
2224
|
discount?: string;
|
|
2576
2225
|
|
|
2577
|
-
/**
|
|
2578
|
-
* Details to determine how long the discount should be applied for.
|
|
2579
|
-
*/
|
|
2580
|
-
discount_end?: Discount.DiscountEnd;
|
|
2581
|
-
|
|
2582
2226
|
/**
|
|
2583
2227
|
* ID of the promotion code to create a new discount for.
|
|
2584
2228
|
*/
|
|
2585
2229
|
promotion_code?: string;
|
|
2586
2230
|
}
|
|
2587
2231
|
|
|
2588
|
-
namespace Discount {
|
|
2589
|
-
interface DiscountEnd {
|
|
2590
|
-
/**
|
|
2591
|
-
* Time span for the redeemed discount.
|
|
2592
|
-
*/
|
|
2593
|
-
duration?: DiscountEnd.Duration;
|
|
2594
|
-
|
|
2595
|
-
/**
|
|
2596
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2597
|
-
*/
|
|
2598
|
-
timestamp?: number;
|
|
2599
|
-
|
|
2600
|
-
/**
|
|
2601
|
-
* The type of calculation made to determine when the discount ends.
|
|
2602
|
-
*/
|
|
2603
|
-
type: DiscountEnd.Type;
|
|
2604
|
-
}
|
|
2605
|
-
|
|
2606
|
-
namespace DiscountEnd {
|
|
2607
|
-
interface Duration {
|
|
2608
|
-
/**
|
|
2609
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2610
|
-
*/
|
|
2611
|
-
interval: Duration.Interval;
|
|
2612
|
-
|
|
2613
|
-
/**
|
|
2614
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2615
|
-
*/
|
|
2616
|
-
interval_count: number;
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2619
|
-
namespace Duration {
|
|
2620
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
type Type = 'duration' | 'timestamp';
|
|
2624
|
-
}
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
2232
|
interface Period {
|
|
2628
2233
|
/**
|
|
2629
2234
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -2689,16 +2294,6 @@ declare module 'stripe' {
|
|
|
2689
2294
|
type PreviewMode = 'next' | 'recurring';
|
|
2690
2295
|
|
|
2691
2296
|
interface ScheduleDetails {
|
|
2692
|
-
/**
|
|
2693
|
-
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
2694
|
-
*/
|
|
2695
|
-
amendments?: Array<ScheduleDetails.Amendment>;
|
|
2696
|
-
|
|
2697
|
-
/**
|
|
2698
|
-
* Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
|
2699
|
-
*/
|
|
2700
|
-
billing_behavior?: ScheduleDetails.BillingBehavior;
|
|
2701
|
-
|
|
2702
2297
|
/**
|
|
2703
2298
|
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
2704
2299
|
*/
|
|
@@ -2714,11 +2309,6 @@ declare module 'stripe' {
|
|
|
2714
2309
|
*/
|
|
2715
2310
|
phases?: Array<ScheduleDetails.Phase>;
|
|
2716
2311
|
|
|
2717
|
-
/**
|
|
2718
|
-
* Provide any time periods to bill in advance.
|
|
2719
|
-
*/
|
|
2720
|
-
prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
|
|
2721
|
-
|
|
2722
2312
|
/**
|
|
2723
2313
|
* In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
|
2724
2314
|
*/
|
|
@@ -2726,604 +2316,10 @@ declare module 'stripe' {
|
|
|
2726
2316
|
}
|
|
2727
2317
|
|
|
2728
2318
|
namespace ScheduleDetails {
|
|
2729
|
-
interface Amendment {
|
|
2730
|
-
/**
|
|
2731
|
-
* Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
|
|
2732
|
-
*/
|
|
2733
|
-
amendment_end?: Amendment.AmendmentEnd;
|
|
2734
|
-
|
|
2735
|
-
/**
|
|
2736
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2737
|
-
*/
|
|
2738
|
-
amendment_start: Amendment.AmendmentStart;
|
|
2739
|
-
|
|
2740
|
-
/**
|
|
2741
|
-
* For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
|
|
2742
|
-
*/
|
|
2743
|
-
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
2744
|
-
|
|
2745
|
-
/**
|
|
2746
|
-
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
2747
|
-
*/
|
|
2748
|
-
discount_actions?: Array<Amendment.DiscountAction>;
|
|
2749
|
-
|
|
2750
|
-
/**
|
|
2751
|
-
* Changes to the subscription items during the amendment time span.
|
|
2752
|
-
*/
|
|
2753
|
-
item_actions?: Array<Amendment.ItemAction>;
|
|
2754
|
-
|
|
2755
|
-
/**
|
|
2756
|
-
* Instructions for how to modify phase metadata
|
|
2757
|
-
*/
|
|
2758
|
-
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
2759
|
-
|
|
2760
|
-
/**
|
|
2761
|
-
* Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
|
|
2762
|
-
*/
|
|
2763
|
-
proration_behavior?: Amendment.ProrationBehavior;
|
|
2764
|
-
|
|
2765
|
-
/**
|
|
2766
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2767
|
-
*/
|
|
2768
|
-
set_pause_collection?: Amendment.SetPauseCollection;
|
|
2769
|
-
|
|
2770
|
-
/**
|
|
2771
|
-
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
2772
|
-
*/
|
|
2773
|
-
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
2774
|
-
|
|
2775
|
-
/**
|
|
2776
|
-
* Settings related to subscription trials.
|
|
2777
|
-
*/
|
|
2778
|
-
trial_settings?: Amendment.TrialSettings;
|
|
2779
|
-
}
|
|
2780
|
-
|
|
2781
|
-
namespace Amendment {
|
|
2782
|
-
interface AmendmentEnd {
|
|
2783
|
-
/**
|
|
2784
|
-
* Use the `end` time of a given discount.
|
|
2785
|
-
*/
|
|
2786
|
-
discount_end?: AmendmentEnd.DiscountEnd;
|
|
2787
|
-
|
|
2788
|
-
/**
|
|
2789
|
-
* Time span for the amendment starting from the `amendment_start`.
|
|
2790
|
-
*/
|
|
2791
|
-
duration?: AmendmentEnd.Duration;
|
|
2792
|
-
|
|
2793
|
-
/**
|
|
2794
|
-
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
2795
|
-
*/
|
|
2796
|
-
timestamp?: number;
|
|
2797
|
-
|
|
2798
|
-
/**
|
|
2799
|
-
* Select one of three ways to pass the `amendment_end`.
|
|
2800
|
-
*/
|
|
2801
|
-
type: AmendmentEnd.Type;
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
namespace AmendmentEnd {
|
|
2805
|
-
interface DiscountEnd {
|
|
2806
|
-
/**
|
|
2807
|
-
* The ID of a specific discount.
|
|
2808
|
-
*/
|
|
2809
|
-
discount: string;
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
interface Duration {
|
|
2813
|
-
/**
|
|
2814
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2815
|
-
*/
|
|
2816
|
-
interval: Duration.Interval;
|
|
2817
|
-
|
|
2818
|
-
/**
|
|
2819
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2820
|
-
*/
|
|
2821
|
-
interval_count: number;
|
|
2822
|
-
}
|
|
2823
|
-
|
|
2824
|
-
namespace Duration {
|
|
2825
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2826
|
-
}
|
|
2827
|
-
|
|
2828
|
-
type Type =
|
|
2829
|
-
| 'discount_end'
|
|
2830
|
-
| 'duration'
|
|
2831
|
-
| 'schedule_end'
|
|
2832
|
-
| 'timestamp'
|
|
2833
|
-
| 'trial_end'
|
|
2834
|
-
| 'trial_start'
|
|
2835
|
-
| 'upcoming_invoice';
|
|
2836
|
-
}
|
|
2837
|
-
|
|
2838
|
-
interface AmendmentStart {
|
|
2839
|
-
/**
|
|
2840
|
-
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
2841
|
-
*/
|
|
2842
|
-
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
2843
|
-
|
|
2844
|
-
/**
|
|
2845
|
-
* Use the `end` time of a given discount.
|
|
2846
|
-
*/
|
|
2847
|
-
discount_end?: AmendmentStart.DiscountEnd;
|
|
2848
|
-
|
|
2849
|
-
/**
|
|
2850
|
-
* A precise Unix timestamp for the amendment to start.
|
|
2851
|
-
*/
|
|
2852
|
-
timestamp?: number;
|
|
2853
|
-
|
|
2854
|
-
/**
|
|
2855
|
-
* Select one of three ways to pass the `amendment_start`.
|
|
2856
|
-
*/
|
|
2857
|
-
type: AmendmentStart.Type;
|
|
2858
|
-
}
|
|
2859
|
-
|
|
2860
|
-
namespace AmendmentStart {
|
|
2861
|
-
interface AmendmentEnd {
|
|
2862
|
-
/**
|
|
2863
|
-
* The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
|
|
2864
|
-
*/
|
|
2865
|
-
index: number;
|
|
2866
|
-
}
|
|
2867
|
-
|
|
2868
|
-
interface DiscountEnd {
|
|
2869
|
-
/**
|
|
2870
|
-
* The ID of a specific discount.
|
|
2871
|
-
*/
|
|
2872
|
-
discount: string;
|
|
2873
|
-
}
|
|
2874
|
-
|
|
2875
|
-
type Type =
|
|
2876
|
-
| 'amendment_end'
|
|
2877
|
-
| 'discount_end'
|
|
2878
|
-
| 'now'
|
|
2879
|
-
| 'schedule_end'
|
|
2880
|
-
| 'timestamp'
|
|
2881
|
-
| 'trial_end'
|
|
2882
|
-
| 'trial_start'
|
|
2883
|
-
| 'upcoming_invoice';
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
|
-
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
2887
|
-
|
|
2888
|
-
interface DiscountAction {
|
|
2889
|
-
/**
|
|
2890
|
-
* Details of the discount to add.
|
|
2891
|
-
*/
|
|
2892
|
-
add?: DiscountAction.Add;
|
|
2893
|
-
|
|
2894
|
-
/**
|
|
2895
|
-
* Details of the discount to remove.
|
|
2896
|
-
*/
|
|
2897
|
-
remove?: DiscountAction.Remove;
|
|
2898
|
-
|
|
2899
|
-
/**
|
|
2900
|
-
* Details of the discount to replace the existing discounts with.
|
|
2901
|
-
*/
|
|
2902
|
-
set?: DiscountAction.Set;
|
|
2903
|
-
|
|
2904
|
-
/**
|
|
2905
|
-
* Determines the type of discount action.
|
|
2906
|
-
*/
|
|
2907
|
-
type: DiscountAction.Type;
|
|
2908
|
-
}
|
|
2909
|
-
|
|
2910
|
-
namespace DiscountAction {
|
|
2911
|
-
interface Add {
|
|
2912
|
-
/**
|
|
2913
|
-
* The coupon code to redeem.
|
|
2914
|
-
*/
|
|
2915
|
-
coupon?: string;
|
|
2916
|
-
|
|
2917
|
-
/**
|
|
2918
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
2919
|
-
*/
|
|
2920
|
-
discount?: string;
|
|
2921
|
-
|
|
2922
|
-
/**
|
|
2923
|
-
* Details to determine how long the discount should be applied for.
|
|
2924
|
-
*/
|
|
2925
|
-
discount_end?: Add.DiscountEnd;
|
|
2926
|
-
|
|
2927
|
-
/**
|
|
2928
|
-
* The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
|
2929
|
-
*/
|
|
2930
|
-
index?: number;
|
|
2931
|
-
|
|
2932
|
-
/**
|
|
2933
|
-
* The promotion code to redeem.
|
|
2934
|
-
*/
|
|
2935
|
-
promotion_code?: string;
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
namespace Add {
|
|
2939
|
-
interface DiscountEnd {
|
|
2940
|
-
/**
|
|
2941
|
-
* The type of calculation made to determine when the discount ends.
|
|
2942
|
-
*/
|
|
2943
|
-
type: 'amendment_end';
|
|
2944
|
-
}
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
interface Remove {
|
|
2948
|
-
/**
|
|
2949
|
-
* The coupon code to remove from the `discounts` array.
|
|
2950
|
-
*/
|
|
2951
|
-
coupon?: string;
|
|
2952
|
-
|
|
2953
|
-
/**
|
|
2954
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
2955
|
-
*/
|
|
2956
|
-
discount?: string;
|
|
2957
|
-
|
|
2958
|
-
/**
|
|
2959
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
2960
|
-
*/
|
|
2961
|
-
promotion_code?: string;
|
|
2962
|
-
}
|
|
2963
|
-
|
|
2964
|
-
interface Set {
|
|
2965
|
-
/**
|
|
2966
|
-
* The coupon code to replace the `discounts` array with.
|
|
2967
|
-
*/
|
|
2968
|
-
coupon?: string;
|
|
2969
|
-
|
|
2970
|
-
/**
|
|
2971
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
2972
|
-
*/
|
|
2973
|
-
discount?: string;
|
|
2974
|
-
|
|
2975
|
-
/**
|
|
2976
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2977
|
-
*/
|
|
2978
|
-
promotion_code?: string;
|
|
2979
|
-
}
|
|
2980
|
-
|
|
2981
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2982
|
-
}
|
|
2983
|
-
|
|
2984
|
-
interface ItemAction {
|
|
2985
|
-
/**
|
|
2986
|
-
* Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
|
|
2987
|
-
*/
|
|
2988
|
-
add?: ItemAction.Add;
|
|
2989
|
-
|
|
2990
|
-
/**
|
|
2991
|
-
* Details of the subscription item to remove.
|
|
2992
|
-
*/
|
|
2993
|
-
remove?: ItemAction.Remove;
|
|
2994
|
-
|
|
2995
|
-
/**
|
|
2996
|
-
* Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
|
|
2997
|
-
*/
|
|
2998
|
-
set?: ItemAction.Set;
|
|
2999
|
-
|
|
3000
|
-
/**
|
|
3001
|
-
* Determines the type of item action.
|
|
3002
|
-
*/
|
|
3003
|
-
type: ItemAction.Type;
|
|
3004
|
-
}
|
|
3005
|
-
|
|
3006
|
-
namespace ItemAction {
|
|
3007
|
-
interface Add {
|
|
3008
|
-
/**
|
|
3009
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
3010
|
-
*/
|
|
3011
|
-
discounts?: Array<Add.Discount>;
|
|
3012
|
-
|
|
3013
|
-
/**
|
|
3014
|
-
* 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`.
|
|
3015
|
-
*/
|
|
3016
|
-
metadata?: Stripe.MetadataParam;
|
|
3017
|
-
|
|
3018
|
-
/**
|
|
3019
|
-
* The ID of the price object.
|
|
3020
|
-
*/
|
|
3021
|
-
price: string;
|
|
3022
|
-
|
|
3023
|
-
/**
|
|
3024
|
-
* Quantity for this item.
|
|
3025
|
-
*/
|
|
3026
|
-
quantity?: number;
|
|
3027
|
-
|
|
3028
|
-
/**
|
|
3029
|
-
* The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
|
3030
|
-
*/
|
|
3031
|
-
tax_rates?: Array<string>;
|
|
3032
|
-
|
|
3033
|
-
/**
|
|
3034
|
-
* Options that configure the trial on the subscription item.
|
|
3035
|
-
*/
|
|
3036
|
-
trial?: Add.Trial;
|
|
3037
|
-
}
|
|
3038
|
-
|
|
3039
|
-
namespace Add {
|
|
3040
|
-
interface Discount {
|
|
3041
|
-
/**
|
|
3042
|
-
* ID of the coupon to create a new discount for.
|
|
3043
|
-
*/
|
|
3044
|
-
coupon?: string;
|
|
3045
|
-
|
|
3046
|
-
/**
|
|
3047
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3048
|
-
*/
|
|
3049
|
-
discount?: string;
|
|
3050
|
-
|
|
3051
|
-
/**
|
|
3052
|
-
* Details to determine how long the discount should be applied for.
|
|
3053
|
-
*/
|
|
3054
|
-
discount_end?: Discount.DiscountEnd;
|
|
3055
|
-
|
|
3056
|
-
/**
|
|
3057
|
-
* ID of the promotion code to create a new discount for.
|
|
3058
|
-
*/
|
|
3059
|
-
promotion_code?: string;
|
|
3060
|
-
}
|
|
3061
|
-
|
|
3062
|
-
namespace Discount {
|
|
3063
|
-
interface DiscountEnd {
|
|
3064
|
-
/**
|
|
3065
|
-
* Time span for the redeemed discount.
|
|
3066
|
-
*/
|
|
3067
|
-
duration?: DiscountEnd.Duration;
|
|
3068
|
-
|
|
3069
|
-
/**
|
|
3070
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3071
|
-
*/
|
|
3072
|
-
timestamp?: number;
|
|
3073
|
-
|
|
3074
|
-
/**
|
|
3075
|
-
* The type of calculation made to determine when the discount ends.
|
|
3076
|
-
*/
|
|
3077
|
-
type: DiscountEnd.Type;
|
|
3078
|
-
}
|
|
3079
|
-
|
|
3080
|
-
namespace DiscountEnd {
|
|
3081
|
-
interface Duration {
|
|
3082
|
-
/**
|
|
3083
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3084
|
-
*/
|
|
3085
|
-
interval: Duration.Interval;
|
|
3086
|
-
|
|
3087
|
-
/**
|
|
3088
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3089
|
-
*/
|
|
3090
|
-
interval_count: number;
|
|
3091
|
-
}
|
|
3092
|
-
|
|
3093
|
-
namespace Duration {
|
|
3094
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
type Type = 'duration' | 'timestamp';
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
interface Trial {
|
|
3102
|
-
/**
|
|
3103
|
-
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
|
3104
|
-
*/
|
|
3105
|
-
converts_to?: Array<string>;
|
|
3106
|
-
|
|
3107
|
-
/**
|
|
3108
|
-
* Determines the type of trial for this item.
|
|
3109
|
-
*/
|
|
3110
|
-
type: Trial.Type;
|
|
3111
|
-
}
|
|
3112
|
-
|
|
3113
|
-
namespace Trial {
|
|
3114
|
-
type Type = 'free' | 'paid';
|
|
3115
|
-
}
|
|
3116
|
-
}
|
|
3117
|
-
|
|
3118
|
-
interface Remove {
|
|
3119
|
-
/**
|
|
3120
|
-
* ID of a price to remove.
|
|
3121
|
-
*/
|
|
3122
|
-
price: string;
|
|
3123
|
-
}
|
|
3124
|
-
|
|
3125
|
-
interface Set {
|
|
3126
|
-
/**
|
|
3127
|
-
* If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
|
3128
|
-
*/
|
|
3129
|
-
discounts?: Array<Set.Discount>;
|
|
3130
|
-
|
|
3131
|
-
/**
|
|
3132
|
-
* If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
|
3133
|
-
*/
|
|
3134
|
-
metadata?: Stripe.MetadataParam;
|
|
3135
|
-
|
|
3136
|
-
/**
|
|
3137
|
-
* The ID of the price object.
|
|
3138
|
-
*/
|
|
3139
|
-
price: string;
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
|
3143
|
-
*/
|
|
3144
|
-
quantity?: number;
|
|
3145
|
-
|
|
3146
|
-
/**
|
|
3147
|
-
* If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
|
3148
|
-
*/
|
|
3149
|
-
tax_rates?: Array<string>;
|
|
3150
|
-
|
|
3151
|
-
/**
|
|
3152
|
-
* If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
|
3153
|
-
*/
|
|
3154
|
-
trial?: Set.Trial;
|
|
3155
|
-
}
|
|
3156
|
-
|
|
3157
|
-
namespace Set {
|
|
3158
|
-
interface Discount {
|
|
3159
|
-
/**
|
|
3160
|
-
* ID of the coupon to create a new discount for.
|
|
3161
|
-
*/
|
|
3162
|
-
coupon?: string;
|
|
3163
|
-
|
|
3164
|
-
/**
|
|
3165
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3166
|
-
*/
|
|
3167
|
-
discount?: string;
|
|
3168
|
-
|
|
3169
|
-
/**
|
|
3170
|
-
* Details to determine how long the discount should be applied for.
|
|
3171
|
-
*/
|
|
3172
|
-
discount_end?: Discount.DiscountEnd;
|
|
3173
|
-
|
|
3174
|
-
/**
|
|
3175
|
-
* ID of the promotion code to create a new discount for.
|
|
3176
|
-
*/
|
|
3177
|
-
promotion_code?: string;
|
|
3178
|
-
}
|
|
3179
|
-
|
|
3180
|
-
namespace Discount {
|
|
3181
|
-
interface DiscountEnd {
|
|
3182
|
-
/**
|
|
3183
|
-
* Time span for the redeemed discount.
|
|
3184
|
-
*/
|
|
3185
|
-
duration?: DiscountEnd.Duration;
|
|
3186
|
-
|
|
3187
|
-
/**
|
|
3188
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3189
|
-
*/
|
|
3190
|
-
timestamp?: number;
|
|
3191
|
-
|
|
3192
|
-
/**
|
|
3193
|
-
* The type of calculation made to determine when the discount ends.
|
|
3194
|
-
*/
|
|
3195
|
-
type: DiscountEnd.Type;
|
|
3196
|
-
}
|
|
3197
|
-
|
|
3198
|
-
namespace DiscountEnd {
|
|
3199
|
-
interface Duration {
|
|
3200
|
-
/**
|
|
3201
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3202
|
-
*/
|
|
3203
|
-
interval: Duration.Interval;
|
|
3204
|
-
|
|
3205
|
-
/**
|
|
3206
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3207
|
-
*/
|
|
3208
|
-
interval_count: number;
|
|
3209
|
-
}
|
|
3210
|
-
|
|
3211
|
-
namespace Duration {
|
|
3212
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3213
|
-
}
|
|
3214
|
-
|
|
3215
|
-
type Type = 'duration' | 'timestamp';
|
|
3216
|
-
}
|
|
3217
|
-
}
|
|
3218
|
-
|
|
3219
|
-
interface Trial {
|
|
3220
|
-
/**
|
|
3221
|
-
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
|
3222
|
-
*/
|
|
3223
|
-
converts_to?: Array<string>;
|
|
3224
|
-
|
|
3225
|
-
/**
|
|
3226
|
-
* Determines the type of trial for this item.
|
|
3227
|
-
*/
|
|
3228
|
-
type: Trial.Type;
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
|
-
namespace Trial {
|
|
3232
|
-
type Type = 'free' | 'paid';
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3236
|
-
type Type = 'add' | 'remove' | 'set';
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
interface MetadataAction {
|
|
3240
|
-
/**
|
|
3241
|
-
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
3242
|
-
*/
|
|
3243
|
-
add?: {
|
|
3244
|
-
[key: string]: string;
|
|
3245
|
-
};
|
|
3246
|
-
|
|
3247
|
-
/**
|
|
3248
|
-
* Keys to remove from schedule phase metadata.
|
|
3249
|
-
*/
|
|
3250
|
-
remove?: Array<string>;
|
|
3251
|
-
|
|
3252
|
-
/**
|
|
3253
|
-
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
3254
|
-
*/
|
|
3255
|
-
set?: Stripe.Emptyable<{
|
|
3256
|
-
[key: string]: string;
|
|
3257
|
-
}>;
|
|
3258
|
-
|
|
3259
|
-
/**
|
|
3260
|
-
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
3261
|
-
*/
|
|
3262
|
-
type: MetadataAction.Type;
|
|
3263
|
-
}
|
|
3264
|
-
|
|
3265
|
-
namespace MetadataAction {
|
|
3266
|
-
type Type = 'add' | 'remove' | 'set';
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
type ProrationBehavior =
|
|
3270
|
-
| 'always_invoice'
|
|
3271
|
-
| 'create_prorations'
|
|
3272
|
-
| 'none';
|
|
3273
|
-
|
|
3274
|
-
interface SetPauseCollection {
|
|
3275
|
-
/**
|
|
3276
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
3277
|
-
*/
|
|
3278
|
-
set?: SetPauseCollection.Set;
|
|
3279
|
-
|
|
3280
|
-
/**
|
|
3281
|
-
* Determines the type of the pause_collection amendment.
|
|
3282
|
-
*/
|
|
3283
|
-
type: SetPauseCollection.Type;
|
|
3284
|
-
}
|
|
3285
|
-
|
|
3286
|
-
namespace SetPauseCollection {
|
|
3287
|
-
interface Set {
|
|
3288
|
-
/**
|
|
3289
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
3290
|
-
*/
|
|
3291
|
-
behavior: Set.Behavior;
|
|
3292
|
-
}
|
|
3293
|
-
|
|
3294
|
-
namespace Set {
|
|
3295
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
3296
|
-
}
|
|
3297
|
-
|
|
3298
|
-
type Type = 'remove' | 'set';
|
|
3299
|
-
}
|
|
3300
|
-
|
|
3301
|
-
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
3302
|
-
|
|
3303
|
-
interface TrialSettings {
|
|
3304
|
-
/**
|
|
3305
|
-
* Defines how the subscription should behave when a trial ends.
|
|
3306
|
-
*/
|
|
3307
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
3308
|
-
}
|
|
3309
|
-
|
|
3310
|
-
namespace TrialSettings {
|
|
3311
|
-
interface EndBehavior {
|
|
3312
|
-
/**
|
|
3313
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
3314
|
-
*/
|
|
3315
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
3316
|
-
}
|
|
3317
|
-
|
|
3318
|
-
namespace EndBehavior {
|
|
3319
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
3320
|
-
}
|
|
3321
|
-
}
|
|
3322
|
-
}
|
|
3323
|
-
|
|
3324
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
3325
|
-
|
|
3326
2319
|
interface BillingMode {
|
|
2320
|
+
/**
|
|
2321
|
+
* Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
|
2322
|
+
*/
|
|
3327
2323
|
type: BillingMode.Type;
|
|
3328
2324
|
}
|
|
3329
2325
|
|
|
@@ -3389,6 +2385,11 @@ declare module 'stripe' {
|
|
|
3389
2385
|
*/
|
|
3390
2386
|
discounts?: Stripe.Emptyable<Array<Phase.Discount>>;
|
|
3391
2387
|
|
|
2388
|
+
/**
|
|
2389
|
+
* The number of intervals the phase should last. If set, `end_date` must not be set.
|
|
2390
|
+
*/
|
|
2391
|
+
duration?: Phase.Duration;
|
|
2392
|
+
|
|
3392
2393
|
/**
|
|
3393
2394
|
* The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
|
3394
2395
|
*/
|
|
@@ -3405,7 +2406,7 @@ declare module 'stripe' {
|
|
|
3405
2406
|
items: Array<Phase.Item>;
|
|
3406
2407
|
|
|
3407
2408
|
/**
|
|
3408
|
-
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
|
2409
|
+
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
|
3409
2410
|
*/
|
|
3410
2411
|
iterations?: number;
|
|
3411
2412
|
|
|
@@ -3419,11 +2420,6 @@ declare module 'stripe' {
|
|
|
3419
2420
|
*/
|
|
3420
2421
|
on_behalf_of?: string;
|
|
3421
2422
|
|
|
3422
|
-
/**
|
|
3423
|
-
* 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).
|
|
3424
|
-
*/
|
|
3425
|
-
pause_collection?: Phase.PauseCollection;
|
|
3426
|
-
|
|
3427
2423
|
/**
|
|
3428
2424
|
* Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
|
3429
2425
|
*/
|
|
@@ -3444,20 +2440,10 @@ declare module 'stripe' {
|
|
|
3444
2440
|
*/
|
|
3445
2441
|
trial?: boolean;
|
|
3446
2442
|
|
|
3447
|
-
/**
|
|
3448
|
-
* Specify trial behavior when crossing phase boundaries
|
|
3449
|
-
*/
|
|
3450
|
-
trial_continuation?: Phase.TrialContinuation;
|
|
3451
|
-
|
|
3452
2443
|
/**
|
|
3453
2444
|
* Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
|
3454
2445
|
*/
|
|
3455
2446
|
trial_end?: number | 'now';
|
|
3456
|
-
|
|
3457
|
-
/**
|
|
3458
|
-
* Settings related to subscription trials.
|
|
3459
|
-
*/
|
|
3460
|
-
trial_settings?: Phase.TrialSettings;
|
|
3461
2447
|
}
|
|
3462
2448
|
|
|
3463
2449
|
namespace Phase {
|
|
@@ -3500,56 +2486,12 @@ declare module 'stripe' {
|
|
|
3500
2486
|
*/
|
|
3501
2487
|
discount?: string;
|
|
3502
2488
|
|
|
3503
|
-
/**
|
|
3504
|
-
* Details to determine how long the discount should be applied for.
|
|
3505
|
-
*/
|
|
3506
|
-
discount_end?: Discount.DiscountEnd;
|
|
3507
|
-
|
|
3508
2489
|
/**
|
|
3509
2490
|
* ID of the promotion code to create a new discount for.
|
|
3510
2491
|
*/
|
|
3511
2492
|
promotion_code?: string;
|
|
3512
2493
|
}
|
|
3513
2494
|
|
|
3514
|
-
namespace Discount {
|
|
3515
|
-
interface DiscountEnd {
|
|
3516
|
-
/**
|
|
3517
|
-
* Time span for the redeemed discount.
|
|
3518
|
-
*/
|
|
3519
|
-
duration?: DiscountEnd.Duration;
|
|
3520
|
-
|
|
3521
|
-
/**
|
|
3522
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3523
|
-
*/
|
|
3524
|
-
timestamp?: number;
|
|
3525
|
-
|
|
3526
|
-
/**
|
|
3527
|
-
* The type of calculation made to determine when the discount ends.
|
|
3528
|
-
*/
|
|
3529
|
-
type: DiscountEnd.Type;
|
|
3530
|
-
}
|
|
3531
|
-
|
|
3532
|
-
namespace DiscountEnd {
|
|
3533
|
-
interface Duration {
|
|
3534
|
-
/**
|
|
3535
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3536
|
-
*/
|
|
3537
|
-
interval: Duration.Interval;
|
|
3538
|
-
|
|
3539
|
-
/**
|
|
3540
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3541
|
-
*/
|
|
3542
|
-
interval_count: number;
|
|
3543
|
-
}
|
|
3544
|
-
|
|
3545
|
-
namespace Duration {
|
|
3546
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3547
|
-
}
|
|
3548
|
-
|
|
3549
|
-
type Type = 'duration' | 'timestamp';
|
|
3550
|
-
}
|
|
3551
|
-
}
|
|
3552
|
-
|
|
3553
2495
|
interface PriceData {
|
|
3554
2496
|
/**
|
|
3555
2497
|
* 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).
|
|
@@ -3639,54 +2581,26 @@ declare module 'stripe' {
|
|
|
3639
2581
|
*/
|
|
3640
2582
|
discount?: string;
|
|
3641
2583
|
|
|
3642
|
-
/**
|
|
3643
|
-
* Details to determine how long the discount should be applied for.
|
|
3644
|
-
*/
|
|
3645
|
-
discount_end?: Discount.DiscountEnd;
|
|
3646
|
-
|
|
3647
2584
|
/**
|
|
3648
2585
|
* ID of the promotion code to create a new discount for.
|
|
3649
2586
|
*/
|
|
3650
2587
|
promotion_code?: string;
|
|
3651
2588
|
}
|
|
3652
2589
|
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
duration?: DiscountEnd.Duration;
|
|
3659
|
-
|
|
3660
|
-
/**
|
|
3661
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3662
|
-
*/
|
|
3663
|
-
timestamp?: number;
|
|
3664
|
-
|
|
3665
|
-
/**
|
|
3666
|
-
* The type of calculation made to determine when the discount ends.
|
|
3667
|
-
*/
|
|
3668
|
-
type: DiscountEnd.Type;
|
|
3669
|
-
}
|
|
3670
|
-
|
|
3671
|
-
namespace DiscountEnd {
|
|
3672
|
-
interface Duration {
|
|
3673
|
-
/**
|
|
3674
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3675
|
-
*/
|
|
3676
|
-
interval: Duration.Interval;
|
|
3677
|
-
|
|
3678
|
-
/**
|
|
3679
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3680
|
-
*/
|
|
3681
|
-
interval_count: number;
|
|
3682
|
-
}
|
|
2590
|
+
interface Duration {
|
|
2591
|
+
/**
|
|
2592
|
+
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
2593
|
+
*/
|
|
2594
|
+
interval: Duration.Interval;
|
|
3683
2595
|
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
2596
|
+
/**
|
|
2597
|
+
* The multiplier applied to the interval.
|
|
2598
|
+
*/
|
|
2599
|
+
interval_count?: number;
|
|
2600
|
+
}
|
|
3687
2601
|
|
|
3688
|
-
|
|
3689
|
-
|
|
2602
|
+
namespace Duration {
|
|
2603
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3690
2604
|
}
|
|
3691
2605
|
|
|
3692
2606
|
interface InvoiceSettings {
|
|
@@ -3764,11 +2678,6 @@ declare module 'stripe' {
|
|
|
3764
2678
|
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
3765
2679
|
*/
|
|
3766
2680
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3767
|
-
|
|
3768
|
-
/**
|
|
3769
|
-
* Options that configure the trial on the subscription item.
|
|
3770
|
-
*/
|
|
3771
|
-
trial?: Item.Trial;
|
|
3772
2681
|
}
|
|
3773
2682
|
|
|
3774
2683
|
namespace Item {
|
|
@@ -3790,56 +2699,12 @@ declare module 'stripe' {
|
|
|
3790
2699
|
*/
|
|
3791
2700
|
discount?: string;
|
|
3792
2701
|
|
|
3793
|
-
/**
|
|
3794
|
-
* Details to determine how long the discount should be applied for.
|
|
3795
|
-
*/
|
|
3796
|
-
discount_end?: Discount.DiscountEnd;
|
|
3797
|
-
|
|
3798
2702
|
/**
|
|
3799
2703
|
* ID of the promotion code to create a new discount for.
|
|
3800
2704
|
*/
|
|
3801
2705
|
promotion_code?: string;
|
|
3802
2706
|
}
|
|
3803
2707
|
|
|
3804
|
-
namespace Discount {
|
|
3805
|
-
interface DiscountEnd {
|
|
3806
|
-
/**
|
|
3807
|
-
* Time span for the redeemed discount.
|
|
3808
|
-
*/
|
|
3809
|
-
duration?: DiscountEnd.Duration;
|
|
3810
|
-
|
|
3811
|
-
/**
|
|
3812
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3813
|
-
*/
|
|
3814
|
-
timestamp?: number;
|
|
3815
|
-
|
|
3816
|
-
/**
|
|
3817
|
-
* The type of calculation made to determine when the discount ends.
|
|
3818
|
-
*/
|
|
3819
|
-
type: DiscountEnd.Type;
|
|
3820
|
-
}
|
|
3821
|
-
|
|
3822
|
-
namespace DiscountEnd {
|
|
3823
|
-
interface Duration {
|
|
3824
|
-
/**
|
|
3825
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3826
|
-
*/
|
|
3827
|
-
interval: Duration.Interval;
|
|
3828
|
-
|
|
3829
|
-
/**
|
|
3830
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3831
|
-
*/
|
|
3832
|
-
interval_count: number;
|
|
3833
|
-
}
|
|
3834
|
-
|
|
3835
|
-
namespace Duration {
|
|
3836
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3837
|
-
}
|
|
3838
|
-
|
|
3839
|
-
type Type = 'duration' | 'timestamp';
|
|
3840
|
-
}
|
|
3841
|
-
}
|
|
3842
|
-
|
|
3843
2708
|
interface PriceData {
|
|
3844
2709
|
/**
|
|
3845
2710
|
* 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).
|
|
@@ -3891,33 +2756,6 @@ declare module 'stripe' {
|
|
|
3891
2756
|
|
|
3892
2757
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3893
2758
|
}
|
|
3894
|
-
|
|
3895
|
-
interface Trial {
|
|
3896
|
-
/**
|
|
3897
|
-
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
|
3898
|
-
*/
|
|
3899
|
-
converts_to?: Array<string>;
|
|
3900
|
-
|
|
3901
|
-
/**
|
|
3902
|
-
* Determines the type of trial for this item.
|
|
3903
|
-
*/
|
|
3904
|
-
type: Trial.Type;
|
|
3905
|
-
}
|
|
3906
|
-
|
|
3907
|
-
namespace Trial {
|
|
3908
|
-
type Type = 'free' | 'paid';
|
|
3909
|
-
}
|
|
3910
|
-
}
|
|
3911
|
-
|
|
3912
|
-
interface PauseCollection {
|
|
3913
|
-
/**
|
|
3914
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
3915
|
-
*/
|
|
3916
|
-
behavior: PauseCollection.Behavior;
|
|
3917
|
-
}
|
|
3918
|
-
|
|
3919
|
-
namespace PauseCollection {
|
|
3920
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
3921
2759
|
}
|
|
3922
2760
|
|
|
3923
2761
|
type ProrationBehavior =
|
|
@@ -3936,95 +2774,6 @@ declare module 'stripe' {
|
|
|
3936
2774
|
*/
|
|
3937
2775
|
destination: string;
|
|
3938
2776
|
}
|
|
3939
|
-
|
|
3940
|
-
type TrialContinuation = 'continue' | 'none';
|
|
3941
|
-
|
|
3942
|
-
interface TrialSettings {
|
|
3943
|
-
/**
|
|
3944
|
-
* Defines how the subscription should behave when a trial ends.
|
|
3945
|
-
*/
|
|
3946
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
3947
|
-
}
|
|
3948
|
-
|
|
3949
|
-
namespace TrialSettings {
|
|
3950
|
-
interface EndBehavior {
|
|
3951
|
-
/**
|
|
3952
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
3953
|
-
*/
|
|
3954
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
3955
|
-
}
|
|
3956
|
-
|
|
3957
|
-
namespace EndBehavior {
|
|
3958
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
3959
|
-
}
|
|
3960
|
-
}
|
|
3961
|
-
}
|
|
3962
|
-
|
|
3963
|
-
interface Prebilling {
|
|
3964
|
-
/**
|
|
3965
|
-
* The end of the prebilled time period.
|
|
3966
|
-
*/
|
|
3967
|
-
bill_until?: Prebilling.BillUntil;
|
|
3968
|
-
|
|
3969
|
-
/**
|
|
3970
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
3971
|
-
*/
|
|
3972
|
-
iterations?: number;
|
|
3973
|
-
}
|
|
3974
|
-
|
|
3975
|
-
namespace Prebilling {
|
|
3976
|
-
interface BillUntil {
|
|
3977
|
-
/**
|
|
3978
|
-
* End the prebilled period when a specified amendment ends.
|
|
3979
|
-
*/
|
|
3980
|
-
amendment_end?: BillUntil.AmendmentEnd;
|
|
3981
|
-
|
|
3982
|
-
/**
|
|
3983
|
-
* Time span for prebilling, starting from `bill_from`.
|
|
3984
|
-
*/
|
|
3985
|
-
duration?: BillUntil.Duration;
|
|
3986
|
-
|
|
3987
|
-
/**
|
|
3988
|
-
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
3989
|
-
*/
|
|
3990
|
-
timestamp?: number;
|
|
3991
|
-
|
|
3992
|
-
/**
|
|
3993
|
-
* Select one of several ways to pass the `bill_until` value.
|
|
3994
|
-
*/
|
|
3995
|
-
type: BillUntil.Type;
|
|
3996
|
-
}
|
|
3997
|
-
|
|
3998
|
-
namespace BillUntil {
|
|
3999
|
-
interface AmendmentEnd {
|
|
4000
|
-
/**
|
|
4001
|
-
* The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
|
|
4002
|
-
*/
|
|
4003
|
-
index: number;
|
|
4004
|
-
}
|
|
4005
|
-
|
|
4006
|
-
interface Duration {
|
|
4007
|
-
/**
|
|
4008
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4009
|
-
*/
|
|
4010
|
-
interval: Duration.Interval;
|
|
4011
|
-
|
|
4012
|
-
/**
|
|
4013
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4014
|
-
*/
|
|
4015
|
-
interval_count: number;
|
|
4016
|
-
}
|
|
4017
|
-
|
|
4018
|
-
namespace Duration {
|
|
4019
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
|
-
type Type =
|
|
4023
|
-
| 'amendment_end'
|
|
4024
|
-
| 'duration'
|
|
4025
|
-
| 'schedule_end'
|
|
4026
|
-
| 'timestamp';
|
|
4027
|
-
}
|
|
4028
2777
|
}
|
|
4029
2778
|
|
|
4030
2779
|
type ProrationBehavior =
|
|
@@ -4069,11 +2818,6 @@ declare module 'stripe' {
|
|
|
4069
2818
|
*/
|
|
4070
2819
|
items?: Array<SubscriptionDetails.Item>;
|
|
4071
2820
|
|
|
4072
|
-
/**
|
|
4073
|
-
* The pre-billing to apply to the subscription as a preview.
|
|
4074
|
-
*/
|
|
4075
|
-
prebilling?: SubscriptionDetails.Prebilling;
|
|
4076
|
-
|
|
4077
2821
|
/**
|
|
4078
2822
|
* Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
|
4079
2823
|
*/
|
|
@@ -4104,6 +2848,9 @@ declare module 'stripe' {
|
|
|
4104
2848
|
type BillingCycleAnchor = 'now' | 'unchanged';
|
|
4105
2849
|
|
|
4106
2850
|
interface BillingMode {
|
|
2851
|
+
/**
|
|
2852
|
+
* Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
|
2853
|
+
*/
|
|
4107
2854
|
type: BillingMode.Type;
|
|
4108
2855
|
}
|
|
4109
2856
|
|
|
@@ -4189,56 +2936,12 @@ declare module 'stripe' {
|
|
|
4189
2936
|
*/
|
|
4190
2937
|
discount?: string;
|
|
4191
2938
|
|
|
4192
|
-
/**
|
|
4193
|
-
* Details to determine how long the discount should be applied for.
|
|
4194
|
-
*/
|
|
4195
|
-
discount_end?: Discount.DiscountEnd;
|
|
4196
|
-
|
|
4197
2939
|
/**
|
|
4198
2940
|
* ID of the promotion code to create a new discount for.
|
|
4199
2941
|
*/
|
|
4200
2942
|
promotion_code?: string;
|
|
4201
2943
|
}
|
|
4202
2944
|
|
|
4203
|
-
namespace Discount {
|
|
4204
|
-
interface DiscountEnd {
|
|
4205
|
-
/**
|
|
4206
|
-
* Time span for the redeemed discount.
|
|
4207
|
-
*/
|
|
4208
|
-
duration?: DiscountEnd.Duration;
|
|
4209
|
-
|
|
4210
|
-
/**
|
|
4211
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4212
|
-
*/
|
|
4213
|
-
timestamp?: number;
|
|
4214
|
-
|
|
4215
|
-
/**
|
|
4216
|
-
* The type of calculation made to determine when the discount ends.
|
|
4217
|
-
*/
|
|
4218
|
-
type: DiscountEnd.Type;
|
|
4219
|
-
}
|
|
4220
|
-
|
|
4221
|
-
namespace DiscountEnd {
|
|
4222
|
-
interface Duration {
|
|
4223
|
-
/**
|
|
4224
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4225
|
-
*/
|
|
4226
|
-
interval: Duration.Interval;
|
|
4227
|
-
|
|
4228
|
-
/**
|
|
4229
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4230
|
-
*/
|
|
4231
|
-
interval_count: number;
|
|
4232
|
-
}
|
|
4233
|
-
|
|
4234
|
-
namespace Duration {
|
|
4235
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4236
|
-
}
|
|
4237
|
-
|
|
4238
|
-
type Type = 'duration' | 'timestamp';
|
|
4239
|
-
}
|
|
4240
|
-
}
|
|
4241
|
-
|
|
4242
2945
|
interface PriceData {
|
|
4243
2946
|
/**
|
|
4244
2947
|
* 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).
|
|
@@ -4292,13 +2995,6 @@ declare module 'stripe' {
|
|
|
4292
2995
|
}
|
|
4293
2996
|
}
|
|
4294
2997
|
|
|
4295
|
-
interface Prebilling {
|
|
4296
|
-
/**
|
|
4297
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
4298
|
-
*/
|
|
4299
|
-
iterations: number;
|
|
4300
|
-
}
|
|
4301
|
-
|
|
4302
2998
|
type ProrationBehavior =
|
|
4303
2999
|
| 'always_invoice'
|
|
4304
3000
|
| 'create_prorations'
|
|
@@ -4483,11 +3179,6 @@ declare module 'stripe' {
|
|
|
4483
3179
|
*/
|
|
4484
3180
|
id: string;
|
|
4485
3181
|
|
|
4486
|
-
/**
|
|
4487
|
-
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
4488
|
-
*/
|
|
4489
|
-
margins?: Stripe.Emptyable<Array<string>>;
|
|
4490
|
-
|
|
4491
3182
|
/**
|
|
4492
3183
|
* 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
|
4493
3184
|
*/
|
|
@@ -4536,56 +3227,12 @@ declare module 'stripe' {
|
|
|
4536
3227
|
*/
|
|
4537
3228
|
discount?: string;
|
|
4538
3229
|
|
|
4539
|
-
/**
|
|
4540
|
-
* Details to determine how long the discount should be applied for.
|
|
4541
|
-
*/
|
|
4542
|
-
discount_end?: Discount.DiscountEnd;
|
|
4543
|
-
|
|
4544
3230
|
/**
|
|
4545
3231
|
* ID of the promotion code to create a new discount for.
|
|
4546
3232
|
*/
|
|
4547
3233
|
promotion_code?: string;
|
|
4548
3234
|
}
|
|
4549
3235
|
|
|
4550
|
-
namespace Discount {
|
|
4551
|
-
interface DiscountEnd {
|
|
4552
|
-
/**
|
|
4553
|
-
* Time span for the redeemed discount.
|
|
4554
|
-
*/
|
|
4555
|
-
duration?: DiscountEnd.Duration;
|
|
4556
|
-
|
|
4557
|
-
/**
|
|
4558
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4559
|
-
*/
|
|
4560
|
-
timestamp?: number;
|
|
4561
|
-
|
|
4562
|
-
/**
|
|
4563
|
-
* The type of calculation made to determine when the discount ends.
|
|
4564
|
-
*/
|
|
4565
|
-
type: DiscountEnd.Type;
|
|
4566
|
-
}
|
|
4567
|
-
|
|
4568
|
-
namespace DiscountEnd {
|
|
4569
|
-
interface Duration {
|
|
4570
|
-
/**
|
|
4571
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4572
|
-
*/
|
|
4573
|
-
interval: Duration.Interval;
|
|
4574
|
-
|
|
4575
|
-
/**
|
|
4576
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4577
|
-
*/
|
|
4578
|
-
interval_count: number;
|
|
4579
|
-
}
|
|
4580
|
-
|
|
4581
|
-
namespace Duration {
|
|
4582
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4583
|
-
}
|
|
4584
|
-
|
|
4585
|
-
type Type = 'duration' | 'timestamp';
|
|
4586
|
-
}
|
|
4587
|
-
}
|
|
4588
|
-
|
|
4589
3236
|
interface Period {
|
|
4590
3237
|
/**
|
|
4591
3238
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -4812,11 +3459,6 @@ declare module 'stripe' {
|
|
|
4812
3459
|
*/
|
|
4813
3460
|
expand?: Array<string>;
|
|
4814
3461
|
|
|
4815
|
-
/**
|
|
4816
|
-
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
4817
|
-
*/
|
|
4818
|
-
margins?: Stripe.Emptyable<Array<string>>;
|
|
4819
|
-
|
|
4820
3462
|
/**
|
|
4821
3463
|
* 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
|
4822
3464
|
*/
|
|
@@ -4867,56 +3509,12 @@ declare module 'stripe' {
|
|
|
4867
3509
|
*/
|
|
4868
3510
|
discount?: string;
|
|
4869
3511
|
|
|
4870
|
-
/**
|
|
4871
|
-
* Details to determine how long the discount should be applied for.
|
|
4872
|
-
*/
|
|
4873
|
-
discount_end?: Discount.DiscountEnd;
|
|
4874
|
-
|
|
4875
3512
|
/**
|
|
4876
3513
|
* ID of the promotion code to create a new discount for.
|
|
4877
3514
|
*/
|
|
4878
3515
|
promotion_code?: string;
|
|
4879
3516
|
}
|
|
4880
3517
|
|
|
4881
|
-
namespace Discount {
|
|
4882
|
-
interface DiscountEnd {
|
|
4883
|
-
/**
|
|
4884
|
-
* Time span for the redeemed discount.
|
|
4885
|
-
*/
|
|
4886
|
-
duration?: DiscountEnd.Duration;
|
|
4887
|
-
|
|
4888
|
-
/**
|
|
4889
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4890
|
-
*/
|
|
4891
|
-
timestamp?: number;
|
|
4892
|
-
|
|
4893
|
-
/**
|
|
4894
|
-
* The type of calculation made to determine when the discount ends.
|
|
4895
|
-
*/
|
|
4896
|
-
type: DiscountEnd.Type;
|
|
4897
|
-
}
|
|
4898
|
-
|
|
4899
|
-
namespace DiscountEnd {
|
|
4900
|
-
interface Duration {
|
|
4901
|
-
/**
|
|
4902
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4903
|
-
*/
|
|
4904
|
-
interval: Duration.Interval;
|
|
4905
|
-
|
|
4906
|
-
/**
|
|
4907
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4908
|
-
*/
|
|
4909
|
-
interval_count: number;
|
|
4910
|
-
}
|
|
4911
|
-
|
|
4912
|
-
namespace Duration {
|
|
4913
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4914
|
-
}
|
|
4915
|
-
|
|
4916
|
-
type Type = 'duration' | 'timestamp';
|
|
4917
|
-
}
|
|
4918
|
-
}
|
|
4919
|
-
|
|
4920
3518
|
interface Period {
|
|
4921
3519
|
/**
|
|
4922
3520
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|