stripe 18.5.0-beta.1 → 18.5.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 +60 -1322
- package/OPENAPI_VERSION +1 -1
- package/README.md +5 -4
- package/VERSION +1 -1
- package/cjs/Error.js +1 -107
- package/cjs/apiVersion.js +3 -2
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
- package/cjs/resources/PaymentIntents.js +0 -13
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources.js +34 -126
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +0 -93
- package/esm/apiVersion.js +2 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
- package/esm/resources/PaymentIntents.js +0 -13
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources.js +6 -91
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +45 -45
- package/types/AccountSessionsResource.d.ts +51 -252
- package/types/Accounts.d.ts +3 -214
- package/types/AccountsResource.d.ts +0 -544
- package/types/Balance.d.ts +2 -7
- 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/Billing/Meters.d.ts +1 -1
- package/types/Billing/MetersResource.d.ts +1 -1
- package/types/BillingPortal/Configurations.d.ts +5 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +10 -0
- 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 +76 -171
- package/types/ChargesResource.d.ts +0 -1406
- package/types/Checkout/Sessions.d.ts +9 -313
- package/types/Checkout/SessionsResource.d.ts +10 -414
- package/types/ConfirmationTokens.d.ts +0 -125
- 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 +3 -8
- 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 +0 -8
- package/types/Discounts.d.ts +0 -10
- package/types/Disputes.d.ts +7 -31
- package/types/Errors.d.ts +2 -81
- package/types/EventTypes.d.ts +0 -664
- package/types/Events.d.ts +0 -97
- package/types/FileLinksResource.d.ts +1 -1
- package/types/Files.d.ts +1 -0
- package/types/FilesResource.d.ts +3 -1
- 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 +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 +1 -45
- package/types/InvoicePayments.d.ts +0 -5
- package/types/InvoicePaymentsResource.d.ts +74 -0
- package/types/Invoices.d.ts +6 -172
- package/types/InvoicesResource.d.ts +61 -1513
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/CardsResource.d.ts +10 -0
- 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 +63 -762
- package/types/PaymentIntentsResource.d.ts +5567 -11125
- package/types/PaymentLinks.d.ts +0 -6
- package/types/PaymentLinksResource.d.ts +1 -13
- package/types/PaymentMethodConfigurations.d.ts +0 -180
- package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
- package/types/PaymentMethods.d.ts +0 -125
- package/types/PaymentMethodsResource.d.ts +2 -167
- package/types/Payouts.d.ts +1 -1
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/PromotionCodes.d.ts +5 -7
- package/types/PromotionCodesResource.d.ts +0 -10
- package/types/Quotes.d.ts +1 -594
- package/types/QuotesResource.d.ts +281 -2626
- package/types/Refunds.d.ts +0 -14
- package/types/SetupAttempts.d.ts +4 -48
- package/types/SetupIntents.d.ts +5 -119
- 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 +0 -109
- package/types/SubscriptionSchedules.d.ts +39 -197
- package/types/SubscriptionSchedulesResource.d.ts +83 -1199
- package/types/Subscriptions.d.ts +1 -135
- package/types/SubscriptionsResource.d.ts +97 -449
- package/types/TaxIds.d.ts +0 -10
- package/types/TaxIdsResource.d.ts +0 -10
- package/types/Terminal/Configurations.d.ts +19 -0
- package/types/Terminal/ConfigurationsResource.d.ts +44 -0
- package/types/Terminal/Readers.d.ts +0 -20
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -126
- package/types/TestHelpers/Terminal/ReadersResource.d.ts +28 -1
- 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 -964
- package/types/WebhookEndpointsResource.d.ts +2 -79
- package/types/index.d.ts +4 -147
- 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/Billing/MeterUsage.js +0 -12
- 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/OnboardingLinks.js +0 -12
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- package/cjs/resources/V2/Core/AccountLinks.js +0 -9
- package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
- package/cjs/resources/V2/Core/Accounts.js +0 -25
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -25
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
- package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
- package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -25
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/BalanceSettings.js +0 -7
- package/esm/resources/Billing/MeterUsage.js +0 -9
- 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/OnboardingLinks.js +0 -9
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- package/esm/resources/V2/Core/AccountLinks.js +0 -6
- package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
- package/esm/resources/V2/Core/Accounts.js +0 -22
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
- package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -22
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
- package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
- package/esm/resources/V2/Payments/OffSessionPayments.js +0 -22
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/BalanceSettings.d.ts +0 -91
- package/types/BalanceSettingsResource.d.ts +0 -110
- package/types/Billing/MeterUsage.d.ts +0 -32
- package/types/Billing/MeterUsageResource.d.ts +0 -685
- package/types/Billing/MeterUsageRows.d.ts +0 -49
- 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 -155
- 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 -2166
- package/types/PaymentAttemptRecordsResource.d.ts +0 -47
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
- package/types/PaymentRecords.d.ts +0 -2159
- 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 -1734
- 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/OnboardingLinks.d.ts +0 -57
- package/types/Terminal/OnboardingLinksResource.d.ts +0 -62
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
- package/types/V2/Core/AccountLinks.d.ts +0 -168
- package/types/V2/Core/AccountLinksResource.d.ts +0 -152
- package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3780
- package/types/V2/Core/Accounts.d.ts +0 -8813
- package/types/V2/Core/AccountsResource.d.ts +0 -10626
- package/types/V2/Core/Persons.d.ts +0 -1872
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
- package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
- package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -580
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -326
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -289
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -168
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -208
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -160
- 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 -179
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -174
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -68
|
@@ -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,8 +50,6 @@ 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 {
|
|
71
54
|
/**
|
|
72
55
|
* Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
|
@@ -320,11 +303,6 @@ declare module 'stripe' {
|
|
|
320
303
|
*/
|
|
321
304
|
on_behalf_of?: string;
|
|
322
305
|
|
|
323
|
-
/**
|
|
324
|
-
* 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).
|
|
325
|
-
*/
|
|
326
|
-
pause_collection?: Phase.PauseCollection;
|
|
327
|
-
|
|
328
306
|
/**
|
|
329
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.
|
|
330
308
|
*/
|
|
@@ -340,20 +318,10 @@ declare module 'stripe' {
|
|
|
340
318
|
*/
|
|
341
319
|
trial?: boolean;
|
|
342
320
|
|
|
343
|
-
/**
|
|
344
|
-
* Specify trial behavior when crossing phase boundaries
|
|
345
|
-
*/
|
|
346
|
-
trial_continuation?: Phase.TrialContinuation;
|
|
347
|
-
|
|
348
321
|
/**
|
|
349
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`
|
|
350
323
|
*/
|
|
351
324
|
trial_end?: number;
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Settings related to subscription trials.
|
|
355
|
-
*/
|
|
356
|
-
trial_settings?: Phase.TrialSettings;
|
|
357
325
|
}
|
|
358
326
|
|
|
359
327
|
namespace Phase {
|
|
@@ -363,6 +331,16 @@ declare module 'stripe' {
|
|
|
363
331
|
*/
|
|
364
332
|
discounts?: Array<AddInvoiceItem.Discount>;
|
|
365
333
|
|
|
334
|
+
/**
|
|
335
|
+
* 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`.
|
|
336
|
+
*/
|
|
337
|
+
metadata?: Stripe.MetadataParam;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
|
341
|
+
*/
|
|
342
|
+
period?: AddInvoiceItem.Period;
|
|
343
|
+
|
|
366
344
|
/**
|
|
367
345
|
* The ID of the price object. One of `price` or `price_data` is required.
|
|
368
346
|
*/
|
|
@@ -396,53 +374,55 @@ declare module 'stripe' {
|
|
|
396
374
|
*/
|
|
397
375
|
discount?: string;
|
|
398
376
|
|
|
399
|
-
/**
|
|
400
|
-
* Details to determine how long the discount should be applied for.
|
|
401
|
-
*/
|
|
402
|
-
discount_end?: Discount.DiscountEnd;
|
|
403
|
-
|
|
404
377
|
/**
|
|
405
378
|
* ID of the promotion code to create a new discount for.
|
|
406
379
|
*/
|
|
407
380
|
promotion_code?: string;
|
|
408
381
|
}
|
|
409
382
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
383
|
+
interface Period {
|
|
384
|
+
/**
|
|
385
|
+
* End of the invoice item period.
|
|
386
|
+
*/
|
|
387
|
+
end: Period.End;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Start of the invoice item period.
|
|
391
|
+
*/
|
|
392
|
+
start: Period.Start;
|
|
393
|
+
}
|
|
416
394
|
|
|
395
|
+
namespace Period {
|
|
396
|
+
interface End {
|
|
417
397
|
/**
|
|
418
|
-
* A precise Unix timestamp for the
|
|
398
|
+
* A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
|
419
399
|
*/
|
|
420
400
|
timestamp?: number;
|
|
421
401
|
|
|
422
402
|
/**
|
|
423
|
-
*
|
|
403
|
+
* Select how to calculate the end of the invoice item period.
|
|
424
404
|
*/
|
|
425
|
-
type:
|
|
405
|
+
type: End.Type;
|
|
426
406
|
}
|
|
427
407
|
|
|
428
|
-
namespace
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
432
|
-
*/
|
|
433
|
-
interval: Duration.Interval;
|
|
408
|
+
namespace End {
|
|
409
|
+
type Type = 'min_item_period_end' | 'phase_end' | 'timestamp';
|
|
410
|
+
}
|
|
434
411
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
412
|
+
interface Start {
|
|
413
|
+
/**
|
|
414
|
+
* A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
|
415
|
+
*/
|
|
416
|
+
timestamp?: number;
|
|
440
417
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
418
|
+
/**
|
|
419
|
+
* Select how to calculate the start of the invoice item period.
|
|
420
|
+
*/
|
|
421
|
+
type: Start.Type;
|
|
422
|
+
}
|
|
444
423
|
|
|
445
|
-
|
|
424
|
+
namespace Start {
|
|
425
|
+
type Type = 'max_item_period_start' | 'phase_start' | 'timestamp';
|
|
446
426
|
}
|
|
447
427
|
}
|
|
448
428
|
|
|
@@ -535,56 +515,12 @@ declare module 'stripe' {
|
|
|
535
515
|
*/
|
|
536
516
|
discount?: string;
|
|
537
517
|
|
|
538
|
-
/**
|
|
539
|
-
* Details to determine how long the discount should be applied for.
|
|
540
|
-
*/
|
|
541
|
-
discount_end?: Discount.DiscountEnd;
|
|
542
|
-
|
|
543
518
|
/**
|
|
544
519
|
* ID of the promotion code to create a new discount for.
|
|
545
520
|
*/
|
|
546
521
|
promotion_code?: string;
|
|
547
522
|
}
|
|
548
523
|
|
|
549
|
-
namespace Discount {
|
|
550
|
-
interface DiscountEnd {
|
|
551
|
-
/**
|
|
552
|
-
* Time span for the redeemed discount.
|
|
553
|
-
*/
|
|
554
|
-
duration?: DiscountEnd.Duration;
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
558
|
-
*/
|
|
559
|
-
timestamp?: number;
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* The type of calculation made to determine when the discount ends.
|
|
563
|
-
*/
|
|
564
|
-
type: DiscountEnd.Type;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
namespace DiscountEnd {
|
|
568
|
-
interface Duration {
|
|
569
|
-
/**
|
|
570
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
571
|
-
*/
|
|
572
|
-
interval: Duration.Interval;
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
576
|
-
*/
|
|
577
|
-
interval_count: number;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
namespace Duration {
|
|
581
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
type Type = 'duration' | 'timestamp';
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
|
|
588
524
|
interface Duration {
|
|
589
525
|
/**
|
|
590
526
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -676,11 +612,6 @@ declare module 'stripe' {
|
|
|
676
612
|
* 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.
|
|
677
613
|
*/
|
|
678
614
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* Options that configure the trial on the subscription item.
|
|
682
|
-
*/
|
|
683
|
-
trial?: Item.Trial;
|
|
684
615
|
}
|
|
685
616
|
|
|
686
617
|
namespace Item {
|
|
@@ -702,56 +633,12 @@ declare module 'stripe' {
|
|
|
702
633
|
*/
|
|
703
634
|
discount?: string;
|
|
704
635
|
|
|
705
|
-
/**
|
|
706
|
-
* Details to determine how long the discount should be applied for.
|
|
707
|
-
*/
|
|
708
|
-
discount_end?: Discount.DiscountEnd;
|
|
709
|
-
|
|
710
636
|
/**
|
|
711
637
|
* ID of the promotion code to create a new discount for.
|
|
712
638
|
*/
|
|
713
639
|
promotion_code?: string;
|
|
714
640
|
}
|
|
715
641
|
|
|
716
|
-
namespace Discount {
|
|
717
|
-
interface DiscountEnd {
|
|
718
|
-
/**
|
|
719
|
-
* Time span for the redeemed discount.
|
|
720
|
-
*/
|
|
721
|
-
duration?: DiscountEnd.Duration;
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
725
|
-
*/
|
|
726
|
-
timestamp?: number;
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* The type of calculation made to determine when the discount ends.
|
|
730
|
-
*/
|
|
731
|
-
type: DiscountEnd.Type;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
namespace DiscountEnd {
|
|
735
|
-
interface Duration {
|
|
736
|
-
/**
|
|
737
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
738
|
-
*/
|
|
739
|
-
interval: Duration.Interval;
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
743
|
-
*/
|
|
744
|
-
interval_count: number;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
namespace Duration {
|
|
748
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
type Type = 'duration' | 'timestamp';
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
|
|
755
642
|
interface PriceData {
|
|
756
643
|
/**
|
|
757
644
|
* 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).
|
|
@@ -803,33 +690,6 @@ declare module 'stripe' {
|
|
|
803
690
|
|
|
804
691
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
805
692
|
}
|
|
806
|
-
|
|
807
|
-
interface Trial {
|
|
808
|
-
/**
|
|
809
|
-
* 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.
|
|
810
|
-
*/
|
|
811
|
-
converts_to?: Array<string>;
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* Determines the type of trial for this item.
|
|
815
|
-
*/
|
|
816
|
-
type: Trial.Type;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
namespace Trial {
|
|
820
|
-
type Type = 'free' | 'paid';
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
interface PauseCollection {
|
|
825
|
-
/**
|
|
826
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
827
|
-
*/
|
|
828
|
-
behavior: PauseCollection.Behavior;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
namespace PauseCollection {
|
|
832
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
833
693
|
}
|
|
834
694
|
|
|
835
695
|
type ProrationBehavior =
|
|
@@ -848,44 +708,6 @@ declare module 'stripe' {
|
|
|
848
708
|
*/
|
|
849
709
|
destination: string;
|
|
850
710
|
}
|
|
851
|
-
|
|
852
|
-
type TrialContinuation = 'continue' | 'none';
|
|
853
|
-
|
|
854
|
-
interface TrialSettings {
|
|
855
|
-
/**
|
|
856
|
-
* Defines how the subscription should behave when a trial ends.
|
|
857
|
-
*/
|
|
858
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
namespace TrialSettings {
|
|
862
|
-
interface EndBehavior {
|
|
863
|
-
/**
|
|
864
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
865
|
-
*/
|
|
866
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
namespace EndBehavior {
|
|
870
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
interface Prebilling {
|
|
876
|
-
/**
|
|
877
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
878
|
-
*/
|
|
879
|
-
iterations: number;
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
883
|
-
*/
|
|
884
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
namespace Prebilling {
|
|
888
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
889
711
|
}
|
|
890
712
|
}
|
|
891
713
|
|
|
@@ -897,11 +719,6 @@ declare module 'stripe' {
|
|
|
897
719
|
}
|
|
898
720
|
|
|
899
721
|
interface SubscriptionScheduleUpdateParams {
|
|
900
|
-
/**
|
|
901
|
-
* 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.
|
|
902
|
-
*/
|
|
903
|
-
billing_behavior?: SubscriptionScheduleUpdateParams.BillingBehavior;
|
|
904
|
-
|
|
905
722
|
/**
|
|
906
723
|
* Object representing the subscription schedule's default settings.
|
|
907
724
|
*/
|
|
@@ -927,11 +744,6 @@ declare module 'stripe' {
|
|
|
927
744
|
*/
|
|
928
745
|
phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
|
|
929
746
|
|
|
930
|
-
/**
|
|
931
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
932
|
-
*/
|
|
933
|
-
prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
|
|
934
|
-
|
|
935
747
|
/**
|
|
936
748
|
* 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`.
|
|
937
749
|
*/
|
|
@@ -939,8 +751,6 @@ declare module 'stripe' {
|
|
|
939
751
|
}
|
|
940
752
|
|
|
941
753
|
namespace SubscriptionScheduleUpdateParams {
|
|
942
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
943
|
-
|
|
944
754
|
interface DefaultSettings {
|
|
945
755
|
/**
|
|
946
756
|
* 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).
|
|
@@ -1183,11 +993,6 @@ declare module 'stripe' {
|
|
|
1183
993
|
*/
|
|
1184
994
|
on_behalf_of?: string;
|
|
1185
995
|
|
|
1186
|
-
/**
|
|
1187
|
-
* 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).
|
|
1188
|
-
*/
|
|
1189
|
-
pause_collection?: Phase.PauseCollection;
|
|
1190
|
-
|
|
1191
996
|
/**
|
|
1192
997
|
* 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.
|
|
1193
998
|
*/
|
|
@@ -1208,20 +1013,10 @@ declare module 'stripe' {
|
|
|
1208
1013
|
*/
|
|
1209
1014
|
trial?: boolean;
|
|
1210
1015
|
|
|
1211
|
-
/**
|
|
1212
|
-
* Specify trial behavior when crossing phase boundaries
|
|
1213
|
-
*/
|
|
1214
|
-
trial_continuation?: Phase.TrialContinuation;
|
|
1215
|
-
|
|
1216
1016
|
/**
|
|
1217
1017
|
* 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`
|
|
1218
1018
|
*/
|
|
1219
1019
|
trial_end?: number | 'now';
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* Settings related to subscription trials.
|
|
1223
|
-
*/
|
|
1224
|
-
trial_settings?: Phase.TrialSettings;
|
|
1225
1020
|
}
|
|
1226
1021
|
|
|
1227
1022
|
namespace Phase {
|
|
@@ -1231,6 +1026,16 @@ declare module 'stripe' {
|
|
|
1231
1026
|
*/
|
|
1232
1027
|
discounts?: Array<AddInvoiceItem.Discount>;
|
|
1233
1028
|
|
|
1029
|
+
/**
|
|
1030
|
+
* 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`.
|
|
1031
|
+
*/
|
|
1032
|
+
metadata?: Stripe.MetadataParam;
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
|
1036
|
+
*/
|
|
1037
|
+
period?: AddInvoiceItem.Period;
|
|
1038
|
+
|
|
1234
1039
|
/**
|
|
1235
1040
|
* The ID of the price object. One of `price` or `price_data` is required.
|
|
1236
1041
|
*/
|
|
@@ -1264,53 +1069,55 @@ declare module 'stripe' {
|
|
|
1264
1069
|
*/
|
|
1265
1070
|
discount?: string;
|
|
1266
1071
|
|
|
1267
|
-
/**
|
|
1268
|
-
* Details to determine how long the discount should be applied for.
|
|
1269
|
-
*/
|
|
1270
|
-
discount_end?: Discount.DiscountEnd;
|
|
1271
|
-
|
|
1272
1072
|
/**
|
|
1273
1073
|
* ID of the promotion code to create a new discount for.
|
|
1274
1074
|
*/
|
|
1275
1075
|
promotion_code?: string;
|
|
1276
1076
|
}
|
|
1277
1077
|
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1078
|
+
interface Period {
|
|
1079
|
+
/**
|
|
1080
|
+
* End of the invoice item period.
|
|
1081
|
+
*/
|
|
1082
|
+
end: Period.End;
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Start of the invoice item period.
|
|
1086
|
+
*/
|
|
1087
|
+
start: Period.Start;
|
|
1088
|
+
}
|
|
1284
1089
|
|
|
1090
|
+
namespace Period {
|
|
1091
|
+
interface End {
|
|
1285
1092
|
/**
|
|
1286
|
-
* A precise Unix timestamp for the
|
|
1093
|
+
* A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
|
1287
1094
|
*/
|
|
1288
1095
|
timestamp?: number;
|
|
1289
1096
|
|
|
1290
1097
|
/**
|
|
1291
|
-
*
|
|
1098
|
+
* Select how to calculate the end of the invoice item period.
|
|
1292
1099
|
*/
|
|
1293
|
-
type:
|
|
1100
|
+
type: End.Type;
|
|
1294
1101
|
}
|
|
1295
1102
|
|
|
1296
|
-
namespace
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1300
|
-
*/
|
|
1301
|
-
interval: Duration.Interval;
|
|
1103
|
+
namespace End {
|
|
1104
|
+
type Type = 'min_item_period_end' | 'phase_end' | 'timestamp';
|
|
1105
|
+
}
|
|
1302
1106
|
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1107
|
+
interface Start {
|
|
1108
|
+
/**
|
|
1109
|
+
* A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
|
1110
|
+
*/
|
|
1111
|
+
timestamp?: number;
|
|
1308
1112
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1113
|
+
/**
|
|
1114
|
+
* Select how to calculate the start of the invoice item period.
|
|
1115
|
+
*/
|
|
1116
|
+
type: Start.Type;
|
|
1117
|
+
}
|
|
1312
1118
|
|
|
1313
|
-
|
|
1119
|
+
namespace Start {
|
|
1120
|
+
type Type = 'max_item_period_start' | 'phase_start' | 'timestamp';
|
|
1314
1121
|
}
|
|
1315
1122
|
}
|
|
1316
1123
|
|
|
@@ -1403,56 +1210,12 @@ declare module 'stripe' {
|
|
|
1403
1210
|
*/
|
|
1404
1211
|
discount?: string;
|
|
1405
1212
|
|
|
1406
|
-
/**
|
|
1407
|
-
* Details to determine how long the discount should be applied for.
|
|
1408
|
-
*/
|
|
1409
|
-
discount_end?: Discount.DiscountEnd;
|
|
1410
|
-
|
|
1411
1213
|
/**
|
|
1412
1214
|
* ID of the promotion code to create a new discount for.
|
|
1413
1215
|
*/
|
|
1414
1216
|
promotion_code?: string;
|
|
1415
1217
|
}
|
|
1416
1218
|
|
|
1417
|
-
namespace Discount {
|
|
1418
|
-
interface DiscountEnd {
|
|
1419
|
-
/**
|
|
1420
|
-
* Time span for the redeemed discount.
|
|
1421
|
-
*/
|
|
1422
|
-
duration?: DiscountEnd.Duration;
|
|
1423
|
-
|
|
1424
|
-
/**
|
|
1425
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1426
|
-
*/
|
|
1427
|
-
timestamp?: number;
|
|
1428
|
-
|
|
1429
|
-
/**
|
|
1430
|
-
* The type of calculation made to determine when the discount ends.
|
|
1431
|
-
*/
|
|
1432
|
-
type: DiscountEnd.Type;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
namespace DiscountEnd {
|
|
1436
|
-
interface Duration {
|
|
1437
|
-
/**
|
|
1438
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1439
|
-
*/
|
|
1440
|
-
interval: Duration.Interval;
|
|
1441
|
-
|
|
1442
|
-
/**
|
|
1443
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1444
|
-
*/
|
|
1445
|
-
interval_count: number;
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
namespace Duration {
|
|
1449
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
type Type = 'duration' | 'timestamp';
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
1219
|
interface Duration {
|
|
1457
1220
|
/**
|
|
1458
1221
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -1544,11 +1307,6 @@ declare module 'stripe' {
|
|
|
1544
1307
|
* 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.
|
|
1545
1308
|
*/
|
|
1546
1309
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1547
|
-
|
|
1548
|
-
/**
|
|
1549
|
-
* Options that configure the trial on the subscription item.
|
|
1550
|
-
*/
|
|
1551
|
-
trial?: Item.Trial;
|
|
1552
1310
|
}
|
|
1553
1311
|
|
|
1554
1312
|
namespace Item {
|
|
@@ -1570,56 +1328,12 @@ declare module 'stripe' {
|
|
|
1570
1328
|
*/
|
|
1571
1329
|
discount?: string;
|
|
1572
1330
|
|
|
1573
|
-
/**
|
|
1574
|
-
* Details to determine how long the discount should be applied for.
|
|
1575
|
-
*/
|
|
1576
|
-
discount_end?: Discount.DiscountEnd;
|
|
1577
|
-
|
|
1578
1331
|
/**
|
|
1579
1332
|
* ID of the promotion code to create a new discount for.
|
|
1580
1333
|
*/
|
|
1581
1334
|
promotion_code?: string;
|
|
1582
1335
|
}
|
|
1583
1336
|
|
|
1584
|
-
namespace Discount {
|
|
1585
|
-
interface DiscountEnd {
|
|
1586
|
-
/**
|
|
1587
|
-
* Time span for the redeemed discount.
|
|
1588
|
-
*/
|
|
1589
|
-
duration?: DiscountEnd.Duration;
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1593
|
-
*/
|
|
1594
|
-
timestamp?: number;
|
|
1595
|
-
|
|
1596
|
-
/**
|
|
1597
|
-
* The type of calculation made to determine when the discount ends.
|
|
1598
|
-
*/
|
|
1599
|
-
type: DiscountEnd.Type;
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
namespace DiscountEnd {
|
|
1603
|
-
interface Duration {
|
|
1604
|
-
/**
|
|
1605
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1606
|
-
*/
|
|
1607
|
-
interval: Duration.Interval;
|
|
1608
|
-
|
|
1609
|
-
/**
|
|
1610
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1611
|
-
*/
|
|
1612
|
-
interval_count: number;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
namespace Duration {
|
|
1616
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
type Type = 'duration' | 'timestamp';
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
1337
|
interface PriceData {
|
|
1624
1338
|
/**
|
|
1625
1339
|
* 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).
|
|
@@ -1671,33 +1385,6 @@ declare module 'stripe' {
|
|
|
1671
1385
|
|
|
1672
1386
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1673
1387
|
}
|
|
1674
|
-
|
|
1675
|
-
interface Trial {
|
|
1676
|
-
/**
|
|
1677
|
-
* 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.
|
|
1678
|
-
*/
|
|
1679
|
-
converts_to?: Array<string>;
|
|
1680
|
-
|
|
1681
|
-
/**
|
|
1682
|
-
* Determines the type of trial for this item.
|
|
1683
|
-
*/
|
|
1684
|
-
type: Trial.Type;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
namespace Trial {
|
|
1688
|
-
type Type = 'free' | 'paid';
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
interface PauseCollection {
|
|
1693
|
-
/**
|
|
1694
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1695
|
-
*/
|
|
1696
|
-
behavior: PauseCollection.Behavior;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
namespace PauseCollection {
|
|
1700
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1701
1388
|
}
|
|
1702
1389
|
|
|
1703
1390
|
type ProrationBehavior =
|
|
@@ -1716,44 +1403,6 @@ declare module 'stripe' {
|
|
|
1716
1403
|
*/
|
|
1717
1404
|
destination: string;
|
|
1718
1405
|
}
|
|
1719
|
-
|
|
1720
|
-
type TrialContinuation = 'continue' | 'none';
|
|
1721
|
-
|
|
1722
|
-
interface TrialSettings {
|
|
1723
|
-
/**
|
|
1724
|
-
* Defines how the subscription should behave when a trial ends.
|
|
1725
|
-
*/
|
|
1726
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
namespace TrialSettings {
|
|
1730
|
-
interface EndBehavior {
|
|
1731
|
-
/**
|
|
1732
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1733
|
-
*/
|
|
1734
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
namespace EndBehavior {
|
|
1738
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
interface Prebilling {
|
|
1744
|
-
/**
|
|
1745
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
1746
|
-
*/
|
|
1747
|
-
iterations: number;
|
|
1748
|
-
|
|
1749
|
-
/**
|
|
1750
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
1751
|
-
*/
|
|
1752
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
namespace Prebilling {
|
|
1756
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
1757
1406
|
}
|
|
1758
1407
|
|
|
1759
1408
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
@@ -1781,12 +1430,7 @@ declare module 'stripe' {
|
|
|
1781
1430
|
customer?: string;
|
|
1782
1431
|
|
|
1783
1432
|
/**
|
|
1784
|
-
*
|
|
1785
|
-
*/
|
|
1786
|
-
customer_account?: string;
|
|
1787
|
-
|
|
1788
|
-
/**
|
|
1789
|
-
* Specifies which fields in the response should be expanded.
|
|
1433
|
+
* Specifies which fields in the response should be expanded.
|
|
1790
1434
|
*/
|
|
1791
1435
|
expand?: Array<string>;
|
|
1792
1436
|
|
|
@@ -1801,753 +1445,6 @@ declare module 'stripe' {
|
|
|
1801
1445
|
scheduled?: boolean;
|
|
1802
1446
|
}
|
|
1803
1447
|
|
|
1804
|
-
interface SubscriptionScheduleAmendParams {
|
|
1805
|
-
/**
|
|
1806
|
-
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
1807
|
-
*/
|
|
1808
|
-
amendments?: Array<SubscriptionScheduleAmendParams.Amendment>;
|
|
1809
|
-
|
|
1810
|
-
/**
|
|
1811
|
-
* Specifies which fields in the response should be expanded.
|
|
1812
|
-
*/
|
|
1813
|
-
expand?: Array<string>;
|
|
1814
|
-
|
|
1815
|
-
/**
|
|
1816
|
-
* Provide any time periods to bill in advance.
|
|
1817
|
-
*/
|
|
1818
|
-
prebilling?: Stripe.Emptyable<
|
|
1819
|
-
Array<SubscriptionScheduleAmendParams.Prebilling>
|
|
1820
|
-
>;
|
|
1821
|
-
|
|
1822
|
-
/**
|
|
1823
|
-
* In cases where the amendment changes the currently active phase,
|
|
1824
|
-
* specifies if and how to prorate at the time of the request.
|
|
1825
|
-
*/
|
|
1826
|
-
proration_behavior?: SubscriptionScheduleAmendParams.ProrationBehavior;
|
|
1827
|
-
|
|
1828
|
-
/**
|
|
1829
|
-
* Changes to apply to the subscription schedule.
|
|
1830
|
-
*/
|
|
1831
|
-
schedule_settings?: SubscriptionScheduleAmendParams.ScheduleSettings;
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
namespace SubscriptionScheduleAmendParams {
|
|
1835
|
-
interface Amendment {
|
|
1836
|
-
/**
|
|
1837
|
-
* 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.
|
|
1838
|
-
*/
|
|
1839
|
-
amendment_end?: Amendment.AmendmentEnd;
|
|
1840
|
-
|
|
1841
|
-
/**
|
|
1842
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1843
|
-
*/
|
|
1844
|
-
amendment_start: Amendment.AmendmentStart;
|
|
1845
|
-
|
|
1846
|
-
/**
|
|
1847
|
-
* 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.
|
|
1848
|
-
*/
|
|
1849
|
-
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
1853
|
-
*/
|
|
1854
|
-
discount_actions?: Array<Amendment.DiscountAction>;
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* Changes to the subscription items during the amendment time span.
|
|
1858
|
-
*/
|
|
1859
|
-
item_actions?: Array<Amendment.ItemAction>;
|
|
1860
|
-
|
|
1861
|
-
/**
|
|
1862
|
-
* Instructions for how to modify phase metadata
|
|
1863
|
-
*/
|
|
1864
|
-
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
1865
|
-
|
|
1866
|
-
/**
|
|
1867
|
-
* 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`.
|
|
1868
|
-
*/
|
|
1869
|
-
proration_behavior?: Amendment.ProrationBehavior;
|
|
1870
|
-
|
|
1871
|
-
/**
|
|
1872
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
1873
|
-
*/
|
|
1874
|
-
set_pause_collection?: Amendment.SetPauseCollection;
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
1878
|
-
*/
|
|
1879
|
-
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
1880
|
-
|
|
1881
|
-
/**
|
|
1882
|
-
* Settings related to subscription trials.
|
|
1883
|
-
*/
|
|
1884
|
-
trial_settings?: Amendment.TrialSettings;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
namespace Amendment {
|
|
1888
|
-
interface AmendmentEnd {
|
|
1889
|
-
/**
|
|
1890
|
-
* Use the `end` time of a given discount.
|
|
1891
|
-
*/
|
|
1892
|
-
discount_end?: AmendmentEnd.DiscountEnd;
|
|
1893
|
-
|
|
1894
|
-
/**
|
|
1895
|
-
* Time span for the amendment starting from the `amendment_start`.
|
|
1896
|
-
*/
|
|
1897
|
-
duration?: AmendmentEnd.Duration;
|
|
1898
|
-
|
|
1899
|
-
/**
|
|
1900
|
-
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
1901
|
-
*/
|
|
1902
|
-
timestamp?: number;
|
|
1903
|
-
|
|
1904
|
-
/**
|
|
1905
|
-
* Select one of three ways to pass the `amendment_end`.
|
|
1906
|
-
*/
|
|
1907
|
-
type: AmendmentEnd.Type;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
namespace AmendmentEnd {
|
|
1911
|
-
interface DiscountEnd {
|
|
1912
|
-
/**
|
|
1913
|
-
* The ID of a specific discount.
|
|
1914
|
-
*/
|
|
1915
|
-
discount: string;
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
interface Duration {
|
|
1919
|
-
/**
|
|
1920
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1921
|
-
*/
|
|
1922
|
-
interval: Duration.Interval;
|
|
1923
|
-
|
|
1924
|
-
/**
|
|
1925
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1926
|
-
*/
|
|
1927
|
-
interval_count: number;
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
namespace Duration {
|
|
1931
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
type Type =
|
|
1935
|
-
| 'discount_end'
|
|
1936
|
-
| 'duration'
|
|
1937
|
-
| 'schedule_end'
|
|
1938
|
-
| 'timestamp'
|
|
1939
|
-
| 'trial_end'
|
|
1940
|
-
| 'trial_start'
|
|
1941
|
-
| 'upcoming_invoice';
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
interface AmendmentStart {
|
|
1945
|
-
/**
|
|
1946
|
-
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
1947
|
-
*/
|
|
1948
|
-
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
1949
|
-
|
|
1950
|
-
/**
|
|
1951
|
-
* Use the `end` time of a given discount.
|
|
1952
|
-
*/
|
|
1953
|
-
discount_end?: AmendmentStart.DiscountEnd;
|
|
1954
|
-
|
|
1955
|
-
/**
|
|
1956
|
-
* A precise Unix timestamp for the amendment to start.
|
|
1957
|
-
*/
|
|
1958
|
-
timestamp?: number;
|
|
1959
|
-
|
|
1960
|
-
/**
|
|
1961
|
-
* Select one of three ways to pass the `amendment_start`.
|
|
1962
|
-
*/
|
|
1963
|
-
type: AmendmentStart.Type;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
namespace AmendmentStart {
|
|
1967
|
-
interface AmendmentEnd {
|
|
1968
|
-
/**
|
|
1969
|
-
* 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.
|
|
1970
|
-
*/
|
|
1971
|
-
index: number;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
interface DiscountEnd {
|
|
1975
|
-
/**
|
|
1976
|
-
* The ID of a specific discount.
|
|
1977
|
-
*/
|
|
1978
|
-
discount: string;
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
type Type =
|
|
1982
|
-
| 'amendment_end'
|
|
1983
|
-
| 'discount_end'
|
|
1984
|
-
| 'now'
|
|
1985
|
-
| 'schedule_end'
|
|
1986
|
-
| 'timestamp'
|
|
1987
|
-
| 'trial_end'
|
|
1988
|
-
| 'trial_start'
|
|
1989
|
-
| 'upcoming_invoice';
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
1993
|
-
|
|
1994
|
-
interface DiscountAction {
|
|
1995
|
-
/**
|
|
1996
|
-
* Details of the discount to add.
|
|
1997
|
-
*/
|
|
1998
|
-
add?: DiscountAction.Add;
|
|
1999
|
-
|
|
2000
|
-
/**
|
|
2001
|
-
* Details of the discount to remove.
|
|
2002
|
-
*/
|
|
2003
|
-
remove?: DiscountAction.Remove;
|
|
2004
|
-
|
|
2005
|
-
/**
|
|
2006
|
-
* Details of the discount to replace the existing discounts with.
|
|
2007
|
-
*/
|
|
2008
|
-
set?: DiscountAction.Set;
|
|
2009
|
-
|
|
2010
|
-
/**
|
|
2011
|
-
* Determines the type of discount action.
|
|
2012
|
-
*/
|
|
2013
|
-
type: DiscountAction.Type;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
namespace DiscountAction {
|
|
2017
|
-
interface Add {
|
|
2018
|
-
/**
|
|
2019
|
-
* The coupon code to redeem.
|
|
2020
|
-
*/
|
|
2021
|
-
coupon?: string;
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
2025
|
-
*/
|
|
2026
|
-
discount?: string;
|
|
2027
|
-
|
|
2028
|
-
/**
|
|
2029
|
-
* Details to determine how long the discount should be applied for.
|
|
2030
|
-
*/
|
|
2031
|
-
discount_end?: Add.DiscountEnd;
|
|
2032
|
-
|
|
2033
|
-
/**
|
|
2034
|
-
* 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.
|
|
2035
|
-
*/
|
|
2036
|
-
index?: number;
|
|
2037
|
-
|
|
2038
|
-
/**
|
|
2039
|
-
* The promotion code to redeem.
|
|
2040
|
-
*/
|
|
2041
|
-
promotion_code?: string;
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
namespace Add {
|
|
2045
|
-
interface DiscountEnd {
|
|
2046
|
-
/**
|
|
2047
|
-
* The type of calculation made to determine when the discount ends.
|
|
2048
|
-
*/
|
|
2049
|
-
type: 'amendment_end';
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
interface Remove {
|
|
2054
|
-
/**
|
|
2055
|
-
* The coupon code to remove from the `discounts` array.
|
|
2056
|
-
*/
|
|
2057
|
-
coupon?: string;
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
2061
|
-
*/
|
|
2062
|
-
discount?: string;
|
|
2063
|
-
|
|
2064
|
-
/**
|
|
2065
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
2066
|
-
*/
|
|
2067
|
-
promotion_code?: string;
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
interface Set {
|
|
2071
|
-
/**
|
|
2072
|
-
* The coupon code to replace the `discounts` array with.
|
|
2073
|
-
*/
|
|
2074
|
-
coupon?: string;
|
|
2075
|
-
|
|
2076
|
-
/**
|
|
2077
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
2078
|
-
*/
|
|
2079
|
-
discount?: string;
|
|
2080
|
-
|
|
2081
|
-
/**
|
|
2082
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2083
|
-
*/
|
|
2084
|
-
promotion_code?: string;
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
interface ItemAction {
|
|
2091
|
-
/**
|
|
2092
|
-
* 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.
|
|
2093
|
-
*/
|
|
2094
|
-
add?: ItemAction.Add;
|
|
2095
|
-
|
|
2096
|
-
/**
|
|
2097
|
-
* Details of the subscription item to remove.
|
|
2098
|
-
*/
|
|
2099
|
-
remove?: ItemAction.Remove;
|
|
2100
|
-
|
|
2101
|
-
/**
|
|
2102
|
-
* 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.
|
|
2103
|
-
*/
|
|
2104
|
-
set?: ItemAction.Set;
|
|
2105
|
-
|
|
2106
|
-
/**
|
|
2107
|
-
* Determines the type of item action.
|
|
2108
|
-
*/
|
|
2109
|
-
type: ItemAction.Type;
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
namespace ItemAction {
|
|
2113
|
-
interface Add {
|
|
2114
|
-
/**
|
|
2115
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
2116
|
-
*/
|
|
2117
|
-
discounts?: Array<Add.Discount>;
|
|
2118
|
-
|
|
2119
|
-
/**
|
|
2120
|
-
* 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`.
|
|
2121
|
-
*/
|
|
2122
|
-
metadata?: Stripe.MetadataParam;
|
|
2123
|
-
|
|
2124
|
-
/**
|
|
2125
|
-
* The ID of the price object.
|
|
2126
|
-
*/
|
|
2127
|
-
price: string;
|
|
2128
|
-
|
|
2129
|
-
/**
|
|
2130
|
-
* Quantity for this item.
|
|
2131
|
-
*/
|
|
2132
|
-
quantity?: number;
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* 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`.
|
|
2136
|
-
*/
|
|
2137
|
-
tax_rates?: Array<string>;
|
|
2138
|
-
|
|
2139
|
-
/**
|
|
2140
|
-
* Options that configure the trial on the subscription item.
|
|
2141
|
-
*/
|
|
2142
|
-
trial?: Add.Trial;
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
namespace Add {
|
|
2146
|
-
interface Discount {
|
|
2147
|
-
/**
|
|
2148
|
-
* ID of the coupon to create a new discount for.
|
|
2149
|
-
*/
|
|
2150
|
-
coupon?: string;
|
|
2151
|
-
|
|
2152
|
-
/**
|
|
2153
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2154
|
-
*/
|
|
2155
|
-
discount?: string;
|
|
2156
|
-
|
|
2157
|
-
/**
|
|
2158
|
-
* Details to determine how long the discount should be applied for.
|
|
2159
|
-
*/
|
|
2160
|
-
discount_end?: Discount.DiscountEnd;
|
|
2161
|
-
|
|
2162
|
-
/**
|
|
2163
|
-
* ID of the promotion code to create a new discount for.
|
|
2164
|
-
*/
|
|
2165
|
-
promotion_code?: string;
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
|
-
namespace Discount {
|
|
2169
|
-
interface DiscountEnd {
|
|
2170
|
-
/**
|
|
2171
|
-
* Time span for the redeemed discount.
|
|
2172
|
-
*/
|
|
2173
|
-
duration?: DiscountEnd.Duration;
|
|
2174
|
-
|
|
2175
|
-
/**
|
|
2176
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2177
|
-
*/
|
|
2178
|
-
timestamp?: number;
|
|
2179
|
-
|
|
2180
|
-
/**
|
|
2181
|
-
* The type of calculation made to determine when the discount ends.
|
|
2182
|
-
*/
|
|
2183
|
-
type: DiscountEnd.Type;
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
namespace DiscountEnd {
|
|
2187
|
-
interface Duration {
|
|
2188
|
-
/**
|
|
2189
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2190
|
-
*/
|
|
2191
|
-
interval: Duration.Interval;
|
|
2192
|
-
|
|
2193
|
-
/**
|
|
2194
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2195
|
-
*/
|
|
2196
|
-
interval_count: number;
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
namespace Duration {
|
|
2200
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
type Type = 'duration' | 'timestamp';
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
interface Trial {
|
|
2208
|
-
/**
|
|
2209
|
-
* 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.
|
|
2210
|
-
*/
|
|
2211
|
-
converts_to?: Array<string>;
|
|
2212
|
-
|
|
2213
|
-
/**
|
|
2214
|
-
* Determines the type of trial for this item.
|
|
2215
|
-
*/
|
|
2216
|
-
type: Trial.Type;
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
namespace Trial {
|
|
2220
|
-
type Type = 'free' | 'paid';
|
|
2221
|
-
}
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
interface Remove {
|
|
2225
|
-
/**
|
|
2226
|
-
* ID of a price to remove.
|
|
2227
|
-
*/
|
|
2228
|
-
price: string;
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
interface Set {
|
|
2232
|
-
/**
|
|
2233
|
-
* 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`.
|
|
2234
|
-
*/
|
|
2235
|
-
discounts?: Array<Set.Discount>;
|
|
2236
|
-
|
|
2237
|
-
/**
|
|
2238
|
-
* 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`.
|
|
2239
|
-
*/
|
|
2240
|
-
metadata?: Stripe.MetadataParam;
|
|
2241
|
-
|
|
2242
|
-
/**
|
|
2243
|
-
* The ID of the price object.
|
|
2244
|
-
*/
|
|
2245
|
-
price: string;
|
|
2246
|
-
|
|
2247
|
-
/**
|
|
2248
|
-
* 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`.
|
|
2249
|
-
*/
|
|
2250
|
-
quantity?: number;
|
|
2251
|
-
|
|
2252
|
-
/**
|
|
2253
|
-
* 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`.
|
|
2254
|
-
*/
|
|
2255
|
-
tax_rates?: Array<string>;
|
|
2256
|
-
|
|
2257
|
-
/**
|
|
2258
|
-
* 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`.
|
|
2259
|
-
*/
|
|
2260
|
-
trial?: Set.Trial;
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
namespace Set {
|
|
2264
|
-
interface Discount {
|
|
2265
|
-
/**
|
|
2266
|
-
* ID of the coupon to create a new discount for.
|
|
2267
|
-
*/
|
|
2268
|
-
coupon?: string;
|
|
2269
|
-
|
|
2270
|
-
/**
|
|
2271
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2272
|
-
*/
|
|
2273
|
-
discount?: string;
|
|
2274
|
-
|
|
2275
|
-
/**
|
|
2276
|
-
* Details to determine how long the discount should be applied for.
|
|
2277
|
-
*/
|
|
2278
|
-
discount_end?: Discount.DiscountEnd;
|
|
2279
|
-
|
|
2280
|
-
/**
|
|
2281
|
-
* ID of the promotion code to create a new discount for.
|
|
2282
|
-
*/
|
|
2283
|
-
promotion_code?: string;
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
namespace Discount {
|
|
2287
|
-
interface DiscountEnd {
|
|
2288
|
-
/**
|
|
2289
|
-
* Time span for the redeemed discount.
|
|
2290
|
-
*/
|
|
2291
|
-
duration?: DiscountEnd.Duration;
|
|
2292
|
-
|
|
2293
|
-
/**
|
|
2294
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2295
|
-
*/
|
|
2296
|
-
timestamp?: number;
|
|
2297
|
-
|
|
2298
|
-
/**
|
|
2299
|
-
* The type of calculation made to determine when the discount ends.
|
|
2300
|
-
*/
|
|
2301
|
-
type: DiscountEnd.Type;
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
namespace DiscountEnd {
|
|
2305
|
-
interface Duration {
|
|
2306
|
-
/**
|
|
2307
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2308
|
-
*/
|
|
2309
|
-
interval: Duration.Interval;
|
|
2310
|
-
|
|
2311
|
-
/**
|
|
2312
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2313
|
-
*/
|
|
2314
|
-
interval_count: number;
|
|
2315
|
-
}
|
|
2316
|
-
|
|
2317
|
-
namespace Duration {
|
|
2318
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
type Type = 'duration' | 'timestamp';
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
interface Trial {
|
|
2326
|
-
/**
|
|
2327
|
-
* 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.
|
|
2328
|
-
*/
|
|
2329
|
-
converts_to?: Array<string>;
|
|
2330
|
-
|
|
2331
|
-
/**
|
|
2332
|
-
* Determines the type of trial for this item.
|
|
2333
|
-
*/
|
|
2334
|
-
type: Trial.Type;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
namespace Trial {
|
|
2338
|
-
type Type = 'free' | 'paid';
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
interface MetadataAction {
|
|
2346
|
-
/**
|
|
2347
|
-
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
2348
|
-
*/
|
|
2349
|
-
add?: {
|
|
2350
|
-
[key: string]: string;
|
|
2351
|
-
};
|
|
2352
|
-
|
|
2353
|
-
/**
|
|
2354
|
-
* Keys to remove from schedule phase metadata.
|
|
2355
|
-
*/
|
|
2356
|
-
remove?: Array<string>;
|
|
2357
|
-
|
|
2358
|
-
/**
|
|
2359
|
-
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
2360
|
-
*/
|
|
2361
|
-
set?: Stripe.Emptyable<{
|
|
2362
|
-
[key: string]: string;
|
|
2363
|
-
}>;
|
|
2364
|
-
|
|
2365
|
-
/**
|
|
2366
|
-
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
2367
|
-
*/
|
|
2368
|
-
type: MetadataAction.Type;
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
namespace MetadataAction {
|
|
2372
|
-
type Type = 'add' | 'remove' | 'set';
|
|
2373
|
-
}
|
|
2374
|
-
|
|
2375
|
-
type ProrationBehavior =
|
|
2376
|
-
| 'always_invoice'
|
|
2377
|
-
| 'create_prorations'
|
|
2378
|
-
| 'none';
|
|
2379
|
-
|
|
2380
|
-
interface SetPauseCollection {
|
|
2381
|
-
/**
|
|
2382
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
2383
|
-
*/
|
|
2384
|
-
set?: SetPauseCollection.Set;
|
|
2385
|
-
|
|
2386
|
-
/**
|
|
2387
|
-
* Determines the type of the pause_collection amendment.
|
|
2388
|
-
*/
|
|
2389
|
-
type: SetPauseCollection.Type;
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
namespace SetPauseCollection {
|
|
2393
|
-
interface Set {
|
|
2394
|
-
/**
|
|
2395
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2396
|
-
*/
|
|
2397
|
-
behavior: Set.Behavior;
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
namespace Set {
|
|
2401
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
type Type = 'remove' | 'set';
|
|
2405
|
-
}
|
|
2406
|
-
|
|
2407
|
-
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
2408
|
-
|
|
2409
|
-
interface TrialSettings {
|
|
2410
|
-
/**
|
|
2411
|
-
* Defines how the subscription should behave when a trial ends.
|
|
2412
|
-
*/
|
|
2413
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
namespace TrialSettings {
|
|
2417
|
-
interface EndBehavior {
|
|
2418
|
-
/**
|
|
2419
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2420
|
-
*/
|
|
2421
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
namespace EndBehavior {
|
|
2425
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
|
-
interface Prebilling {
|
|
2431
|
-
/**
|
|
2432
|
-
* The beginning of the prebilled time period. The default value is `now`.
|
|
2433
|
-
*/
|
|
2434
|
-
bill_from?: Prebilling.BillFrom;
|
|
2435
|
-
|
|
2436
|
-
/**
|
|
2437
|
-
* The end of the prebilled time period.
|
|
2438
|
-
*/
|
|
2439
|
-
bill_until?: Prebilling.BillUntil;
|
|
2440
|
-
|
|
2441
|
-
/**
|
|
2442
|
-
* When the prebilling invoice should be created. The default value is `now`.
|
|
2443
|
-
*/
|
|
2444
|
-
invoice_at?: 'now';
|
|
2445
|
-
|
|
2446
|
-
/**
|
|
2447
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2448
|
-
*/
|
|
2449
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
namespace Prebilling {
|
|
2453
|
-
interface BillFrom {
|
|
2454
|
-
/**
|
|
2455
|
-
* Start the prebilled period when a specified amendment begins.
|
|
2456
|
-
*/
|
|
2457
|
-
amendment_start?: BillFrom.AmendmentStart;
|
|
2458
|
-
|
|
2459
|
-
/**
|
|
2460
|
-
* Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2461
|
-
*/
|
|
2462
|
-
timestamp?: number;
|
|
2463
|
-
|
|
2464
|
-
/**
|
|
2465
|
-
* Select one of several ways to pass the `bill_from` value.
|
|
2466
|
-
*/
|
|
2467
|
-
type: BillFrom.Type;
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
namespace BillFrom {
|
|
2471
|
-
interface AmendmentStart {
|
|
2472
|
-
/**
|
|
2473
|
-
* 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.
|
|
2474
|
-
*/
|
|
2475
|
-
index: number;
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
type Type = 'amendment_start' | 'now' | 'timestamp';
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
interface BillUntil {
|
|
2482
|
-
/**
|
|
2483
|
-
* End the prebilled period when a specified amendment ends.
|
|
2484
|
-
*/
|
|
2485
|
-
amendment_end?: BillUntil.AmendmentEnd;
|
|
2486
|
-
|
|
2487
|
-
/**
|
|
2488
|
-
* Time span for prebilling, starting from `bill_from`.
|
|
2489
|
-
*/
|
|
2490
|
-
duration?: BillUntil.Duration;
|
|
2491
|
-
|
|
2492
|
-
/**
|
|
2493
|
-
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2494
|
-
*/
|
|
2495
|
-
timestamp?: number;
|
|
2496
|
-
|
|
2497
|
-
/**
|
|
2498
|
-
* Select one of several ways to pass the `bill_until` value.
|
|
2499
|
-
*/
|
|
2500
|
-
type: BillUntil.Type;
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
|
-
namespace BillUntil {
|
|
2504
|
-
interface AmendmentEnd {
|
|
2505
|
-
/**
|
|
2506
|
-
* 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.
|
|
2507
|
-
*/
|
|
2508
|
-
index: number;
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
|
-
interface Duration {
|
|
2512
|
-
/**
|
|
2513
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2514
|
-
*/
|
|
2515
|
-
interval: Duration.Interval;
|
|
2516
|
-
|
|
2517
|
-
/**
|
|
2518
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2519
|
-
*/
|
|
2520
|
-
interval_count: number;
|
|
2521
|
-
}
|
|
2522
|
-
|
|
2523
|
-
namespace Duration {
|
|
2524
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2525
|
-
}
|
|
2526
|
-
|
|
2527
|
-
type Type =
|
|
2528
|
-
| 'amendment_end'
|
|
2529
|
-
| 'duration'
|
|
2530
|
-
| 'schedule_end'
|
|
2531
|
-
| 'timestamp';
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
|
-
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2538
|
-
|
|
2539
|
-
interface ScheduleSettings {
|
|
2540
|
-
/**
|
|
2541
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2542
|
-
*/
|
|
2543
|
-
end_behavior?: ScheduleSettings.EndBehavior;
|
|
2544
|
-
}
|
|
2545
|
-
|
|
2546
|
-
namespace ScheduleSettings {
|
|
2547
|
-
type EndBehavior = 'cancel' | 'release';
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
1448
|
interface SubscriptionScheduleCancelParams {
|
|
2552
1449
|
/**
|
|
2553
1450
|
* Specifies which fields in the response should be expanded.
|
|
@@ -2622,19 +1519,6 @@ declare module 'stripe' {
|
|
|
2622
1519
|
options?: RequestOptions
|
|
2623
1520
|
): ApiListPromise<Stripe.SubscriptionSchedule>;
|
|
2624
1521
|
|
|
2625
|
-
/**
|
|
2626
|
-
* Amends an existing subscription schedule.
|
|
2627
|
-
*/
|
|
2628
|
-
amend(
|
|
2629
|
-
id: string,
|
|
2630
|
-
params?: SubscriptionScheduleAmendParams,
|
|
2631
|
-
options?: RequestOptions
|
|
2632
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2633
|
-
amend(
|
|
2634
|
-
id: string,
|
|
2635
|
-
options?: RequestOptions
|
|
2636
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2637
|
-
|
|
2638
1522
|
/**
|
|
2639
1523
|
* 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.
|
|
2640
1524
|
*/
|