stripe 18.4.0 → 18.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1322 -37
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/Error.js +107 -1
- package/cjs/apiVersion.js +2 -3
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/BalanceSettings.js +10 -0
- package/cjs/resources/Billing/MeterUsage.js +12 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/ExternalAccounts.js +23 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/FxQuotes.js +15 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +4 -4
- package/cjs/resources/PaymentIntents.js +13 -0
- package/cjs/resources/PaymentRecords.js +29 -0
- package/cjs/resources/Privacy/RedactionJobs.js +42 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/OnboardingLinks.js +12 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/V2/Core/AccountLinks.js +9 -0
- package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
- package/cjs/resources/V2/Core/Accounts.js +25 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +28 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +24 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +25 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
- package/cjs/resources/V2/Payments/OffSessionPayments.js +25 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
- package/cjs/resources.js +102 -10
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +93 -0
- package/esm/apiVersion.js +1 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/BalanceSettings.js +7 -0
- package/esm/resources/Billing/MeterUsage.js +9 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/ExternalAccounts.js +20 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/FxQuotes.js +12 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +3 -3
- package/esm/resources/PaymentIntents.js +13 -0
- package/esm/resources/PaymentRecords.js +26 -0
- package/esm/resources/Privacy/RedactionJobs.js +39 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/OnboardingLinks.js +9 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/V2/Core/AccountLinks.js +6 -0
- package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
- package/esm/resources/V2/Core/Accounts.js +22 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +25 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +21 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +22 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
- package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
- package/esm/resources/V2/Payments/OffSessionPayments.js +22 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
- package/esm/resources.js +86 -1
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +45 -0
- package/types/AccountSessionsResource.d.ts +264 -0
- package/types/Accounts.d.ts +212 -1
- package/types/AccountsResource.d.ts +544 -0
- package/types/BalanceSettings.d.ts +91 -0
- package/types/BalanceSettingsResource.d.ts +110 -0
- package/types/Billing/CreditBalanceSummary.d.ts +5 -0
- package/types/Billing/CreditBalanceSummaryResource.d.ts +8 -3
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
- package/types/Billing/CreditGrants.d.ts +5 -0
- package/types/Billing/CreditGrantsResource.d.ts +11 -1
- package/types/Billing/MeterUsage.d.ts +32 -0
- package/types/Billing/MeterUsageResource.d.ts +685 -0
- package/types/Billing/MeterUsageRows.d.ts +49 -0
- package/types/BillingPortal/Sessions.d.ts +5 -0
- package/types/BillingPortal/SessionsResource.d.ts +12 -4
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Cards.d.ts +5 -0
- package/types/CashBalances.d.ts +5 -0
- package/types/Charges.d.ts +166 -0
- package/types/ChargesResource.d.ts +1406 -0
- package/types/Checkout/Sessions.d.ts +314 -1
- package/types/Checkout/SessionsResource.d.ts +414 -1
- package/types/ConfirmationTokens.d.ts +125 -0
- package/types/Coupons.d.ts +33 -0
- package/types/CouponsResource.d.ts +21 -0
- package/types/CreditNoteLineItems.d.ts +17 -0
- package/types/CreditNotes.d.ts +5 -0
- package/types/CreditNotesResource.d.ts +5 -0
- package/types/CustomerBalanceTransactions.d.ts +2 -0
- package/types/CustomerCashBalanceTransactions.d.ts +2 -0
- package/types/CustomerSessions.d.ts +5 -0
- package/types/CustomerSessionsResource.d.ts +6 -1
- package/types/Customers.d.ts +2 -0
- package/types/CustomersResource.d.ts +8 -0
- package/types/Discounts.d.ts +10 -0
- package/types/Disputes.d.ts +29 -0
- package/types/Errors.d.ts +81 -2
- package/types/EventTypes.d.ts +664 -0
- package/types/Events.d.ts +97 -0
- package/types/ExternalAccountsResource.d.ts +304 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +36 -1
- package/types/FinancialConnections/AccountsResource.d.ts +40 -3
- package/types/FinancialConnections/Institutions.d.ts +98 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +51 -1
- package/types/FinancialConnections/SessionsResource.d.ts +43 -1
- package/types/FxQuotes.d.ts +155 -0
- package/types/FxQuotesResource.d.ts +130 -0
- package/types/Identity/VerificationSessions.d.ts +5 -0
- package/types/Identity/VerificationSessionsResource.d.ts +7 -0
- package/types/InvoiceItems.d.ts +10 -0
- package/types/InvoiceItemsResource.d.ts +117 -6
- package/types/InvoiceLineItems.d.ts +45 -1
- package/types/InvoicePayments.d.ts +5 -0
- package/types/Invoices.d.ts +171 -3
- package/types/InvoicesResource.d.ts +1537 -26
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/Settlements.d.ts +113 -0
- package/types/Issuing/Transactions.d.ts +5 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +49 -0
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1163 -0
- package/types/OrdersResource.d.ts +3139 -0
- package/types/PaymentAttemptRecords.d.ts +2166 -0
- package/types/PaymentAttemptRecordsResource.d.ts +47 -0
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +116 -0
- package/types/PaymentIntents.d.ts +768 -2
- package/types/PaymentIntentsResource.d.ts +11341 -5700
- package/types/PaymentLinks.d.ts +6 -0
- package/types/PaymentLinksResource.d.ts +12 -0
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
- package/types/PaymentMethods.d.ts +125 -0
- package/types/PaymentMethodsResource.d.ts +167 -2
- package/types/PaymentRecords.d.ts +2159 -0
- package/types/PaymentRecordsResource.d.ts +455 -0
- package/types/Payouts.d.ts +5 -0
- package/types/PayoutsResource.d.ts +5 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
- package/types/Privacy/RedactionJobs.d.ts +111 -0
- package/types/Privacy/RedactionJobsResource.d.ts +230 -0
- package/types/PromotionCodes.d.ts +5 -0
- package/types/PromotionCodesResource.d.ts +10 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1734 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +845 -0
- package/types/Quotes.d.ts +594 -1
- package/types/QuotesResource.d.ts +2577 -232
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +47 -1
- package/types/SetupIntents.d.ts +118 -2
- package/types/SetupIntentsResource.d.ts +730 -3
- package/types/Sources.d.ts +29 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +205 -0
- package/types/SubscriptionSchedulesResource.d.ts +1237 -9
- package/types/Subscriptions.d.ts +135 -1
- package/types/SubscriptionsResource.d.ts +472 -8
- package/types/Tax/Associations.d.ts +82 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/TaxIds.d.ts +10 -0
- package/types/TaxIdsResource.d.ts +10 -0
- package/types/Terminal/OnboardingLinks.d.ts +57 -0
- package/types/Terminal/OnboardingLinksResource.d.ts +62 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +20 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Transfers.d.ts +5 -0
- package/types/TransfersResource.d.ts +5 -0
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/V2/Core/AccountLinks.d.ts +168 -0
- package/types/V2/Core/AccountLinksResource.d.ts +152 -0
- package/types/V2/Core/Accounts/PersonsResource.d.ts +3780 -0
- package/types/V2/Core/Accounts.d.ts +8813 -0
- package/types/V2/Core/AccountsResource.d.ts +10626 -0
- package/types/V2/Core/Persons.d.ts +1872 -0
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +172 -0
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +70 -0
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +123 -0
- package/types/V2/EventTypes.d.ts +965 -5
- package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
- package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +580 -0
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +326 -0
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +314 -0
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +289 -0
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +206 -0
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +168 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +278 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +242 -0
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +296 -0
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +251 -0
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +208 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +160 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +87 -0
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +262 -0
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +176 -0
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +155 -0
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
- package/types/V2/MoneyManagement/Transactions.d.ts +170 -0
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
- package/types/V2/Payments/OffSessionPayments.d.ts +179 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +174 -0
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +68 -0
- package/types/WebhookEndpointsResource.d.ts +78 -0
- package/types/index.d.ts +145 -2
- package/types/lib.d.ts +11 -1
- package/types/test/typescriptTest.ts +3 -3
- package/types/InvoicePaymentsResource.d.ts +0 -74
|
@@ -8,6 +8,11 @@ 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
|
+
|
|
11
16
|
/**
|
|
12
17
|
* 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).
|
|
13
18
|
*/
|
|
@@ -48,11 +53,21 @@ declare module 'stripe' {
|
|
|
48
53
|
*/
|
|
49
54
|
customer?: string;
|
|
50
55
|
|
|
56
|
+
/**
|
|
57
|
+
* The ID of the account who will be billed.
|
|
58
|
+
*/
|
|
59
|
+
customer_account?: string;
|
|
60
|
+
|
|
51
61
|
/**
|
|
52
62
|
* The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
|
53
63
|
*/
|
|
54
64
|
days_until_due?: number;
|
|
55
65
|
|
|
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
|
+
|
|
56
71
|
/**
|
|
57
72
|
* 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.
|
|
58
73
|
*/
|
|
@@ -165,6 +180,28 @@ declare module 'stripe' {
|
|
|
165
180
|
}
|
|
166
181
|
|
|
167
182
|
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
|
+
|
|
168
205
|
interface AutomaticTax {
|
|
169
206
|
/**
|
|
170
207
|
* 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.
|
|
@@ -220,12 +257,56 @@ declare module 'stripe' {
|
|
|
220
257
|
*/
|
|
221
258
|
discount?: string;
|
|
222
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Details to determine how long the discount should be applied for.
|
|
262
|
+
*/
|
|
263
|
+
discount_end?: Discount.DiscountEnd;
|
|
264
|
+
|
|
223
265
|
/**
|
|
224
266
|
* ID of the promotion code to create a new discount for.
|
|
225
267
|
*/
|
|
226
268
|
promotion_code?: string;
|
|
227
269
|
}
|
|
228
270
|
|
|
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
|
+
|
|
229
310
|
interface FromInvoice {
|
|
230
311
|
/**
|
|
231
312
|
* The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
|
|
@@ -297,6 +378,13 @@ declare module 'stripe' {
|
|
|
297
378
|
PaymentMethodOptions.CustomerBalance
|
|
298
379
|
>;
|
|
299
380
|
|
|
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
|
+
|
|
300
388
|
/**
|
|
301
389
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
302
390
|
*/
|
|
@@ -307,6 +395,11 @@ declare module 'stripe' {
|
|
|
307
395
|
*/
|
|
308
396
|
sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
|
|
309
397
|
|
|
398
|
+
/**
|
|
399
|
+
* If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
|
|
400
|
+
*/
|
|
401
|
+
upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
|
|
402
|
+
|
|
310
403
|
/**
|
|
311
404
|
* If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
|
|
312
405
|
*/
|
|
@@ -444,10 +537,47 @@ declare module 'stripe' {
|
|
|
444
537
|
}
|
|
445
538
|
}
|
|
446
539
|
|
|
540
|
+
interface IdBankTransfer {}
|
|
541
|
+
|
|
447
542
|
interface Konbini {}
|
|
448
543
|
|
|
449
544
|
interface SepaDebit {}
|
|
450
545
|
|
|
546
|
+
interface Upi {
|
|
547
|
+
/**
|
|
548
|
+
* Configuration options for setting up an eMandate
|
|
549
|
+
*/
|
|
550
|
+
mandate_options?: Upi.MandateOptions;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
namespace Upi {
|
|
554
|
+
interface MandateOptions {
|
|
555
|
+
/**
|
|
556
|
+
* Amount to be charged for future payments.
|
|
557
|
+
*/
|
|
558
|
+
amount?: number;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
|
562
|
+
*/
|
|
563
|
+
amount_type?: MandateOptions.AmountType;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* A description of the mandate or subscription that is meant to be displayed to the customer.
|
|
567
|
+
*/
|
|
568
|
+
description?: string;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
|
572
|
+
*/
|
|
573
|
+
end_date?: number;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
namespace MandateOptions {
|
|
577
|
+
type AmountType = 'fixed' | 'maximum';
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
451
581
|
interface UsBankAccount {
|
|
452
582
|
/**
|
|
453
583
|
* Additional fields for Financial Connections Session creation
|
|
@@ -484,6 +614,11 @@ declare module 'stripe' {
|
|
|
484
614
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
485
615
|
*/
|
|
486
616
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
620
|
+
*/
|
|
621
|
+
institution?: string;
|
|
487
622
|
}
|
|
488
623
|
|
|
489
624
|
namespace Filters {
|
|
@@ -496,7 +631,11 @@ declare module 'stripe' {
|
|
|
496
631
|
| 'payment_method'
|
|
497
632
|
| 'transactions';
|
|
498
633
|
|
|
499
|
-
type Prefetch =
|
|
634
|
+
type Prefetch =
|
|
635
|
+
| 'balances'
|
|
636
|
+
| 'inferred_balances'
|
|
637
|
+
| 'ownership'
|
|
638
|
+
| 'transactions';
|
|
500
639
|
}
|
|
501
640
|
|
|
502
641
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -516,11 +655,13 @@ declare module 'stripe' {
|
|
|
516
655
|
| 'card'
|
|
517
656
|
| 'cashapp'
|
|
518
657
|
| 'crypto'
|
|
658
|
+
| 'custom'
|
|
519
659
|
| 'customer_balance'
|
|
520
660
|
| 'eps'
|
|
521
661
|
| 'fpx'
|
|
522
662
|
| 'giropay'
|
|
523
663
|
| 'grabpay'
|
|
664
|
+
| 'id_bank_transfer'
|
|
524
665
|
| 'ideal'
|
|
525
666
|
| 'jp_credit_transfer'
|
|
526
667
|
| 'kakao_pay'
|
|
@@ -540,7 +681,9 @@ declare module 'stripe' {
|
|
|
540
681
|
| 'sepa_credit_transfer'
|
|
541
682
|
| 'sepa_debit'
|
|
542
683
|
| 'sofort'
|
|
684
|
+
| 'stripe_balance'
|
|
543
685
|
| 'swish'
|
|
686
|
+
| 'upi'
|
|
544
687
|
| 'us_bank_account'
|
|
545
688
|
| 'wechat_pay';
|
|
546
689
|
}
|
|
@@ -767,6 +910,11 @@ declare module 'stripe' {
|
|
|
767
910
|
*/
|
|
768
911
|
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
769
912
|
|
|
913
|
+
/**
|
|
914
|
+
* List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
|
915
|
+
*/
|
|
916
|
+
amounts_due?: Stripe.Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
|
|
917
|
+
|
|
770
918
|
/**
|
|
771
919
|
* 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).
|
|
772
920
|
*/
|
|
@@ -802,6 +950,11 @@ declare module 'stripe' {
|
|
|
802
950
|
*/
|
|
803
951
|
days_until_due?: number;
|
|
804
952
|
|
|
953
|
+
/**
|
|
954
|
+
* The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
|
955
|
+
*/
|
|
956
|
+
default_margins?: Stripe.Emptyable<Array<string>>;
|
|
957
|
+
|
|
805
958
|
/**
|
|
806
959
|
* 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.
|
|
807
960
|
*/
|
|
@@ -899,6 +1052,28 @@ declare module 'stripe' {
|
|
|
899
1052
|
}
|
|
900
1053
|
|
|
901
1054
|
namespace InvoiceUpdateParams {
|
|
1055
|
+
interface AmountsDue {
|
|
1056
|
+
/**
|
|
1057
|
+
* The amount in cents (or local equivalent).
|
|
1058
|
+
*/
|
|
1059
|
+
amount: number;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Number of days from when invoice is finalized until the payment is due.
|
|
1063
|
+
*/
|
|
1064
|
+
days_until_due?: number;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
1068
|
+
*/
|
|
1069
|
+
description: string;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Date on which a payment plan's payment is due.
|
|
1073
|
+
*/
|
|
1074
|
+
due_date?: number;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
902
1077
|
interface AutomaticTax {
|
|
903
1078
|
/**
|
|
904
1079
|
* 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.
|
|
@@ -954,12 +1129,56 @@ declare module 'stripe' {
|
|
|
954
1129
|
*/
|
|
955
1130
|
discount?: string;
|
|
956
1131
|
|
|
1132
|
+
/**
|
|
1133
|
+
* Details to determine how long the discount should be applied for.
|
|
1134
|
+
*/
|
|
1135
|
+
discount_end?: Discount.DiscountEnd;
|
|
1136
|
+
|
|
957
1137
|
/**
|
|
958
1138
|
* ID of the promotion code to create a new discount for.
|
|
959
1139
|
*/
|
|
960
1140
|
promotion_code?: string;
|
|
961
1141
|
}
|
|
962
1142
|
|
|
1143
|
+
namespace Discount {
|
|
1144
|
+
interface DiscountEnd {
|
|
1145
|
+
/**
|
|
1146
|
+
* Time span for the redeemed discount.
|
|
1147
|
+
*/
|
|
1148
|
+
duration?: DiscountEnd.Duration;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1152
|
+
*/
|
|
1153
|
+
timestamp?: number;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* The type of calculation made to determine when the discount ends.
|
|
1157
|
+
*/
|
|
1158
|
+
type: DiscountEnd.Type;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
namespace DiscountEnd {
|
|
1162
|
+
interface Duration {
|
|
1163
|
+
/**
|
|
1164
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1165
|
+
*/
|
|
1166
|
+
interval: Duration.Interval;
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1170
|
+
*/
|
|
1171
|
+
interval_count: number;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
namespace Duration {
|
|
1175
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
type Type = 'duration' | 'timestamp';
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
963
1182
|
interface Issuer {
|
|
964
1183
|
/**
|
|
965
1184
|
* The connected account being referenced when `type` is `account`.
|
|
@@ -1019,6 +1238,13 @@ declare module 'stripe' {
|
|
|
1019
1238
|
PaymentMethodOptions.CustomerBalance
|
|
1020
1239
|
>;
|
|
1021
1240
|
|
|
1241
|
+
/**
|
|
1242
|
+
* 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.
|
|
1243
|
+
*/
|
|
1244
|
+
id_bank_transfer?: Stripe.Emptyable<
|
|
1245
|
+
PaymentMethodOptions.IdBankTransfer
|
|
1246
|
+
>;
|
|
1247
|
+
|
|
1022
1248
|
/**
|
|
1023
1249
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
1024
1250
|
*/
|
|
@@ -1029,6 +1255,11 @@ declare module 'stripe' {
|
|
|
1029
1255
|
*/
|
|
1030
1256
|
sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
|
|
1031
1257
|
|
|
1258
|
+
/**
|
|
1259
|
+
* If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
|
|
1260
|
+
*/
|
|
1261
|
+
upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
|
|
1262
|
+
|
|
1032
1263
|
/**
|
|
1033
1264
|
* If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
|
|
1034
1265
|
*/
|
|
@@ -1166,10 +1397,47 @@ declare module 'stripe' {
|
|
|
1166
1397
|
}
|
|
1167
1398
|
}
|
|
1168
1399
|
|
|
1400
|
+
interface IdBankTransfer {}
|
|
1401
|
+
|
|
1169
1402
|
interface Konbini {}
|
|
1170
1403
|
|
|
1171
1404
|
interface SepaDebit {}
|
|
1172
1405
|
|
|
1406
|
+
interface Upi {
|
|
1407
|
+
/**
|
|
1408
|
+
* Configuration options for setting up an eMandate
|
|
1409
|
+
*/
|
|
1410
|
+
mandate_options?: Upi.MandateOptions;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
namespace Upi {
|
|
1414
|
+
interface MandateOptions {
|
|
1415
|
+
/**
|
|
1416
|
+
* Amount to be charged for future payments.
|
|
1417
|
+
*/
|
|
1418
|
+
amount?: number;
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
|
1422
|
+
*/
|
|
1423
|
+
amount_type?: MandateOptions.AmountType;
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* A description of the mandate or subscription that is meant to be displayed to the customer.
|
|
1427
|
+
*/
|
|
1428
|
+
description?: string;
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
|
1432
|
+
*/
|
|
1433
|
+
end_date?: number;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
namespace MandateOptions {
|
|
1437
|
+
type AmountType = 'fixed' | 'maximum';
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1173
1441
|
interface UsBankAccount {
|
|
1174
1442
|
/**
|
|
1175
1443
|
* Additional fields for Financial Connections Session creation
|
|
@@ -1206,6 +1474,11 @@ declare module 'stripe' {
|
|
|
1206
1474
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
1207
1475
|
*/
|
|
1208
1476
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
1480
|
+
*/
|
|
1481
|
+
institution?: string;
|
|
1209
1482
|
}
|
|
1210
1483
|
|
|
1211
1484
|
namespace Filters {
|
|
@@ -1218,7 +1491,11 @@ declare module 'stripe' {
|
|
|
1218
1491
|
| 'payment_method'
|
|
1219
1492
|
| 'transactions';
|
|
1220
1493
|
|
|
1221
|
-
type Prefetch =
|
|
1494
|
+
type Prefetch =
|
|
1495
|
+
| 'balances'
|
|
1496
|
+
| 'inferred_balances'
|
|
1497
|
+
| 'ownership'
|
|
1498
|
+
| 'transactions';
|
|
1222
1499
|
}
|
|
1223
1500
|
|
|
1224
1501
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1238,11 +1515,13 @@ declare module 'stripe' {
|
|
|
1238
1515
|
| 'card'
|
|
1239
1516
|
| 'cashapp'
|
|
1240
1517
|
| 'crypto'
|
|
1518
|
+
| 'custom'
|
|
1241
1519
|
| 'customer_balance'
|
|
1242
1520
|
| 'eps'
|
|
1243
1521
|
| 'fpx'
|
|
1244
1522
|
| 'giropay'
|
|
1245
1523
|
| 'grabpay'
|
|
1524
|
+
| 'id_bank_transfer'
|
|
1246
1525
|
| 'ideal'
|
|
1247
1526
|
| 'jp_credit_transfer'
|
|
1248
1527
|
| 'kakao_pay'
|
|
@@ -1262,7 +1541,9 @@ declare module 'stripe' {
|
|
|
1262
1541
|
| 'sepa_credit_transfer'
|
|
1263
1542
|
| 'sepa_debit'
|
|
1264
1543
|
| 'sofort'
|
|
1544
|
+
| 'stripe_balance'
|
|
1265
1545
|
| 'swish'
|
|
1546
|
+
| 'upi'
|
|
1266
1547
|
| 'us_bank_account'
|
|
1267
1548
|
| 'wechat_pay';
|
|
1268
1549
|
}
|
|
@@ -1490,6 +1771,11 @@ declare module 'stripe' {
|
|
|
1490
1771
|
*/
|
|
1491
1772
|
customer?: string;
|
|
1492
1773
|
|
|
1774
|
+
/**
|
|
1775
|
+
* Only return invoices for the account specified by this account ID.
|
|
1776
|
+
*/
|
|
1777
|
+
customer_account?: string;
|
|
1778
|
+
|
|
1493
1779
|
due_date?: Stripe.RangeQueryParam | number;
|
|
1494
1780
|
|
|
1495
1781
|
/**
|
|
@@ -1562,6 +1848,11 @@ declare module 'stripe' {
|
|
|
1562
1848
|
*/
|
|
1563
1849
|
invoice_item?: string;
|
|
1564
1850
|
|
|
1851
|
+
/**
|
|
1852
|
+
* 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.
|
|
1853
|
+
*/
|
|
1854
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
1855
|
+
|
|
1565
1856
|
/**
|
|
1566
1857
|
* 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`.
|
|
1567
1858
|
*/
|
|
@@ -1610,12 +1901,56 @@ declare module 'stripe' {
|
|
|
1610
1901
|
*/
|
|
1611
1902
|
discount?: string;
|
|
1612
1903
|
|
|
1904
|
+
/**
|
|
1905
|
+
* Details to determine how long the discount should be applied for.
|
|
1906
|
+
*/
|
|
1907
|
+
discount_end?: Discount.DiscountEnd;
|
|
1908
|
+
|
|
1613
1909
|
/**
|
|
1614
1910
|
* ID of the promotion code to create a new discount for.
|
|
1615
1911
|
*/
|
|
1616
1912
|
promotion_code?: string;
|
|
1617
1913
|
}
|
|
1618
1914
|
|
|
1915
|
+
namespace Discount {
|
|
1916
|
+
interface DiscountEnd {
|
|
1917
|
+
/**
|
|
1918
|
+
* Time span for the redeemed discount.
|
|
1919
|
+
*/
|
|
1920
|
+
duration?: DiscountEnd.Duration;
|
|
1921
|
+
|
|
1922
|
+
/**
|
|
1923
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1924
|
+
*/
|
|
1925
|
+
timestamp?: number;
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* The type of calculation made to determine when the discount ends.
|
|
1929
|
+
*/
|
|
1930
|
+
type: DiscountEnd.Type;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
namespace DiscountEnd {
|
|
1934
|
+
interface Duration {
|
|
1935
|
+
/**
|
|
1936
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1937
|
+
*/
|
|
1938
|
+
interval: Duration.Interval;
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1942
|
+
*/
|
|
1943
|
+
interval_count: number;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
namespace Duration {
|
|
1947
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
type Type = 'duration' | 'timestamp';
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1619
1954
|
interface Period {
|
|
1620
1955
|
/**
|
|
1621
1956
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -1817,6 +2152,11 @@ declare module 'stripe' {
|
|
|
1817
2152
|
}
|
|
1818
2153
|
|
|
1819
2154
|
interface InvoiceAttachPaymentParams {
|
|
2155
|
+
/**
|
|
2156
|
+
* The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
|
2157
|
+
*/
|
|
2158
|
+
amount_requested?: number;
|
|
2159
|
+
|
|
1820
2160
|
/**
|
|
1821
2161
|
* Specifies which fields in the response should be expanded.
|
|
1822
2162
|
*/
|
|
@@ -1826,6 +2166,50 @@ declare module 'stripe' {
|
|
|
1826
2166
|
* The ID of the PaymentIntent to attach to the invoice.
|
|
1827
2167
|
*/
|
|
1828
2168
|
payment_intent?: string;
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* The ID of the PaymentRecord to attach to the invoice.
|
|
2172
|
+
*/
|
|
2173
|
+
payment_record?: string;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* The PaymentRecord data for attaching an out of band payment to the invoice.
|
|
2177
|
+
*/
|
|
2178
|
+
payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
namespace InvoiceAttachPaymentParams {
|
|
2182
|
+
interface PaymentRecordData {
|
|
2183
|
+
/**
|
|
2184
|
+
* The amount that was paid out of band.
|
|
2185
|
+
*/
|
|
2186
|
+
amount: number;
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* The currency that was paid out of band.
|
|
2190
|
+
*/
|
|
2191
|
+
currency: string;
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* 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`.
|
|
2195
|
+
*/
|
|
2196
|
+
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2197
|
+
|
|
2198
|
+
/**
|
|
2199
|
+
* The type of money movement for this out of band payment record.
|
|
2200
|
+
*/
|
|
2201
|
+
money_movement_type: string;
|
|
2202
|
+
|
|
2203
|
+
/**
|
|
2204
|
+
* The timestamp when this out of band payment was paid.
|
|
2205
|
+
*/
|
|
2206
|
+
paid_at?: number;
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* The reference for this out of band payment record.
|
|
2210
|
+
*/
|
|
2211
|
+
payment_reference?: string;
|
|
2212
|
+
}
|
|
1829
2213
|
}
|
|
1830
2214
|
|
|
1831
2215
|
interface InvoiceCreatePreviewParams {
|
|
@@ -1844,6 +2228,11 @@ declare module 'stripe' {
|
|
|
1844
2228
|
*/
|
|
1845
2229
|
customer?: string;
|
|
1846
2230
|
|
|
2231
|
+
/**
|
|
2232
|
+
* 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.
|
|
2233
|
+
*/
|
|
2234
|
+
customer_account?: string;
|
|
2235
|
+
|
|
1847
2236
|
/**
|
|
1848
2237
|
* 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.
|
|
1849
2238
|
*/
|
|
@@ -2124,21 +2513,65 @@ declare module 'stripe' {
|
|
|
2124
2513
|
discount?: string;
|
|
2125
2514
|
|
|
2126
2515
|
/**
|
|
2127
|
-
*
|
|
2516
|
+
* Details to determine how long the discount should be applied for.
|
|
2128
2517
|
*/
|
|
2129
|
-
|
|
2130
|
-
}
|
|
2518
|
+
discount_end?: Discount.DiscountEnd;
|
|
2131
2519
|
|
|
2132
|
-
interface InvoiceItem {
|
|
2133
2520
|
/**
|
|
2134
|
-
*
|
|
2521
|
+
* ID of the promotion code to create a new discount for.
|
|
2135
2522
|
*/
|
|
2136
|
-
|
|
2523
|
+
promotion_code?: string;
|
|
2524
|
+
}
|
|
2137
2525
|
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2526
|
+
namespace Discount {
|
|
2527
|
+
interface DiscountEnd {
|
|
2528
|
+
/**
|
|
2529
|
+
* Time span for the redeemed discount.
|
|
2530
|
+
*/
|
|
2531
|
+
duration?: DiscountEnd.Duration;
|
|
2532
|
+
|
|
2533
|
+
/**
|
|
2534
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2535
|
+
*/
|
|
2536
|
+
timestamp?: number;
|
|
2537
|
+
|
|
2538
|
+
/**
|
|
2539
|
+
* The type of calculation made to determine when the discount ends.
|
|
2540
|
+
*/
|
|
2541
|
+
type: DiscountEnd.Type;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
namespace DiscountEnd {
|
|
2545
|
+
interface Duration {
|
|
2546
|
+
/**
|
|
2547
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2548
|
+
*/
|
|
2549
|
+
interval: Duration.Interval;
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2553
|
+
*/
|
|
2554
|
+
interval_count: number;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
namespace Duration {
|
|
2558
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
type Type = 'duration' | 'timestamp';
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
interface InvoiceItem {
|
|
2566
|
+
/**
|
|
2567
|
+
* The integer amount in cents (or local equivalent) of previewed invoice item.
|
|
2568
|
+
*/
|
|
2569
|
+
amount?: number;
|
|
2570
|
+
|
|
2571
|
+
/**
|
|
2572
|
+
* 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). Only applicable to new invoice items.
|
|
2573
|
+
*/
|
|
2574
|
+
currency?: string;
|
|
2142
2575
|
|
|
2143
2576
|
/**
|
|
2144
2577
|
* An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
|
@@ -2223,12 +2656,56 @@ declare module 'stripe' {
|
|
|
2223
2656
|
*/
|
|
2224
2657
|
discount?: string;
|
|
2225
2658
|
|
|
2659
|
+
/**
|
|
2660
|
+
* Details to determine how long the discount should be applied for.
|
|
2661
|
+
*/
|
|
2662
|
+
discount_end?: Discount.DiscountEnd;
|
|
2663
|
+
|
|
2226
2664
|
/**
|
|
2227
2665
|
* ID of the promotion code to create a new discount for.
|
|
2228
2666
|
*/
|
|
2229
2667
|
promotion_code?: string;
|
|
2230
2668
|
}
|
|
2231
2669
|
|
|
2670
|
+
namespace Discount {
|
|
2671
|
+
interface DiscountEnd {
|
|
2672
|
+
/**
|
|
2673
|
+
* Time span for the redeemed discount.
|
|
2674
|
+
*/
|
|
2675
|
+
duration?: DiscountEnd.Duration;
|
|
2676
|
+
|
|
2677
|
+
/**
|
|
2678
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2679
|
+
*/
|
|
2680
|
+
timestamp?: number;
|
|
2681
|
+
|
|
2682
|
+
/**
|
|
2683
|
+
* The type of calculation made to determine when the discount ends.
|
|
2684
|
+
*/
|
|
2685
|
+
type: DiscountEnd.Type;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
namespace DiscountEnd {
|
|
2689
|
+
interface Duration {
|
|
2690
|
+
/**
|
|
2691
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2692
|
+
*/
|
|
2693
|
+
interval: Duration.Interval;
|
|
2694
|
+
|
|
2695
|
+
/**
|
|
2696
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2697
|
+
*/
|
|
2698
|
+
interval_count: number;
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
namespace Duration {
|
|
2702
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
type Type = 'duration' | 'timestamp';
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2232
2709
|
interface Period {
|
|
2233
2710
|
/**
|
|
2234
2711
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -2294,28 +2771,640 @@ declare module 'stripe' {
|
|
|
2294
2771
|
type PreviewMode = 'next' | 'recurring';
|
|
2295
2772
|
|
|
2296
2773
|
interface ScheduleDetails {
|
|
2774
|
+
/**
|
|
2775
|
+
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
2776
|
+
*/
|
|
2777
|
+
amendments?: Array<ScheduleDetails.Amendment>;
|
|
2778
|
+
|
|
2779
|
+
/**
|
|
2780
|
+
* 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.
|
|
2781
|
+
*/
|
|
2782
|
+
billing_behavior?: ScheduleDetails.BillingBehavior;
|
|
2783
|
+
|
|
2297
2784
|
/**
|
|
2298
2785
|
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
2299
2786
|
*/
|
|
2300
2787
|
billing_mode?: ScheduleDetails.BillingMode;
|
|
2301
2788
|
|
|
2302
|
-
/**
|
|
2303
|
-
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
|
2304
|
-
*/
|
|
2305
|
-
end_behavior?: ScheduleDetails.EndBehavior;
|
|
2789
|
+
/**
|
|
2790
|
+
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
|
2791
|
+
*/
|
|
2792
|
+
end_behavior?: ScheduleDetails.EndBehavior;
|
|
2793
|
+
|
|
2794
|
+
/**
|
|
2795
|
+
* List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
|
2796
|
+
*/
|
|
2797
|
+
phases?: Array<ScheduleDetails.Phase>;
|
|
2798
|
+
|
|
2799
|
+
/**
|
|
2800
|
+
* Provide any time periods to bill in advance.
|
|
2801
|
+
*/
|
|
2802
|
+
prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
|
2806
|
+
*/
|
|
2807
|
+
proration_behavior?: ScheduleDetails.ProrationBehavior;
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
namespace ScheduleDetails {
|
|
2811
|
+
interface Amendment {
|
|
2812
|
+
/**
|
|
2813
|
+
* 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.
|
|
2814
|
+
*/
|
|
2815
|
+
amendment_end?: Amendment.AmendmentEnd;
|
|
2816
|
+
|
|
2817
|
+
/**
|
|
2818
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2819
|
+
*/
|
|
2820
|
+
amendment_start: Amendment.AmendmentStart;
|
|
2821
|
+
|
|
2822
|
+
/**
|
|
2823
|
+
* 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.
|
|
2824
|
+
*/
|
|
2825
|
+
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
2826
|
+
|
|
2827
|
+
/**
|
|
2828
|
+
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
2829
|
+
*/
|
|
2830
|
+
discount_actions?: Array<Amendment.DiscountAction>;
|
|
2831
|
+
|
|
2832
|
+
/**
|
|
2833
|
+
* Changes to the subscription items during the amendment time span.
|
|
2834
|
+
*/
|
|
2835
|
+
item_actions?: Array<Amendment.ItemAction>;
|
|
2836
|
+
|
|
2837
|
+
/**
|
|
2838
|
+
* Instructions for how to modify phase metadata
|
|
2839
|
+
*/
|
|
2840
|
+
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
2841
|
+
|
|
2842
|
+
/**
|
|
2843
|
+
* 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`.
|
|
2844
|
+
*/
|
|
2845
|
+
proration_behavior?: Amendment.ProrationBehavior;
|
|
2846
|
+
|
|
2847
|
+
/**
|
|
2848
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2849
|
+
*/
|
|
2850
|
+
set_pause_collection?: Amendment.SetPauseCollection;
|
|
2851
|
+
|
|
2852
|
+
/**
|
|
2853
|
+
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
2854
|
+
*/
|
|
2855
|
+
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
2856
|
+
|
|
2857
|
+
/**
|
|
2858
|
+
* Settings related to subscription trials.
|
|
2859
|
+
*/
|
|
2860
|
+
trial_settings?: Amendment.TrialSettings;
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
namespace Amendment {
|
|
2864
|
+
interface AmendmentEnd {
|
|
2865
|
+
/**
|
|
2866
|
+
* Use the `end` time of a given discount.
|
|
2867
|
+
*/
|
|
2868
|
+
discount_end?: AmendmentEnd.DiscountEnd;
|
|
2869
|
+
|
|
2870
|
+
/**
|
|
2871
|
+
* Time span for the amendment starting from the `amendment_start`.
|
|
2872
|
+
*/
|
|
2873
|
+
duration?: AmendmentEnd.Duration;
|
|
2874
|
+
|
|
2875
|
+
/**
|
|
2876
|
+
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
2877
|
+
*/
|
|
2878
|
+
timestamp?: number;
|
|
2879
|
+
|
|
2880
|
+
/**
|
|
2881
|
+
* Select one of three ways to pass the `amendment_end`.
|
|
2882
|
+
*/
|
|
2883
|
+
type: AmendmentEnd.Type;
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
namespace AmendmentEnd {
|
|
2887
|
+
interface DiscountEnd {
|
|
2888
|
+
/**
|
|
2889
|
+
* The ID of a specific discount.
|
|
2890
|
+
*/
|
|
2891
|
+
discount: string;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
interface Duration {
|
|
2895
|
+
/**
|
|
2896
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2897
|
+
*/
|
|
2898
|
+
interval: Duration.Interval;
|
|
2899
|
+
|
|
2900
|
+
/**
|
|
2901
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2902
|
+
*/
|
|
2903
|
+
interval_count: number;
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
namespace Duration {
|
|
2907
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
type Type =
|
|
2911
|
+
| 'discount_end'
|
|
2912
|
+
| 'duration'
|
|
2913
|
+
| 'schedule_end'
|
|
2914
|
+
| 'timestamp'
|
|
2915
|
+
| 'trial_end'
|
|
2916
|
+
| 'trial_start'
|
|
2917
|
+
| 'upcoming_invoice';
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
interface AmendmentStart {
|
|
2921
|
+
/**
|
|
2922
|
+
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
2923
|
+
*/
|
|
2924
|
+
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
2925
|
+
|
|
2926
|
+
/**
|
|
2927
|
+
* Use the `end` time of a given discount.
|
|
2928
|
+
*/
|
|
2929
|
+
discount_end?: AmendmentStart.DiscountEnd;
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* A precise Unix timestamp for the amendment to start.
|
|
2933
|
+
*/
|
|
2934
|
+
timestamp?: number;
|
|
2935
|
+
|
|
2936
|
+
/**
|
|
2937
|
+
* Select one of three ways to pass the `amendment_start`.
|
|
2938
|
+
*/
|
|
2939
|
+
type: AmendmentStart.Type;
|
|
2940
|
+
}
|
|
2941
|
+
|
|
2942
|
+
namespace AmendmentStart {
|
|
2943
|
+
interface AmendmentEnd {
|
|
2944
|
+
/**
|
|
2945
|
+
* 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.
|
|
2946
|
+
*/
|
|
2947
|
+
index: number;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
interface DiscountEnd {
|
|
2951
|
+
/**
|
|
2952
|
+
* The ID of a specific discount.
|
|
2953
|
+
*/
|
|
2954
|
+
discount: string;
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
type Type =
|
|
2958
|
+
| 'amendment_end'
|
|
2959
|
+
| 'discount_end'
|
|
2960
|
+
| 'now'
|
|
2961
|
+
| 'schedule_end'
|
|
2962
|
+
| 'timestamp'
|
|
2963
|
+
| 'trial_end'
|
|
2964
|
+
| 'trial_start'
|
|
2965
|
+
| 'upcoming_invoice';
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
2969
|
+
|
|
2970
|
+
interface DiscountAction {
|
|
2971
|
+
/**
|
|
2972
|
+
* Details of the discount to add.
|
|
2973
|
+
*/
|
|
2974
|
+
add?: DiscountAction.Add;
|
|
2975
|
+
|
|
2976
|
+
/**
|
|
2977
|
+
* Details of the discount to remove.
|
|
2978
|
+
*/
|
|
2979
|
+
remove?: DiscountAction.Remove;
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* Details of the discount to replace the existing discounts with.
|
|
2983
|
+
*/
|
|
2984
|
+
set?: DiscountAction.Set;
|
|
2985
|
+
|
|
2986
|
+
/**
|
|
2987
|
+
* Determines the type of discount action.
|
|
2988
|
+
*/
|
|
2989
|
+
type: DiscountAction.Type;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
namespace DiscountAction {
|
|
2993
|
+
interface Add {
|
|
2994
|
+
/**
|
|
2995
|
+
* The coupon code to redeem.
|
|
2996
|
+
*/
|
|
2997
|
+
coupon?: string;
|
|
2998
|
+
|
|
2999
|
+
/**
|
|
3000
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
3001
|
+
*/
|
|
3002
|
+
discount?: string;
|
|
3003
|
+
|
|
3004
|
+
/**
|
|
3005
|
+
* Details to determine how long the discount should be applied for.
|
|
3006
|
+
*/
|
|
3007
|
+
discount_end?: Add.DiscountEnd;
|
|
3008
|
+
|
|
3009
|
+
/**
|
|
3010
|
+
* 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.
|
|
3011
|
+
*/
|
|
3012
|
+
index?: number;
|
|
3013
|
+
|
|
3014
|
+
/**
|
|
3015
|
+
* The promotion code to redeem.
|
|
3016
|
+
*/
|
|
3017
|
+
promotion_code?: string;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
namespace Add {
|
|
3021
|
+
interface DiscountEnd {
|
|
3022
|
+
/**
|
|
3023
|
+
* The type of calculation made to determine when the discount ends.
|
|
3024
|
+
*/
|
|
3025
|
+
type: 'amendment_end';
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
interface Remove {
|
|
3030
|
+
/**
|
|
3031
|
+
* The coupon code to remove from the `discounts` array.
|
|
3032
|
+
*/
|
|
3033
|
+
coupon?: string;
|
|
3034
|
+
|
|
3035
|
+
/**
|
|
3036
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
3037
|
+
*/
|
|
3038
|
+
discount?: string;
|
|
3039
|
+
|
|
3040
|
+
/**
|
|
3041
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
3042
|
+
*/
|
|
3043
|
+
promotion_code?: string;
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
interface Set {
|
|
3047
|
+
/**
|
|
3048
|
+
* The coupon code to replace the `discounts` array with.
|
|
3049
|
+
*/
|
|
3050
|
+
coupon?: string;
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
3054
|
+
*/
|
|
3055
|
+
discount?: string;
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
3059
|
+
*/
|
|
3060
|
+
promotion_code?: string;
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3064
|
+
}
|
|
3065
|
+
|
|
3066
|
+
interface ItemAction {
|
|
3067
|
+
/**
|
|
3068
|
+
* 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.
|
|
3069
|
+
*/
|
|
3070
|
+
add?: ItemAction.Add;
|
|
3071
|
+
|
|
3072
|
+
/**
|
|
3073
|
+
* Details of the subscription item to remove.
|
|
3074
|
+
*/
|
|
3075
|
+
remove?: ItemAction.Remove;
|
|
3076
|
+
|
|
3077
|
+
/**
|
|
3078
|
+
* 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.
|
|
3079
|
+
*/
|
|
3080
|
+
set?: ItemAction.Set;
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* Determines the type of item action.
|
|
3084
|
+
*/
|
|
3085
|
+
type: ItemAction.Type;
|
|
3086
|
+
}
|
|
3087
|
+
|
|
3088
|
+
namespace ItemAction {
|
|
3089
|
+
interface Add {
|
|
3090
|
+
/**
|
|
3091
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
3092
|
+
*/
|
|
3093
|
+
discounts?: Array<Add.Discount>;
|
|
3094
|
+
|
|
3095
|
+
/**
|
|
3096
|
+
* 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`.
|
|
3097
|
+
*/
|
|
3098
|
+
metadata?: Stripe.MetadataParam;
|
|
3099
|
+
|
|
3100
|
+
/**
|
|
3101
|
+
* The ID of the price object.
|
|
3102
|
+
*/
|
|
3103
|
+
price: string;
|
|
3104
|
+
|
|
3105
|
+
/**
|
|
3106
|
+
* Quantity for this item.
|
|
3107
|
+
*/
|
|
3108
|
+
quantity?: number;
|
|
3109
|
+
|
|
3110
|
+
/**
|
|
3111
|
+
* 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`.
|
|
3112
|
+
*/
|
|
3113
|
+
tax_rates?: Array<string>;
|
|
3114
|
+
|
|
3115
|
+
/**
|
|
3116
|
+
* Options that configure the trial on the subscription item.
|
|
3117
|
+
*/
|
|
3118
|
+
trial?: Add.Trial;
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
|
+
namespace Add {
|
|
3122
|
+
interface Discount {
|
|
3123
|
+
/**
|
|
3124
|
+
* ID of the coupon to create a new discount for.
|
|
3125
|
+
*/
|
|
3126
|
+
coupon?: string;
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3130
|
+
*/
|
|
3131
|
+
discount?: string;
|
|
3132
|
+
|
|
3133
|
+
/**
|
|
3134
|
+
* Details to determine how long the discount should be applied for.
|
|
3135
|
+
*/
|
|
3136
|
+
discount_end?: Discount.DiscountEnd;
|
|
3137
|
+
|
|
3138
|
+
/**
|
|
3139
|
+
* ID of the promotion code to create a new discount for.
|
|
3140
|
+
*/
|
|
3141
|
+
promotion_code?: string;
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3144
|
+
namespace Discount {
|
|
3145
|
+
interface DiscountEnd {
|
|
3146
|
+
/**
|
|
3147
|
+
* Time span for the redeemed discount.
|
|
3148
|
+
*/
|
|
3149
|
+
duration?: DiscountEnd.Duration;
|
|
3150
|
+
|
|
3151
|
+
/**
|
|
3152
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3153
|
+
*/
|
|
3154
|
+
timestamp?: number;
|
|
3155
|
+
|
|
3156
|
+
/**
|
|
3157
|
+
* The type of calculation made to determine when the discount ends.
|
|
3158
|
+
*/
|
|
3159
|
+
type: DiscountEnd.Type;
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
namespace DiscountEnd {
|
|
3163
|
+
interface Duration {
|
|
3164
|
+
/**
|
|
3165
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3166
|
+
*/
|
|
3167
|
+
interval: Duration.Interval;
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3171
|
+
*/
|
|
3172
|
+
interval_count: number;
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
namespace Duration {
|
|
3176
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3177
|
+
}
|
|
3178
|
+
|
|
3179
|
+
type Type = 'duration' | 'timestamp';
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3183
|
+
interface Trial {
|
|
3184
|
+
/**
|
|
3185
|
+
* 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.
|
|
3186
|
+
*/
|
|
3187
|
+
converts_to?: Array<string>;
|
|
3188
|
+
|
|
3189
|
+
/**
|
|
3190
|
+
* Determines the type of trial for this item.
|
|
3191
|
+
*/
|
|
3192
|
+
type: Trial.Type;
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
namespace Trial {
|
|
3196
|
+
type Type = 'free' | 'paid';
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
interface Remove {
|
|
3201
|
+
/**
|
|
3202
|
+
* ID of a price to remove.
|
|
3203
|
+
*/
|
|
3204
|
+
price: string;
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
interface Set {
|
|
3208
|
+
/**
|
|
3209
|
+
* 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`.
|
|
3210
|
+
*/
|
|
3211
|
+
discounts?: Array<Set.Discount>;
|
|
3212
|
+
|
|
3213
|
+
/**
|
|
3214
|
+
* 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`.
|
|
3215
|
+
*/
|
|
3216
|
+
metadata?: Stripe.MetadataParam;
|
|
3217
|
+
|
|
3218
|
+
/**
|
|
3219
|
+
* The ID of the price object.
|
|
3220
|
+
*/
|
|
3221
|
+
price: string;
|
|
3222
|
+
|
|
3223
|
+
/**
|
|
3224
|
+
* 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`.
|
|
3225
|
+
*/
|
|
3226
|
+
quantity?: number;
|
|
3227
|
+
|
|
3228
|
+
/**
|
|
3229
|
+
* 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`.
|
|
3230
|
+
*/
|
|
3231
|
+
tax_rates?: Array<string>;
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* 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`.
|
|
3235
|
+
*/
|
|
3236
|
+
trial?: Set.Trial;
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
namespace Set {
|
|
3240
|
+
interface Discount {
|
|
3241
|
+
/**
|
|
3242
|
+
* ID of the coupon to create a new discount for.
|
|
3243
|
+
*/
|
|
3244
|
+
coupon?: string;
|
|
3245
|
+
|
|
3246
|
+
/**
|
|
3247
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3248
|
+
*/
|
|
3249
|
+
discount?: string;
|
|
3250
|
+
|
|
3251
|
+
/**
|
|
3252
|
+
* Details to determine how long the discount should be applied for.
|
|
3253
|
+
*/
|
|
3254
|
+
discount_end?: Discount.DiscountEnd;
|
|
3255
|
+
|
|
3256
|
+
/**
|
|
3257
|
+
* ID of the promotion code to create a new discount for.
|
|
3258
|
+
*/
|
|
3259
|
+
promotion_code?: string;
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
namespace Discount {
|
|
3263
|
+
interface DiscountEnd {
|
|
3264
|
+
/**
|
|
3265
|
+
* Time span for the redeemed discount.
|
|
3266
|
+
*/
|
|
3267
|
+
duration?: DiscountEnd.Duration;
|
|
3268
|
+
|
|
3269
|
+
/**
|
|
3270
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3271
|
+
*/
|
|
3272
|
+
timestamp?: number;
|
|
3273
|
+
|
|
3274
|
+
/**
|
|
3275
|
+
* The type of calculation made to determine when the discount ends.
|
|
3276
|
+
*/
|
|
3277
|
+
type: DiscountEnd.Type;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
namespace DiscountEnd {
|
|
3281
|
+
interface Duration {
|
|
3282
|
+
/**
|
|
3283
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3284
|
+
*/
|
|
3285
|
+
interval: Duration.Interval;
|
|
3286
|
+
|
|
3287
|
+
/**
|
|
3288
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3289
|
+
*/
|
|
3290
|
+
interval_count: number;
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
namespace Duration {
|
|
3294
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
type Type = 'duration' | 'timestamp';
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
interface Trial {
|
|
3302
|
+
/**
|
|
3303
|
+
* 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.
|
|
3304
|
+
*/
|
|
3305
|
+
converts_to?: Array<string>;
|
|
3306
|
+
|
|
3307
|
+
/**
|
|
3308
|
+
* Determines the type of trial for this item.
|
|
3309
|
+
*/
|
|
3310
|
+
type: Trial.Type;
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3313
|
+
namespace Trial {
|
|
3314
|
+
type Type = 'free' | 'paid';
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
interface MetadataAction {
|
|
3322
|
+
/**
|
|
3323
|
+
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
3324
|
+
*/
|
|
3325
|
+
add?: {
|
|
3326
|
+
[key: string]: string;
|
|
3327
|
+
};
|
|
3328
|
+
|
|
3329
|
+
/**
|
|
3330
|
+
* Keys to remove from schedule phase metadata.
|
|
3331
|
+
*/
|
|
3332
|
+
remove?: Array<string>;
|
|
3333
|
+
|
|
3334
|
+
/**
|
|
3335
|
+
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
3336
|
+
*/
|
|
3337
|
+
set?: Stripe.Emptyable<{
|
|
3338
|
+
[key: string]: string;
|
|
3339
|
+
}>;
|
|
3340
|
+
|
|
3341
|
+
/**
|
|
3342
|
+
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
3343
|
+
*/
|
|
3344
|
+
type: MetadataAction.Type;
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
namespace MetadataAction {
|
|
3348
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
type ProrationBehavior =
|
|
3352
|
+
| 'always_invoice'
|
|
3353
|
+
| 'create_prorations'
|
|
3354
|
+
| 'none';
|
|
3355
|
+
|
|
3356
|
+
interface SetPauseCollection {
|
|
3357
|
+
/**
|
|
3358
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
3359
|
+
*/
|
|
3360
|
+
set?: SetPauseCollection.Set;
|
|
3361
|
+
|
|
3362
|
+
/**
|
|
3363
|
+
* Determines the type of the pause_collection amendment.
|
|
3364
|
+
*/
|
|
3365
|
+
type: SetPauseCollection.Type;
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
namespace SetPauseCollection {
|
|
3369
|
+
interface Set {
|
|
3370
|
+
/**
|
|
3371
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
3372
|
+
*/
|
|
3373
|
+
behavior: Set.Behavior;
|
|
3374
|
+
}
|
|
3375
|
+
|
|
3376
|
+
namespace Set {
|
|
3377
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
3378
|
+
}
|
|
3379
|
+
|
|
3380
|
+
type Type = 'remove' | 'set';
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3383
|
+
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
3384
|
+
|
|
3385
|
+
interface TrialSettings {
|
|
3386
|
+
/**
|
|
3387
|
+
* Defines how the subscription should behave when a trial ends.
|
|
3388
|
+
*/
|
|
3389
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
namespace TrialSettings {
|
|
3393
|
+
interface EndBehavior {
|
|
3394
|
+
/**
|
|
3395
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
3396
|
+
*/
|
|
3397
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
3398
|
+
}
|
|
2306
3399
|
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
3400
|
+
namespace EndBehavior {
|
|
3401
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
2311
3405
|
|
|
2312
|
-
|
|
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.
|
|
2314
|
-
*/
|
|
2315
|
-
proration_behavior?: ScheduleDetails.ProrationBehavior;
|
|
2316
|
-
}
|
|
3406
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
2317
3407
|
|
|
2318
|
-
namespace ScheduleDetails {
|
|
2319
3408
|
interface BillingMode {
|
|
2320
3409
|
/**
|
|
2321
3410
|
* Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
|
@@ -2420,6 +3509,11 @@ declare module 'stripe' {
|
|
|
2420
3509
|
*/
|
|
2421
3510
|
on_behalf_of?: string;
|
|
2422
3511
|
|
|
3512
|
+
/**
|
|
3513
|
+
* 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).
|
|
3514
|
+
*/
|
|
3515
|
+
pause_collection?: Phase.PauseCollection;
|
|
3516
|
+
|
|
2423
3517
|
/**
|
|
2424
3518
|
* 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.
|
|
2425
3519
|
*/
|
|
@@ -2440,10 +3534,20 @@ declare module 'stripe' {
|
|
|
2440
3534
|
*/
|
|
2441
3535
|
trial?: boolean;
|
|
2442
3536
|
|
|
3537
|
+
/**
|
|
3538
|
+
* Specify trial behavior when crossing phase boundaries
|
|
3539
|
+
*/
|
|
3540
|
+
trial_continuation?: Phase.TrialContinuation;
|
|
3541
|
+
|
|
2443
3542
|
/**
|
|
2444
3543
|
* 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`
|
|
2445
3544
|
*/
|
|
2446
3545
|
trial_end?: number | 'now';
|
|
3546
|
+
|
|
3547
|
+
/**
|
|
3548
|
+
* Settings related to subscription trials.
|
|
3549
|
+
*/
|
|
3550
|
+
trial_settings?: Phase.TrialSettings;
|
|
2447
3551
|
}
|
|
2448
3552
|
|
|
2449
3553
|
namespace Phase {
|
|
@@ -2486,12 +3590,56 @@ declare module 'stripe' {
|
|
|
2486
3590
|
*/
|
|
2487
3591
|
discount?: string;
|
|
2488
3592
|
|
|
3593
|
+
/**
|
|
3594
|
+
* Details to determine how long the discount should be applied for.
|
|
3595
|
+
*/
|
|
3596
|
+
discount_end?: Discount.DiscountEnd;
|
|
3597
|
+
|
|
2489
3598
|
/**
|
|
2490
3599
|
* ID of the promotion code to create a new discount for.
|
|
2491
3600
|
*/
|
|
2492
3601
|
promotion_code?: string;
|
|
2493
3602
|
}
|
|
2494
3603
|
|
|
3604
|
+
namespace Discount {
|
|
3605
|
+
interface DiscountEnd {
|
|
3606
|
+
/**
|
|
3607
|
+
* Time span for the redeemed discount.
|
|
3608
|
+
*/
|
|
3609
|
+
duration?: DiscountEnd.Duration;
|
|
3610
|
+
|
|
3611
|
+
/**
|
|
3612
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3613
|
+
*/
|
|
3614
|
+
timestamp?: number;
|
|
3615
|
+
|
|
3616
|
+
/**
|
|
3617
|
+
* The type of calculation made to determine when the discount ends.
|
|
3618
|
+
*/
|
|
3619
|
+
type: DiscountEnd.Type;
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
namespace DiscountEnd {
|
|
3623
|
+
interface Duration {
|
|
3624
|
+
/**
|
|
3625
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3626
|
+
*/
|
|
3627
|
+
interval: Duration.Interval;
|
|
3628
|
+
|
|
3629
|
+
/**
|
|
3630
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3631
|
+
*/
|
|
3632
|
+
interval_count: number;
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
namespace Duration {
|
|
3636
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3637
|
+
}
|
|
3638
|
+
|
|
3639
|
+
type Type = 'duration' | 'timestamp';
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
|
|
2495
3643
|
interface PriceData {
|
|
2496
3644
|
/**
|
|
2497
3645
|
* 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).
|
|
@@ -2581,12 +3729,56 @@ declare module 'stripe' {
|
|
|
2581
3729
|
*/
|
|
2582
3730
|
discount?: string;
|
|
2583
3731
|
|
|
3732
|
+
/**
|
|
3733
|
+
* Details to determine how long the discount should be applied for.
|
|
3734
|
+
*/
|
|
3735
|
+
discount_end?: Discount.DiscountEnd;
|
|
3736
|
+
|
|
2584
3737
|
/**
|
|
2585
3738
|
* ID of the promotion code to create a new discount for.
|
|
2586
3739
|
*/
|
|
2587
3740
|
promotion_code?: string;
|
|
2588
3741
|
}
|
|
2589
3742
|
|
|
3743
|
+
namespace Discount {
|
|
3744
|
+
interface DiscountEnd {
|
|
3745
|
+
/**
|
|
3746
|
+
* Time span for the redeemed discount.
|
|
3747
|
+
*/
|
|
3748
|
+
duration?: DiscountEnd.Duration;
|
|
3749
|
+
|
|
3750
|
+
/**
|
|
3751
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3752
|
+
*/
|
|
3753
|
+
timestamp?: number;
|
|
3754
|
+
|
|
3755
|
+
/**
|
|
3756
|
+
* The type of calculation made to determine when the discount ends.
|
|
3757
|
+
*/
|
|
3758
|
+
type: DiscountEnd.Type;
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
|
+
namespace DiscountEnd {
|
|
3762
|
+
interface Duration {
|
|
3763
|
+
/**
|
|
3764
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3765
|
+
*/
|
|
3766
|
+
interval: Duration.Interval;
|
|
3767
|
+
|
|
3768
|
+
/**
|
|
3769
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3770
|
+
*/
|
|
3771
|
+
interval_count: number;
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3774
|
+
namespace Duration {
|
|
3775
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
type Type = 'duration' | 'timestamp';
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
|
|
2590
3782
|
interface Duration {
|
|
2591
3783
|
/**
|
|
2592
3784
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -2678,6 +3870,11 @@ declare module 'stripe' {
|
|
|
2678
3870
|
* 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.
|
|
2679
3871
|
*/
|
|
2680
3872
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3873
|
+
|
|
3874
|
+
/**
|
|
3875
|
+
* Options that configure the trial on the subscription item.
|
|
3876
|
+
*/
|
|
3877
|
+
trial?: Item.Trial;
|
|
2681
3878
|
}
|
|
2682
3879
|
|
|
2683
3880
|
namespace Item {
|
|
@@ -2699,12 +3896,56 @@ declare module 'stripe' {
|
|
|
2699
3896
|
*/
|
|
2700
3897
|
discount?: string;
|
|
2701
3898
|
|
|
3899
|
+
/**
|
|
3900
|
+
* Details to determine how long the discount should be applied for.
|
|
3901
|
+
*/
|
|
3902
|
+
discount_end?: Discount.DiscountEnd;
|
|
3903
|
+
|
|
2702
3904
|
/**
|
|
2703
3905
|
* ID of the promotion code to create a new discount for.
|
|
2704
3906
|
*/
|
|
2705
3907
|
promotion_code?: string;
|
|
2706
3908
|
}
|
|
2707
3909
|
|
|
3910
|
+
namespace Discount {
|
|
3911
|
+
interface DiscountEnd {
|
|
3912
|
+
/**
|
|
3913
|
+
* Time span for the redeemed discount.
|
|
3914
|
+
*/
|
|
3915
|
+
duration?: DiscountEnd.Duration;
|
|
3916
|
+
|
|
3917
|
+
/**
|
|
3918
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3919
|
+
*/
|
|
3920
|
+
timestamp?: number;
|
|
3921
|
+
|
|
3922
|
+
/**
|
|
3923
|
+
* The type of calculation made to determine when the discount ends.
|
|
3924
|
+
*/
|
|
3925
|
+
type: DiscountEnd.Type;
|
|
3926
|
+
}
|
|
3927
|
+
|
|
3928
|
+
namespace DiscountEnd {
|
|
3929
|
+
interface Duration {
|
|
3930
|
+
/**
|
|
3931
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3932
|
+
*/
|
|
3933
|
+
interval: Duration.Interval;
|
|
3934
|
+
|
|
3935
|
+
/**
|
|
3936
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3937
|
+
*/
|
|
3938
|
+
interval_count: number;
|
|
3939
|
+
}
|
|
3940
|
+
|
|
3941
|
+
namespace Duration {
|
|
3942
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
type Type = 'duration' | 'timestamp';
|
|
3946
|
+
}
|
|
3947
|
+
}
|
|
3948
|
+
|
|
2708
3949
|
interface PriceData {
|
|
2709
3950
|
/**
|
|
2710
3951
|
* 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).
|
|
@@ -2756,6 +3997,33 @@ declare module 'stripe' {
|
|
|
2756
3997
|
|
|
2757
3998
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2758
3999
|
}
|
|
4000
|
+
|
|
4001
|
+
interface Trial {
|
|
4002
|
+
/**
|
|
4003
|
+
* 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.
|
|
4004
|
+
*/
|
|
4005
|
+
converts_to?: Array<string>;
|
|
4006
|
+
|
|
4007
|
+
/**
|
|
4008
|
+
* Determines the type of trial for this item.
|
|
4009
|
+
*/
|
|
4010
|
+
type: Trial.Type;
|
|
4011
|
+
}
|
|
4012
|
+
|
|
4013
|
+
namespace Trial {
|
|
4014
|
+
type Type = 'free' | 'paid';
|
|
4015
|
+
}
|
|
4016
|
+
}
|
|
4017
|
+
|
|
4018
|
+
interface PauseCollection {
|
|
4019
|
+
/**
|
|
4020
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
4021
|
+
*/
|
|
4022
|
+
behavior: PauseCollection.Behavior;
|
|
4023
|
+
}
|
|
4024
|
+
|
|
4025
|
+
namespace PauseCollection {
|
|
4026
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2759
4027
|
}
|
|
2760
4028
|
|
|
2761
4029
|
type ProrationBehavior =
|
|
@@ -2774,6 +4042,95 @@ declare module 'stripe' {
|
|
|
2774
4042
|
*/
|
|
2775
4043
|
destination: string;
|
|
2776
4044
|
}
|
|
4045
|
+
|
|
4046
|
+
type TrialContinuation = 'continue' | 'none';
|
|
4047
|
+
|
|
4048
|
+
interface TrialSettings {
|
|
4049
|
+
/**
|
|
4050
|
+
* Defines how the subscription should behave when a trial ends.
|
|
4051
|
+
*/
|
|
4052
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
4053
|
+
}
|
|
4054
|
+
|
|
4055
|
+
namespace TrialSettings {
|
|
4056
|
+
interface EndBehavior {
|
|
4057
|
+
/**
|
|
4058
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
4059
|
+
*/
|
|
4060
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
namespace EndBehavior {
|
|
4064
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
}
|
|
4068
|
+
|
|
4069
|
+
interface Prebilling {
|
|
4070
|
+
/**
|
|
4071
|
+
* The end of the prebilled time period.
|
|
4072
|
+
*/
|
|
4073
|
+
bill_until?: Prebilling.BillUntil;
|
|
4074
|
+
|
|
4075
|
+
/**
|
|
4076
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
4077
|
+
*/
|
|
4078
|
+
iterations?: number;
|
|
4079
|
+
}
|
|
4080
|
+
|
|
4081
|
+
namespace Prebilling {
|
|
4082
|
+
interface BillUntil {
|
|
4083
|
+
/**
|
|
4084
|
+
* End the prebilled period when a specified amendment ends.
|
|
4085
|
+
*/
|
|
4086
|
+
amendment_end?: BillUntil.AmendmentEnd;
|
|
4087
|
+
|
|
4088
|
+
/**
|
|
4089
|
+
* Time span for prebilling, starting from `bill_from`.
|
|
4090
|
+
*/
|
|
4091
|
+
duration?: BillUntil.Duration;
|
|
4092
|
+
|
|
4093
|
+
/**
|
|
4094
|
+
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
4095
|
+
*/
|
|
4096
|
+
timestamp?: number;
|
|
4097
|
+
|
|
4098
|
+
/**
|
|
4099
|
+
* Select one of several ways to pass the `bill_until` value.
|
|
4100
|
+
*/
|
|
4101
|
+
type: BillUntil.Type;
|
|
4102
|
+
}
|
|
4103
|
+
|
|
4104
|
+
namespace BillUntil {
|
|
4105
|
+
interface AmendmentEnd {
|
|
4106
|
+
/**
|
|
4107
|
+
* 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.
|
|
4108
|
+
*/
|
|
4109
|
+
index: number;
|
|
4110
|
+
}
|
|
4111
|
+
|
|
4112
|
+
interface Duration {
|
|
4113
|
+
/**
|
|
4114
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4115
|
+
*/
|
|
4116
|
+
interval: Duration.Interval;
|
|
4117
|
+
|
|
4118
|
+
/**
|
|
4119
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4120
|
+
*/
|
|
4121
|
+
interval_count: number;
|
|
4122
|
+
}
|
|
4123
|
+
|
|
4124
|
+
namespace Duration {
|
|
4125
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4126
|
+
}
|
|
4127
|
+
|
|
4128
|
+
type Type =
|
|
4129
|
+
| 'amendment_end'
|
|
4130
|
+
| 'duration'
|
|
4131
|
+
| 'schedule_end'
|
|
4132
|
+
| 'timestamp';
|
|
4133
|
+
}
|
|
2777
4134
|
}
|
|
2778
4135
|
|
|
2779
4136
|
type ProrationBehavior =
|
|
@@ -2818,6 +4175,11 @@ declare module 'stripe' {
|
|
|
2818
4175
|
*/
|
|
2819
4176
|
items?: Array<SubscriptionDetails.Item>;
|
|
2820
4177
|
|
|
4178
|
+
/**
|
|
4179
|
+
* The pre-billing to apply to the subscription as a preview.
|
|
4180
|
+
*/
|
|
4181
|
+
prebilling?: SubscriptionDetails.Prebilling;
|
|
4182
|
+
|
|
2821
4183
|
/**
|
|
2822
4184
|
* 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`.
|
|
2823
4185
|
*/
|
|
@@ -2936,12 +4298,56 @@ declare module 'stripe' {
|
|
|
2936
4298
|
*/
|
|
2937
4299
|
discount?: string;
|
|
2938
4300
|
|
|
4301
|
+
/**
|
|
4302
|
+
* Details to determine how long the discount should be applied for.
|
|
4303
|
+
*/
|
|
4304
|
+
discount_end?: Discount.DiscountEnd;
|
|
4305
|
+
|
|
2939
4306
|
/**
|
|
2940
4307
|
* ID of the promotion code to create a new discount for.
|
|
2941
4308
|
*/
|
|
2942
4309
|
promotion_code?: string;
|
|
2943
4310
|
}
|
|
2944
4311
|
|
|
4312
|
+
namespace Discount {
|
|
4313
|
+
interface DiscountEnd {
|
|
4314
|
+
/**
|
|
4315
|
+
* Time span for the redeemed discount.
|
|
4316
|
+
*/
|
|
4317
|
+
duration?: DiscountEnd.Duration;
|
|
4318
|
+
|
|
4319
|
+
/**
|
|
4320
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4321
|
+
*/
|
|
4322
|
+
timestamp?: number;
|
|
4323
|
+
|
|
4324
|
+
/**
|
|
4325
|
+
* The type of calculation made to determine when the discount ends.
|
|
4326
|
+
*/
|
|
4327
|
+
type: DiscountEnd.Type;
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4330
|
+
namespace DiscountEnd {
|
|
4331
|
+
interface Duration {
|
|
4332
|
+
/**
|
|
4333
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4334
|
+
*/
|
|
4335
|
+
interval: Duration.Interval;
|
|
4336
|
+
|
|
4337
|
+
/**
|
|
4338
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4339
|
+
*/
|
|
4340
|
+
interval_count: number;
|
|
4341
|
+
}
|
|
4342
|
+
|
|
4343
|
+
namespace Duration {
|
|
4344
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4345
|
+
}
|
|
4346
|
+
|
|
4347
|
+
type Type = 'duration' | 'timestamp';
|
|
4348
|
+
}
|
|
4349
|
+
}
|
|
4350
|
+
|
|
2945
4351
|
interface PriceData {
|
|
2946
4352
|
/**
|
|
2947
4353
|
* 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).
|
|
@@ -2995,6 +4401,13 @@ declare module 'stripe' {
|
|
|
2995
4401
|
}
|
|
2996
4402
|
}
|
|
2997
4403
|
|
|
4404
|
+
interface Prebilling {
|
|
4405
|
+
/**
|
|
4406
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
4407
|
+
*/
|
|
4408
|
+
iterations: number;
|
|
4409
|
+
}
|
|
4410
|
+
|
|
2998
4411
|
type ProrationBehavior =
|
|
2999
4412
|
| 'always_invoice'
|
|
3000
4413
|
| 'create_prorations'
|
|
@@ -3179,6 +4592,11 @@ declare module 'stripe' {
|
|
|
3179
4592
|
*/
|
|
3180
4593
|
id: string;
|
|
3181
4594
|
|
|
4595
|
+
/**
|
|
4596
|
+
* 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.
|
|
4597
|
+
*/
|
|
4598
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
4599
|
+
|
|
3182
4600
|
/**
|
|
3183
4601
|
* 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.
|
|
3184
4602
|
*/
|
|
@@ -3227,12 +4645,56 @@ declare module 'stripe' {
|
|
|
3227
4645
|
*/
|
|
3228
4646
|
discount?: string;
|
|
3229
4647
|
|
|
4648
|
+
/**
|
|
4649
|
+
* Details to determine how long the discount should be applied for.
|
|
4650
|
+
*/
|
|
4651
|
+
discount_end?: Discount.DiscountEnd;
|
|
4652
|
+
|
|
3230
4653
|
/**
|
|
3231
4654
|
* ID of the promotion code to create a new discount for.
|
|
3232
4655
|
*/
|
|
3233
4656
|
promotion_code?: string;
|
|
3234
4657
|
}
|
|
3235
4658
|
|
|
4659
|
+
namespace Discount {
|
|
4660
|
+
interface DiscountEnd {
|
|
4661
|
+
/**
|
|
4662
|
+
* Time span for the redeemed discount.
|
|
4663
|
+
*/
|
|
4664
|
+
duration?: DiscountEnd.Duration;
|
|
4665
|
+
|
|
4666
|
+
/**
|
|
4667
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4668
|
+
*/
|
|
4669
|
+
timestamp?: number;
|
|
4670
|
+
|
|
4671
|
+
/**
|
|
4672
|
+
* The type of calculation made to determine when the discount ends.
|
|
4673
|
+
*/
|
|
4674
|
+
type: DiscountEnd.Type;
|
|
4675
|
+
}
|
|
4676
|
+
|
|
4677
|
+
namespace DiscountEnd {
|
|
4678
|
+
interface Duration {
|
|
4679
|
+
/**
|
|
4680
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4681
|
+
*/
|
|
4682
|
+
interval: Duration.Interval;
|
|
4683
|
+
|
|
4684
|
+
/**
|
|
4685
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4686
|
+
*/
|
|
4687
|
+
interval_count: number;
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4690
|
+
namespace Duration {
|
|
4691
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
type Type = 'duration' | 'timestamp';
|
|
4695
|
+
}
|
|
4696
|
+
}
|
|
4697
|
+
|
|
3236
4698
|
interface Period {
|
|
3237
4699
|
/**
|
|
3238
4700
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -3459,6 +4921,11 @@ declare module 'stripe' {
|
|
|
3459
4921
|
*/
|
|
3460
4922
|
expand?: Array<string>;
|
|
3461
4923
|
|
|
4924
|
+
/**
|
|
4925
|
+
* 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.
|
|
4926
|
+
*/
|
|
4927
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
4928
|
+
|
|
3462
4929
|
/**
|
|
3463
4930
|
* 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.
|
|
3464
4931
|
*/
|
|
@@ -3509,12 +4976,56 @@ declare module 'stripe' {
|
|
|
3509
4976
|
*/
|
|
3510
4977
|
discount?: string;
|
|
3511
4978
|
|
|
4979
|
+
/**
|
|
4980
|
+
* Details to determine how long the discount should be applied for.
|
|
4981
|
+
*/
|
|
4982
|
+
discount_end?: Discount.DiscountEnd;
|
|
4983
|
+
|
|
3512
4984
|
/**
|
|
3513
4985
|
* ID of the promotion code to create a new discount for.
|
|
3514
4986
|
*/
|
|
3515
4987
|
promotion_code?: string;
|
|
3516
4988
|
}
|
|
3517
4989
|
|
|
4990
|
+
namespace Discount {
|
|
4991
|
+
interface DiscountEnd {
|
|
4992
|
+
/**
|
|
4993
|
+
* Time span for the redeemed discount.
|
|
4994
|
+
*/
|
|
4995
|
+
duration?: DiscountEnd.Duration;
|
|
4996
|
+
|
|
4997
|
+
/**
|
|
4998
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4999
|
+
*/
|
|
5000
|
+
timestamp?: number;
|
|
5001
|
+
|
|
5002
|
+
/**
|
|
5003
|
+
* The type of calculation made to determine when the discount ends.
|
|
5004
|
+
*/
|
|
5005
|
+
type: DiscountEnd.Type;
|
|
5006
|
+
}
|
|
5007
|
+
|
|
5008
|
+
namespace DiscountEnd {
|
|
5009
|
+
interface Duration {
|
|
5010
|
+
/**
|
|
5011
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
5012
|
+
*/
|
|
5013
|
+
interval: Duration.Interval;
|
|
5014
|
+
|
|
5015
|
+
/**
|
|
5016
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
5017
|
+
*/
|
|
5018
|
+
interval_count: number;
|
|
5019
|
+
}
|
|
5020
|
+
|
|
5021
|
+
namespace Duration {
|
|
5022
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
type Type = 'duration' | 'timestamp';
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
|
|
3518
5029
|
interface Period {
|
|
3519
5030
|
/**
|
|
3520
5031
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|