stripe 20.1.2 → 20.2.0-alpha.2
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 +1988 -14
- package/OPENAPI_VERSION +1 -1
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/Error.js +123 -1
- package/cjs/RequestSender.js +1 -9
- package/cjs/apiVersion.js +2 -3
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/BalanceTransfers.js +9 -0
- package/cjs/resources/Billing/Analytics/MeterUsage.js +12 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/DelegatedCheckout/RequestedSessions.js +28 -0
- package/cjs/resources/ExternalAccounts.js +23 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/FxQuotes.js +15 -0
- package/cjs/resources/Identity/BlocklistEntries.js +25 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
- package/cjs/resources/Issuing/Programs.js +22 -0
- package/cjs/resources/Mandates.js +5 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +8 -0
- package/cjs/resources/PaymentMethods.js +4 -0
- package/cjs/resources/Privacy/RedactionJobs.js +42 -0
- package/cjs/resources/ProductCatalog/TrialOffers.js +12 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/Radar/AccountEvaluations.js +20 -0
- package/cjs/resources/SharedPayment/GrantedTokens.js +12 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Subscriptions.js +8 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Tax/Locations.js +18 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +16 -0
- package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +16 -0
- package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
- package/cjs/resources/V2/Billing/BillSettings.js +27 -0
- package/cjs/resources/V2/Billing/Cadences.js +23 -0
- package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
- package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
- package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
- package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
- package/cjs/resources/V2/Billing/Intents.js +36 -0
- package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
- package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
- package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
- package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
- package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +12 -0
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +26 -0
- package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
- package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
- package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
- package/cjs/resources/V2/Billing/Profiles.js +19 -0
- package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
- package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
- package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
- package/cjs/resources/V2/Billing/RateCards.js +29 -0
- package/cjs/resources/V2/Billing/ServiceActions.js +20 -0
- package/cjs/resources/V2/Core/ClaimableSandboxes.js +16 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +33 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +37 -0
- package/cjs/resources/V2/Iam/ApiKeys.js +24 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
- package/cjs/resources/V2/MoneyManagement/CurrencyConversions.js +21 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +29 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +20 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
- package/cjs/resources/V2/Payments/OffSessionPayments.js +29 -0
- package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.js +20 -0
- package/cjs/resources/V2/Payments/SettlementAllocationIntents.js +33 -0
- package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
- package/cjs/resources/V2/Reporting/Reports.js +12 -0
- package/cjs/resources/V2/Tax/ManualRules.js +23 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
- package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
- package/cjs/resources.js +166 -4
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +107 -0
- package/esm/RequestSender.js +1 -9
- package/esm/apiVersion.js +1 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/BalanceTransfers.js +6 -0
- package/esm/resources/Billing/Analytics/MeterUsage.js +9 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/DelegatedCheckout/RequestedSessions.js +25 -0
- package/esm/resources/ExternalAccounts.js +20 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/FxQuotes.js +12 -0
- package/esm/resources/Identity/BlocklistEntries.js +22 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
- package/esm/resources/Issuing/Programs.js +19 -0
- package/esm/resources/Mandates.js +5 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +8 -0
- package/esm/resources/PaymentMethods.js +4 -0
- package/esm/resources/Privacy/RedactionJobs.js +39 -0
- package/esm/resources/ProductCatalog/TrialOffers.js +9 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/Radar/AccountEvaluations.js +17 -0
- package/esm/resources/SharedPayment/GrantedTokens.js +9 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Subscriptions.js +8 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Tax/Locations.js +15 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/TestHelpers/Capital/FinancingOffers.js +13 -0
- package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +13 -0
- package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
- package/esm/resources/V2/Billing/BillSettings.js +24 -0
- package/esm/resources/V2/Billing/Cadences.js +20 -0
- package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
- package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
- package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
- package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
- package/esm/resources/V2/Billing/Intents.js +33 -0
- package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
- package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
- package/esm/resources/V2/Billing/LicenseFees.js +24 -0
- package/esm/resources/V2/Billing/LicensedItems.js +22 -0
- package/esm/resources/V2/Billing/MeteredItems.js +19 -0
- package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +9 -0
- package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +23 -0
- package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
- package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
- package/esm/resources/V2/Billing/PricingPlans.js +26 -0
- package/esm/resources/V2/Billing/Profiles.js +16 -0
- package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
- package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
- package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
- package/esm/resources/V2/Billing/RateCards.js +26 -0
- package/esm/resources/V2/Billing/ServiceActions.js +17 -0
- package/esm/resources/V2/Core/ClaimableSandboxes.js +13 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +30 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +34 -0
- package/esm/resources/V2/Iam/ApiKeys.js +21 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
- package/esm/resources/V2/MoneyManagement/CurrencyConversions.js +18 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +26 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
- package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +17 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
- package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
- package/esm/resources/V2/Payments/OffSessionPayments.js +26 -0
- package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.js +17 -0
- package/esm/resources/V2/Payments/SettlementAllocationIntents.js +30 -0
- package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
- package/esm/resources/V2/Reporting/Reports.js +9 -0
- package/esm/resources/V2/Tax/ManualRules.js +20 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
- package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
- package/esm/resources.js +156 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +63 -0
- package/types/AccountSessionsResource.d.ts +285 -0
- package/types/Accounts.d.ts +225 -1
- package/types/AccountsResource.d.ts +698 -12
- package/types/ApplicationFees.d.ts +6 -1
- package/types/Balance.d.ts +82 -0
- package/types/BalanceTransactions.d.ts +2 -1
- package/types/BalanceTransfers.d.ts +122 -0
- package/types/BalanceTransfersResource.d.ts +87 -0
- package/types/BankAccounts.d.ts +2 -0
- package/types/Billing/AlertTriggereds.d.ts +16 -1
- package/types/Billing/Alerts.d.ts +116 -1
- package/types/Billing/AlertsResource.d.ts +149 -2
- package/types/Billing/Analytics/MeterUsage.d.ts +31 -0
- package/types/Billing/Analytics/MeterUsageResource.d.ts +694 -0
- package/types/Billing/Analytics/MeterUsageRows.d.ts +58 -0
- package/types/Billing/CreditBalanceSummary.d.ts +118 -2
- package/types/Billing/CreditBalanceSummaryResource.d.ts +12 -0
- package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
- package/types/Billing/CreditGrants.d.ts +71 -1
- package/types/Billing/CreditGrantsResource.d.ts +32 -1
- package/types/Billing/MeterEventSummaries.d.ts +7 -0
- package/types/Billing/Meters.d.ts +5 -0
- package/types/Billing/MetersResource.d.ts +17 -0
- package/types/Capabilities.d.ts +2 -0
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +109 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Cards.d.ts +19 -0
- package/types/Charges.d.ts +166 -0
- package/types/ChargesResource.d.ts +3855 -75
- package/types/Checkout/Sessions.d.ts +337 -2
- package/types/Checkout/SessionsResource.d.ts +450 -2
- package/types/ConfirmationTokens.d.ts +117 -0
- package/types/Coupons.d.ts +35 -0
- package/types/CouponsResource.d.ts +23 -0
- package/types/CreditNoteLineItems.d.ts +17 -0
- package/types/CustomerSessions.d.ts +41 -0
- package/types/CustomerSessionsResource.d.ts +41 -0
- package/types/CustomersResource.d.ts +7 -0
- package/types/DelegatedCheckout/RequestedSessions.d.ts +465 -0
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +703 -0
- package/types/Discounts.d.ts +10 -0
- package/types/Disputes.d.ts +40 -0
- package/types/DisputesResource.d.ts +11 -0
- package/types/Errors.d.ts +91 -0
- package/types/EventTypes.d.ts +630 -0
- package/types/Events.d.ts +96 -0
- package/types/ExternalAccountsResource.d.ts +304 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +34 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Institutions.d.ts +98 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +49 -1
- package/types/FinancialConnections/SessionsResource.d.ts +38 -1
- package/types/FxQuotes.d.ts +155 -0
- package/types/FxQuotesResource.d.ts +130 -0
- package/types/Identity/BlocklistEntries.d.ts +78 -0
- package/types/Identity/BlocklistEntriesResource.d.ts +146 -0
- package/types/Identity/VerificationReports.d.ts +10 -0
- package/types/Identity/VerificationReportsResource.d.ts +5 -0
- package/types/InvoiceItems.d.ts +123 -3
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +169 -6
- package/types/Invoices.d.ts +216 -4
- package/types/InvoicesResource.d.ts +1955 -136
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/Cards.d.ts +10 -0
- package/types/Issuing/CardsResource.d.ts +33 -0
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/Programs.d.ts +42 -0
- package/types/Issuing/ProgramsResource.d.ts +96 -0
- package/types/Issuing/Settlements.d.ts +113 -0
- package/types/Issuing/Transactions.d.ts +5 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +45 -1
- package/types/Mandates.d.ts +69 -1
- package/types/MandatesResource.d.ts +31 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1163 -0
- package/types/OrdersResource.d.ts +5505 -0
- package/types/PaymentAttemptRecords.d.ts +117 -0
- package/types/PaymentIntents.d.ts +728 -4
- package/types/PaymentIntentsResource.d.ts +19194 -6486
- package/types/PaymentLinks.d.ts +5 -0
- package/types/PaymentLinksResource.d.ts +29 -0
- package/types/PaymentMethodBalances.d.ts +63 -0
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
- package/types/PaymentMethods.d.ts +122 -0
- package/types/PaymentMethodsResource.d.ts +130 -0
- package/types/PaymentRecords.d.ts +117 -0
- package/types/Persons.d.ts +30 -0
- package/types/Plans.d.ts +5 -0
- package/types/PlansResource.d.ts +19 -0
- package/types/Prices.d.ts +27 -0
- package/types/PricesResource.d.ts +41 -0
- package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
- package/types/Privacy/RedactionJobs.d.ts +111 -0
- package/types/Privacy/RedactionJobsResource.d.ts +230 -0
- package/types/ProductCatalog/TrialOffers.d.ts +77 -0
- package/types/ProductCatalog/TrialOffersResource.d.ts +80 -0
- package/types/ProductsResource.d.ts +34 -0
- package/types/QuoteLines.d.ts +651 -0
- package/types/QuotePreviewInvoices.d.ts +1839 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +1034 -0
- package/types/Quotes.d.ts +871 -1
- package/types/QuotesResource.d.ts +3245 -297
- package/types/Radar/AccountEvaluations.d.ts +88 -0
- package/types/Radar/AccountEvaluationsResource.d.ts +148 -0
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +42 -1
- package/types/SetupIntents.d.ts +159 -2
- package/types/SetupIntentsResource.d.ts +719 -3
- package/types/SharedPayment/GrantedTokens.d.ts +102 -0
- package/types/SharedPayment/GrantedTokensResource.d.ts +29 -0
- package/types/Sources.d.ts +29 -0
- package/types/SubscriptionItems.d.ts +39 -0
- package/types/SubscriptionItemsResource.d.ts +143 -0
- package/types/SubscriptionSchedules.d.ts +324 -0
- package/types/SubscriptionSchedulesResource.d.ts +1521 -65
- package/types/Subscriptions.d.ts +279 -1
- package/types/SubscriptionsResource.d.ts +807 -2
- package/types/Tax/CalculationLineItems.d.ts +14 -1
- package/types/Tax/Calculations.d.ts +17 -1
- package/types/Tax/CalculationsResource.d.ts +5 -0
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/Tax/Locations.d.ts +34 -0
- package/types/Tax/LocationsResource.d.ts +117 -0
- package/types/Tax/Registrations.d.ts +81 -1
- package/types/Tax/RegistrationsResource.d.ts +9 -1
- package/types/Tax/Transactions.d.ts +9 -1
- package/types/TaxCodes.d.ts +18 -0
- package/types/Terminal/Configurations.d.ts +9 -0
- package/types/Terminal/ConfigurationsResource.d.ts +28 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +20 -0
- package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +130 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +103 -0
- package/types/TestHelpers/SharedPayment/GrantedTokensResource.d.ts +91 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/TokensResource.d.ts +68 -0
- package/types/Transfers.d.ts +9 -0
- package/types/TransfersResource.d.ts +7 -0
- package/types/TransitBalances.d.ts +40 -0
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
- package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/BillSettings.d.ts +120 -0
- package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
- package/types/V2/Billing/Cadences.d.ts +735 -0
- package/types/V2/Billing/CadencesResource.d.ts +516 -0
- package/types/V2/Billing/CollectionSettingVersions.d.ts +318 -0
- package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
- package/types/V2/Billing/CollectionSettings.d.ts +341 -0
- package/types/V2/Billing/CollectionSettingsResource.d.ts +683 -0
- package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
- package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
- package/types/V2/Billing/IntentActions.d.ts +564 -0
- package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
- package/types/V2/Billing/Intents.d.ts +117 -0
- package/types/V2/Billing/IntentsResource.d.ts +674 -0
- package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
- package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
- package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
- package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/LicenseFees.d.ts +164 -0
- package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
- package/types/V2/Billing/LicensedItems.d.ts +73 -0
- package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
- package/types/V2/Billing/MeteredItems.d.ts +101 -0
- package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
- package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
- package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +57 -0
- package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +40 -0
- package/types/V2/Billing/PricingPlanSubscriptions.d.ts +144 -0
- package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +120 -0
- package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
- package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
- package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/PricingPlans.d.ts +84 -0
- package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
- package/types/V2/Billing/Profiles.d.ts +70 -0
- package/types/V2/Billing/ProfilesResource.d.ts +150 -0
- package/types/V2/Billing/RateCardRates.d.ts +144 -0
- package/types/V2/Billing/RateCardSubscriptions.d.ts +144 -0
- package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
- package/types/V2/Billing/RateCardVersions.d.ts +39 -0
- package/types/V2/Billing/RateCards/RatesResource.d.ts +203 -0
- package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/RateCards.d.ts +98 -0
- package/types/V2/Billing/RateCardsResource.d.ts +162 -0
- package/types/V2/Billing/ServiceActions.d.ts +298 -0
- package/types/V2/Billing/ServiceActionsResource.d.ts +394 -0
- package/types/V2/Core/AccountLinks.d.ts +10 -2
- package/types/V2/Core/AccountLinksResource.d.ts +11 -2
- package/types/V2/Core/AccountTokensResource.d.ts +259 -0
- package/types/V2/Core/Accounts/PersonTokensResource.d.ts +2 -0
- package/types/V2/Core/Accounts/PersonsResource.d.ts +5 -0
- package/types/V2/Core/Accounts.d.ts +2437 -50
- package/types/V2/Core/AccountsResource.d.ts +2538 -368
- package/types/V2/Core/ClaimableSandboxes.d.ts +132 -0
- package/types/V2/Core/ClaimableSandboxesResource.d.ts +74 -0
- package/types/V2/Core/EventTypes.d.ts +5438 -9
- package/types/V2/Core/Events.d.ts +61 -0
- package/types/V2/Core/EventsResource.d.ts +11 -1
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +181 -0
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +194 -0
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +142 -0
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +198 -0
- package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +46 -0
- package/types/V2/Iam/ApiKeys.d.ts +154 -0
- package/types/V2/Iam/ApiKeysResource.d.ts +215 -0
- package/types/V2/MoneyManagement/Adjustments.d.ts +122 -0
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
- package/types/V2/MoneyManagement/CurrencyConversions.d.ts +98 -0
- package/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts +141 -0
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +216 -0
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +179 -0
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +178 -0
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +126 -0
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +250 -0
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +156 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +230 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +134 -0
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +450 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +292 -0
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +332 -0
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +296 -0
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +225 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +227 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +93 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +115 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +356 -0
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +248 -0
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
- package/types/V2/MoneyManagement/RecipientVerifications.d.ts +112 -0
- package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +77 -0
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +200 -0
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
- package/types/V2/MoneyManagement/Transactions.d.ts +227 -0
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
- package/types/V2/Payments/OffSessionPayments.d.ts +249 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +306 -0
- package/types/V2/Payments/SettlementAllocationIntentSplits.d.ts +111 -0
- package/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts +126 -0
- package/types/V2/Payments/SettlementAllocationIntents.d.ts +122 -0
- package/types/V2/Payments/SettlementAllocationIntentsResource.d.ts +168 -0
- package/types/V2/Reporting/ReportRuns.d.ts +154 -0
- package/types/V2/Reporting/ReportRunsResource.d.ts +75 -0
- package/types/V2/Reporting/Reports.d.ts +120 -0
- package/types/V2/Reporting/ReportsResource.d.ts +30 -0
- package/types/V2/Tax/ManualRules.d.ts +142 -0
- package/types/V2/Tax/ManualRulesResource.d.ts +292 -0
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +85 -0
- package/types/V2/TestHelpers/MoneyManagementResource.d.ts +49 -0
- package/types/WebhookEndpointsResource.d.ts +77 -2
- package/types/Webhooks.d.ts +2 -0
- package/types/apiVersion.d.ts +1 -2
- package/types/index.d.ts +260 -0
- package/types/lib.d.ts +10 -0
|
@@ -3,11 +3,23 @@
|
|
|
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
|
+
|
|
6
11
|
/**
|
|
7
12
|
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
8
13
|
*/
|
|
9
14
|
billing_mode?: SubscriptionScheduleCreateParams.BillingMode;
|
|
10
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Sets the billing schedules for the subscription schedule.
|
|
18
|
+
*/
|
|
19
|
+
billing_schedules?: Array<
|
|
20
|
+
SubscriptionScheduleCreateParams.BillingSchedule
|
|
21
|
+
>;
|
|
22
|
+
|
|
11
23
|
/**
|
|
12
24
|
* The identifier of the customer to create the subscription schedule for.
|
|
13
25
|
*/
|
|
@@ -48,6 +60,11 @@ declare module 'stripe' {
|
|
|
48
60
|
*/
|
|
49
61
|
phases?: Array<SubscriptionScheduleCreateParams.Phase>;
|
|
50
62
|
|
|
63
|
+
/**
|
|
64
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
65
|
+
*/
|
|
66
|
+
prebilling?: SubscriptionScheduleCreateParams.Prebilling;
|
|
67
|
+
|
|
51
68
|
/**
|
|
52
69
|
* 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.
|
|
53
70
|
*/
|
|
@@ -55,6 +72,8 @@ declare module 'stripe' {
|
|
|
55
72
|
}
|
|
56
73
|
|
|
57
74
|
namespace SubscriptionScheduleCreateParams {
|
|
75
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
76
|
+
|
|
58
77
|
interface BillingMode {
|
|
59
78
|
/**
|
|
60
79
|
* Configure behavior for flexible billing mode.
|
|
@@ -82,6 +101,74 @@ declare module 'stripe' {
|
|
|
82
101
|
type Type = 'classic' | 'flexible';
|
|
83
102
|
}
|
|
84
103
|
|
|
104
|
+
interface BillingSchedule {
|
|
105
|
+
/**
|
|
106
|
+
* Configure billing schedule differently for individual subscription items.
|
|
107
|
+
*/
|
|
108
|
+
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The end date for the billing schedule.
|
|
112
|
+
*/
|
|
113
|
+
bill_until: BillingSchedule.BillUntil;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
117
|
+
*/
|
|
118
|
+
key?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
namespace BillingSchedule {
|
|
122
|
+
interface AppliesTo {
|
|
123
|
+
/**
|
|
124
|
+
* The ID of the price object.
|
|
125
|
+
*/
|
|
126
|
+
price?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Controls which subscription items the billing schedule applies to.
|
|
130
|
+
*/
|
|
131
|
+
type: 'price';
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
interface BillUntil {
|
|
135
|
+
/**
|
|
136
|
+
* Specifies the billing period.
|
|
137
|
+
*/
|
|
138
|
+
duration?: BillUntil.Duration;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The end date of the billing schedule.
|
|
142
|
+
*/
|
|
143
|
+
timestamp?: number;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
147
|
+
*/
|
|
148
|
+
type: BillUntil.Type;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
namespace BillUntil {
|
|
152
|
+
interface Duration {
|
|
153
|
+
/**
|
|
154
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
155
|
+
*/
|
|
156
|
+
interval: Duration.Interval;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The multiplier applied to the interval.
|
|
160
|
+
*/
|
|
161
|
+
interval_count?: number;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
namespace Duration {
|
|
165
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
type Type = 'duration' | 'timestamp';
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
85
172
|
interface DefaultSettings {
|
|
86
173
|
/**
|
|
87
174
|
* 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).
|
|
@@ -130,6 +217,11 @@ declare module 'stripe' {
|
|
|
130
217
|
*/
|
|
131
218
|
on_behalf_of?: Stripe.Emptyable<string>;
|
|
132
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Configures how the subscription schedule handles billing for phase transitions.
|
|
222
|
+
*/
|
|
223
|
+
phase_effective_at?: DefaultSettings.PhaseEffectiveAt;
|
|
224
|
+
|
|
133
225
|
/**
|
|
134
226
|
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
135
227
|
*/
|
|
@@ -218,6 +310,8 @@ declare module 'stripe' {
|
|
|
218
310
|
}
|
|
219
311
|
}
|
|
220
312
|
|
|
313
|
+
type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
|
|
314
|
+
|
|
221
315
|
interface TransferData {
|
|
222
316
|
/**
|
|
223
317
|
* 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 destination account. By default, the entire amount is transferred to the destination.
|
|
@@ -294,6 +388,11 @@ declare module 'stripe' {
|
|
|
294
388
|
*/
|
|
295
389
|
duration?: Phase.Duration;
|
|
296
390
|
|
|
391
|
+
/**
|
|
392
|
+
* Configures how the subscription schedule handles billing for phase transitions.
|
|
393
|
+
*/
|
|
394
|
+
effective_at?: Phase.EffectiveAt;
|
|
395
|
+
|
|
297
396
|
/**
|
|
298
397
|
* The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
|
|
299
398
|
*/
|
|
@@ -319,6 +418,11 @@ declare module 'stripe' {
|
|
|
319
418
|
*/
|
|
320
419
|
on_behalf_of?: string;
|
|
321
420
|
|
|
421
|
+
/**
|
|
422
|
+
* 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
423
|
+
*/
|
|
424
|
+
pause_collection?: Phase.PauseCollection;
|
|
425
|
+
|
|
322
426
|
/**
|
|
323
427
|
* Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/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://docs.stripe.com/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.
|
|
324
428
|
*/
|
|
@@ -334,10 +438,20 @@ declare module 'stripe' {
|
|
|
334
438
|
*/
|
|
335
439
|
trial?: boolean;
|
|
336
440
|
|
|
441
|
+
/**
|
|
442
|
+
* Specify trial behavior when crossing phase boundaries
|
|
443
|
+
*/
|
|
444
|
+
trial_continuation?: Phase.TrialContinuation;
|
|
445
|
+
|
|
337
446
|
/**
|
|
338
447
|
* 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`
|
|
339
448
|
*/
|
|
340
449
|
trial_end?: number;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Settings related to subscription trials.
|
|
453
|
+
*/
|
|
454
|
+
trial_settings?: Phase.TrialSettings;
|
|
341
455
|
}
|
|
342
456
|
|
|
343
457
|
namespace Phase {
|
|
@@ -390,12 +504,56 @@ declare module 'stripe' {
|
|
|
390
504
|
*/
|
|
391
505
|
discount?: string;
|
|
392
506
|
|
|
507
|
+
/**
|
|
508
|
+
* Details to determine how long the discount should be applied for.
|
|
509
|
+
*/
|
|
510
|
+
discount_end?: Discount.DiscountEnd;
|
|
511
|
+
|
|
393
512
|
/**
|
|
394
513
|
* ID of the promotion code to create a new discount for.
|
|
395
514
|
*/
|
|
396
515
|
promotion_code?: string;
|
|
397
516
|
}
|
|
398
517
|
|
|
518
|
+
namespace Discount {
|
|
519
|
+
interface DiscountEnd {
|
|
520
|
+
/**
|
|
521
|
+
* Time span for the redeemed discount.
|
|
522
|
+
*/
|
|
523
|
+
duration?: DiscountEnd.Duration;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
527
|
+
*/
|
|
528
|
+
timestamp?: number;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* The type of calculation made to determine when the discount ends.
|
|
532
|
+
*/
|
|
533
|
+
type: DiscountEnd.Type;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
namespace DiscountEnd {
|
|
537
|
+
interface Duration {
|
|
538
|
+
/**
|
|
539
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
540
|
+
*/
|
|
541
|
+
interval: Duration.Interval;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
545
|
+
*/
|
|
546
|
+
interval_count: number;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
namespace Duration {
|
|
550
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
type Type = 'duration' | 'timestamp';
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
399
557
|
interface Period {
|
|
400
558
|
/**
|
|
401
559
|
* End of the invoice item period.
|
|
@@ -531,12 +689,56 @@ declare module 'stripe' {
|
|
|
531
689
|
*/
|
|
532
690
|
discount?: string;
|
|
533
691
|
|
|
692
|
+
/**
|
|
693
|
+
* Details to determine how long the discount should be applied for.
|
|
694
|
+
*/
|
|
695
|
+
discount_end?: Discount.DiscountEnd;
|
|
696
|
+
|
|
534
697
|
/**
|
|
535
698
|
* ID of the promotion code to create a new discount for.
|
|
536
699
|
*/
|
|
537
700
|
promotion_code?: string;
|
|
538
701
|
}
|
|
539
702
|
|
|
703
|
+
namespace Discount {
|
|
704
|
+
interface DiscountEnd {
|
|
705
|
+
/**
|
|
706
|
+
* Time span for the redeemed discount.
|
|
707
|
+
*/
|
|
708
|
+
duration?: DiscountEnd.Duration;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
712
|
+
*/
|
|
713
|
+
timestamp?: number;
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* The type of calculation made to determine when the discount ends.
|
|
717
|
+
*/
|
|
718
|
+
type: DiscountEnd.Type;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
namespace DiscountEnd {
|
|
722
|
+
interface Duration {
|
|
723
|
+
/**
|
|
724
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
725
|
+
*/
|
|
726
|
+
interval: Duration.Interval;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
730
|
+
*/
|
|
731
|
+
interval_count: number;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
namespace Duration {
|
|
735
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
type Type = 'duration' | 'timestamp';
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
540
742
|
interface Duration {
|
|
541
743
|
/**
|
|
542
744
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -553,6 +755,8 @@ declare module 'stripe' {
|
|
|
553
755
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
554
756
|
}
|
|
555
757
|
|
|
758
|
+
type EffectiveAt = 'billing_period_start' | 'phase_start';
|
|
759
|
+
|
|
556
760
|
interface InvoiceSettings {
|
|
557
761
|
/**
|
|
558
762
|
* 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.
|
|
@@ -628,6 +832,16 @@ declare module 'stripe' {
|
|
|
628
832
|
* A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
629
833
|
*/
|
|
630
834
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Options that configure the trial on the subscription item.
|
|
838
|
+
*/
|
|
839
|
+
trial?: Item.Trial;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
843
|
+
*/
|
|
844
|
+
trial_offer?: string;
|
|
631
845
|
}
|
|
632
846
|
|
|
633
847
|
namespace Item {
|
|
@@ -649,12 +863,56 @@ declare module 'stripe' {
|
|
|
649
863
|
*/
|
|
650
864
|
discount?: string;
|
|
651
865
|
|
|
866
|
+
/**
|
|
867
|
+
* Details to determine how long the discount should be applied for.
|
|
868
|
+
*/
|
|
869
|
+
discount_end?: Discount.DiscountEnd;
|
|
870
|
+
|
|
652
871
|
/**
|
|
653
872
|
* ID of the promotion code to create a new discount for.
|
|
654
873
|
*/
|
|
655
874
|
promotion_code?: string;
|
|
656
875
|
}
|
|
657
876
|
|
|
877
|
+
namespace Discount {
|
|
878
|
+
interface DiscountEnd {
|
|
879
|
+
/**
|
|
880
|
+
* Time span for the redeemed discount.
|
|
881
|
+
*/
|
|
882
|
+
duration?: DiscountEnd.Duration;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
886
|
+
*/
|
|
887
|
+
timestamp?: number;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* The type of calculation made to determine when the discount ends.
|
|
891
|
+
*/
|
|
892
|
+
type: DiscountEnd.Type;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
namespace DiscountEnd {
|
|
896
|
+
interface Duration {
|
|
897
|
+
/**
|
|
898
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
899
|
+
*/
|
|
900
|
+
interval: Duration.Interval;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
904
|
+
*/
|
|
905
|
+
interval_count: number;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
namespace Duration {
|
|
909
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
type Type = 'duration' | 'timestamp';
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
658
916
|
interface PriceData {
|
|
659
917
|
/**
|
|
660
918
|
* 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).
|
|
@@ -706,6 +964,33 @@ declare module 'stripe' {
|
|
|
706
964
|
|
|
707
965
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
708
966
|
}
|
|
967
|
+
|
|
968
|
+
interface Trial {
|
|
969
|
+
/**
|
|
970
|
+
* 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.
|
|
971
|
+
*/
|
|
972
|
+
converts_to?: Array<string>;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Determines the type of trial for this item.
|
|
976
|
+
*/
|
|
977
|
+
type: Trial.Type;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
namespace Trial {
|
|
981
|
+
type Type = 'free' | 'paid';
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
interface PauseCollection {
|
|
986
|
+
/**
|
|
987
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
988
|
+
*/
|
|
989
|
+
behavior: PauseCollection.Behavior;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
namespace PauseCollection {
|
|
993
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
709
994
|
}
|
|
710
995
|
|
|
711
996
|
type ProrationBehavior =
|
|
@@ -724,6 +1009,44 @@ declare module 'stripe' {
|
|
|
724
1009
|
*/
|
|
725
1010
|
destination: string;
|
|
726
1011
|
}
|
|
1012
|
+
|
|
1013
|
+
type TrialContinuation = 'continue' | 'none';
|
|
1014
|
+
|
|
1015
|
+
interface TrialSettings {
|
|
1016
|
+
/**
|
|
1017
|
+
* Defines how the subscription should behave when a trial ends.
|
|
1018
|
+
*/
|
|
1019
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
namespace TrialSettings {
|
|
1023
|
+
interface EndBehavior {
|
|
1024
|
+
/**
|
|
1025
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1026
|
+
*/
|
|
1027
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
namespace EndBehavior {
|
|
1031
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
interface Prebilling {
|
|
1037
|
+
/**
|
|
1038
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
1039
|
+
*/
|
|
1040
|
+
iterations: number;
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
1044
|
+
*/
|
|
1045
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
namespace Prebilling {
|
|
1049
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
727
1050
|
}
|
|
728
1051
|
}
|
|
729
1052
|
|
|
@@ -735,6 +1058,18 @@ declare module 'stripe' {
|
|
|
735
1058
|
}
|
|
736
1059
|
|
|
737
1060
|
interface SubscriptionScheduleUpdateParams {
|
|
1061
|
+
/**
|
|
1062
|
+
* 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.
|
|
1063
|
+
*/
|
|
1064
|
+
billing_behavior?: SubscriptionScheduleUpdateParams.BillingBehavior;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* Sets the billing schedules for the subscription schedule.
|
|
1068
|
+
*/
|
|
1069
|
+
billing_schedules?: Stripe.Emptyable<
|
|
1070
|
+
Array<SubscriptionScheduleUpdateParams.BillingSchedule>
|
|
1071
|
+
>;
|
|
1072
|
+
|
|
738
1073
|
/**
|
|
739
1074
|
* Object representing the subscription schedule's default settings.
|
|
740
1075
|
*/
|
|
@@ -760,6 +1095,11 @@ declare module 'stripe' {
|
|
|
760
1095
|
*/
|
|
761
1096
|
phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
|
|
762
1097
|
|
|
1098
|
+
/**
|
|
1099
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
1100
|
+
*/
|
|
1101
|
+
prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
|
|
1102
|
+
|
|
763
1103
|
/**
|
|
764
1104
|
* 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`.
|
|
765
1105
|
*/
|
|
@@ -767,6 +1107,76 @@ declare module 'stripe' {
|
|
|
767
1107
|
}
|
|
768
1108
|
|
|
769
1109
|
namespace SubscriptionScheduleUpdateParams {
|
|
1110
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1111
|
+
|
|
1112
|
+
interface BillingSchedule {
|
|
1113
|
+
/**
|
|
1114
|
+
* Configure billing schedule differently for individual subscription items.
|
|
1115
|
+
*/
|
|
1116
|
+
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* The end date for the billing schedule.
|
|
1120
|
+
*/
|
|
1121
|
+
bill_until?: BillingSchedule.BillUntil;
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
1125
|
+
*/
|
|
1126
|
+
key?: string;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
namespace BillingSchedule {
|
|
1130
|
+
interface AppliesTo {
|
|
1131
|
+
/**
|
|
1132
|
+
* The ID of the price object.
|
|
1133
|
+
*/
|
|
1134
|
+
price?: string;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* Controls which subscription items the billing schedule applies to.
|
|
1138
|
+
*/
|
|
1139
|
+
type: 'price';
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
interface BillUntil {
|
|
1143
|
+
/**
|
|
1144
|
+
* Specifies the billing period.
|
|
1145
|
+
*/
|
|
1146
|
+
duration?: BillUntil.Duration;
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* The end date of the billing schedule.
|
|
1150
|
+
*/
|
|
1151
|
+
timestamp?: number;
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
1155
|
+
*/
|
|
1156
|
+
type: BillUntil.Type;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
namespace BillUntil {
|
|
1160
|
+
interface Duration {
|
|
1161
|
+
/**
|
|
1162
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
1163
|
+
*/
|
|
1164
|
+
interval: Duration.Interval;
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* The multiplier applied to the interval.
|
|
1168
|
+
*/
|
|
1169
|
+
interval_count?: number;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
namespace Duration {
|
|
1173
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
type Type = 'duration' | 'timestamp';
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
|
|
770
1180
|
interface DefaultSettings {
|
|
771
1181
|
/**
|
|
772
1182
|
* 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).
|
|
@@ -815,6 +1225,11 @@ declare module 'stripe' {
|
|
|
815
1225
|
*/
|
|
816
1226
|
on_behalf_of?: Stripe.Emptyable<string>;
|
|
817
1227
|
|
|
1228
|
+
/**
|
|
1229
|
+
* Configures how the subscription schedule handles billing for phase transitions.
|
|
1230
|
+
*/
|
|
1231
|
+
phase_effective_at?: DefaultSettings.PhaseEffectiveAt;
|
|
1232
|
+
|
|
818
1233
|
/**
|
|
819
1234
|
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
820
1235
|
*/
|
|
@@ -903,6 +1318,8 @@ declare module 'stripe' {
|
|
|
903
1318
|
}
|
|
904
1319
|
}
|
|
905
1320
|
|
|
1321
|
+
type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
|
|
1322
|
+
|
|
906
1323
|
interface TransferData {
|
|
907
1324
|
/**
|
|
908
1325
|
* 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 destination account. By default, the entire amount is transferred to the destination.
|
|
@@ -979,6 +1396,11 @@ declare module 'stripe' {
|
|
|
979
1396
|
*/
|
|
980
1397
|
duration?: Phase.Duration;
|
|
981
1398
|
|
|
1399
|
+
/**
|
|
1400
|
+
* Configures how the subscription schedule handles billing for phase transitions.
|
|
1401
|
+
*/
|
|
1402
|
+
effective_at?: Phase.EffectiveAt;
|
|
1403
|
+
|
|
982
1404
|
/**
|
|
983
1405
|
* The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
|
|
984
1406
|
*/
|
|
@@ -1004,6 +1426,11 @@ declare module 'stripe' {
|
|
|
1004
1426
|
*/
|
|
1005
1427
|
on_behalf_of?: string;
|
|
1006
1428
|
|
|
1429
|
+
/**
|
|
1430
|
+
* 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
1431
|
+
*/
|
|
1432
|
+
pause_collection?: Phase.PauseCollection;
|
|
1433
|
+
|
|
1007
1434
|
/**
|
|
1008
1435
|
* Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/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://docs.stripe.com/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.
|
|
1009
1436
|
*/
|
|
@@ -1024,10 +1451,20 @@ declare module 'stripe' {
|
|
|
1024
1451
|
*/
|
|
1025
1452
|
trial?: boolean;
|
|
1026
1453
|
|
|
1454
|
+
/**
|
|
1455
|
+
* Specify trial behavior when crossing phase boundaries
|
|
1456
|
+
*/
|
|
1457
|
+
trial_continuation?: Phase.TrialContinuation;
|
|
1458
|
+
|
|
1027
1459
|
/**
|
|
1028
1460
|
* 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`
|
|
1029
1461
|
*/
|
|
1030
1462
|
trial_end?: number | 'now';
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* Settings related to subscription trials.
|
|
1466
|
+
*/
|
|
1467
|
+
trial_settings?: Phase.TrialSettings;
|
|
1031
1468
|
}
|
|
1032
1469
|
|
|
1033
1470
|
namespace Phase {
|
|
@@ -1081,21 +1518,65 @@ declare module 'stripe' {
|
|
|
1081
1518
|
discount?: string;
|
|
1082
1519
|
|
|
1083
1520
|
/**
|
|
1084
|
-
*
|
|
1085
|
-
*/
|
|
1086
|
-
promotion_code?: string;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
interface Period {
|
|
1090
|
-
/**
|
|
1091
|
-
* End of the invoice item period.
|
|
1521
|
+
* Details to determine how long the discount should be applied for.
|
|
1092
1522
|
*/
|
|
1093
|
-
|
|
1523
|
+
discount_end?: Discount.DiscountEnd;
|
|
1094
1524
|
|
|
1095
1525
|
/**
|
|
1096
|
-
*
|
|
1526
|
+
* ID of the promotion code to create a new discount for.
|
|
1097
1527
|
*/
|
|
1098
|
-
|
|
1528
|
+
promotion_code?: string;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
namespace Discount {
|
|
1532
|
+
interface DiscountEnd {
|
|
1533
|
+
/**
|
|
1534
|
+
* Time span for the redeemed discount.
|
|
1535
|
+
*/
|
|
1536
|
+
duration?: DiscountEnd.Duration;
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1540
|
+
*/
|
|
1541
|
+
timestamp?: number;
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* The type of calculation made to determine when the discount ends.
|
|
1545
|
+
*/
|
|
1546
|
+
type: DiscountEnd.Type;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
namespace DiscountEnd {
|
|
1550
|
+
interface Duration {
|
|
1551
|
+
/**
|
|
1552
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1553
|
+
*/
|
|
1554
|
+
interval: Duration.Interval;
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1558
|
+
*/
|
|
1559
|
+
interval_count: number;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
namespace Duration {
|
|
1563
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
type Type = 'duration' | 'timestamp';
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
interface Period {
|
|
1571
|
+
/**
|
|
1572
|
+
* End of the invoice item period.
|
|
1573
|
+
*/
|
|
1574
|
+
end: Period.End;
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Start of the invoice item period.
|
|
1578
|
+
*/
|
|
1579
|
+
start: Period.Start;
|
|
1099
1580
|
}
|
|
1100
1581
|
|
|
1101
1582
|
namespace Period {
|
|
@@ -1221,12 +1702,56 @@ declare module 'stripe' {
|
|
|
1221
1702
|
*/
|
|
1222
1703
|
discount?: string;
|
|
1223
1704
|
|
|
1705
|
+
/**
|
|
1706
|
+
* Details to determine how long the discount should be applied for.
|
|
1707
|
+
*/
|
|
1708
|
+
discount_end?: Discount.DiscountEnd;
|
|
1709
|
+
|
|
1224
1710
|
/**
|
|
1225
1711
|
* ID of the promotion code to create a new discount for.
|
|
1226
1712
|
*/
|
|
1227
1713
|
promotion_code?: string;
|
|
1228
1714
|
}
|
|
1229
1715
|
|
|
1716
|
+
namespace Discount {
|
|
1717
|
+
interface DiscountEnd {
|
|
1718
|
+
/**
|
|
1719
|
+
* Time span for the redeemed discount.
|
|
1720
|
+
*/
|
|
1721
|
+
duration?: DiscountEnd.Duration;
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1725
|
+
*/
|
|
1726
|
+
timestamp?: number;
|
|
1727
|
+
|
|
1728
|
+
/**
|
|
1729
|
+
* The type of calculation made to determine when the discount ends.
|
|
1730
|
+
*/
|
|
1731
|
+
type: DiscountEnd.Type;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
namespace DiscountEnd {
|
|
1735
|
+
interface Duration {
|
|
1736
|
+
/**
|
|
1737
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1738
|
+
*/
|
|
1739
|
+
interval: Duration.Interval;
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1743
|
+
*/
|
|
1744
|
+
interval_count: number;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
namespace Duration {
|
|
1748
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
type Type = 'duration' | 'timestamp';
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1230
1755
|
interface Duration {
|
|
1231
1756
|
/**
|
|
1232
1757
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -1243,6 +1768,8 @@ declare module 'stripe' {
|
|
|
1243
1768
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1244
1769
|
}
|
|
1245
1770
|
|
|
1771
|
+
type EffectiveAt = 'billing_period_start' | 'phase_start';
|
|
1772
|
+
|
|
1246
1773
|
interface InvoiceSettings {
|
|
1247
1774
|
/**
|
|
1248
1775
|
* 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.
|
|
@@ -1318,6 +1845,16 @@ declare module 'stripe' {
|
|
|
1318
1845
|
* A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
1319
1846
|
*/
|
|
1320
1847
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* Options that configure the trial on the subscription item.
|
|
1851
|
+
*/
|
|
1852
|
+
trial?: Item.Trial;
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
1856
|
+
*/
|
|
1857
|
+
trial_offer?: string;
|
|
1321
1858
|
}
|
|
1322
1859
|
|
|
1323
1860
|
namespace Item {
|
|
@@ -1339,12 +1876,56 @@ declare module 'stripe' {
|
|
|
1339
1876
|
*/
|
|
1340
1877
|
discount?: string;
|
|
1341
1878
|
|
|
1879
|
+
/**
|
|
1880
|
+
* Details to determine how long the discount should be applied for.
|
|
1881
|
+
*/
|
|
1882
|
+
discount_end?: Discount.DiscountEnd;
|
|
1883
|
+
|
|
1342
1884
|
/**
|
|
1343
1885
|
* ID of the promotion code to create a new discount for.
|
|
1344
1886
|
*/
|
|
1345
1887
|
promotion_code?: string;
|
|
1346
1888
|
}
|
|
1347
1889
|
|
|
1890
|
+
namespace Discount {
|
|
1891
|
+
interface DiscountEnd {
|
|
1892
|
+
/**
|
|
1893
|
+
* Time span for the redeemed discount.
|
|
1894
|
+
*/
|
|
1895
|
+
duration?: DiscountEnd.Duration;
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1899
|
+
*/
|
|
1900
|
+
timestamp?: number;
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* The type of calculation made to determine when the discount ends.
|
|
1904
|
+
*/
|
|
1905
|
+
type: DiscountEnd.Type;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
namespace DiscountEnd {
|
|
1909
|
+
interface Duration {
|
|
1910
|
+
/**
|
|
1911
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1912
|
+
*/
|
|
1913
|
+
interval: Duration.Interval;
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1917
|
+
*/
|
|
1918
|
+
interval_count: number;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
namespace Duration {
|
|
1922
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
type Type = 'duration' | 'timestamp';
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1348
1929
|
interface PriceData {
|
|
1349
1930
|
/**
|
|
1350
1931
|
* 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).
|
|
@@ -1396,6 +1977,33 @@ declare module 'stripe' {
|
|
|
1396
1977
|
|
|
1397
1978
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1398
1979
|
}
|
|
1980
|
+
|
|
1981
|
+
interface Trial {
|
|
1982
|
+
/**
|
|
1983
|
+
* 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.
|
|
1984
|
+
*/
|
|
1985
|
+
converts_to?: Array<string>;
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* Determines the type of trial for this item.
|
|
1989
|
+
*/
|
|
1990
|
+
type: Trial.Type;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
namespace Trial {
|
|
1994
|
+
type Type = 'free' | 'paid';
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
interface PauseCollection {
|
|
1999
|
+
/**
|
|
2000
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2001
|
+
*/
|
|
2002
|
+
behavior: PauseCollection.Behavior;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
namespace PauseCollection {
|
|
2006
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1399
2007
|
}
|
|
1400
2008
|
|
|
1401
2009
|
type ProrationBehavior =
|
|
@@ -1414,6 +2022,44 @@ declare module 'stripe' {
|
|
|
1414
2022
|
*/
|
|
1415
2023
|
destination: string;
|
|
1416
2024
|
}
|
|
2025
|
+
|
|
2026
|
+
type TrialContinuation = 'continue' | 'none';
|
|
2027
|
+
|
|
2028
|
+
interface TrialSettings {
|
|
2029
|
+
/**
|
|
2030
|
+
* Defines how the subscription should behave when a trial ends.
|
|
2031
|
+
*/
|
|
2032
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
namespace TrialSettings {
|
|
2036
|
+
interface EndBehavior {
|
|
2037
|
+
/**
|
|
2038
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2039
|
+
*/
|
|
2040
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
namespace EndBehavior {
|
|
2044
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
interface Prebilling {
|
|
2050
|
+
/**
|
|
2051
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
2052
|
+
*/
|
|
2053
|
+
iterations: number;
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2057
|
+
*/
|
|
2058
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
namespace Prebilling {
|
|
2062
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
1417
2063
|
}
|
|
1418
2064
|
|
|
1419
2065
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
@@ -1461,79 +2107,889 @@ declare module 'stripe' {
|
|
|
1461
2107
|
scheduled?: boolean;
|
|
1462
2108
|
}
|
|
1463
2109
|
|
|
1464
|
-
interface
|
|
2110
|
+
interface SubscriptionScheduleAmendParams {
|
|
1465
2111
|
/**
|
|
1466
|
-
*
|
|
2112
|
+
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
1467
2113
|
*/
|
|
1468
|
-
|
|
2114
|
+
amendments?: Array<SubscriptionScheduleAmendParams.Amendment>;
|
|
1469
2115
|
|
|
1470
2116
|
/**
|
|
1471
|
-
*
|
|
2117
|
+
* Specifies which fields in the response should be expanded.
|
|
1472
2118
|
*/
|
|
1473
|
-
|
|
2119
|
+
expand?: Array<string>;
|
|
1474
2120
|
|
|
1475
2121
|
/**
|
|
1476
|
-
*
|
|
2122
|
+
* Provide any time periods to bill in advance.
|
|
1477
2123
|
*/
|
|
1478
|
-
|
|
1479
|
-
|
|
2124
|
+
prebilling?: Stripe.Emptyable<
|
|
2125
|
+
Array<SubscriptionScheduleAmendParams.Prebilling>
|
|
2126
|
+
>;
|
|
1480
2127
|
|
|
1481
|
-
interface SubscriptionScheduleReleaseParams {
|
|
1482
2128
|
/**
|
|
1483
|
-
*
|
|
2129
|
+
* In cases where the amendment changes the currently active phase,
|
|
2130
|
+
* specifies if and how to prorate at the time of the request.
|
|
1484
2131
|
*/
|
|
1485
|
-
|
|
2132
|
+
proration_behavior?: SubscriptionScheduleAmendParams.ProrationBehavior;
|
|
1486
2133
|
|
|
1487
2134
|
/**
|
|
1488
|
-
*
|
|
2135
|
+
* Changes to apply to the subscription schedule.
|
|
1489
2136
|
*/
|
|
1490
|
-
|
|
2137
|
+
schedule_settings?: SubscriptionScheduleAmendParams.ScheduleSettings;
|
|
1491
2138
|
}
|
|
1492
2139
|
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
options?: RequestOptions
|
|
1500
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
1501
|
-
create(
|
|
1502
|
-
options?: RequestOptions
|
|
1503
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2140
|
+
namespace SubscriptionScheduleAmendParams {
|
|
2141
|
+
interface Amendment {
|
|
2142
|
+
/**
|
|
2143
|
+
* 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.
|
|
2144
|
+
*/
|
|
2145
|
+
amendment_end?: Amendment.AmendmentEnd;
|
|
1504
2146
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
id: string,
|
|
1510
|
-
params?: SubscriptionScheduleRetrieveParams,
|
|
1511
|
-
options?: RequestOptions
|
|
1512
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
1513
|
-
retrieve(
|
|
1514
|
-
id: string,
|
|
1515
|
-
options?: RequestOptions
|
|
1516
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2147
|
+
/**
|
|
2148
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2149
|
+
*/
|
|
2150
|
+
amendment_start: Amendment.AmendmentStart;
|
|
1517
2151
|
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
id: string,
|
|
1523
|
-
params?: SubscriptionScheduleUpdateParams,
|
|
1524
|
-
options?: RequestOptions
|
|
1525
|
-
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2152
|
+
/**
|
|
2153
|
+
* 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.
|
|
2154
|
+
*/
|
|
2155
|
+
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
1526
2156
|
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
2157
|
+
/**
|
|
2158
|
+
* Actions to apply to the billing schedules.
|
|
2159
|
+
*/
|
|
2160
|
+
billing_schedules_actions?: Array<Amendment.BillingSchedulesAction>;
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
2164
|
+
*/
|
|
2165
|
+
discount_actions?: Array<Amendment.DiscountAction>;
|
|
2166
|
+
|
|
2167
|
+
/**
|
|
2168
|
+
* Configures how the subscription schedule handles billing for phase transitions.
|
|
2169
|
+
*/
|
|
2170
|
+
effective_at?: Amendment.EffectiveAt;
|
|
2171
|
+
|
|
2172
|
+
/**
|
|
2173
|
+
* Changes to the subscription items during the amendment time span.
|
|
2174
|
+
*/
|
|
2175
|
+
item_actions?: Array<Amendment.ItemAction>;
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* Instructions for how to modify phase metadata
|
|
2179
|
+
*/
|
|
2180
|
+
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
2181
|
+
|
|
2182
|
+
/**
|
|
2183
|
+
* 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`.
|
|
2184
|
+
*/
|
|
2185
|
+
proration_behavior?: Amendment.ProrationBehavior;
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2189
|
+
*/
|
|
2190
|
+
set_pause_collection?: Amendment.SetPauseCollection;
|
|
2191
|
+
|
|
2192
|
+
/**
|
|
2193
|
+
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
2194
|
+
*/
|
|
2195
|
+
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* Settings related to subscription trials.
|
|
2199
|
+
*/
|
|
2200
|
+
trial_settings?: Amendment.TrialSettings;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
namespace Amendment {
|
|
2204
|
+
interface AmendmentEnd {
|
|
2205
|
+
/**
|
|
2206
|
+
* Use the `end` time of a given discount.
|
|
2207
|
+
*/
|
|
2208
|
+
discount_end?: AmendmentEnd.DiscountEnd;
|
|
2209
|
+
|
|
2210
|
+
/**
|
|
2211
|
+
* Time span for the amendment starting from the `amendment_start`.
|
|
2212
|
+
*/
|
|
2213
|
+
duration?: AmendmentEnd.Duration;
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
2217
|
+
*/
|
|
2218
|
+
timestamp?: number;
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* Select one of three ways to pass the `amendment_end`.
|
|
2222
|
+
*/
|
|
2223
|
+
type: AmendmentEnd.Type;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
namespace AmendmentEnd {
|
|
2227
|
+
interface DiscountEnd {
|
|
2228
|
+
/**
|
|
2229
|
+
* The ID of a specific discount.
|
|
2230
|
+
*/
|
|
2231
|
+
discount: string;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
interface Duration {
|
|
2235
|
+
/**
|
|
2236
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2237
|
+
*/
|
|
2238
|
+
interval: Duration.Interval;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2242
|
+
*/
|
|
2243
|
+
interval_count: number;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
namespace Duration {
|
|
2247
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
type Type =
|
|
2251
|
+
| 'discount_end'
|
|
2252
|
+
| 'duration'
|
|
2253
|
+
| 'schedule_end'
|
|
2254
|
+
| 'timestamp'
|
|
2255
|
+
| 'trial_end'
|
|
2256
|
+
| 'trial_start'
|
|
2257
|
+
| 'upcoming_invoice';
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
interface AmendmentStart {
|
|
2261
|
+
/**
|
|
2262
|
+
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
2263
|
+
*/
|
|
2264
|
+
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* Use the `end` time of a given discount.
|
|
2268
|
+
*/
|
|
2269
|
+
discount_end?: AmendmentStart.DiscountEnd;
|
|
2270
|
+
|
|
2271
|
+
/**
|
|
2272
|
+
* A precise Unix timestamp for the amendment to start.
|
|
2273
|
+
*/
|
|
2274
|
+
timestamp?: number;
|
|
2275
|
+
|
|
2276
|
+
/**
|
|
2277
|
+
* Select one of three ways to pass the `amendment_start`.
|
|
2278
|
+
*/
|
|
2279
|
+
type: AmendmentStart.Type;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
namespace AmendmentStart {
|
|
2283
|
+
interface AmendmentEnd {
|
|
2284
|
+
/**
|
|
2285
|
+
* 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.
|
|
2286
|
+
*/
|
|
2287
|
+
index: number;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
interface DiscountEnd {
|
|
2291
|
+
/**
|
|
2292
|
+
* The ID of a specific discount.
|
|
2293
|
+
*/
|
|
2294
|
+
discount: string;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
type Type =
|
|
2298
|
+
| 'amendment_end'
|
|
2299
|
+
| 'discount_end'
|
|
2300
|
+
| 'now'
|
|
2301
|
+
| 'schedule_end'
|
|
2302
|
+
| 'timestamp'
|
|
2303
|
+
| 'trial_end'
|
|
2304
|
+
| 'trial_start'
|
|
2305
|
+
| 'upcoming_invoice';
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
2309
|
+
|
|
2310
|
+
interface BillingSchedulesAction {
|
|
2311
|
+
/**
|
|
2312
|
+
* Specify which subscription items the billing schedule applies to.
|
|
2313
|
+
*/
|
|
2314
|
+
applies_to?: Array<BillingSchedulesAction.AppliesTo>;
|
|
2315
|
+
|
|
2316
|
+
/**
|
|
2317
|
+
* Select the action.
|
|
2318
|
+
*/
|
|
2319
|
+
type: BillingSchedulesAction.Type;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
namespace BillingSchedulesAction {
|
|
2323
|
+
interface AppliesTo {
|
|
2324
|
+
/**
|
|
2325
|
+
* The ID of the price object.
|
|
2326
|
+
*/
|
|
2327
|
+
price?: string;
|
|
2328
|
+
|
|
2329
|
+
/**
|
|
2330
|
+
* Controls which subscription items the billing schedule applies to.
|
|
2331
|
+
*/
|
|
2332
|
+
type: 'price';
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
type Type = 'remove' | 'set';
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
interface DiscountAction {
|
|
2339
|
+
/**
|
|
2340
|
+
* Details of the discount to add.
|
|
2341
|
+
*/
|
|
2342
|
+
add?: DiscountAction.Add;
|
|
2343
|
+
|
|
2344
|
+
/**
|
|
2345
|
+
* Details of the discount to remove.
|
|
2346
|
+
*/
|
|
2347
|
+
remove?: DiscountAction.Remove;
|
|
2348
|
+
|
|
2349
|
+
/**
|
|
2350
|
+
* Details of the discount to replace the existing discounts with.
|
|
2351
|
+
*/
|
|
2352
|
+
set?: DiscountAction.Set;
|
|
2353
|
+
|
|
2354
|
+
/**
|
|
2355
|
+
* Determines the type of discount action.
|
|
2356
|
+
*/
|
|
2357
|
+
type: DiscountAction.Type;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
namespace DiscountAction {
|
|
2361
|
+
interface Add {
|
|
2362
|
+
/**
|
|
2363
|
+
* The coupon code to redeem.
|
|
2364
|
+
*/
|
|
2365
|
+
coupon?: string;
|
|
2366
|
+
|
|
2367
|
+
/**
|
|
2368
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
2369
|
+
*/
|
|
2370
|
+
discount?: string;
|
|
2371
|
+
|
|
2372
|
+
/**
|
|
2373
|
+
* Details to determine how long the discount should be applied for.
|
|
2374
|
+
*/
|
|
2375
|
+
discount_end?: Add.DiscountEnd;
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* 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.
|
|
2379
|
+
*/
|
|
2380
|
+
index?: number;
|
|
2381
|
+
|
|
2382
|
+
/**
|
|
2383
|
+
* The promotion code to redeem.
|
|
2384
|
+
*/
|
|
2385
|
+
promotion_code?: string;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
namespace Add {
|
|
2389
|
+
interface DiscountEnd {
|
|
2390
|
+
/**
|
|
2391
|
+
* The type of calculation made to determine when the discount ends.
|
|
2392
|
+
*/
|
|
2393
|
+
type: 'amendment_end';
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
interface Remove {
|
|
2398
|
+
/**
|
|
2399
|
+
* The coupon code to remove from the `discounts` array.
|
|
2400
|
+
*/
|
|
2401
|
+
coupon?: string;
|
|
2402
|
+
|
|
2403
|
+
/**
|
|
2404
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
2405
|
+
*/
|
|
2406
|
+
discount?: string;
|
|
2407
|
+
|
|
2408
|
+
/**
|
|
2409
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
2410
|
+
*/
|
|
2411
|
+
promotion_code?: string;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
interface Set {
|
|
2415
|
+
/**
|
|
2416
|
+
* The coupon code to replace the `discounts` array with.
|
|
2417
|
+
*/
|
|
2418
|
+
coupon?: string;
|
|
2419
|
+
|
|
2420
|
+
/**
|
|
2421
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
2422
|
+
*/
|
|
2423
|
+
discount?: string;
|
|
2424
|
+
|
|
2425
|
+
/**
|
|
2426
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2427
|
+
*/
|
|
2428
|
+
promotion_code?: string;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
type Type = 'add' | 'remove' | 'set';
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
type EffectiveAt = 'amendment_start' | 'billing_period_start';
|
|
2435
|
+
|
|
2436
|
+
interface ItemAction {
|
|
2437
|
+
/**
|
|
2438
|
+
* 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.
|
|
2439
|
+
*/
|
|
2440
|
+
add?: ItemAction.Add;
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* Details of the subscription item to remove.
|
|
2444
|
+
*/
|
|
2445
|
+
remove?: ItemAction.Remove;
|
|
2446
|
+
|
|
2447
|
+
/**
|
|
2448
|
+
* 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.
|
|
2449
|
+
*/
|
|
2450
|
+
set?: ItemAction.Set;
|
|
2451
|
+
|
|
2452
|
+
/**
|
|
2453
|
+
* Determines the type of item action.
|
|
2454
|
+
*/
|
|
2455
|
+
type: ItemAction.Type;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
namespace ItemAction {
|
|
2459
|
+
interface Add {
|
|
2460
|
+
/**
|
|
2461
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
2462
|
+
*/
|
|
2463
|
+
discounts?: Array<Add.Discount>;
|
|
2464
|
+
|
|
2465
|
+
/**
|
|
2466
|
+
* Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
2467
|
+
*/
|
|
2468
|
+
metadata?: Stripe.MetadataParam;
|
|
2469
|
+
|
|
2470
|
+
/**
|
|
2471
|
+
* The ID of the price object.
|
|
2472
|
+
*/
|
|
2473
|
+
price: string;
|
|
2474
|
+
|
|
2475
|
+
/**
|
|
2476
|
+
* Quantity for this item.
|
|
2477
|
+
*/
|
|
2478
|
+
quantity?: number;
|
|
2479
|
+
|
|
2480
|
+
/**
|
|
2481
|
+
* 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`.
|
|
2482
|
+
*/
|
|
2483
|
+
tax_rates?: Array<string>;
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* Options that configure the trial on the subscription item.
|
|
2487
|
+
*/
|
|
2488
|
+
trial?: Add.Trial;
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
2492
|
+
*/
|
|
2493
|
+
trial_offer?: string;
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
namespace Add {
|
|
2497
|
+
interface Discount {
|
|
2498
|
+
/**
|
|
2499
|
+
* ID of the coupon to create a new discount for.
|
|
2500
|
+
*/
|
|
2501
|
+
coupon?: string;
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2505
|
+
*/
|
|
2506
|
+
discount?: string;
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Details to determine how long the discount should be applied for.
|
|
2510
|
+
*/
|
|
2511
|
+
discount_end?: Discount.DiscountEnd;
|
|
2512
|
+
|
|
2513
|
+
/**
|
|
2514
|
+
* ID of the promotion code to create a new discount for.
|
|
2515
|
+
*/
|
|
2516
|
+
promotion_code?: string;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
namespace Discount {
|
|
2520
|
+
interface DiscountEnd {
|
|
2521
|
+
/**
|
|
2522
|
+
* Time span for the redeemed discount.
|
|
2523
|
+
*/
|
|
2524
|
+
duration?: DiscountEnd.Duration;
|
|
2525
|
+
|
|
2526
|
+
/**
|
|
2527
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2528
|
+
*/
|
|
2529
|
+
timestamp?: number;
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* The type of calculation made to determine when the discount ends.
|
|
2533
|
+
*/
|
|
2534
|
+
type: DiscountEnd.Type;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
namespace DiscountEnd {
|
|
2538
|
+
interface Duration {
|
|
2539
|
+
/**
|
|
2540
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2541
|
+
*/
|
|
2542
|
+
interval: Duration.Interval;
|
|
2543
|
+
|
|
2544
|
+
/**
|
|
2545
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2546
|
+
*/
|
|
2547
|
+
interval_count: number;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
namespace Duration {
|
|
2551
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
type Type = 'duration' | 'timestamp';
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
interface Trial {
|
|
2559
|
+
/**
|
|
2560
|
+
* 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.
|
|
2561
|
+
*/
|
|
2562
|
+
converts_to?: Array<string>;
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Determines the type of trial for this item.
|
|
2566
|
+
*/
|
|
2567
|
+
type: Trial.Type;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
namespace Trial {
|
|
2571
|
+
type Type = 'free' | 'paid';
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
interface Remove {
|
|
2576
|
+
/**
|
|
2577
|
+
* ID of a price to remove.
|
|
2578
|
+
*/
|
|
2579
|
+
price: string;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
interface Set {
|
|
2583
|
+
/**
|
|
2584
|
+
* 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`.
|
|
2585
|
+
*/
|
|
2586
|
+
discounts?: Array<Set.Discount>;
|
|
2587
|
+
|
|
2588
|
+
/**
|
|
2589
|
+
* 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`.
|
|
2590
|
+
*/
|
|
2591
|
+
metadata?: Stripe.MetadataParam;
|
|
2592
|
+
|
|
2593
|
+
/**
|
|
2594
|
+
* The ID of the price object.
|
|
2595
|
+
*/
|
|
2596
|
+
price: string;
|
|
2597
|
+
|
|
2598
|
+
/**
|
|
2599
|
+
* 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`.
|
|
2600
|
+
*/
|
|
2601
|
+
quantity?: number;
|
|
2602
|
+
|
|
2603
|
+
/**
|
|
2604
|
+
* 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`.
|
|
2605
|
+
*/
|
|
2606
|
+
tax_rates?: Array<string>;
|
|
2607
|
+
|
|
2608
|
+
/**
|
|
2609
|
+
* 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`.
|
|
2610
|
+
*/
|
|
2611
|
+
trial?: Set.Trial;
|
|
2612
|
+
|
|
2613
|
+
/**
|
|
2614
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
2615
|
+
*/
|
|
2616
|
+
trial_offer?: string;
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
namespace Set {
|
|
2620
|
+
interface Discount {
|
|
2621
|
+
/**
|
|
2622
|
+
* ID of the coupon to create a new discount for.
|
|
2623
|
+
*/
|
|
2624
|
+
coupon?: string;
|
|
2625
|
+
|
|
2626
|
+
/**
|
|
2627
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2628
|
+
*/
|
|
2629
|
+
discount?: string;
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* Details to determine how long the discount should be applied for.
|
|
2633
|
+
*/
|
|
2634
|
+
discount_end?: Discount.DiscountEnd;
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* ID of the promotion code to create a new discount for.
|
|
2638
|
+
*/
|
|
2639
|
+
promotion_code?: string;
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
namespace Discount {
|
|
2643
|
+
interface DiscountEnd {
|
|
2644
|
+
/**
|
|
2645
|
+
* Time span for the redeemed discount.
|
|
2646
|
+
*/
|
|
2647
|
+
duration?: DiscountEnd.Duration;
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2651
|
+
*/
|
|
2652
|
+
timestamp?: number;
|
|
2653
|
+
|
|
2654
|
+
/**
|
|
2655
|
+
* The type of calculation made to determine when the discount ends.
|
|
2656
|
+
*/
|
|
2657
|
+
type: DiscountEnd.Type;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
namespace DiscountEnd {
|
|
2661
|
+
interface Duration {
|
|
2662
|
+
/**
|
|
2663
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2664
|
+
*/
|
|
2665
|
+
interval: Duration.Interval;
|
|
2666
|
+
|
|
2667
|
+
/**
|
|
2668
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2669
|
+
*/
|
|
2670
|
+
interval_count: number;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
namespace Duration {
|
|
2674
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2677
|
+
type Type = 'duration' | 'timestamp';
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
interface Trial {
|
|
2682
|
+
/**
|
|
2683
|
+
* 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.
|
|
2684
|
+
*/
|
|
2685
|
+
converts_to?: Array<string>;
|
|
2686
|
+
|
|
2687
|
+
/**
|
|
2688
|
+
* Determines the type of trial for this item.
|
|
2689
|
+
*/
|
|
2690
|
+
type: Trial.Type;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
namespace Trial {
|
|
2694
|
+
type Type = 'free' | 'paid';
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
type Type = 'add' | 'remove' | 'set';
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
interface MetadataAction {
|
|
2702
|
+
/**
|
|
2703
|
+
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
2704
|
+
*/
|
|
2705
|
+
add?: {
|
|
2706
|
+
[key: string]: string;
|
|
2707
|
+
};
|
|
2708
|
+
|
|
2709
|
+
/**
|
|
2710
|
+
* Keys to remove from schedule phase metadata.
|
|
2711
|
+
*/
|
|
2712
|
+
remove?: Array<string>;
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
2716
|
+
*/
|
|
2717
|
+
set?: Stripe.Emptyable<{
|
|
2718
|
+
[key: string]: string;
|
|
2719
|
+
}>;
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
2723
|
+
*/
|
|
2724
|
+
type: MetadataAction.Type;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
namespace MetadataAction {
|
|
2728
|
+
type Type = 'add' | 'remove' | 'set';
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
type ProrationBehavior =
|
|
2732
|
+
| 'always_invoice'
|
|
2733
|
+
| 'create_prorations'
|
|
2734
|
+
| 'none';
|
|
2735
|
+
|
|
2736
|
+
interface SetPauseCollection {
|
|
2737
|
+
/**
|
|
2738
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
2739
|
+
*/
|
|
2740
|
+
set?: SetPauseCollection.Set;
|
|
2741
|
+
|
|
2742
|
+
/**
|
|
2743
|
+
* Determines the type of the pause_collection amendment.
|
|
2744
|
+
*/
|
|
2745
|
+
type: SetPauseCollection.Type;
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
namespace SetPauseCollection {
|
|
2749
|
+
interface Set {
|
|
2750
|
+
/**
|
|
2751
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2752
|
+
*/
|
|
2753
|
+
behavior: Set.Behavior;
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
namespace Set {
|
|
2757
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
type Type = 'remove' | 'set';
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
2764
|
+
|
|
2765
|
+
interface TrialSettings {
|
|
2766
|
+
/**
|
|
2767
|
+
* Defines how the subscription should behave when a trial ends.
|
|
2768
|
+
*/
|
|
2769
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
namespace TrialSettings {
|
|
2773
|
+
interface EndBehavior {
|
|
2774
|
+
/**
|
|
2775
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2776
|
+
*/
|
|
2777
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
namespace EndBehavior {
|
|
2781
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
interface Prebilling {
|
|
2787
|
+
/**
|
|
2788
|
+
* The beginning of the prebilled time period. The default value is `now`.
|
|
2789
|
+
*/
|
|
2790
|
+
bill_from?: Prebilling.BillFrom;
|
|
2791
|
+
|
|
2792
|
+
/**
|
|
2793
|
+
* The end of the prebilled time period.
|
|
2794
|
+
*/
|
|
2795
|
+
bill_until?: Prebilling.BillUntil;
|
|
2796
|
+
|
|
2797
|
+
/**
|
|
2798
|
+
* When the prebilling invoice should be created. The default value is `now`.
|
|
2799
|
+
*/
|
|
2800
|
+
invoice_at?: 'now';
|
|
2801
|
+
|
|
2802
|
+
/**
|
|
2803
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2804
|
+
*/
|
|
2805
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
namespace Prebilling {
|
|
2809
|
+
interface BillFrom {
|
|
2810
|
+
/**
|
|
2811
|
+
* Start the prebilled period when a specified amendment begins.
|
|
2812
|
+
*/
|
|
2813
|
+
amendment_start?: BillFrom.AmendmentStart;
|
|
2814
|
+
|
|
2815
|
+
/**
|
|
2816
|
+
* Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2817
|
+
*/
|
|
2818
|
+
timestamp?: number;
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* Select one of several ways to pass the `bill_from` value.
|
|
2822
|
+
*/
|
|
2823
|
+
type: BillFrom.Type;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
namespace BillFrom {
|
|
2827
|
+
interface AmendmentStart {
|
|
2828
|
+
/**
|
|
2829
|
+
* 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.
|
|
2830
|
+
*/
|
|
2831
|
+
index: number;
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
type Type = 'amendment_start' | 'now' | 'timestamp';
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
interface BillUntil {
|
|
2838
|
+
/**
|
|
2839
|
+
* End the prebilled period when a specified amendment ends.
|
|
2840
|
+
*/
|
|
2841
|
+
amendment_end?: BillUntil.AmendmentEnd;
|
|
2842
|
+
|
|
2843
|
+
/**
|
|
2844
|
+
* Time span for prebilling, starting from `bill_from`.
|
|
2845
|
+
*/
|
|
2846
|
+
duration?: BillUntil.Duration;
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2850
|
+
*/
|
|
2851
|
+
timestamp?: number;
|
|
2852
|
+
|
|
2853
|
+
/**
|
|
2854
|
+
* Select one of several ways to pass the `bill_until` value.
|
|
2855
|
+
*/
|
|
2856
|
+
type: BillUntil.Type;
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
namespace BillUntil {
|
|
2860
|
+
interface AmendmentEnd {
|
|
2861
|
+
/**
|
|
2862
|
+
* 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.
|
|
2863
|
+
*/
|
|
2864
|
+
index: number;
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2867
|
+
interface Duration {
|
|
2868
|
+
/**
|
|
2869
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2870
|
+
*/
|
|
2871
|
+
interval: Duration.Interval;
|
|
2872
|
+
|
|
2873
|
+
/**
|
|
2874
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2875
|
+
*/
|
|
2876
|
+
interval_count: number;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
namespace Duration {
|
|
2880
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
type Type =
|
|
2884
|
+
| 'amendment_end'
|
|
2885
|
+
| 'duration'
|
|
2886
|
+
| 'schedule_end'
|
|
2887
|
+
| 'timestamp';
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2894
|
+
|
|
2895
|
+
interface ScheduleSettings {
|
|
2896
|
+
/**
|
|
2897
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2898
|
+
*/
|
|
2899
|
+
end_behavior?: ScheduleSettings.EndBehavior;
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
namespace ScheduleSettings {
|
|
2903
|
+
type EndBehavior = 'cancel' | 'release';
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
interface SubscriptionScheduleCancelParams {
|
|
2908
|
+
/**
|
|
2909
|
+
* Specifies which fields in the response should be expanded.
|
|
2910
|
+
*/
|
|
2911
|
+
expand?: Array<string>;
|
|
2912
|
+
|
|
2913
|
+
/**
|
|
2914
|
+
* 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`.
|
|
2915
|
+
*/
|
|
2916
|
+
invoice_now?: boolean;
|
|
2917
|
+
|
|
2918
|
+
/**
|
|
2919
|
+
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
|
|
2920
|
+
*/
|
|
2921
|
+
prorate?: boolean;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
interface SubscriptionScheduleReleaseParams {
|
|
2925
|
+
/**
|
|
2926
|
+
* Specifies which fields in the response should be expanded.
|
|
2927
|
+
*/
|
|
2928
|
+
expand?: Array<string>;
|
|
2929
|
+
|
|
2930
|
+
/**
|
|
2931
|
+
* Keep any cancellation on the subscription that the schedule has set
|
|
2932
|
+
*/
|
|
2933
|
+
preserve_cancel_date?: boolean;
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
class SubscriptionSchedulesResource {
|
|
2937
|
+
/**
|
|
2938
|
+
* Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
|
|
2939
|
+
*/
|
|
2940
|
+
create(
|
|
2941
|
+
params?: SubscriptionScheduleCreateParams,
|
|
2942
|
+
options?: RequestOptions
|
|
2943
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2944
|
+
create(
|
|
2945
|
+
options?: RequestOptions
|
|
2946
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
|
|
2950
|
+
*/
|
|
2951
|
+
retrieve(
|
|
2952
|
+
id: string,
|
|
2953
|
+
params?: SubscriptionScheduleRetrieveParams,
|
|
2954
|
+
options?: RequestOptions
|
|
2955
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2956
|
+
retrieve(
|
|
2957
|
+
id: string,
|
|
2958
|
+
options?: RequestOptions
|
|
2959
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2960
|
+
|
|
2961
|
+
/**
|
|
2962
|
+
* Updates an existing subscription schedule.
|
|
2963
|
+
*/
|
|
2964
|
+
update(
|
|
2965
|
+
id: string,
|
|
2966
|
+
params?: SubscriptionScheduleUpdateParams,
|
|
2967
|
+
options?: RequestOptions
|
|
2968
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2969
|
+
|
|
2970
|
+
/**
|
|
2971
|
+
* Retrieves the list of your subscription schedules.
|
|
2972
|
+
*/
|
|
2973
|
+
list(
|
|
2974
|
+
params?: SubscriptionScheduleListParams,
|
|
2975
|
+
options?: RequestOptions
|
|
2976
|
+
): ApiListPromise<Stripe.SubscriptionSchedule>;
|
|
2977
|
+
list(
|
|
2978
|
+
options?: RequestOptions
|
|
2979
|
+
): ApiListPromise<Stripe.SubscriptionSchedule>;
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* Amends an existing subscription schedule.
|
|
2983
|
+
*/
|
|
2984
|
+
amend(
|
|
2985
|
+
id: string,
|
|
2986
|
+
params?: SubscriptionScheduleAmendParams,
|
|
2987
|
+
options?: RequestOptions
|
|
2988
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2989
|
+
amend(
|
|
2990
|
+
id: string,
|
|
2991
|
+
options?: RequestOptions
|
|
2992
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
1537
2993
|
|
|
1538
2994
|
/**
|
|
1539
2995
|
* 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.
|