stripe 18.4.0-beta.1 → 18.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -1278
- package/OPENAPI_VERSION +1 -1
- package/README.md +0 -1
- package/VERSION +1 -1
- package/cjs/Error.js +1 -91
- package/cjs/apiVersion.js +3 -2
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
- package/cjs/resources/PaymentIntents.js +0 -13
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources.js +10 -98
- package/cjs/stripe.core.js +2 -1
- package/esm/Error.js +0 -79
- package/esm/apiVersion.js +2 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
- package/esm/resources/PaymentIntents.js +0 -13
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources.js +1 -82
- package/esm/stripe.core.js +2 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +4 -6
- package/types/AccountSessions.d.ts +30 -45
- package/types/AccountSessionsResource.d.ts +36 -264
- package/types/Accounts.d.ts +2 -213
- package/types/AccountsResource.d.ts +3 -547
- package/types/Billing/CreditBalanceSummary.d.ts +0 -5
- package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
- package/types/Billing/CreditGrants.d.ts +0 -5
- package/types/Billing/CreditGrantsResource.d.ts +2 -12
- package/types/BillingPortal/Configurations.d.ts +21 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +48 -0
- package/types/BillingPortal/Sessions.d.ts +0 -5
- package/types/BillingPortal/SessionsResource.d.ts +4 -12
- package/types/Capabilities.d.ts +1 -6
- package/types/Cards.d.ts +0 -5
- package/types/CashBalances.d.ts +0 -5
- package/types/Charges.d.ts +10 -171
- package/types/ChargesResource.d.ts +0 -1406
- package/types/Checkout/Sessions.d.ts +20 -310
- package/types/Checkout/SessionsResource.d.ts +21 -326
- package/types/ConfirmationTokens.d.ts +3 -128
- package/types/Coupons.d.ts +0 -33
- package/types/CouponsResource.d.ts +0 -21
- package/types/CreditNoteLineItems.d.ts +0 -17
- package/types/CreditNotes.d.ts +0 -5
- package/types/CreditNotesResource.d.ts +0 -5
- package/types/CustomerBalanceTransactions.d.ts +0 -2
- package/types/CustomerCashBalanceTransactions.d.ts +0 -2
- package/types/CustomerSessions.d.ts +0 -5
- package/types/CustomerSessionsResource.d.ts +1 -6
- package/types/Customers.d.ts +1 -3
- package/types/CustomersResource.d.ts +0 -8
- package/types/Discounts.d.ts +0 -10
- package/types/Disputes.d.ts +1 -8
- package/types/Errors.d.ts +2 -69
- package/types/EventTypes.d.ts +0 -664
- package/types/Events.d.ts +14 -123
- package/types/FinancialConnections/Accounts.d.ts +1 -36
- package/types/FinancialConnections/AccountsResource.d.ts +3 -40
- package/types/FinancialConnections/Sessions.d.ts +1 -51
- package/types/FinancialConnections/SessionsResource.d.ts +1 -43
- package/types/Identity/VerificationSessions.d.ts +2 -7
- package/types/Identity/VerificationSessionsResource.d.ts +0 -7
- package/types/InvoiceItems.d.ts +0 -10
- package/types/InvoiceItemsResource.d.ts +7 -118
- package/types/InvoiceLineItems.d.ts +1 -45
- package/types/InvoicePayments.d.ts +0 -5
- package/types/InvoicePaymentsResource.d.ts +74 -0
- package/types/Invoices.d.ts +3 -133
- package/types/InvoicesResource.d.ts +31 -1433
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/Transactions.d.ts +0 -5
- package/types/Issuing/TransactionsResource.d.ts +0 -5
- package/types/LineItems.d.ts +0 -49
- package/types/Mandates.d.ts +0 -77
- package/types/PaymentIntents.d.ts +3 -769
- package/types/PaymentIntentsResource.d.ts +4133 -8848
- package/types/PaymentLinks.d.ts +5 -6
- package/types/PaymentLinksResource.d.ts +102 -15
- package/types/PaymentMethodConfigurations.d.ts +0 -180
- package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
- package/types/PaymentMethods.d.ts +3 -128
- package/types/PaymentMethodsResource.d.ts +3 -168
- package/types/Payouts.d.ts +0 -5
- package/types/PayoutsResource.d.ts +0 -5
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/PromotionCodes.d.ts +0 -5
- package/types/PromotionCodesResource.d.ts +0 -10
- package/types/Quotes.d.ts +1 -594
- package/types/QuotesResource.d.ts +281 -2623
- package/types/Radar/ValueLists.d.ts +1 -1
- package/types/Radar/ValueListsResource.d.ts +1 -1
- package/types/Refunds.d.ts +1 -15
- package/types/Reporting/ReportRunsResource.d.ts +1 -0
- package/types/Reviews.d.ts +2 -2
- package/types/SetupAttempts.d.ts +2 -48
- package/types/SetupIntents.d.ts +2 -118
- package/types/SetupIntentsResource.d.ts +3 -730
- package/types/Sources.d.ts +0 -29
- package/types/SubscriptionItems.d.ts +0 -21
- package/types/SubscriptionItemsResource.d.ts +2 -111
- package/types/SubscriptionSchedules.d.ts +0 -205
- package/types/SubscriptionSchedulesResource.d.ts +41 -1224
- package/types/Subscriptions.d.ts +1 -97
- package/types/SubscriptionsResource.d.ts +12 -391
- package/types/Tax/Registrations.d.ts +228 -27
- package/types/Tax/RegistrationsResource.d.ts +648 -27
- package/types/TaxIds.d.ts +0 -10
- package/types/TaxIdsResource.d.ts +0 -10
- package/types/Terminal/Configurations.d.ts +76 -0
- package/types/Terminal/ConfigurationsResource.d.ts +176 -0
- package/types/Terminal/Readers.d.ts +0 -20
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -126
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/Transfers.d.ts +0 -5
- package/types/TransfersResource.d.ts +0 -5
- package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
- package/types/Treasury/FinancialAccounts.d.ts +0 -5
- package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
- package/types/Treasury/OutboundTransfers.d.ts +0 -26
- package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
- package/types/Treasury/ReceivedCredits.d.ts +0 -26
- package/types/Treasury/ReceivedDebits.d.ts +0 -31
- package/types/V2/EventTypes.d.ts +4 -906
- package/types/WebhookEndpointsResource.d.ts +2 -79
- package/types/index.d.ts +2 -138
- package/types/lib.d.ts +2 -11
- package/types/test/typescriptTest.ts +3 -3
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/BalanceSettings.js +0 -10
- package/cjs/resources/Capital/FinancingOffers.js +0 -21
- package/cjs/resources/Capital/FinancingSummary.js +0 -12
- package/cjs/resources/Capital/FinancingTransactions.js +0 -17
- package/cjs/resources/ExternalAccounts.js +0 -23
- package/cjs/resources/FinancialConnections/Institutions.js +0 -17
- package/cjs/resources/FxQuotes.js +0 -15
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/PaymentRecords.js +0 -29
- package/cjs/resources/Privacy/RedactionJobs.js +0 -42
- package/cjs/resources/Tax/Associations.js +0 -9
- package/cjs/resources/Tax/Forms.js +0 -20
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- package/cjs/resources/V2/Core/AccountLinks.js +0 -9
- package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
- package/cjs/resources/V2/Core/Accounts.js +0 -25
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
- package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
- package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -25
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/BalanceSettings.js +0 -7
- package/esm/resources/Capital/FinancingOffers.js +0 -18
- package/esm/resources/Capital/FinancingSummary.js +0 -9
- package/esm/resources/Capital/FinancingTransactions.js +0 -14
- package/esm/resources/ExternalAccounts.js +0 -20
- package/esm/resources/FinancialConnections/Institutions.js +0 -14
- package/esm/resources/FxQuotes.js +0 -12
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/PaymentRecords.js +0 -26
- package/esm/resources/Privacy/RedactionJobs.js +0 -39
- package/esm/resources/Tax/Associations.js +0 -6
- package/esm/resources/Tax/Forms.js +0 -17
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- package/esm/resources/V2/Core/AccountLinks.js +0 -6
- package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
- package/esm/resources/V2/Core/Accounts.js +0 -22
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
- package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
- package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
- package/esm/resources/V2/Payments/OffSessionPayments.js +0 -22
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/BalanceSettings.d.ts +0 -89
- package/types/BalanceSettingsResource.d.ts +0 -108
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/ExternalAccountsResource.d.ts +0 -304
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -98
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/FxQuotes.d.ts +0 -153
- package/types/FxQuotesResource.d.ts +0 -130
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
- package/types/Issuing/Settlements.d.ts +0 -113
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1163
- package/types/OrdersResource.d.ts +0 -3139
- package/types/PaymentAttemptRecords.d.ts +0 -2161
- package/types/PaymentAttemptRecordsResource.d.ts +0 -47
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
- package/types/PaymentRecords.d.ts +0 -2154
- package/types/PaymentRecordsResource.d.ts +0 -455
- package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
- package/types/Privacy/RedactionJobs.d.ts +0 -111
- package/types/Privacy/RedactionJobsResource.d.ts +0 -230
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1696
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -845
- package/types/Tax/Associations.d.ts +0 -82
- package/types/Tax/AssociationsResource.d.ts +0 -29
- package/types/Tax/Forms.d.ts +0 -220
- package/types/Tax/FormsResource.d.ts +0 -107
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
- package/types/V2/Core/AccountLinks.d.ts +0 -106
- package/types/V2/Core/AccountLinksResource.d.ts +0 -90
- package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3780
- package/types/V2/Core/Accounts.d.ts +0 -8248
- package/types/V2/Core/AccountsResource.d.ts +0 -10257
- package/types/V2/Core/Persons.d.ts +0 -1872
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
- package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
- package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -550
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -289
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -168
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -208
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -151
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -87
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -262
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -155
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
- package/types/V2/MoneyManagement/Transactions.d.ts +0 -170
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
- package/types/V2/Payments/OffSessionPayments.d.ts +0 -162
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -159
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
declare module 'stripe' {
|
|
4
4
|
namespace Stripe {
|
|
5
5
|
interface SubscriptionScheduleCreateParams {
|
|
6
|
-
/**
|
|
7
|
-
* 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.
|
|
8
|
-
*/
|
|
9
|
-
billing_behavior?: SubscriptionScheduleCreateParams.BillingBehavior;
|
|
10
|
-
|
|
11
6
|
/**
|
|
12
7
|
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
13
8
|
*/
|
|
@@ -18,11 +13,6 @@ declare module 'stripe' {
|
|
|
18
13
|
*/
|
|
19
14
|
customer?: string;
|
|
20
15
|
|
|
21
|
-
/**
|
|
22
|
-
* The identifier of the account to create the subscription schedule for.
|
|
23
|
-
*/
|
|
24
|
-
customer_account?: string;
|
|
25
|
-
|
|
26
16
|
/**
|
|
27
17
|
* Object representing the subscription schedule's default settings.
|
|
28
18
|
*/
|
|
@@ -53,11 +43,6 @@ declare module 'stripe' {
|
|
|
53
43
|
*/
|
|
54
44
|
phases?: Array<SubscriptionScheduleCreateParams.Phase>;
|
|
55
45
|
|
|
56
|
-
/**
|
|
57
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
58
|
-
*/
|
|
59
|
-
prebilling?: SubscriptionScheduleCreateParams.Prebilling;
|
|
60
|
-
|
|
61
46
|
/**
|
|
62
47
|
* When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
|
63
48
|
*/
|
|
@@ -65,9 +50,10 @@ declare module 'stripe' {
|
|
|
65
50
|
}
|
|
66
51
|
|
|
67
52
|
namespace SubscriptionScheduleCreateParams {
|
|
68
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
69
|
-
|
|
70
53
|
interface BillingMode {
|
|
54
|
+
/**
|
|
55
|
+
* Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
|
56
|
+
*/
|
|
71
57
|
type: BillingMode.Type;
|
|
72
58
|
}
|
|
73
59
|
|
|
@@ -282,6 +268,11 @@ declare module 'stripe' {
|
|
|
282
268
|
*/
|
|
283
269
|
discounts?: Stripe.Emptyable<Array<Phase.Discount>>;
|
|
284
270
|
|
|
271
|
+
/**
|
|
272
|
+
* The number of intervals the phase should last. If set, `end_date` must not be set.
|
|
273
|
+
*/
|
|
274
|
+
duration?: Phase.Duration;
|
|
275
|
+
|
|
285
276
|
/**
|
|
286
277
|
* The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
|
287
278
|
*/
|
|
@@ -298,7 +289,7 @@ declare module 'stripe' {
|
|
|
298
289
|
items: Array<Phase.Item>;
|
|
299
290
|
|
|
300
291
|
/**
|
|
301
|
-
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
|
292
|
+
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
|
302
293
|
*/
|
|
303
294
|
iterations?: number;
|
|
304
295
|
|
|
@@ -312,11 +303,6 @@ declare module 'stripe' {
|
|
|
312
303
|
*/
|
|
313
304
|
on_behalf_of?: string;
|
|
314
305
|
|
|
315
|
-
/**
|
|
316
|
-
* 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).
|
|
317
|
-
*/
|
|
318
|
-
pause_collection?: Phase.PauseCollection;
|
|
319
|
-
|
|
320
306
|
/**
|
|
321
307
|
* 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.
|
|
322
308
|
*/
|
|
@@ -332,20 +318,10 @@ declare module 'stripe' {
|
|
|
332
318
|
*/
|
|
333
319
|
trial?: boolean;
|
|
334
320
|
|
|
335
|
-
/**
|
|
336
|
-
* Specify trial behavior when crossing phase boundaries
|
|
337
|
-
*/
|
|
338
|
-
trial_continuation?: Phase.TrialContinuation;
|
|
339
|
-
|
|
340
321
|
/**
|
|
341
322
|
* 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`
|
|
342
323
|
*/
|
|
343
324
|
trial_end?: number;
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Settings related to subscription trials.
|
|
347
|
-
*/
|
|
348
|
-
trial_settings?: Phase.TrialSettings;
|
|
349
325
|
}
|
|
350
326
|
|
|
351
327
|
namespace Phase {
|
|
@@ -388,56 +364,12 @@ declare module 'stripe' {
|
|
|
388
364
|
*/
|
|
389
365
|
discount?: string;
|
|
390
366
|
|
|
391
|
-
/**
|
|
392
|
-
* Details to determine how long the discount should be applied for.
|
|
393
|
-
*/
|
|
394
|
-
discount_end?: Discount.DiscountEnd;
|
|
395
|
-
|
|
396
367
|
/**
|
|
397
368
|
* ID of the promotion code to create a new discount for.
|
|
398
369
|
*/
|
|
399
370
|
promotion_code?: string;
|
|
400
371
|
}
|
|
401
372
|
|
|
402
|
-
namespace Discount {
|
|
403
|
-
interface DiscountEnd {
|
|
404
|
-
/**
|
|
405
|
-
* Time span for the redeemed discount.
|
|
406
|
-
*/
|
|
407
|
-
duration?: DiscountEnd.Duration;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
411
|
-
*/
|
|
412
|
-
timestamp?: number;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* The type of calculation made to determine when the discount ends.
|
|
416
|
-
*/
|
|
417
|
-
type: DiscountEnd.Type;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
namespace DiscountEnd {
|
|
421
|
-
interface Duration {
|
|
422
|
-
/**
|
|
423
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
424
|
-
*/
|
|
425
|
-
interval: Duration.Interval;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
429
|
-
*/
|
|
430
|
-
interval_count: number;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
namespace Duration {
|
|
434
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
type Type = 'duration' | 'timestamp';
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
373
|
interface PriceData {
|
|
442
374
|
/**
|
|
443
375
|
* 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).
|
|
@@ -527,54 +459,26 @@ declare module 'stripe' {
|
|
|
527
459
|
*/
|
|
528
460
|
discount?: string;
|
|
529
461
|
|
|
530
|
-
/**
|
|
531
|
-
* Details to determine how long the discount should be applied for.
|
|
532
|
-
*/
|
|
533
|
-
discount_end?: Discount.DiscountEnd;
|
|
534
|
-
|
|
535
462
|
/**
|
|
536
463
|
* ID of the promotion code to create a new discount for.
|
|
537
464
|
*/
|
|
538
465
|
promotion_code?: string;
|
|
539
466
|
}
|
|
540
467
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
duration?: DiscountEnd.Duration;
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
550
|
-
*/
|
|
551
|
-
timestamp?: number;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* The type of calculation made to determine when the discount ends.
|
|
555
|
-
*/
|
|
556
|
-
type: DiscountEnd.Type;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
namespace DiscountEnd {
|
|
560
|
-
interface Duration {
|
|
561
|
-
/**
|
|
562
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
563
|
-
*/
|
|
564
|
-
interval: Duration.Interval;
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
568
|
-
*/
|
|
569
|
-
interval_count: number;
|
|
570
|
-
}
|
|
468
|
+
interface Duration {
|
|
469
|
+
/**
|
|
470
|
+
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
471
|
+
*/
|
|
472
|
+
interval: Duration.Interval;
|
|
571
473
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
474
|
+
/**
|
|
475
|
+
* The multiplier applied to the interval.
|
|
476
|
+
*/
|
|
477
|
+
interval_count?: number;
|
|
478
|
+
}
|
|
575
479
|
|
|
576
|
-
|
|
577
|
-
|
|
480
|
+
namespace Duration {
|
|
481
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
578
482
|
}
|
|
579
483
|
|
|
580
484
|
interface InvoiceSettings {
|
|
@@ -652,11 +556,6 @@ declare module 'stripe' {
|
|
|
652
556
|
* 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.
|
|
653
557
|
*/
|
|
654
558
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Options that configure the trial on the subscription item.
|
|
658
|
-
*/
|
|
659
|
-
trial?: Item.Trial;
|
|
660
559
|
}
|
|
661
560
|
|
|
662
561
|
namespace Item {
|
|
@@ -678,56 +577,12 @@ declare module 'stripe' {
|
|
|
678
577
|
*/
|
|
679
578
|
discount?: string;
|
|
680
579
|
|
|
681
|
-
/**
|
|
682
|
-
* Details to determine how long the discount should be applied for.
|
|
683
|
-
*/
|
|
684
|
-
discount_end?: Discount.DiscountEnd;
|
|
685
|
-
|
|
686
580
|
/**
|
|
687
581
|
* ID of the promotion code to create a new discount for.
|
|
688
582
|
*/
|
|
689
583
|
promotion_code?: string;
|
|
690
584
|
}
|
|
691
585
|
|
|
692
|
-
namespace Discount {
|
|
693
|
-
interface DiscountEnd {
|
|
694
|
-
/**
|
|
695
|
-
* Time span for the redeemed discount.
|
|
696
|
-
*/
|
|
697
|
-
duration?: DiscountEnd.Duration;
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
701
|
-
*/
|
|
702
|
-
timestamp?: number;
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
* The type of calculation made to determine when the discount ends.
|
|
706
|
-
*/
|
|
707
|
-
type: DiscountEnd.Type;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
namespace DiscountEnd {
|
|
711
|
-
interface Duration {
|
|
712
|
-
/**
|
|
713
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
714
|
-
*/
|
|
715
|
-
interval: Duration.Interval;
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
719
|
-
*/
|
|
720
|
-
interval_count: number;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
namespace Duration {
|
|
724
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
type Type = 'duration' | 'timestamp';
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
|
|
731
586
|
interface PriceData {
|
|
732
587
|
/**
|
|
733
588
|
* 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).
|
|
@@ -779,33 +634,6 @@ declare module 'stripe' {
|
|
|
779
634
|
|
|
780
635
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
781
636
|
}
|
|
782
|
-
|
|
783
|
-
interface Trial {
|
|
784
|
-
/**
|
|
785
|
-
* 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.
|
|
786
|
-
*/
|
|
787
|
-
converts_to?: Array<string>;
|
|
788
|
-
|
|
789
|
-
/**
|
|
790
|
-
* Determines the type of trial for this item.
|
|
791
|
-
*/
|
|
792
|
-
type: Trial.Type;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
namespace Trial {
|
|
796
|
-
type Type = 'free' | 'paid';
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
interface PauseCollection {
|
|
801
|
-
/**
|
|
802
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
803
|
-
*/
|
|
804
|
-
behavior: PauseCollection.Behavior;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
namespace PauseCollection {
|
|
808
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
809
637
|
}
|
|
810
638
|
|
|
811
639
|
type ProrationBehavior =
|
|
@@ -824,44 +652,6 @@ declare module 'stripe' {
|
|
|
824
652
|
*/
|
|
825
653
|
destination: string;
|
|
826
654
|
}
|
|
827
|
-
|
|
828
|
-
type TrialContinuation = 'continue' | 'none';
|
|
829
|
-
|
|
830
|
-
interface TrialSettings {
|
|
831
|
-
/**
|
|
832
|
-
* Defines how the subscription should behave when a trial ends.
|
|
833
|
-
*/
|
|
834
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
namespace TrialSettings {
|
|
838
|
-
interface EndBehavior {
|
|
839
|
-
/**
|
|
840
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
841
|
-
*/
|
|
842
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
namespace EndBehavior {
|
|
846
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
interface Prebilling {
|
|
852
|
-
/**
|
|
853
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
854
|
-
*/
|
|
855
|
-
iterations: number;
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
859
|
-
*/
|
|
860
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
namespace Prebilling {
|
|
864
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
865
655
|
}
|
|
866
656
|
}
|
|
867
657
|
|
|
@@ -873,11 +663,6 @@ declare module 'stripe' {
|
|
|
873
663
|
}
|
|
874
664
|
|
|
875
665
|
interface SubscriptionScheduleUpdateParams {
|
|
876
|
-
/**
|
|
877
|
-
* 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.
|
|
878
|
-
*/
|
|
879
|
-
billing_behavior?: SubscriptionScheduleUpdateParams.BillingBehavior;
|
|
880
|
-
|
|
881
666
|
/**
|
|
882
667
|
* Object representing the subscription schedule's default settings.
|
|
883
668
|
*/
|
|
@@ -903,11 +688,6 @@ declare module 'stripe' {
|
|
|
903
688
|
*/
|
|
904
689
|
phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
|
|
905
690
|
|
|
906
|
-
/**
|
|
907
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
908
|
-
*/
|
|
909
|
-
prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
|
|
910
|
-
|
|
911
691
|
/**
|
|
912
692
|
* If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
|
|
913
693
|
*/
|
|
@@ -915,8 +695,6 @@ declare module 'stripe' {
|
|
|
915
695
|
}
|
|
916
696
|
|
|
917
697
|
namespace SubscriptionScheduleUpdateParams {
|
|
918
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
919
|
-
|
|
920
698
|
interface DefaultSettings {
|
|
921
699
|
/**
|
|
922
700
|
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
|
@@ -1124,6 +902,11 @@ declare module 'stripe' {
|
|
|
1124
902
|
*/
|
|
1125
903
|
discounts?: Stripe.Emptyable<Array<Phase.Discount>>;
|
|
1126
904
|
|
|
905
|
+
/**
|
|
906
|
+
* The number of intervals the phase should last. If set, `end_date` must not be set.
|
|
907
|
+
*/
|
|
908
|
+
duration?: Phase.Duration;
|
|
909
|
+
|
|
1127
910
|
/**
|
|
1128
911
|
* The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
|
1129
912
|
*/
|
|
@@ -1140,7 +923,7 @@ declare module 'stripe' {
|
|
|
1140
923
|
items: Array<Phase.Item>;
|
|
1141
924
|
|
|
1142
925
|
/**
|
|
1143
|
-
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
|
926
|
+
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
|
1144
927
|
*/
|
|
1145
928
|
iterations?: number;
|
|
1146
929
|
|
|
@@ -1154,11 +937,6 @@ declare module 'stripe' {
|
|
|
1154
937
|
*/
|
|
1155
938
|
on_behalf_of?: string;
|
|
1156
939
|
|
|
1157
|
-
/**
|
|
1158
|
-
* 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).
|
|
1159
|
-
*/
|
|
1160
|
-
pause_collection?: Phase.PauseCollection;
|
|
1161
|
-
|
|
1162
940
|
/**
|
|
1163
941
|
* 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.
|
|
1164
942
|
*/
|
|
@@ -1179,20 +957,10 @@ declare module 'stripe' {
|
|
|
1179
957
|
*/
|
|
1180
958
|
trial?: boolean;
|
|
1181
959
|
|
|
1182
|
-
/**
|
|
1183
|
-
* Specify trial behavior when crossing phase boundaries
|
|
1184
|
-
*/
|
|
1185
|
-
trial_continuation?: Phase.TrialContinuation;
|
|
1186
|
-
|
|
1187
960
|
/**
|
|
1188
961
|
* 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`
|
|
1189
962
|
*/
|
|
1190
963
|
trial_end?: number | 'now';
|
|
1191
|
-
|
|
1192
|
-
/**
|
|
1193
|
-
* Settings related to subscription trials.
|
|
1194
|
-
*/
|
|
1195
|
-
trial_settings?: Phase.TrialSettings;
|
|
1196
964
|
}
|
|
1197
965
|
|
|
1198
966
|
namespace Phase {
|
|
@@ -1235,56 +1003,12 @@ declare module 'stripe' {
|
|
|
1235
1003
|
*/
|
|
1236
1004
|
discount?: string;
|
|
1237
1005
|
|
|
1238
|
-
/**
|
|
1239
|
-
* Details to determine how long the discount should be applied for.
|
|
1240
|
-
*/
|
|
1241
|
-
discount_end?: Discount.DiscountEnd;
|
|
1242
|
-
|
|
1243
1006
|
/**
|
|
1244
1007
|
* ID of the promotion code to create a new discount for.
|
|
1245
1008
|
*/
|
|
1246
1009
|
promotion_code?: string;
|
|
1247
1010
|
}
|
|
1248
1011
|
|
|
1249
|
-
namespace Discount {
|
|
1250
|
-
interface DiscountEnd {
|
|
1251
|
-
/**
|
|
1252
|
-
* Time span for the redeemed discount.
|
|
1253
|
-
*/
|
|
1254
|
-
duration?: DiscountEnd.Duration;
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1258
|
-
*/
|
|
1259
|
-
timestamp?: number;
|
|
1260
|
-
|
|
1261
|
-
/**
|
|
1262
|
-
* The type of calculation made to determine when the discount ends.
|
|
1263
|
-
*/
|
|
1264
|
-
type: DiscountEnd.Type;
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
namespace DiscountEnd {
|
|
1268
|
-
interface Duration {
|
|
1269
|
-
/**
|
|
1270
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1271
|
-
*/
|
|
1272
|
-
interval: Duration.Interval;
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1276
|
-
*/
|
|
1277
|
-
interval_count: number;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
namespace Duration {
|
|
1281
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
type Type = 'duration' | 'timestamp';
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
1012
|
interface PriceData {
|
|
1289
1013
|
/**
|
|
1290
1014
|
* 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).
|
|
@@ -1374,54 +1098,26 @@ declare module 'stripe' {
|
|
|
1374
1098
|
*/
|
|
1375
1099
|
discount?: string;
|
|
1376
1100
|
|
|
1377
|
-
/**
|
|
1378
|
-
* Details to determine how long the discount should be applied for.
|
|
1379
|
-
*/
|
|
1380
|
-
discount_end?: Discount.DiscountEnd;
|
|
1381
|
-
|
|
1382
1101
|
/**
|
|
1383
1102
|
* ID of the promotion code to create a new discount for.
|
|
1384
1103
|
*/
|
|
1385
1104
|
promotion_code?: string;
|
|
1386
1105
|
}
|
|
1387
1106
|
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
duration?: DiscountEnd.Duration;
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1397
|
-
*/
|
|
1398
|
-
timestamp?: number;
|
|
1399
|
-
|
|
1400
|
-
/**
|
|
1401
|
-
* The type of calculation made to determine when the discount ends.
|
|
1402
|
-
*/
|
|
1403
|
-
type: DiscountEnd.Type;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
namespace DiscountEnd {
|
|
1407
|
-
interface Duration {
|
|
1408
|
-
/**
|
|
1409
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1410
|
-
*/
|
|
1411
|
-
interval: Duration.Interval;
|
|
1412
|
-
|
|
1413
|
-
/**
|
|
1414
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1415
|
-
*/
|
|
1416
|
-
interval_count: number;
|
|
1417
|
-
}
|
|
1107
|
+
interface Duration {
|
|
1108
|
+
/**
|
|
1109
|
+
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
1110
|
+
*/
|
|
1111
|
+
interval: Duration.Interval;
|
|
1418
1112
|
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1113
|
+
/**
|
|
1114
|
+
* The multiplier applied to the interval.
|
|
1115
|
+
*/
|
|
1116
|
+
interval_count?: number;
|
|
1117
|
+
}
|
|
1422
1118
|
|
|
1423
|
-
|
|
1424
|
-
|
|
1119
|
+
namespace Duration {
|
|
1120
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1425
1121
|
}
|
|
1426
1122
|
|
|
1427
1123
|
interface InvoiceSettings {
|
|
@@ -1499,11 +1195,6 @@ declare module 'stripe' {
|
|
|
1499
1195
|
* 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.
|
|
1500
1196
|
*/
|
|
1501
1197
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1502
|
-
|
|
1503
|
-
/**
|
|
1504
|
-
* Options that configure the trial on the subscription item.
|
|
1505
|
-
*/
|
|
1506
|
-
trial?: Item.Trial;
|
|
1507
1198
|
}
|
|
1508
1199
|
|
|
1509
1200
|
namespace Item {
|
|
@@ -1525,56 +1216,12 @@ declare module 'stripe' {
|
|
|
1525
1216
|
*/
|
|
1526
1217
|
discount?: string;
|
|
1527
1218
|
|
|
1528
|
-
/**
|
|
1529
|
-
* Details to determine how long the discount should be applied for.
|
|
1530
|
-
*/
|
|
1531
|
-
discount_end?: Discount.DiscountEnd;
|
|
1532
|
-
|
|
1533
1219
|
/**
|
|
1534
1220
|
* ID of the promotion code to create a new discount for.
|
|
1535
1221
|
*/
|
|
1536
1222
|
promotion_code?: string;
|
|
1537
1223
|
}
|
|
1538
1224
|
|
|
1539
|
-
namespace Discount {
|
|
1540
|
-
interface DiscountEnd {
|
|
1541
|
-
/**
|
|
1542
|
-
* Time span for the redeemed discount.
|
|
1543
|
-
*/
|
|
1544
|
-
duration?: DiscountEnd.Duration;
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1548
|
-
*/
|
|
1549
|
-
timestamp?: number;
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* The type of calculation made to determine when the discount ends.
|
|
1553
|
-
*/
|
|
1554
|
-
type: DiscountEnd.Type;
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
namespace DiscountEnd {
|
|
1558
|
-
interface Duration {
|
|
1559
|
-
/**
|
|
1560
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1561
|
-
*/
|
|
1562
|
-
interval: Duration.Interval;
|
|
1563
|
-
|
|
1564
|
-
/**
|
|
1565
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1566
|
-
*/
|
|
1567
|
-
interval_count: number;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
namespace Duration {
|
|
1571
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
type Type = 'duration' | 'timestamp';
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
1225
|
interface PriceData {
|
|
1579
1226
|
/**
|
|
1580
1227
|
* 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).
|
|
@@ -1626,33 +1273,6 @@ declare module 'stripe' {
|
|
|
1626
1273
|
|
|
1627
1274
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1628
1275
|
}
|
|
1629
|
-
|
|
1630
|
-
interface Trial {
|
|
1631
|
-
/**
|
|
1632
|
-
* 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.
|
|
1633
|
-
*/
|
|
1634
|
-
converts_to?: Array<string>;
|
|
1635
|
-
|
|
1636
|
-
/**
|
|
1637
|
-
* Determines the type of trial for this item.
|
|
1638
|
-
*/
|
|
1639
|
-
type: Trial.Type;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
namespace Trial {
|
|
1643
|
-
type Type = 'free' | 'paid';
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
interface PauseCollection {
|
|
1648
|
-
/**
|
|
1649
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1650
|
-
*/
|
|
1651
|
-
behavior: PauseCollection.Behavior;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
namespace PauseCollection {
|
|
1655
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1656
1276
|
}
|
|
1657
1277
|
|
|
1658
1278
|
type ProrationBehavior =
|
|
@@ -1671,44 +1291,6 @@ declare module 'stripe' {
|
|
|
1671
1291
|
*/
|
|
1672
1292
|
destination: string;
|
|
1673
1293
|
}
|
|
1674
|
-
|
|
1675
|
-
type TrialContinuation = 'continue' | 'none';
|
|
1676
|
-
|
|
1677
|
-
interface TrialSettings {
|
|
1678
|
-
/**
|
|
1679
|
-
* Defines how the subscription should behave when a trial ends.
|
|
1680
|
-
*/
|
|
1681
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
namespace TrialSettings {
|
|
1685
|
-
interface EndBehavior {
|
|
1686
|
-
/**
|
|
1687
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1688
|
-
*/
|
|
1689
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
namespace EndBehavior {
|
|
1693
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
interface Prebilling {
|
|
1699
|
-
/**
|
|
1700
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
1701
|
-
*/
|
|
1702
|
-
iterations: number;
|
|
1703
|
-
|
|
1704
|
-
/**
|
|
1705
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
1706
|
-
*/
|
|
1707
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
namespace Prebilling {
|
|
1711
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
1712
1294
|
}
|
|
1713
1295
|
|
|
1714
1296
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
@@ -1735,11 +1317,6 @@ declare module 'stripe' {
|
|
|
1735
1317
|
*/
|
|
1736
1318
|
customer?: string;
|
|
1737
1319
|
|
|
1738
|
-
/**
|
|
1739
|
-
* Only return subscription schedules for the given account.
|
|
1740
|
-
*/
|
|
1741
|
-
customer_account?: string;
|
|
1742
|
-
|
|
1743
1320
|
/**
|
|
1744
1321
|
* Specifies which fields in the response should be expanded.
|
|
1745
1322
|
*/
|
|
@@ -1756,756 +1333,9 @@ declare module 'stripe' {
|
|
|
1756
1333
|
scheduled?: boolean;
|
|
1757
1334
|
}
|
|
1758
1335
|
|
|
1759
|
-
interface
|
|
1336
|
+
interface SubscriptionScheduleCancelParams {
|
|
1760
1337
|
/**
|
|
1761
|
-
*
|
|
1762
|
-
*/
|
|
1763
|
-
amendments?: Array<SubscriptionScheduleAmendParams.Amendment>;
|
|
1764
|
-
|
|
1765
|
-
/**
|
|
1766
|
-
* Specifies which fields in the response should be expanded.
|
|
1767
|
-
*/
|
|
1768
|
-
expand?: Array<string>;
|
|
1769
|
-
|
|
1770
|
-
/**
|
|
1771
|
-
* Provide any time periods to bill in advance.
|
|
1772
|
-
*/
|
|
1773
|
-
prebilling?: Stripe.Emptyable<
|
|
1774
|
-
Array<SubscriptionScheduleAmendParams.Prebilling>
|
|
1775
|
-
>;
|
|
1776
|
-
|
|
1777
|
-
/**
|
|
1778
|
-
* In cases where the amendment changes the currently active phase,
|
|
1779
|
-
* specifies if and how to prorate at the time of the request.
|
|
1780
|
-
*/
|
|
1781
|
-
proration_behavior?: SubscriptionScheduleAmendParams.ProrationBehavior;
|
|
1782
|
-
|
|
1783
|
-
/**
|
|
1784
|
-
* Changes to apply to the subscription schedule.
|
|
1785
|
-
*/
|
|
1786
|
-
schedule_settings?: SubscriptionScheduleAmendParams.ScheduleSettings;
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
namespace SubscriptionScheduleAmendParams {
|
|
1790
|
-
interface Amendment {
|
|
1791
|
-
/**
|
|
1792
|
-
* 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.
|
|
1793
|
-
*/
|
|
1794
|
-
amendment_end?: Amendment.AmendmentEnd;
|
|
1795
|
-
|
|
1796
|
-
/**
|
|
1797
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1798
|
-
*/
|
|
1799
|
-
amendment_start: Amendment.AmendmentStart;
|
|
1800
|
-
|
|
1801
|
-
/**
|
|
1802
|
-
* 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.
|
|
1803
|
-
*/
|
|
1804
|
-
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
1808
|
-
*/
|
|
1809
|
-
discount_actions?: Array<Amendment.DiscountAction>;
|
|
1810
|
-
|
|
1811
|
-
/**
|
|
1812
|
-
* Changes to the subscription items during the amendment time span.
|
|
1813
|
-
*/
|
|
1814
|
-
item_actions?: Array<Amendment.ItemAction>;
|
|
1815
|
-
|
|
1816
|
-
/**
|
|
1817
|
-
* Instructions for how to modify phase metadata
|
|
1818
|
-
*/
|
|
1819
|
-
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1822
|
-
* 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`.
|
|
1823
|
-
*/
|
|
1824
|
-
proration_behavior?: Amendment.ProrationBehavior;
|
|
1825
|
-
|
|
1826
|
-
/**
|
|
1827
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
1828
|
-
*/
|
|
1829
|
-
set_pause_collection?: Amendment.SetPauseCollection;
|
|
1830
|
-
|
|
1831
|
-
/**
|
|
1832
|
-
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
1833
|
-
*/
|
|
1834
|
-
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
1835
|
-
|
|
1836
|
-
/**
|
|
1837
|
-
* Settings related to subscription trials.
|
|
1838
|
-
*/
|
|
1839
|
-
trial_settings?: Amendment.TrialSettings;
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
namespace Amendment {
|
|
1843
|
-
interface AmendmentEnd {
|
|
1844
|
-
/**
|
|
1845
|
-
* Use the `end` time of a given discount.
|
|
1846
|
-
*/
|
|
1847
|
-
discount_end?: AmendmentEnd.DiscountEnd;
|
|
1848
|
-
|
|
1849
|
-
/**
|
|
1850
|
-
* Time span for the amendment starting from the `amendment_start`.
|
|
1851
|
-
*/
|
|
1852
|
-
duration?: AmendmentEnd.Duration;
|
|
1853
|
-
|
|
1854
|
-
/**
|
|
1855
|
-
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
1856
|
-
*/
|
|
1857
|
-
timestamp?: number;
|
|
1858
|
-
|
|
1859
|
-
/**
|
|
1860
|
-
* Select one of three ways to pass the `amendment_end`.
|
|
1861
|
-
*/
|
|
1862
|
-
type: AmendmentEnd.Type;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
namespace AmendmentEnd {
|
|
1866
|
-
interface DiscountEnd {
|
|
1867
|
-
/**
|
|
1868
|
-
* The ID of a specific discount.
|
|
1869
|
-
*/
|
|
1870
|
-
discount: string;
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
interface Duration {
|
|
1874
|
-
/**
|
|
1875
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1876
|
-
*/
|
|
1877
|
-
interval: Duration.Interval;
|
|
1878
|
-
|
|
1879
|
-
/**
|
|
1880
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1881
|
-
*/
|
|
1882
|
-
interval_count: number;
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
namespace Duration {
|
|
1886
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
type Type =
|
|
1890
|
-
| 'discount_end'
|
|
1891
|
-
| 'duration'
|
|
1892
|
-
| 'schedule_end'
|
|
1893
|
-
| 'timestamp'
|
|
1894
|
-
| 'trial_end'
|
|
1895
|
-
| 'trial_start'
|
|
1896
|
-
| 'upcoming_invoice';
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
interface AmendmentStart {
|
|
1900
|
-
/**
|
|
1901
|
-
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
1902
|
-
*/
|
|
1903
|
-
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
1904
|
-
|
|
1905
|
-
/**
|
|
1906
|
-
* Use the `end` time of a given discount.
|
|
1907
|
-
*/
|
|
1908
|
-
discount_end?: AmendmentStart.DiscountEnd;
|
|
1909
|
-
|
|
1910
|
-
/**
|
|
1911
|
-
* A precise Unix timestamp for the amendment to start.
|
|
1912
|
-
*/
|
|
1913
|
-
timestamp?: number;
|
|
1914
|
-
|
|
1915
|
-
/**
|
|
1916
|
-
* Select one of three ways to pass the `amendment_start`.
|
|
1917
|
-
*/
|
|
1918
|
-
type: AmendmentStart.Type;
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
namespace AmendmentStart {
|
|
1922
|
-
interface AmendmentEnd {
|
|
1923
|
-
/**
|
|
1924
|
-
* 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.
|
|
1925
|
-
*/
|
|
1926
|
-
index: number;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
interface DiscountEnd {
|
|
1930
|
-
/**
|
|
1931
|
-
* The ID of a specific discount.
|
|
1932
|
-
*/
|
|
1933
|
-
discount: string;
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
type Type =
|
|
1937
|
-
| 'amendment_end'
|
|
1938
|
-
| 'discount_end'
|
|
1939
|
-
| 'now'
|
|
1940
|
-
| 'schedule_end'
|
|
1941
|
-
| 'timestamp'
|
|
1942
|
-
| 'trial_end'
|
|
1943
|
-
| 'trial_start'
|
|
1944
|
-
| 'upcoming_invoice';
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
1948
|
-
|
|
1949
|
-
interface DiscountAction {
|
|
1950
|
-
/**
|
|
1951
|
-
* Details of the discount to add.
|
|
1952
|
-
*/
|
|
1953
|
-
add?: DiscountAction.Add;
|
|
1954
|
-
|
|
1955
|
-
/**
|
|
1956
|
-
* Details of the discount to remove.
|
|
1957
|
-
*/
|
|
1958
|
-
remove?: DiscountAction.Remove;
|
|
1959
|
-
|
|
1960
|
-
/**
|
|
1961
|
-
* Details of the discount to replace the existing discounts with.
|
|
1962
|
-
*/
|
|
1963
|
-
set?: DiscountAction.Set;
|
|
1964
|
-
|
|
1965
|
-
/**
|
|
1966
|
-
* Determines the type of discount action.
|
|
1967
|
-
*/
|
|
1968
|
-
type: DiscountAction.Type;
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
namespace DiscountAction {
|
|
1972
|
-
interface Add {
|
|
1973
|
-
/**
|
|
1974
|
-
* The coupon code to redeem.
|
|
1975
|
-
*/
|
|
1976
|
-
coupon?: string;
|
|
1977
|
-
|
|
1978
|
-
/**
|
|
1979
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
1980
|
-
*/
|
|
1981
|
-
discount?: string;
|
|
1982
|
-
|
|
1983
|
-
/**
|
|
1984
|
-
* Details to determine how long the discount should be applied for.
|
|
1985
|
-
*/
|
|
1986
|
-
discount_end?: Add.DiscountEnd;
|
|
1987
|
-
|
|
1988
|
-
/**
|
|
1989
|
-
* 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.
|
|
1990
|
-
*/
|
|
1991
|
-
index?: number;
|
|
1992
|
-
|
|
1993
|
-
/**
|
|
1994
|
-
* The promotion code to redeem.
|
|
1995
|
-
*/
|
|
1996
|
-
promotion_code?: string;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
namespace Add {
|
|
2000
|
-
interface DiscountEnd {
|
|
2001
|
-
/**
|
|
2002
|
-
* The type of calculation made to determine when the discount ends.
|
|
2003
|
-
*/
|
|
2004
|
-
type: 'amendment_end';
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
interface Remove {
|
|
2009
|
-
/**
|
|
2010
|
-
* The coupon code to remove from the `discounts` array.
|
|
2011
|
-
*/
|
|
2012
|
-
coupon?: string;
|
|
2013
|
-
|
|
2014
|
-
/**
|
|
2015
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
2016
|
-
*/
|
|
2017
|
-
discount?: string;
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
2021
|
-
*/
|
|
2022
|
-
promotion_code?: string;
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
interface Set {
|
|
2026
|
-
/**
|
|
2027
|
-
* The coupon code to replace the `discounts` array with.
|
|
2028
|
-
*/
|
|
2029
|
-
coupon?: string;
|
|
2030
|
-
|
|
2031
|
-
/**
|
|
2032
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
2033
|
-
*/
|
|
2034
|
-
discount?: string;
|
|
2035
|
-
|
|
2036
|
-
/**
|
|
2037
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2038
|
-
*/
|
|
2039
|
-
promotion_code?: string;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
interface ItemAction {
|
|
2046
|
-
/**
|
|
2047
|
-
* 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.
|
|
2048
|
-
*/
|
|
2049
|
-
add?: ItemAction.Add;
|
|
2050
|
-
|
|
2051
|
-
/**
|
|
2052
|
-
* Details of the subscription item to remove.
|
|
2053
|
-
*/
|
|
2054
|
-
remove?: ItemAction.Remove;
|
|
2055
|
-
|
|
2056
|
-
/**
|
|
2057
|
-
* 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.
|
|
2058
|
-
*/
|
|
2059
|
-
set?: ItemAction.Set;
|
|
2060
|
-
|
|
2061
|
-
/**
|
|
2062
|
-
* Determines the type of item action.
|
|
2063
|
-
*/
|
|
2064
|
-
type: ItemAction.Type;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
namespace ItemAction {
|
|
2068
|
-
interface Add {
|
|
2069
|
-
/**
|
|
2070
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
2071
|
-
*/
|
|
2072
|
-
discounts?: Array<Add.Discount>;
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
* 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`.
|
|
2076
|
-
*/
|
|
2077
|
-
metadata?: Stripe.MetadataParam;
|
|
2078
|
-
|
|
2079
|
-
/**
|
|
2080
|
-
* The ID of the price object.
|
|
2081
|
-
*/
|
|
2082
|
-
price: string;
|
|
2083
|
-
|
|
2084
|
-
/**
|
|
2085
|
-
* Quantity for this item.
|
|
2086
|
-
*/
|
|
2087
|
-
quantity?: number;
|
|
2088
|
-
|
|
2089
|
-
/**
|
|
2090
|
-
* 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`.
|
|
2091
|
-
*/
|
|
2092
|
-
tax_rates?: Array<string>;
|
|
2093
|
-
|
|
2094
|
-
/**
|
|
2095
|
-
* Options that configure the trial on the subscription item.
|
|
2096
|
-
*/
|
|
2097
|
-
trial?: Add.Trial;
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
namespace Add {
|
|
2101
|
-
interface Discount {
|
|
2102
|
-
/**
|
|
2103
|
-
* ID of the coupon to create a new discount for.
|
|
2104
|
-
*/
|
|
2105
|
-
coupon?: string;
|
|
2106
|
-
|
|
2107
|
-
/**
|
|
2108
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2109
|
-
*/
|
|
2110
|
-
discount?: string;
|
|
2111
|
-
|
|
2112
|
-
/**
|
|
2113
|
-
* Details to determine how long the discount should be applied for.
|
|
2114
|
-
*/
|
|
2115
|
-
discount_end?: Discount.DiscountEnd;
|
|
2116
|
-
|
|
2117
|
-
/**
|
|
2118
|
-
* ID of the promotion code to create a new discount for.
|
|
2119
|
-
*/
|
|
2120
|
-
promotion_code?: string;
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
namespace Discount {
|
|
2124
|
-
interface DiscountEnd {
|
|
2125
|
-
/**
|
|
2126
|
-
* Time span for the redeemed discount.
|
|
2127
|
-
*/
|
|
2128
|
-
duration?: DiscountEnd.Duration;
|
|
2129
|
-
|
|
2130
|
-
/**
|
|
2131
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2132
|
-
*/
|
|
2133
|
-
timestamp?: number;
|
|
2134
|
-
|
|
2135
|
-
/**
|
|
2136
|
-
* The type of calculation made to determine when the discount ends.
|
|
2137
|
-
*/
|
|
2138
|
-
type: DiscountEnd.Type;
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
namespace DiscountEnd {
|
|
2142
|
-
interface Duration {
|
|
2143
|
-
/**
|
|
2144
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2145
|
-
*/
|
|
2146
|
-
interval: Duration.Interval;
|
|
2147
|
-
|
|
2148
|
-
/**
|
|
2149
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2150
|
-
*/
|
|
2151
|
-
interval_count: number;
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
namespace Duration {
|
|
2155
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
type Type = 'duration' | 'timestamp';
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
interface Trial {
|
|
2163
|
-
/**
|
|
2164
|
-
* 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.
|
|
2165
|
-
*/
|
|
2166
|
-
converts_to?: Array<string>;
|
|
2167
|
-
|
|
2168
|
-
/**
|
|
2169
|
-
* Determines the type of trial for this item.
|
|
2170
|
-
*/
|
|
2171
|
-
type: Trial.Type;
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
namespace Trial {
|
|
2175
|
-
type Type = 'free' | 'paid';
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2178
|
-
|
|
2179
|
-
interface Remove {
|
|
2180
|
-
/**
|
|
2181
|
-
* ID of a price to remove.
|
|
2182
|
-
*/
|
|
2183
|
-
price: string;
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
interface Set {
|
|
2187
|
-
/**
|
|
2188
|
-
* 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`.
|
|
2189
|
-
*/
|
|
2190
|
-
discounts?: Array<Set.Discount>;
|
|
2191
|
-
|
|
2192
|
-
/**
|
|
2193
|
-
* 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`.
|
|
2194
|
-
*/
|
|
2195
|
-
metadata?: Stripe.MetadataParam;
|
|
2196
|
-
|
|
2197
|
-
/**
|
|
2198
|
-
* The ID of the price object.
|
|
2199
|
-
*/
|
|
2200
|
-
price: string;
|
|
2201
|
-
|
|
2202
|
-
/**
|
|
2203
|
-
* 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`.
|
|
2204
|
-
*/
|
|
2205
|
-
quantity?: number;
|
|
2206
|
-
|
|
2207
|
-
/**
|
|
2208
|
-
* 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`.
|
|
2209
|
-
*/
|
|
2210
|
-
tax_rates?: Array<string>;
|
|
2211
|
-
|
|
2212
|
-
/**
|
|
2213
|
-
* 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`.
|
|
2214
|
-
*/
|
|
2215
|
-
trial?: Set.Trial;
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
namespace Set {
|
|
2219
|
-
interface Discount {
|
|
2220
|
-
/**
|
|
2221
|
-
* ID of the coupon to create a new discount for.
|
|
2222
|
-
*/
|
|
2223
|
-
coupon?: string;
|
|
2224
|
-
|
|
2225
|
-
/**
|
|
2226
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2227
|
-
*/
|
|
2228
|
-
discount?: string;
|
|
2229
|
-
|
|
2230
|
-
/**
|
|
2231
|
-
* Details to determine how long the discount should be applied for.
|
|
2232
|
-
*/
|
|
2233
|
-
discount_end?: Discount.DiscountEnd;
|
|
2234
|
-
|
|
2235
|
-
/**
|
|
2236
|
-
* ID of the promotion code to create a new discount for.
|
|
2237
|
-
*/
|
|
2238
|
-
promotion_code?: string;
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
namespace Discount {
|
|
2242
|
-
interface DiscountEnd {
|
|
2243
|
-
/**
|
|
2244
|
-
* Time span for the redeemed discount.
|
|
2245
|
-
*/
|
|
2246
|
-
duration?: DiscountEnd.Duration;
|
|
2247
|
-
|
|
2248
|
-
/**
|
|
2249
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2250
|
-
*/
|
|
2251
|
-
timestamp?: number;
|
|
2252
|
-
|
|
2253
|
-
/**
|
|
2254
|
-
* The type of calculation made to determine when the discount ends.
|
|
2255
|
-
*/
|
|
2256
|
-
type: DiscountEnd.Type;
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
namespace DiscountEnd {
|
|
2260
|
-
interface Duration {
|
|
2261
|
-
/**
|
|
2262
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2263
|
-
*/
|
|
2264
|
-
interval: Duration.Interval;
|
|
2265
|
-
|
|
2266
|
-
/**
|
|
2267
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2268
|
-
*/
|
|
2269
|
-
interval_count: number;
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
namespace Duration {
|
|
2273
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
type Type = 'duration' | 'timestamp';
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
|
-
interface Trial {
|
|
2281
|
-
/**
|
|
2282
|
-
* 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.
|
|
2283
|
-
*/
|
|
2284
|
-
converts_to?: Array<string>;
|
|
2285
|
-
|
|
2286
|
-
/**
|
|
2287
|
-
* Determines the type of trial for this item.
|
|
2288
|
-
*/
|
|
2289
|
-
type: Trial.Type;
|
|
2290
|
-
}
|
|
2291
|
-
|
|
2292
|
-
namespace Trial {
|
|
2293
|
-
type Type = 'free' | 'paid';
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
|
|
2297
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
|
-
interface MetadataAction {
|
|
2301
|
-
/**
|
|
2302
|
-
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
2303
|
-
*/
|
|
2304
|
-
add?: {
|
|
2305
|
-
[key: string]: string;
|
|
2306
|
-
};
|
|
2307
|
-
|
|
2308
|
-
/**
|
|
2309
|
-
* Keys to remove from schedule phase metadata.
|
|
2310
|
-
*/
|
|
2311
|
-
remove?: Array<string>;
|
|
2312
|
-
|
|
2313
|
-
/**
|
|
2314
|
-
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
2315
|
-
*/
|
|
2316
|
-
set?: Stripe.Emptyable<{
|
|
2317
|
-
[key: string]: string;
|
|
2318
|
-
}>;
|
|
2319
|
-
|
|
2320
|
-
/**
|
|
2321
|
-
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
2322
|
-
*/
|
|
2323
|
-
type: MetadataAction.Type;
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
namespace MetadataAction {
|
|
2327
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2330
|
-
type ProrationBehavior =
|
|
2331
|
-
| 'always_invoice'
|
|
2332
|
-
| 'create_prorations'
|
|
2333
|
-
| 'none';
|
|
2334
|
-
|
|
2335
|
-
interface SetPauseCollection {
|
|
2336
|
-
/**
|
|
2337
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
2338
|
-
*/
|
|
2339
|
-
set?: SetPauseCollection.Set;
|
|
2340
|
-
|
|
2341
|
-
/**
|
|
2342
|
-
* Determines the type of the pause_collection amendment.
|
|
2343
|
-
*/
|
|
2344
|
-
type: SetPauseCollection.Type;
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
namespace SetPauseCollection {
|
|
2348
|
-
interface Set {
|
|
2349
|
-
/**
|
|
2350
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2351
|
-
*/
|
|
2352
|
-
behavior: Set.Behavior;
|
|
2353
|
-
}
|
|
2354
|
-
|
|
2355
|
-
namespace Set {
|
|
2356
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
type Type = 'remove' | 'set';
|
|
2360
|
-
}
|
|
2361
|
-
|
|
2362
|
-
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
2363
|
-
|
|
2364
|
-
interface TrialSettings {
|
|
2365
|
-
/**
|
|
2366
|
-
* Defines how the subscription should behave when a trial ends.
|
|
2367
|
-
*/
|
|
2368
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
namespace TrialSettings {
|
|
2372
|
-
interface EndBehavior {
|
|
2373
|
-
/**
|
|
2374
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2375
|
-
*/
|
|
2376
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
namespace EndBehavior {
|
|
2380
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
interface Prebilling {
|
|
2386
|
-
/**
|
|
2387
|
-
* The beginning of the prebilled time period. The default value is `now`.
|
|
2388
|
-
*/
|
|
2389
|
-
bill_from?: Prebilling.BillFrom;
|
|
2390
|
-
|
|
2391
|
-
/**
|
|
2392
|
-
* The end of the prebilled time period.
|
|
2393
|
-
*/
|
|
2394
|
-
bill_until?: Prebilling.BillUntil;
|
|
2395
|
-
|
|
2396
|
-
/**
|
|
2397
|
-
* When the prebilling invoice should be created. The default value is `now`.
|
|
2398
|
-
*/
|
|
2399
|
-
invoice_at?: 'now';
|
|
2400
|
-
|
|
2401
|
-
/**
|
|
2402
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2403
|
-
*/
|
|
2404
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
2405
|
-
}
|
|
2406
|
-
|
|
2407
|
-
namespace Prebilling {
|
|
2408
|
-
interface BillFrom {
|
|
2409
|
-
/**
|
|
2410
|
-
* Start the prebilled period when a specified amendment begins.
|
|
2411
|
-
*/
|
|
2412
|
-
amendment_start?: BillFrom.AmendmentStart;
|
|
2413
|
-
|
|
2414
|
-
/**
|
|
2415
|
-
* Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2416
|
-
*/
|
|
2417
|
-
timestamp?: number;
|
|
2418
|
-
|
|
2419
|
-
/**
|
|
2420
|
-
* Select one of several ways to pass the `bill_from` value.
|
|
2421
|
-
*/
|
|
2422
|
-
type: BillFrom.Type;
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
namespace BillFrom {
|
|
2426
|
-
interface AmendmentStart {
|
|
2427
|
-
/**
|
|
2428
|
-
* The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
|
|
2429
|
-
*/
|
|
2430
|
-
index: number;
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
|
-
type Type = 'amendment_start' | 'now' | 'timestamp';
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
interface BillUntil {
|
|
2437
|
-
/**
|
|
2438
|
-
* End the prebilled period when a specified amendment ends.
|
|
2439
|
-
*/
|
|
2440
|
-
amendment_end?: BillUntil.AmendmentEnd;
|
|
2441
|
-
|
|
2442
|
-
/**
|
|
2443
|
-
* Time span for prebilling, starting from `bill_from`.
|
|
2444
|
-
*/
|
|
2445
|
-
duration?: BillUntil.Duration;
|
|
2446
|
-
|
|
2447
|
-
/**
|
|
2448
|
-
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2449
|
-
*/
|
|
2450
|
-
timestamp?: number;
|
|
2451
|
-
|
|
2452
|
-
/**
|
|
2453
|
-
* Select one of several ways to pass the `bill_until` value.
|
|
2454
|
-
*/
|
|
2455
|
-
type: BillUntil.Type;
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
namespace BillUntil {
|
|
2459
|
-
interface AmendmentEnd {
|
|
2460
|
-
/**
|
|
2461
|
-
* 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.
|
|
2462
|
-
*/
|
|
2463
|
-
index: number;
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
interface Duration {
|
|
2467
|
-
/**
|
|
2468
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2469
|
-
*/
|
|
2470
|
-
interval: Duration.Interval;
|
|
2471
|
-
|
|
2472
|
-
/**
|
|
2473
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2474
|
-
*/
|
|
2475
|
-
interval_count: number;
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
namespace Duration {
|
|
2479
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2480
|
-
}
|
|
2481
|
-
|
|
2482
|
-
type Type =
|
|
2483
|
-
| 'amendment_end'
|
|
2484
|
-
| 'duration'
|
|
2485
|
-
| 'schedule_end'
|
|
2486
|
-
| 'timestamp';
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
2490
|
-
}
|
|
2491
|
-
|
|
2492
|
-
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2493
|
-
|
|
2494
|
-
interface ScheduleSettings {
|
|
2495
|
-
/**
|
|
2496
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2497
|
-
*/
|
|
2498
|
-
end_behavior?: ScheduleSettings.EndBehavior;
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
namespace ScheduleSettings {
|
|
2502
|
-
type EndBehavior = 'cancel' | 'release';
|
|
2503
|
-
}
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
interface SubscriptionScheduleCancelParams {
|
|
2507
|
-
/**
|
|
2508
|
-
* Specifies which fields in the response should be expanded.
|
|
1338
|
+
* Specifies which fields in the response should be expanded.
|
|
2509
1339
|
*/
|
|
2510
1340
|
expand?: Array<string>;
|
|
2511
1341
|
|
|
@@ -2577,19 +1407,6 @@ declare module 'stripe' {
|
|
|
2577
1407
|
options?: RequestOptions
|
|
2578
1408
|
): ApiListPromise<Stripe.SubscriptionSchedule>;
|
|
2579
1409
|
|
|
2580
|
-
/**
|
|
2581
|
-
* Amends an existing subscription schedule.
|
|
2582
|
-
*/
|
|
2583
|
-
amend(
|
|
2584
|
-
id: string,
|
|
2585
|
-
params?: SubscriptionScheduleAmendParams,
|
|
2586
|
-
options?: RequestOptions
|
|
2587
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2588
|
-
amend(
|
|
2589
|
-
id: string,
|
|
2590
|
-
options?: RequestOptions
|
|
2591
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2592
|
-
|
|
2593
1410
|
/**
|
|
2594
1411
|
* Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
|
2595
1412
|
*/
|