stripe 18.1.0-beta.3 → 18.1.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 +154 -1208
- package/OPENAPI_VERSION +1 -1
- package/README.md +11 -12
- package/VERSION +1 -1
- package/cjs/Error.js +3 -93
- package/cjs/RequestSender.js +5 -9
- package/cjs/StripeResource.js +1 -1
- package/cjs/Webhooks.js +6 -2
- package/cjs/apiVersion.js +1 -1
- package/cjs/net/FetchHttpClient.js +3 -4
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
- package/cjs/resources/Invoices.js +0 -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/Terminal/Readers.js +0 -12
- package/cjs/resources/TestHelpers/Terminal/Readers.js +0 -8
- package/cjs/resources.js +18 -108
- package/cjs/stripe.core.js +2 -4
- package/cjs/utils.js +33 -4
- package/esm/Error.js +2 -81
- package/esm/RequestSender.js +6 -10
- package/esm/StripeResource.js +1 -1
- package/esm/Webhooks.js +6 -2
- package/esm/apiVersion.js +1 -1
- package/esm/net/FetchHttpClient.js +3 -4
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
- package/esm/resources/Invoices.js +0 -4
- package/esm/resources/PaymentIntents.js +0 -13
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/Terminal/Readers.js +0 -12
- package/esm/resources/TestHelpers/Terminal/Readers.js +0 -8
- package/esm/resources.js +1 -84
- package/esm/stripe.core.js +2 -4
- package/esm/utils.js +29 -3
- package/package.json +12 -3
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +0 -45
- package/types/AccountSessionsResource.d.ts +0 -300
- package/types/Accounts.d.ts +1 -212
- package/types/AccountsResource.d.ts +2 -546
- 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 +1 -11
- package/types/BillingPortal/Sessions.d.ts +0 -5
- package/types/BillingPortal/SessionsResource.d.ts +4 -12
- package/types/Cards.d.ts +0 -5
- package/types/CashBalances.d.ts +0 -5
- package/types/Charges.d.ts +0 -166
- package/types/ChargesResource.d.ts +0 -1314
- package/types/Checkout/Sessions.d.ts +13 -306
- package/types/Checkout/SessionsResource.d.ts +1 -333
- package/types/ConfirmationTokens.d.ts +0 -120
- 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 -9
- 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 +0 -2
- package/types/CustomersResource.d.ts +23 -11
- package/types/Discounts.d.ts +0 -10
- package/types/Errors.d.ts +2 -69
- package/types/EventTypes.d.ts +0 -698
- package/types/Events.d.ts +1 -100
- package/types/FinancialConnections/Accounts.d.ts +1 -31
- 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 +0 -5
- package/types/Identity/VerificationSessionsResource.d.ts +0 -7
- package/types/InvoiceItems.d.ts +0 -10
- package/types/InvoiceItemsResource.d.ts +6 -117
- package/types/InvoiceLineItems.d.ts +2 -46
- package/types/InvoicePayments.d.ts +0 -5
- package/types/InvoicePaymentsResource.d.ts +74 -0
- package/types/Invoices.d.ts +15 -138
- package/types/InvoicesResource.d.ts +15 -1471
- 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 +2 -728
- package/types/PaymentIntentsResource.d.ts +3955 -8479
- package/types/PaymentLinks.d.ts +0 -6
- package/types/PaymentLinksResource.d.ts +0 -12
- package/types/PaymentMethodConfigurations.d.ts +0 -180
- package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
- package/types/PaymentMethods.d.ts +0 -120
- package/types/PaymentMethodsResource.d.ts +2 -167
- 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/Products.d.ts +0 -39
- package/types/ProductsResource.d.ts +0 -36
- package/types/PromotionCodes.d.ts +0 -5
- package/types/PromotionCodesResource.d.ts +0 -10
- package/types/Quotes.d.ts +2 -597
- package/types/QuotesResource.d.ts +224 -2571
- package/types/Refunds.d.ts +0 -14
- package/types/SetupAttempts.d.ts +1 -50
- package/types/SetupIntents.d.ts +2 -121
- package/types/SetupIntentsResource.d.ts +3 -730
- package/types/Sources.d.ts +0 -29
- package/types/SubscriptionItems.d.ts +0 -23
- package/types/SubscriptionItemsResource.d.ts +0 -109
- package/types/SubscriptionSchedules.d.ts +0 -205
- package/types/SubscriptionSchedulesResource.d.ts +8 -1236
- package/types/Subscriptions.d.ts +1 -97
- package/types/SubscriptionsResource.d.ts +9 -391
- package/types/Tax/Calculations.d.ts +11 -1
- package/types/Tax/CalculationsResource.d.ts +11 -1
- package/types/Tax/Registrations.d.ts +27 -0
- package/types/Tax/RegistrationsResource.d.ts +36 -0
- package/types/Tax/Transactions.d.ts +11 -1
- package/types/TaxIds.d.ts +11 -11
- package/types/TaxIdsResource.d.ts +11 -11
- package/types/Terminal/Readers.d.ts +0 -300
- package/types/Terminal/ReadersResource.d.ts +0 -220
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +7 -127
- package/types/TestHelpers/Terminal/ReadersResource.d.ts +0 -53
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/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/OutboundPaymentsResource.d.ts +0 -5
- 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 +7 -677
- package/types/WebhookEndpointsResource.d.ts +4 -85
- package/types/index.d.ts +5 -146
- package/types/lib.d.ts +1 -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/GiftCards/Cards.js +0 -23
- package/cjs/resources/GiftCards/Transactions.js +0 -33
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/PaymentRecords.js +0 -29
- package/cjs/resources/Privacy/RedactionJobs.js +0 -46
- 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 -12
- 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/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/GiftCards/Cards.js +0 -20
- package/esm/resources/GiftCards/Transactions.js +0 -30
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/PaymentRecords.js +0 -26
- package/esm/resources/Privacy/RedactionJobs.js +0 -43
- 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 -9
- 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/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/Billing/MeterErrorReports.d.ts +0 -106
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/ExternalAccountsResource.d.ts +0 -304
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -93
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/FxQuotes.d.ts +0 -153
- package/types/FxQuotesResource.d.ts +0 -130
- package/types/GiftCards/Cards.d.ts +0 -118
- package/types/GiftCards/CardsResource.d.ts +0 -159
- package/types/GiftCards/Transactions.d.ts +0 -129
- package/types/GiftCards/TransactionsResource.d.ts +0 -201
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -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 -1189
- package/types/OrdersResource.d.ts +0 -2981
- package/types/PaymentAttemptRecords.d.ts +0 -2112
- package/types/PaymentAttemptRecordsResource.d.ts +0 -47
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -110
- package/types/PaymentRecords.d.ts +0 -2105
- package/types/PaymentRecordsResource.d.ts +0 -455
- package/types/Privacy/RedactionJobRootObjects.d.ts +0 -35
- package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -30
- package/types/Privacy/RedactionJobs.d.ts +0 -43
- package/types/Privacy/RedactionJobsResource.d.ts +0 -240
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1687
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -778
- package/types/Tax/Associations.d.ts +0 -126
- package/types/Tax/AssociationsResource.d.ts +0 -29
- package/types/Tax/Forms.d.ts +0 -220
- package/types/Tax/FormsResource.d.ts +0 -107
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
- package/types/V2/Core/AccountLinks.d.ts +0 -101
- package/types/V2/Core/AccountLinksResource.d.ts +0 -90
- package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3760
- package/types/V2/Core/Accounts.d.ts +0 -8057
- package/types/V2/Core/AccountsResource.d.ts +0 -10184
- package/types/V2/Core/Persons.d.ts +0 -1857
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -155
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -65
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
- package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -22
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -27
- package/types/V2/MoneyManagement/Adjustments.d.ts +0 -105
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -540
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -308
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -287
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -201
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -141
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -93
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -273
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -92
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -246
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -146
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -82
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -280
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -219
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -151
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
- package/types/V2/MoneyManagement/Transactions.d.ts +0 -166
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
|
@@ -3,21 +3,11 @@
|
|
|
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
|
* The identifier of the customer to create the subscription schedule for.
|
|
13
8
|
*/
|
|
14
9
|
customer?: string;
|
|
15
10
|
|
|
16
|
-
/**
|
|
17
|
-
* The identifier of the account to create the subscription schedule for.
|
|
18
|
-
*/
|
|
19
|
-
customer_account?: string;
|
|
20
|
-
|
|
21
11
|
/**
|
|
22
12
|
* Object representing the subscription schedule's default settings.
|
|
23
13
|
*/
|
|
@@ -48,11 +38,6 @@ declare module 'stripe' {
|
|
|
48
38
|
*/
|
|
49
39
|
phases?: Array<SubscriptionScheduleCreateParams.Phase>;
|
|
50
40
|
|
|
51
|
-
/**
|
|
52
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
53
|
-
*/
|
|
54
|
-
prebilling?: SubscriptionScheduleCreateParams.Prebilling;
|
|
55
|
-
|
|
56
41
|
/**
|
|
57
42
|
* 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.
|
|
58
43
|
*/
|
|
@@ -60,8 +45,6 @@ declare module 'stripe' {
|
|
|
60
45
|
}
|
|
61
46
|
|
|
62
47
|
namespace SubscriptionScheduleCreateParams {
|
|
63
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
64
|
-
|
|
65
48
|
interface DefaultSettings {
|
|
66
49
|
/**
|
|
67
50
|
* 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).
|
|
@@ -275,11 +258,6 @@ declare module 'stripe' {
|
|
|
275
258
|
*/
|
|
276
259
|
on_behalf_of?: string;
|
|
277
260
|
|
|
278
|
-
/**
|
|
279
|
-
* 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).
|
|
280
|
-
*/
|
|
281
|
-
pause_collection?: Phase.PauseCollection;
|
|
282
|
-
|
|
283
261
|
/**
|
|
284
262
|
* Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. 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 of the current phase.
|
|
285
263
|
*/
|
|
@@ -295,20 +273,10 @@ declare module 'stripe' {
|
|
|
295
273
|
*/
|
|
296
274
|
trial?: boolean;
|
|
297
275
|
|
|
298
|
-
/**
|
|
299
|
-
* Specify trial behavior when crossing phase boundaries
|
|
300
|
-
*/
|
|
301
|
-
trial_continuation?: Phase.TrialContinuation;
|
|
302
|
-
|
|
303
276
|
/**
|
|
304
277
|
* 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`
|
|
305
278
|
*/
|
|
306
279
|
trial_end?: number;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Settings related to subscription trials.
|
|
310
|
-
*/
|
|
311
|
-
trial_settings?: Phase.TrialSettings;
|
|
312
280
|
}
|
|
313
281
|
|
|
314
282
|
namespace Phase {
|
|
@@ -351,56 +319,12 @@ declare module 'stripe' {
|
|
|
351
319
|
*/
|
|
352
320
|
discount?: string;
|
|
353
321
|
|
|
354
|
-
/**
|
|
355
|
-
* Details to determine how long the discount should be applied for.
|
|
356
|
-
*/
|
|
357
|
-
discount_end?: Discount.DiscountEnd;
|
|
358
|
-
|
|
359
322
|
/**
|
|
360
323
|
* ID of the promotion code to create a new discount for.
|
|
361
324
|
*/
|
|
362
325
|
promotion_code?: string;
|
|
363
326
|
}
|
|
364
327
|
|
|
365
|
-
namespace Discount {
|
|
366
|
-
interface DiscountEnd {
|
|
367
|
-
/**
|
|
368
|
-
* Time span for the redeemed discount.
|
|
369
|
-
*/
|
|
370
|
-
duration?: DiscountEnd.Duration;
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
374
|
-
*/
|
|
375
|
-
timestamp?: number;
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* The type of calculation made to determine when the discount ends.
|
|
379
|
-
*/
|
|
380
|
-
type: DiscountEnd.Type;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
namespace DiscountEnd {
|
|
384
|
-
interface Duration {
|
|
385
|
-
/**
|
|
386
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
387
|
-
*/
|
|
388
|
-
interval: Duration.Interval;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
392
|
-
*/
|
|
393
|
-
interval_count: number;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
namespace Duration {
|
|
397
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
type Type = 'duration' | 'timestamp';
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
328
|
interface PriceData {
|
|
405
329
|
/**
|
|
406
330
|
* 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).
|
|
@@ -478,56 +402,12 @@ declare module 'stripe' {
|
|
|
478
402
|
*/
|
|
479
403
|
discount?: string;
|
|
480
404
|
|
|
481
|
-
/**
|
|
482
|
-
* Details to determine how long the discount should be applied for.
|
|
483
|
-
*/
|
|
484
|
-
discount_end?: Discount.DiscountEnd;
|
|
485
|
-
|
|
486
405
|
/**
|
|
487
406
|
* ID of the promotion code to create a new discount for.
|
|
488
407
|
*/
|
|
489
408
|
promotion_code?: string;
|
|
490
409
|
}
|
|
491
410
|
|
|
492
|
-
namespace Discount {
|
|
493
|
-
interface DiscountEnd {
|
|
494
|
-
/**
|
|
495
|
-
* Time span for the redeemed discount.
|
|
496
|
-
*/
|
|
497
|
-
duration?: DiscountEnd.Duration;
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
501
|
-
*/
|
|
502
|
-
timestamp?: number;
|
|
503
|
-
|
|
504
|
-
/**
|
|
505
|
-
* The type of calculation made to determine when the discount ends.
|
|
506
|
-
*/
|
|
507
|
-
type: DiscountEnd.Type;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
namespace DiscountEnd {
|
|
511
|
-
interface Duration {
|
|
512
|
-
/**
|
|
513
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
514
|
-
*/
|
|
515
|
-
interval: Duration.Interval;
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
519
|
-
*/
|
|
520
|
-
interval_count: number;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
namespace Duration {
|
|
524
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
type Type = 'duration' | 'timestamp';
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
|
|
531
411
|
interface InvoiceSettings {
|
|
532
412
|
/**
|
|
533
413
|
* The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
|
@@ -598,11 +478,6 @@ declare module 'stripe' {
|
|
|
598
478
|
* 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.
|
|
599
479
|
*/
|
|
600
480
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Options that configure the trial on the subscription item.
|
|
604
|
-
*/
|
|
605
|
-
trial?: Item.Trial;
|
|
606
481
|
}
|
|
607
482
|
|
|
608
483
|
namespace Item {
|
|
@@ -617,56 +492,12 @@ declare module 'stripe' {
|
|
|
617
492
|
*/
|
|
618
493
|
discount?: string;
|
|
619
494
|
|
|
620
|
-
/**
|
|
621
|
-
* Details to determine how long the discount should be applied for.
|
|
622
|
-
*/
|
|
623
|
-
discount_end?: Discount.DiscountEnd;
|
|
624
|
-
|
|
625
495
|
/**
|
|
626
496
|
* ID of the promotion code to create a new discount for.
|
|
627
497
|
*/
|
|
628
498
|
promotion_code?: string;
|
|
629
499
|
}
|
|
630
500
|
|
|
631
|
-
namespace Discount {
|
|
632
|
-
interface DiscountEnd {
|
|
633
|
-
/**
|
|
634
|
-
* Time span for the redeemed discount.
|
|
635
|
-
*/
|
|
636
|
-
duration?: DiscountEnd.Duration;
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
640
|
-
*/
|
|
641
|
-
timestamp?: number;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* The type of calculation made to determine when the discount ends.
|
|
645
|
-
*/
|
|
646
|
-
type: DiscountEnd.Type;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
namespace DiscountEnd {
|
|
650
|
-
interface Duration {
|
|
651
|
-
/**
|
|
652
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
653
|
-
*/
|
|
654
|
-
interval: Duration.Interval;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
658
|
-
*/
|
|
659
|
-
interval_count: number;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
namespace Duration {
|
|
663
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
type Type = 'duration' | 'timestamp';
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
|
|
670
501
|
interface PriceData {
|
|
671
502
|
/**
|
|
672
503
|
* 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).
|
|
@@ -718,33 +549,6 @@ declare module 'stripe' {
|
|
|
718
549
|
|
|
719
550
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
720
551
|
}
|
|
721
|
-
|
|
722
|
-
interface Trial {
|
|
723
|
-
/**
|
|
724
|
-
* 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.
|
|
725
|
-
*/
|
|
726
|
-
converts_to?: Array<string>;
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Determines the type of trial for this item.
|
|
730
|
-
*/
|
|
731
|
-
type: Trial.Type;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
namespace Trial {
|
|
735
|
-
type Type = 'free' | 'paid';
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
interface PauseCollection {
|
|
740
|
-
/**
|
|
741
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
742
|
-
*/
|
|
743
|
-
behavior: PauseCollection.Behavior;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
namespace PauseCollection {
|
|
747
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
748
552
|
}
|
|
749
553
|
|
|
750
554
|
type ProrationBehavior =
|
|
@@ -763,44 +567,6 @@ declare module 'stripe' {
|
|
|
763
567
|
*/
|
|
764
568
|
destination: string;
|
|
765
569
|
}
|
|
766
|
-
|
|
767
|
-
type TrialContinuation = 'continue' | 'none';
|
|
768
|
-
|
|
769
|
-
interface TrialSettings {
|
|
770
|
-
/**
|
|
771
|
-
* Defines how the subscription should behave when a trial ends.
|
|
772
|
-
*/
|
|
773
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
namespace TrialSettings {
|
|
777
|
-
interface EndBehavior {
|
|
778
|
-
/**
|
|
779
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
780
|
-
*/
|
|
781
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
namespace EndBehavior {
|
|
785
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
interface Prebilling {
|
|
791
|
-
/**
|
|
792
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
793
|
-
*/
|
|
794
|
-
iterations: number;
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
798
|
-
*/
|
|
799
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
namespace Prebilling {
|
|
803
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
804
570
|
}
|
|
805
571
|
}
|
|
806
572
|
|
|
@@ -812,11 +578,6 @@ declare module 'stripe' {
|
|
|
812
578
|
}
|
|
813
579
|
|
|
814
580
|
interface SubscriptionScheduleUpdateParams {
|
|
815
|
-
/**
|
|
816
|
-
* 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.
|
|
817
|
-
*/
|
|
818
|
-
billing_behavior?: SubscriptionScheduleUpdateParams.BillingBehavior;
|
|
819
|
-
|
|
820
581
|
/**
|
|
821
582
|
* Object representing the subscription schedule's default settings.
|
|
822
583
|
*/
|
|
@@ -842,11 +603,6 @@ declare module 'stripe' {
|
|
|
842
603
|
*/
|
|
843
604
|
phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
|
|
844
605
|
|
|
845
|
-
/**
|
|
846
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
847
|
-
*/
|
|
848
|
-
prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
|
|
849
|
-
|
|
850
606
|
/**
|
|
851
607
|
* If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
|
|
852
608
|
*/
|
|
@@ -854,8 +610,6 @@ declare module 'stripe' {
|
|
|
854
610
|
}
|
|
855
611
|
|
|
856
612
|
namespace SubscriptionScheduleUpdateParams {
|
|
857
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
858
|
-
|
|
859
613
|
interface DefaultSettings {
|
|
860
614
|
/**
|
|
861
615
|
* 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).
|
|
@@ -1069,11 +823,6 @@ declare module 'stripe' {
|
|
|
1069
823
|
*/
|
|
1070
824
|
on_behalf_of?: string;
|
|
1071
825
|
|
|
1072
|
-
/**
|
|
1073
|
-
* 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).
|
|
1074
|
-
*/
|
|
1075
|
-
pause_collection?: Phase.PauseCollection;
|
|
1076
|
-
|
|
1077
826
|
/**
|
|
1078
827
|
* Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. 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 of the current phase.
|
|
1079
828
|
*/
|
|
@@ -1094,20 +843,10 @@ declare module 'stripe' {
|
|
|
1094
843
|
*/
|
|
1095
844
|
trial?: boolean;
|
|
1096
845
|
|
|
1097
|
-
/**
|
|
1098
|
-
* Specify trial behavior when crossing phase boundaries
|
|
1099
|
-
*/
|
|
1100
|
-
trial_continuation?: Phase.TrialContinuation;
|
|
1101
|
-
|
|
1102
846
|
/**
|
|
1103
847
|
* 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`
|
|
1104
848
|
*/
|
|
1105
849
|
trial_end?: number | 'now';
|
|
1106
|
-
|
|
1107
|
-
/**
|
|
1108
|
-
* Settings related to subscription trials.
|
|
1109
|
-
*/
|
|
1110
|
-
trial_settings?: Phase.TrialSettings;
|
|
1111
850
|
}
|
|
1112
851
|
|
|
1113
852
|
namespace Phase {
|
|
@@ -1150,56 +889,12 @@ declare module 'stripe' {
|
|
|
1150
889
|
*/
|
|
1151
890
|
discount?: string;
|
|
1152
891
|
|
|
1153
|
-
/**
|
|
1154
|
-
* Details to determine how long the discount should be applied for.
|
|
1155
|
-
*/
|
|
1156
|
-
discount_end?: Discount.DiscountEnd;
|
|
1157
|
-
|
|
1158
892
|
/**
|
|
1159
893
|
* ID of the promotion code to create a new discount for.
|
|
1160
894
|
*/
|
|
1161
895
|
promotion_code?: string;
|
|
1162
896
|
}
|
|
1163
897
|
|
|
1164
|
-
namespace Discount {
|
|
1165
|
-
interface DiscountEnd {
|
|
1166
|
-
/**
|
|
1167
|
-
* Time span for the redeemed discount.
|
|
1168
|
-
*/
|
|
1169
|
-
duration?: DiscountEnd.Duration;
|
|
1170
|
-
|
|
1171
|
-
/**
|
|
1172
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1173
|
-
*/
|
|
1174
|
-
timestamp?: number;
|
|
1175
|
-
|
|
1176
|
-
/**
|
|
1177
|
-
* The type of calculation made to determine when the discount ends.
|
|
1178
|
-
*/
|
|
1179
|
-
type: DiscountEnd.Type;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
namespace DiscountEnd {
|
|
1183
|
-
interface Duration {
|
|
1184
|
-
/**
|
|
1185
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1186
|
-
*/
|
|
1187
|
-
interval: Duration.Interval;
|
|
1188
|
-
|
|
1189
|
-
/**
|
|
1190
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1191
|
-
*/
|
|
1192
|
-
interval_count: number;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
namespace Duration {
|
|
1196
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
type Type = 'duration' | 'timestamp';
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
898
|
interface PriceData {
|
|
1204
899
|
/**
|
|
1205
900
|
* 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).
|
|
@@ -1277,56 +972,12 @@ declare module 'stripe' {
|
|
|
1277
972
|
*/
|
|
1278
973
|
discount?: string;
|
|
1279
974
|
|
|
1280
|
-
/**
|
|
1281
|
-
* Details to determine how long the discount should be applied for.
|
|
1282
|
-
*/
|
|
1283
|
-
discount_end?: Discount.DiscountEnd;
|
|
1284
|
-
|
|
1285
975
|
/**
|
|
1286
976
|
* ID of the promotion code to create a new discount for.
|
|
1287
977
|
*/
|
|
1288
978
|
promotion_code?: string;
|
|
1289
979
|
}
|
|
1290
980
|
|
|
1291
|
-
namespace Discount {
|
|
1292
|
-
interface DiscountEnd {
|
|
1293
|
-
/**
|
|
1294
|
-
* Time span for the redeemed discount.
|
|
1295
|
-
*/
|
|
1296
|
-
duration?: DiscountEnd.Duration;
|
|
1297
|
-
|
|
1298
|
-
/**
|
|
1299
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1300
|
-
*/
|
|
1301
|
-
timestamp?: number;
|
|
1302
|
-
|
|
1303
|
-
/**
|
|
1304
|
-
* The type of calculation made to determine when the discount ends.
|
|
1305
|
-
*/
|
|
1306
|
-
type: DiscountEnd.Type;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
namespace DiscountEnd {
|
|
1310
|
-
interface Duration {
|
|
1311
|
-
/**
|
|
1312
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1313
|
-
*/
|
|
1314
|
-
interval: Duration.Interval;
|
|
1315
|
-
|
|
1316
|
-
/**
|
|
1317
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1318
|
-
*/
|
|
1319
|
-
interval_count: number;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
namespace Duration {
|
|
1323
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
type Type = 'duration' | 'timestamp';
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
981
|
interface InvoiceSettings {
|
|
1331
982
|
/**
|
|
1332
983
|
* The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
|
@@ -1397,11 +1048,6 @@ declare module 'stripe' {
|
|
|
1397
1048
|
* 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.
|
|
1398
1049
|
*/
|
|
1399
1050
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* Options that configure the trial on the subscription item.
|
|
1403
|
-
*/
|
|
1404
|
-
trial?: Item.Trial;
|
|
1405
1051
|
}
|
|
1406
1052
|
|
|
1407
1053
|
namespace Item {
|
|
@@ -1416,56 +1062,12 @@ declare module 'stripe' {
|
|
|
1416
1062
|
*/
|
|
1417
1063
|
discount?: string;
|
|
1418
1064
|
|
|
1419
|
-
/**
|
|
1420
|
-
* Details to determine how long the discount should be applied for.
|
|
1421
|
-
*/
|
|
1422
|
-
discount_end?: Discount.DiscountEnd;
|
|
1423
|
-
|
|
1424
1065
|
/**
|
|
1425
1066
|
* ID of the promotion code to create a new discount for.
|
|
1426
1067
|
*/
|
|
1427
1068
|
promotion_code?: string;
|
|
1428
1069
|
}
|
|
1429
1070
|
|
|
1430
|
-
namespace Discount {
|
|
1431
|
-
interface DiscountEnd {
|
|
1432
|
-
/**
|
|
1433
|
-
* Time span for the redeemed discount.
|
|
1434
|
-
*/
|
|
1435
|
-
duration?: DiscountEnd.Duration;
|
|
1436
|
-
|
|
1437
|
-
/**
|
|
1438
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1439
|
-
*/
|
|
1440
|
-
timestamp?: number;
|
|
1441
|
-
|
|
1442
|
-
/**
|
|
1443
|
-
* The type of calculation made to determine when the discount ends.
|
|
1444
|
-
*/
|
|
1445
|
-
type: DiscountEnd.Type;
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
namespace DiscountEnd {
|
|
1449
|
-
interface Duration {
|
|
1450
|
-
/**
|
|
1451
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1452
|
-
*/
|
|
1453
|
-
interval: Duration.Interval;
|
|
1454
|
-
|
|
1455
|
-
/**
|
|
1456
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1457
|
-
*/
|
|
1458
|
-
interval_count: number;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
namespace Duration {
|
|
1462
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
type Type = 'duration' | 'timestamp';
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
1071
|
interface PriceData {
|
|
1470
1072
|
/**
|
|
1471
1073
|
* 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).
|
|
@@ -1517,33 +1119,6 @@ declare module 'stripe' {
|
|
|
1517
1119
|
|
|
1518
1120
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1519
1121
|
}
|
|
1520
|
-
|
|
1521
|
-
interface Trial {
|
|
1522
|
-
/**
|
|
1523
|
-
* 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.
|
|
1524
|
-
*/
|
|
1525
|
-
converts_to?: Array<string>;
|
|
1526
|
-
|
|
1527
|
-
/**
|
|
1528
|
-
* Determines the type of trial for this item.
|
|
1529
|
-
*/
|
|
1530
|
-
type: Trial.Type;
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
namespace Trial {
|
|
1534
|
-
type Type = 'free' | 'paid';
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
interface PauseCollection {
|
|
1539
|
-
/**
|
|
1540
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1541
|
-
*/
|
|
1542
|
-
behavior: PauseCollection.Behavior;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
namespace PauseCollection {
|
|
1546
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1547
1122
|
}
|
|
1548
1123
|
|
|
1549
1124
|
type ProrationBehavior =
|
|
@@ -1562,44 +1137,6 @@ declare module 'stripe' {
|
|
|
1562
1137
|
*/
|
|
1563
1138
|
destination: string;
|
|
1564
1139
|
}
|
|
1565
|
-
|
|
1566
|
-
type TrialContinuation = 'continue' | 'none';
|
|
1567
|
-
|
|
1568
|
-
interface TrialSettings {
|
|
1569
|
-
/**
|
|
1570
|
-
* Defines how the subscription should behave when a trial ends.
|
|
1571
|
-
*/
|
|
1572
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
namespace TrialSettings {
|
|
1576
|
-
interface EndBehavior {
|
|
1577
|
-
/**
|
|
1578
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1579
|
-
*/
|
|
1580
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
namespace EndBehavior {
|
|
1584
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
interface Prebilling {
|
|
1590
|
-
/**
|
|
1591
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
1592
|
-
*/
|
|
1593
|
-
iterations: number;
|
|
1594
|
-
|
|
1595
|
-
/**
|
|
1596
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
1597
|
-
*/
|
|
1598
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
namespace Prebilling {
|
|
1602
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
1603
1140
|
}
|
|
1604
1141
|
|
|
1605
1142
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
@@ -1626,11 +1163,6 @@ declare module 'stripe' {
|
|
|
1626
1163
|
*/
|
|
1627
1164
|
customer?: string;
|
|
1628
1165
|
|
|
1629
|
-
/**
|
|
1630
|
-
* Only return subscription schedules for the given account.
|
|
1631
|
-
*/
|
|
1632
|
-
customer_account?: string;
|
|
1633
|
-
|
|
1634
1166
|
/**
|
|
1635
1167
|
* Specifies which fields in the response should be expanded.
|
|
1636
1168
|
*/
|
|
@@ -1647,773 +1179,26 @@ declare module 'stripe' {
|
|
|
1647
1179
|
scheduled?: boolean;
|
|
1648
1180
|
}
|
|
1649
1181
|
|
|
1650
|
-
interface
|
|
1651
|
-
/**
|
|
1652
|
-
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
1653
|
-
*/
|
|
1654
|
-
amendments?: Array<SubscriptionScheduleAmendParams.Amendment>;
|
|
1655
|
-
|
|
1182
|
+
interface SubscriptionScheduleCancelParams {
|
|
1656
1183
|
/**
|
|
1657
1184
|
* Specifies which fields in the response should be expanded.
|
|
1658
1185
|
*/
|
|
1659
1186
|
expand?: Array<string>;
|
|
1660
1187
|
|
|
1661
1188
|
/**
|
|
1662
|
-
*
|
|
1189
|
+
* If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
|
|
1663
1190
|
*/
|
|
1664
|
-
|
|
1665
|
-
Array<SubscriptionScheduleAmendParams.Prebilling>
|
|
1666
|
-
>;
|
|
1191
|
+
invoice_now?: boolean;
|
|
1667
1192
|
|
|
1668
1193
|
/**
|
|
1669
|
-
*
|
|
1670
|
-
* specifies if and how to prorate at the time of the request.
|
|
1194
|
+
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
|
|
1671
1195
|
*/
|
|
1672
|
-
|
|
1196
|
+
prorate?: boolean;
|
|
1197
|
+
}
|
|
1673
1198
|
|
|
1199
|
+
interface SubscriptionScheduleReleaseParams {
|
|
1674
1200
|
/**
|
|
1675
|
-
*
|
|
1676
|
-
*/
|
|
1677
|
-
schedule_settings?: SubscriptionScheduleAmendParams.ScheduleSettings;
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
namespace SubscriptionScheduleAmendParams {
|
|
1681
|
-
interface Amendment {
|
|
1682
|
-
/**
|
|
1683
|
-
* 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.
|
|
1684
|
-
*/
|
|
1685
|
-
amendment_end?: Amendment.AmendmentEnd;
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1689
|
-
*/
|
|
1690
|
-
amendment_start: Amendment.AmendmentStart;
|
|
1691
|
-
|
|
1692
|
-
/**
|
|
1693
|
-
* 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.
|
|
1694
|
-
*/
|
|
1695
|
-
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
1699
|
-
*/
|
|
1700
|
-
discount_actions?: Array<Amendment.DiscountAction>;
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* Changes to the subscription items during the amendment time span.
|
|
1704
|
-
*/
|
|
1705
|
-
item_actions?: Array<Amendment.ItemAction>;
|
|
1706
|
-
|
|
1707
|
-
/**
|
|
1708
|
-
* Instructions for how to modify phase metadata
|
|
1709
|
-
*/
|
|
1710
|
-
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
1711
|
-
|
|
1712
|
-
/**
|
|
1713
|
-
* 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`.
|
|
1714
|
-
*/
|
|
1715
|
-
proration_behavior?: Amendment.ProrationBehavior;
|
|
1716
|
-
|
|
1717
|
-
/**
|
|
1718
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
1719
|
-
*/
|
|
1720
|
-
set_pause_collection?: Amendment.SetPauseCollection;
|
|
1721
|
-
|
|
1722
|
-
/**
|
|
1723
|
-
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
1724
|
-
*/
|
|
1725
|
-
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
1726
|
-
|
|
1727
|
-
/**
|
|
1728
|
-
* Settings related to subscription trials.
|
|
1729
|
-
*/
|
|
1730
|
-
trial_settings?: Amendment.TrialSettings;
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
namespace Amendment {
|
|
1734
|
-
interface AmendmentEnd {
|
|
1735
|
-
/**
|
|
1736
|
-
* Use the `end` time of a given discount.
|
|
1737
|
-
*/
|
|
1738
|
-
discount_end?: AmendmentEnd.DiscountEnd;
|
|
1739
|
-
|
|
1740
|
-
/**
|
|
1741
|
-
* Time span for the amendment starting from the `amendment_start`.
|
|
1742
|
-
*/
|
|
1743
|
-
duration?: AmendmentEnd.Duration;
|
|
1744
|
-
|
|
1745
|
-
/**
|
|
1746
|
-
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
1747
|
-
*/
|
|
1748
|
-
timestamp?: number;
|
|
1749
|
-
|
|
1750
|
-
/**
|
|
1751
|
-
* Select one of three ways to pass the `amendment_end`.
|
|
1752
|
-
*/
|
|
1753
|
-
type: AmendmentEnd.Type;
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
namespace AmendmentEnd {
|
|
1757
|
-
interface DiscountEnd {
|
|
1758
|
-
/**
|
|
1759
|
-
* The ID of a specific discount.
|
|
1760
|
-
*/
|
|
1761
|
-
discount: string;
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
interface Duration {
|
|
1765
|
-
/**
|
|
1766
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1767
|
-
*/
|
|
1768
|
-
interval: Duration.Interval;
|
|
1769
|
-
|
|
1770
|
-
/**
|
|
1771
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1772
|
-
*/
|
|
1773
|
-
interval_count: number;
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
namespace Duration {
|
|
1777
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
type Type =
|
|
1781
|
-
| 'discount_end'
|
|
1782
|
-
| 'duration'
|
|
1783
|
-
| 'schedule_end'
|
|
1784
|
-
| 'timestamp'
|
|
1785
|
-
| 'trial_end'
|
|
1786
|
-
| 'trial_start'
|
|
1787
|
-
| 'upcoming_invoice';
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
interface AmendmentStart {
|
|
1791
|
-
/**
|
|
1792
|
-
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
1793
|
-
*/
|
|
1794
|
-
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
1795
|
-
|
|
1796
|
-
/**
|
|
1797
|
-
* Use the `end` time of a given discount.
|
|
1798
|
-
*/
|
|
1799
|
-
discount_end?: AmendmentStart.DiscountEnd;
|
|
1800
|
-
|
|
1801
|
-
/**
|
|
1802
|
-
* A precise Unix timestamp for the amendment to start.
|
|
1803
|
-
*/
|
|
1804
|
-
timestamp?: number;
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* Select one of three ways to pass the `amendment_start`.
|
|
1808
|
-
*/
|
|
1809
|
-
type: AmendmentStart.Type;
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
namespace AmendmentStart {
|
|
1813
|
-
interface AmendmentEnd {
|
|
1814
|
-
/**
|
|
1815
|
-
* 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.
|
|
1816
|
-
*/
|
|
1817
|
-
index: number;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
interface DiscountEnd {
|
|
1821
|
-
/**
|
|
1822
|
-
* The ID of a specific discount.
|
|
1823
|
-
*/
|
|
1824
|
-
discount: string;
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
type Type =
|
|
1828
|
-
| 'amendment_end'
|
|
1829
|
-
| 'discount_end'
|
|
1830
|
-
| 'now'
|
|
1831
|
-
| 'schedule_end'
|
|
1832
|
-
| 'timestamp'
|
|
1833
|
-
| 'trial_end'
|
|
1834
|
-
| 'trial_start'
|
|
1835
|
-
| 'upcoming_invoice';
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
1839
|
-
|
|
1840
|
-
interface DiscountAction {
|
|
1841
|
-
/**
|
|
1842
|
-
* Details of the discount to add.
|
|
1843
|
-
*/
|
|
1844
|
-
add?: DiscountAction.Add;
|
|
1845
|
-
|
|
1846
|
-
/**
|
|
1847
|
-
* Details of the discount to remove.
|
|
1848
|
-
*/
|
|
1849
|
-
remove?: DiscountAction.Remove;
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* Details of the discount to replace the existing discounts with.
|
|
1853
|
-
*/
|
|
1854
|
-
set?: DiscountAction.Set;
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* Determines the type of discount action.
|
|
1858
|
-
*/
|
|
1859
|
-
type: DiscountAction.Type;
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
namespace DiscountAction {
|
|
1863
|
-
interface Add {
|
|
1864
|
-
/**
|
|
1865
|
-
* The coupon code to redeem.
|
|
1866
|
-
*/
|
|
1867
|
-
coupon?: string;
|
|
1868
|
-
|
|
1869
|
-
/**
|
|
1870
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
1871
|
-
*/
|
|
1872
|
-
discount?: string;
|
|
1873
|
-
|
|
1874
|
-
/**
|
|
1875
|
-
* Details to determine how long the discount should be applied for.
|
|
1876
|
-
*/
|
|
1877
|
-
discount_end?: Add.DiscountEnd;
|
|
1878
|
-
|
|
1879
|
-
/**
|
|
1880
|
-
* 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.
|
|
1881
|
-
*/
|
|
1882
|
-
index?: number;
|
|
1883
|
-
|
|
1884
|
-
/**
|
|
1885
|
-
* The promotion code to redeem.
|
|
1886
|
-
*/
|
|
1887
|
-
promotion_code?: string;
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
namespace Add {
|
|
1891
|
-
interface DiscountEnd {
|
|
1892
|
-
/**
|
|
1893
|
-
* The type of calculation made to determine when the discount ends.
|
|
1894
|
-
*/
|
|
1895
|
-
type: 'amendment_end';
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
interface Remove {
|
|
1900
|
-
/**
|
|
1901
|
-
* The coupon code to remove from the `discounts` array.
|
|
1902
|
-
*/
|
|
1903
|
-
coupon?: string;
|
|
1904
|
-
|
|
1905
|
-
/**
|
|
1906
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
1907
|
-
*/
|
|
1908
|
-
discount?: string;
|
|
1909
|
-
|
|
1910
|
-
/**
|
|
1911
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
1912
|
-
*/
|
|
1913
|
-
promotion_code?: string;
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
interface Set {
|
|
1917
|
-
/**
|
|
1918
|
-
* The coupon code to replace the `discounts` array with.
|
|
1919
|
-
*/
|
|
1920
|
-
coupon?: string;
|
|
1921
|
-
|
|
1922
|
-
/**
|
|
1923
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
1924
|
-
*/
|
|
1925
|
-
discount?: string;
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
1929
|
-
*/
|
|
1930
|
-
promotion_code?: string;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
type Type = 'add' | 'remove' | 'set';
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
interface ItemAction {
|
|
1937
|
-
/**
|
|
1938
|
-
* 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.
|
|
1939
|
-
*/
|
|
1940
|
-
add?: ItemAction.Add;
|
|
1941
|
-
|
|
1942
|
-
/**
|
|
1943
|
-
* Details of the subscription item to remove.
|
|
1944
|
-
*/
|
|
1945
|
-
remove?: ItemAction.Remove;
|
|
1946
|
-
|
|
1947
|
-
/**
|
|
1948
|
-
* 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.
|
|
1949
|
-
*/
|
|
1950
|
-
set?: ItemAction.Set;
|
|
1951
|
-
|
|
1952
|
-
/**
|
|
1953
|
-
* Determines the type of item action.
|
|
1954
|
-
*/
|
|
1955
|
-
type: ItemAction.Type;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
namespace ItemAction {
|
|
1959
|
-
interface Add {
|
|
1960
|
-
/**
|
|
1961
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
1962
|
-
*/
|
|
1963
|
-
discounts?: Array<Add.Discount>;
|
|
1964
|
-
|
|
1965
|
-
/**
|
|
1966
|
-
* 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`.
|
|
1967
|
-
*/
|
|
1968
|
-
metadata?: Stripe.MetadataParam;
|
|
1969
|
-
|
|
1970
|
-
/**
|
|
1971
|
-
* The ID of the price object.
|
|
1972
|
-
*/
|
|
1973
|
-
price: string;
|
|
1974
|
-
|
|
1975
|
-
/**
|
|
1976
|
-
* Quantity for this item.
|
|
1977
|
-
*/
|
|
1978
|
-
quantity?: number;
|
|
1979
|
-
|
|
1980
|
-
/**
|
|
1981
|
-
* 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`.
|
|
1982
|
-
*/
|
|
1983
|
-
tax_rates?: Array<string>;
|
|
1984
|
-
|
|
1985
|
-
/**
|
|
1986
|
-
* Options that configure the trial on the subscription item.
|
|
1987
|
-
*/
|
|
1988
|
-
trial?: Add.Trial;
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
namespace Add {
|
|
1992
|
-
interface Discount {
|
|
1993
|
-
/**
|
|
1994
|
-
* ID of the coupon to create a new discount for.
|
|
1995
|
-
*/
|
|
1996
|
-
coupon?: string;
|
|
1997
|
-
|
|
1998
|
-
/**
|
|
1999
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2000
|
-
*/
|
|
2001
|
-
discount?: string;
|
|
2002
|
-
|
|
2003
|
-
/**
|
|
2004
|
-
* Details to determine how long the discount should be applied for.
|
|
2005
|
-
*/
|
|
2006
|
-
discount_end?: Discount.DiscountEnd;
|
|
2007
|
-
|
|
2008
|
-
/**
|
|
2009
|
-
* ID of the promotion code to create a new discount for.
|
|
2010
|
-
*/
|
|
2011
|
-
promotion_code?: string;
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2014
|
-
namespace Discount {
|
|
2015
|
-
interface DiscountEnd {
|
|
2016
|
-
/**
|
|
2017
|
-
* Time span for the redeemed discount.
|
|
2018
|
-
*/
|
|
2019
|
-
duration?: DiscountEnd.Duration;
|
|
2020
|
-
|
|
2021
|
-
/**
|
|
2022
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2023
|
-
*/
|
|
2024
|
-
timestamp?: number;
|
|
2025
|
-
|
|
2026
|
-
/**
|
|
2027
|
-
* The type of calculation made to determine when the discount ends.
|
|
2028
|
-
*/
|
|
2029
|
-
type: DiscountEnd.Type;
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
namespace DiscountEnd {
|
|
2033
|
-
interface Duration {
|
|
2034
|
-
/**
|
|
2035
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2036
|
-
*/
|
|
2037
|
-
interval: Duration.Interval;
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2041
|
-
*/
|
|
2042
|
-
interval_count: number;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
namespace Duration {
|
|
2046
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
type Type = 'duration' | 'timestamp';
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
interface Trial {
|
|
2054
|
-
/**
|
|
2055
|
-
* 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.
|
|
2056
|
-
*/
|
|
2057
|
-
converts_to?: Array<string>;
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* Determines the type of trial for this item.
|
|
2061
|
-
*/
|
|
2062
|
-
type: Trial.Type;
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
namespace Trial {
|
|
2066
|
-
type Type = 'free' | 'paid';
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
interface Remove {
|
|
2071
|
-
/**
|
|
2072
|
-
* ID of a price to remove.
|
|
2073
|
-
*/
|
|
2074
|
-
price: string;
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
|
-
interface Set {
|
|
2078
|
-
/**
|
|
2079
|
-
* 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`.
|
|
2080
|
-
*/
|
|
2081
|
-
discounts?: Array<Set.Discount>;
|
|
2082
|
-
|
|
2083
|
-
/**
|
|
2084
|
-
* 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`.
|
|
2085
|
-
*/
|
|
2086
|
-
metadata?: Stripe.MetadataParam;
|
|
2087
|
-
|
|
2088
|
-
/**
|
|
2089
|
-
* The ID of the price object.
|
|
2090
|
-
*/
|
|
2091
|
-
price: string;
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* 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`.
|
|
2095
|
-
*/
|
|
2096
|
-
quantity?: number;
|
|
2097
|
-
|
|
2098
|
-
/**
|
|
2099
|
-
* 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`.
|
|
2100
|
-
*/
|
|
2101
|
-
tax_rates?: Array<string>;
|
|
2102
|
-
|
|
2103
|
-
/**
|
|
2104
|
-
* 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`.
|
|
2105
|
-
*/
|
|
2106
|
-
trial?: Set.Trial;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
namespace Set {
|
|
2110
|
-
interface Discount {
|
|
2111
|
-
/**
|
|
2112
|
-
* ID of the coupon to create a new discount for.
|
|
2113
|
-
*/
|
|
2114
|
-
coupon?: string;
|
|
2115
|
-
|
|
2116
|
-
/**
|
|
2117
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2118
|
-
*/
|
|
2119
|
-
discount?: string;
|
|
2120
|
-
|
|
2121
|
-
/**
|
|
2122
|
-
* Details to determine how long the discount should be applied for.
|
|
2123
|
-
*/
|
|
2124
|
-
discount_end?: Discount.DiscountEnd;
|
|
2125
|
-
|
|
2126
|
-
/**
|
|
2127
|
-
* ID of the promotion code to create a new discount for.
|
|
2128
|
-
*/
|
|
2129
|
-
promotion_code?: string;
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
namespace Discount {
|
|
2133
|
-
interface DiscountEnd {
|
|
2134
|
-
/**
|
|
2135
|
-
* Time span for the redeemed discount.
|
|
2136
|
-
*/
|
|
2137
|
-
duration?: DiscountEnd.Duration;
|
|
2138
|
-
|
|
2139
|
-
/**
|
|
2140
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2141
|
-
*/
|
|
2142
|
-
timestamp?: number;
|
|
2143
|
-
|
|
2144
|
-
/**
|
|
2145
|
-
* The type of calculation made to determine when the discount ends.
|
|
2146
|
-
*/
|
|
2147
|
-
type: DiscountEnd.Type;
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
namespace DiscountEnd {
|
|
2151
|
-
interface Duration {
|
|
2152
|
-
/**
|
|
2153
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2154
|
-
*/
|
|
2155
|
-
interval: Duration.Interval;
|
|
2156
|
-
|
|
2157
|
-
/**
|
|
2158
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2159
|
-
*/
|
|
2160
|
-
interval_count: number;
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
namespace Duration {
|
|
2164
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
type Type = 'duration' | 'timestamp';
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
interface Trial {
|
|
2172
|
-
/**
|
|
2173
|
-
* 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.
|
|
2174
|
-
*/
|
|
2175
|
-
converts_to?: Array<string>;
|
|
2176
|
-
|
|
2177
|
-
/**
|
|
2178
|
-
* Determines the type of trial for this item.
|
|
2179
|
-
*/
|
|
2180
|
-
type: Trial.Type;
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
namespace Trial {
|
|
2184
|
-
type Type = 'free' | 'paid';
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
interface MetadataAction {
|
|
2192
|
-
/**
|
|
2193
|
-
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
2194
|
-
*/
|
|
2195
|
-
add?: {
|
|
2196
|
-
[key: string]: string;
|
|
2197
|
-
};
|
|
2198
|
-
|
|
2199
|
-
/**
|
|
2200
|
-
* Keys to remove from schedule phase metadata.
|
|
2201
|
-
*/
|
|
2202
|
-
remove?: Array<string>;
|
|
2203
|
-
|
|
2204
|
-
/**
|
|
2205
|
-
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
2206
|
-
*/
|
|
2207
|
-
set?: Stripe.Emptyable<{
|
|
2208
|
-
[key: string]: string;
|
|
2209
|
-
}>;
|
|
2210
|
-
|
|
2211
|
-
/**
|
|
2212
|
-
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
2213
|
-
*/
|
|
2214
|
-
type: MetadataAction.Type;
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
namespace MetadataAction {
|
|
2218
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
type ProrationBehavior =
|
|
2222
|
-
| 'always_invoice'
|
|
2223
|
-
| 'create_prorations'
|
|
2224
|
-
| 'none';
|
|
2225
|
-
|
|
2226
|
-
interface SetPauseCollection {
|
|
2227
|
-
/**
|
|
2228
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
2229
|
-
*/
|
|
2230
|
-
set?: SetPauseCollection.Set;
|
|
2231
|
-
|
|
2232
|
-
/**
|
|
2233
|
-
* Determines the type of the pause_collection amendment.
|
|
2234
|
-
*/
|
|
2235
|
-
type: SetPauseCollection.Type;
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
namespace SetPauseCollection {
|
|
2239
|
-
interface Set {
|
|
2240
|
-
/**
|
|
2241
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2242
|
-
*/
|
|
2243
|
-
behavior: Set.Behavior;
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
namespace Set {
|
|
2247
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
type Type = 'remove' | 'set';
|
|
2251
|
-
}
|
|
2252
|
-
|
|
2253
|
-
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
2254
|
-
|
|
2255
|
-
interface TrialSettings {
|
|
2256
|
-
/**
|
|
2257
|
-
* Defines how the subscription should behave when a trial ends.
|
|
2258
|
-
*/
|
|
2259
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
namespace TrialSettings {
|
|
2263
|
-
interface EndBehavior {
|
|
2264
|
-
/**
|
|
2265
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2266
|
-
*/
|
|
2267
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
namespace EndBehavior {
|
|
2271
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
2272
|
-
}
|
|
2273
|
-
}
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
interface Prebilling {
|
|
2277
|
-
/**
|
|
2278
|
-
* The beginning of the prebilled time period. The default value is `now`.
|
|
2279
|
-
*/
|
|
2280
|
-
bill_from?: Prebilling.BillFrom;
|
|
2281
|
-
|
|
2282
|
-
/**
|
|
2283
|
-
* The end of the prebilled time period.
|
|
2284
|
-
*/
|
|
2285
|
-
bill_until?: Prebilling.BillUntil;
|
|
2286
|
-
|
|
2287
|
-
/**
|
|
2288
|
-
* When the prebilling invoice should be created. The default value is `now`.
|
|
2289
|
-
*/
|
|
2290
|
-
invoice_at?: 'now';
|
|
2291
|
-
|
|
2292
|
-
/**
|
|
2293
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2294
|
-
*/
|
|
2295
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
namespace Prebilling {
|
|
2299
|
-
interface BillFrom {
|
|
2300
|
-
/**
|
|
2301
|
-
* Start the prebilled period when a specified amendment begins.
|
|
2302
|
-
*/
|
|
2303
|
-
amendment_start?: BillFrom.AmendmentStart;
|
|
2304
|
-
|
|
2305
|
-
/**
|
|
2306
|
-
* Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2307
|
-
*/
|
|
2308
|
-
timestamp?: number;
|
|
2309
|
-
|
|
2310
|
-
/**
|
|
2311
|
-
* Select one of several ways to pass the `bill_from` value.
|
|
2312
|
-
*/
|
|
2313
|
-
type: BillFrom.Type;
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
namespace BillFrom {
|
|
2317
|
-
interface AmendmentStart {
|
|
2318
|
-
/**
|
|
2319
|
-
* 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.
|
|
2320
|
-
*/
|
|
2321
|
-
index: number;
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
type Type = 'amendment_start' | 'now' | 'timestamp';
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
interface BillUntil {
|
|
2328
|
-
/**
|
|
2329
|
-
* End the prebilled period when a specified amendment ends.
|
|
2330
|
-
*/
|
|
2331
|
-
amendment_end?: BillUntil.AmendmentEnd;
|
|
2332
|
-
|
|
2333
|
-
/**
|
|
2334
|
-
* Time span for prebilling, starting from `bill_from`.
|
|
2335
|
-
*/
|
|
2336
|
-
duration?: BillUntil.Duration;
|
|
2337
|
-
|
|
2338
|
-
/**
|
|
2339
|
-
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2340
|
-
*/
|
|
2341
|
-
timestamp?: number;
|
|
2342
|
-
|
|
2343
|
-
/**
|
|
2344
|
-
* Select one of several ways to pass the `bill_until` value.
|
|
2345
|
-
*/
|
|
2346
|
-
type: BillUntil.Type;
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
|
-
namespace BillUntil {
|
|
2350
|
-
interface AmendmentEnd {
|
|
2351
|
-
/**
|
|
2352
|
-
* 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.
|
|
2353
|
-
*/
|
|
2354
|
-
index: number;
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
interface Duration {
|
|
2358
|
-
/**
|
|
2359
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2360
|
-
*/
|
|
2361
|
-
interval: Duration.Interval;
|
|
2362
|
-
|
|
2363
|
-
/**
|
|
2364
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2365
|
-
*/
|
|
2366
|
-
interval_count: number;
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
namespace Duration {
|
|
2370
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
type Type =
|
|
2374
|
-
| 'amendment_end'
|
|
2375
|
-
| 'duration'
|
|
2376
|
-
| 'schedule_end'
|
|
2377
|
-
| 'timestamp';
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2384
|
-
|
|
2385
|
-
interface ScheduleSettings {
|
|
2386
|
-
/**
|
|
2387
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2388
|
-
*/
|
|
2389
|
-
end_behavior?: ScheduleSettings.EndBehavior;
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
namespace ScheduleSettings {
|
|
2393
|
-
type EndBehavior = 'cancel' | 'release';
|
|
2394
|
-
}
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
interface SubscriptionScheduleCancelParams {
|
|
2398
|
-
/**
|
|
2399
|
-
* Specifies which fields in the response should be expanded.
|
|
2400
|
-
*/
|
|
2401
|
-
expand?: Array<string>;
|
|
2402
|
-
|
|
2403
|
-
/**
|
|
2404
|
-
* If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
|
|
2405
|
-
*/
|
|
2406
|
-
invoice_now?: boolean;
|
|
2407
|
-
|
|
2408
|
-
/**
|
|
2409
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
|
|
2410
|
-
*/
|
|
2411
|
-
prorate?: boolean;
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
interface SubscriptionScheduleReleaseParams {
|
|
2415
|
-
/**
|
|
2416
|
-
* Specifies which fields in the response should be expanded.
|
|
1201
|
+
* Specifies which fields in the response should be expanded.
|
|
2417
1202
|
*/
|
|
2418
1203
|
expand?: Array<string>;
|
|
2419
1204
|
|
|
@@ -2468,19 +1253,6 @@ declare module 'stripe' {
|
|
|
2468
1253
|
options?: RequestOptions
|
|
2469
1254
|
): ApiListPromise<Stripe.SubscriptionSchedule>;
|
|
2470
1255
|
|
|
2471
|
-
/**
|
|
2472
|
-
* Amends an existing subscription schedule.
|
|
2473
|
-
*/
|
|
2474
|
-
amend(
|
|
2475
|
-
id: string,
|
|
2476
|
-
params?: SubscriptionScheduleAmendParams,
|
|
2477
|
-
options?: RequestOptions
|
|
2478
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2479
|
-
amend(
|
|
2480
|
-
id: string,
|
|
2481
|
-
options?: RequestOptions
|
|
2482
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2483
|
-
|
|
2484
1256
|
/**
|
|
2485
1257
|
* 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.
|
|
2486
1258
|
*/
|