stripe 19.3.1 → 19.4.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 +1722 -12
- package/OPENAPI_VERSION +1 -1
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/Error.js +115 -1
- package/cjs/apiVersion.js +2 -3
- package/cjs/resources/AccountNotices.js +21 -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/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Subscriptions.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/OnboardingLinks.js +12 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/TestHelpers/Capital/FinancingOffers.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/AccountLinks.js +9 -0
- package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
- package/cjs/resources/V2/Core/Accounts.js +25 -0
- package/cjs/resources/V2/Core/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/MoneyManagement/Adjustments.js +17 -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/Reporting/ReportRuns.js +13 -0
- package/cjs/resources/V2/Reporting/Reports.js +12 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
- package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
- package/cjs/resources.js +152 -8
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +100 -0
- package/esm/apiVersion.js +1 -2
- package/esm/resources/AccountNotices.js +18 -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/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Subscriptions.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/OnboardingLinks.js +9 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/TestHelpers/Capital/FinancingOffers.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/AccountLinks.js +6 -0
- package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
- package/esm/resources/V2/Core/Accounts.js +22 -0
- package/esm/resources/V2/Core/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/MoneyManagement/Adjustments.js +14 -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/Reporting/ReportRuns.js +10 -0
- package/esm/resources/V2/Reporting/Reports.js +9 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
- package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
- package/esm/resources.js +139 -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 +45 -0
- package/types/AccountSessionsResource.d.ts +264 -0
- package/types/Accounts.d.ts +215 -2
- package/types/AccountsResource.d.ts +634 -2
- package/types/ApplicationFees.d.ts +6 -1
- package/types/Balance.d.ts +82 -0
- package/types/BalanceTransactions.d.ts +2 -1
- 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 +123 -2
- package/types/Billing/CreditBalanceSummaryResource.d.ts +20 -3
- package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
- package/types/Billing/CreditGrants.d.ts +76 -1
- package/types/Billing/CreditGrantsResource.d.ts +45 -4
- 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/BillingPortal/Sessions.d.ts +5 -0
- package/types/BillingPortal/SessionsResource.d.ts +12 -4
- 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 +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Cards.d.ts +19 -0
- package/types/CashBalances.d.ts +5 -0
- package/types/Charges.d.ts +190 -0
- package/types/ChargesResource.d.ts +1406 -0
- package/types/Checkout/Sessions.d.ts +427 -2
- package/types/Checkout/SessionsResource.d.ts +682 -2
- package/types/ConfirmationTokens.d.ts +139 -0
- package/types/Coupons.d.ts +35 -0
- package/types/CouponsResource.d.ts +23 -0
- package/types/CreditNoteLineItems.d.ts +17 -0
- package/types/CreditNotes.d.ts +5 -0
- package/types/CreditNotesResource.d.ts +5 -0
- package/types/CustomerBalanceTransactions.d.ts +2 -0
- package/types/CustomerCashBalanceTransactions.d.ts +2 -0
- package/types/CustomerSessions.d.ts +46 -0
- package/types/CustomerSessionsResource.d.ts +48 -2
- package/types/Customers.d.ts +2 -0
- package/types/CustomersResource.d.ts +8 -0
- package/types/DelegatedCheckout/RequestedSessions.d.ts +384 -0
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +599 -0
- package/types/Discounts.d.ts +20 -0
- package/types/Disputes.d.ts +40 -0
- package/types/DisputesResource.d.ts +11 -0
- package/types/Errors.d.ts +85 -0
- package/types/EventTypes.d.ts +630 -0
- package/types/Events.d.ts +95 -0
- package/types/ExternalAccountsResource.d.ts +304 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +36 -1
- package/types/FinancialConnections/AccountsResource.d.ts +40 -3
- package/types/FinancialConnections/Institutions.d.ts +98 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +51 -1
- package/types/FinancialConnections/SessionsResource.d.ts +43 -1
- package/types/FxQuotes.d.ts +155 -0
- package/types/FxQuotesResource.d.ts +130 -0
- package/types/Identity/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/Identity/VerificationSessions.d.ts +5 -0
- package/types/Identity/VerificationSessionsResource.d.ts +7 -0
- package/types/InvoiceItems.d.ts +127 -2
- package/types/InvoiceItemsResource.d.ts +117 -6
- package/types/InvoiceLineItems.d.ts +171 -3
- package/types/Invoices.d.ts +217 -5
- package/types/InvoicesResource.d.ts +1710 -2
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/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 +49 -0
- package/types/Mandates.d.ts +135 -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 +3139 -0
- package/types/PaymentAttemptRecords.d.ts +141 -0
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +7 -13
- package/types/PaymentIntents.d.ts +807 -27
- package/types/PaymentIntentsResource.d.ts +9828 -5019
- package/types/PaymentLinks.d.ts +6 -0
- package/types/PaymentLinksResource.d.ts +12 -0
- package/types/PaymentMethodBalances.d.ts +63 -0
- package/types/PaymentMethodConfigurations.d.ts +216 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +300 -0
- package/types/PaymentMethods.d.ts +144 -0
- package/types/PaymentMethodsResource.d.ts +187 -2
- package/types/PaymentRecords.d.ts +141 -0
- package/types/Persons.d.ts +30 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
- package/types/Privacy/RedactionJobs.d.ts +111 -0
- package/types/Privacy/RedactionJobsResource.d.ts +230 -0
- package/types/PromotionCodes.d.ts +5 -0
- package/types/PromotionCodesResource.d.ts +10 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1784 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +1108 -0
- package/types/Quotes.d.ts +982 -1
- package/types/QuotesResource.d.ts +3226 -293
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +51 -1
- package/types/SetupIntents.d.ts +239 -2
- package/types/SetupIntentsResource.d.ts +1044 -4
- package/types/Sources.d.ts +29 -0
- package/types/SubscriptionItems.d.ts +26 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +403 -0
- package/types/SubscriptionSchedulesResource.d.ts +1404 -0
- package/types/Subscriptions.d.ts +370 -1
- package/types/SubscriptionsResource.d.ts +757 -8
- package/types/Tax/Associations.d.ts +82 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/TaxIds.d.ts +10 -0
- package/types/TaxIdsResource.d.ts +10 -0
- package/types/Terminal/Configurations.d.ts +9 -0
- package/types/Terminal/ConfigurationsResource.d.ts +46 -18
- package/types/Terminal/OnboardingLinks.d.ts +57 -0
- package/types/Terminal/OnboardingLinksResource.d.ts +62 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +20 -0
- package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +130 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/TokensResource.d.ts +44 -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 +459 -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 +575 -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/MeterEvents.d.ts +1 -2
- 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 +274 -0
- package/types/V2/Billing/ServiceActionsResource.d.ts +370 -0
- package/types/V2/Core/AccountLinks.d.ts +168 -0
- package/types/V2/Core/AccountLinksResource.d.ts +152 -0
- package/types/V2/Core/AccountPersons.d.ts +615 -0
- package/types/V2/Core/Accounts/PersonsResource.d.ts +1153 -0
- package/types/V2/Core/Accounts.d.ts +7478 -0
- package/types/V2/Core/AccountsResource.d.ts +6723 -0
- 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 +8680 -10
- package/types/V2/Core/Events.d.ts +14 -0
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +194 -0
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +116 -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 +32 -0
- package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +148 -0
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +172 -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 +212 -0
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +170 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +283 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +247 -0
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +330 -0
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +256 -0
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +213 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +201 -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 +113 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +307 -0
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +186 -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 +162 -0
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
- package/types/V2/MoneyManagement/Transactions.d.ts +177 -0
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
- package/types/V2/Payments/OffSessionPayments.d.ts +326 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +401 -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/TestHelpers/FinancialAddressesResource.d.ts +73 -0
- package/types/V2/TestHelpers/MoneyManagementResource.d.ts +49 -0
- package/types/WebhookEndpointsResource.d.ts +74 -0
- package/types/Webhooks.d.ts +2 -0
- package/types/apiVersion.d.ts +1 -2
- package/types/index.d.ts +233 -0
- package/types/lib.d.ts +10 -0
|
@@ -3,16 +3,33 @@
|
|
|
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
|
*/
|
|
14
26
|
customer?: string;
|
|
15
27
|
|
|
28
|
+
/**
|
|
29
|
+
* The identifier of the account to create the subscription schedule for.
|
|
30
|
+
*/
|
|
31
|
+
customer_account?: string;
|
|
32
|
+
|
|
16
33
|
/**
|
|
17
34
|
* Object representing the subscription schedule's default settings.
|
|
18
35
|
*/
|
|
@@ -43,6 +60,11 @@ declare module 'stripe' {
|
|
|
43
60
|
*/
|
|
44
61
|
phases?: Array<SubscriptionScheduleCreateParams.Phase>;
|
|
45
62
|
|
|
63
|
+
/**
|
|
64
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
65
|
+
*/
|
|
66
|
+
prebilling?: SubscriptionScheduleCreateParams.Prebilling;
|
|
67
|
+
|
|
46
68
|
/**
|
|
47
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.
|
|
48
70
|
*/
|
|
@@ -50,6 +72,8 @@ declare module 'stripe' {
|
|
|
50
72
|
}
|
|
51
73
|
|
|
52
74
|
namespace SubscriptionScheduleCreateParams {
|
|
75
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
76
|
+
|
|
53
77
|
interface BillingMode {
|
|
54
78
|
/**
|
|
55
79
|
* Configure behavior for flexible billing mode.
|
|
@@ -77,6 +101,80 @@ declare module 'stripe' {
|
|
|
77
101
|
type Type = 'classic' | 'flexible';
|
|
78
102
|
}
|
|
79
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 =
|
|
169
|
+
| 'amendment_end'
|
|
170
|
+
| 'duration'
|
|
171
|
+
| 'line_ends_at'
|
|
172
|
+
| 'schedule_end'
|
|
173
|
+
| 'timestamp'
|
|
174
|
+
| 'upcoming_invoice';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
80
178
|
interface DefaultSettings {
|
|
81
179
|
/**
|
|
82
180
|
* 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).
|
|
@@ -129,6 +227,11 @@ declare module 'stripe' {
|
|
|
129
227
|
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
130
228
|
*/
|
|
131
229
|
transfer_data?: Stripe.Emptyable<DefaultSettings.TransferData>;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
233
|
+
*/
|
|
234
|
+
phase_effective_at?: DefaultSettings.PhaseEffectiveAt;
|
|
132
235
|
}
|
|
133
236
|
|
|
134
237
|
namespace DefaultSettings {
|
|
@@ -213,6 +316,8 @@ declare module 'stripe' {
|
|
|
213
316
|
}
|
|
214
317
|
}
|
|
215
318
|
|
|
319
|
+
type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
|
|
320
|
+
|
|
216
321
|
interface TransferData {
|
|
217
322
|
/**
|
|
218
323
|
* 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.
|
|
@@ -314,6 +419,11 @@ declare module 'stripe' {
|
|
|
314
419
|
*/
|
|
315
420
|
on_behalf_of?: string;
|
|
316
421
|
|
|
422
|
+
/**
|
|
423
|
+
* If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
|
424
|
+
*/
|
|
425
|
+
pause_collection?: Phase.PauseCollection;
|
|
426
|
+
|
|
317
427
|
/**
|
|
318
428
|
* Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
|
319
429
|
*/
|
|
@@ -329,10 +439,20 @@ declare module 'stripe' {
|
|
|
329
439
|
*/
|
|
330
440
|
trial?: boolean;
|
|
331
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Specify trial behavior when crossing phase boundaries
|
|
444
|
+
*/
|
|
445
|
+
trial_continuation?: Phase.TrialContinuation;
|
|
446
|
+
|
|
332
447
|
/**
|
|
333
448
|
* 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`
|
|
334
449
|
*/
|
|
335
450
|
trial_end?: number;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Settings related to subscription trials.
|
|
454
|
+
*/
|
|
455
|
+
trial_settings?: Phase.TrialSettings;
|
|
336
456
|
}
|
|
337
457
|
|
|
338
458
|
namespace Phase {
|
|
@@ -385,12 +505,56 @@ declare module 'stripe' {
|
|
|
385
505
|
*/
|
|
386
506
|
discount?: string;
|
|
387
507
|
|
|
508
|
+
/**
|
|
509
|
+
* Details to determine how long the discount should be applied for.
|
|
510
|
+
*/
|
|
511
|
+
discount_end?: Discount.DiscountEnd;
|
|
512
|
+
|
|
388
513
|
/**
|
|
389
514
|
* ID of the promotion code to create a new discount for.
|
|
390
515
|
*/
|
|
391
516
|
promotion_code?: string;
|
|
392
517
|
}
|
|
393
518
|
|
|
519
|
+
namespace Discount {
|
|
520
|
+
interface DiscountEnd {
|
|
521
|
+
/**
|
|
522
|
+
* Time span for the redeemed discount.
|
|
523
|
+
*/
|
|
524
|
+
duration?: DiscountEnd.Duration;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
528
|
+
*/
|
|
529
|
+
timestamp?: number;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* The type of calculation made to determine when the discount ends.
|
|
533
|
+
*/
|
|
534
|
+
type: DiscountEnd.Type;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
namespace DiscountEnd {
|
|
538
|
+
interface Duration {
|
|
539
|
+
/**
|
|
540
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
541
|
+
*/
|
|
542
|
+
interval: Duration.Interval;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
546
|
+
*/
|
|
547
|
+
interval_count: number;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
namespace Duration {
|
|
551
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
type Type = 'duration' | 'timestamp';
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
394
558
|
interface Period {
|
|
395
559
|
/**
|
|
396
560
|
* End of the invoice item period.
|
|
@@ -526,12 +690,56 @@ declare module 'stripe' {
|
|
|
526
690
|
*/
|
|
527
691
|
discount?: string;
|
|
528
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Details to determine how long the discount should be applied for.
|
|
695
|
+
*/
|
|
696
|
+
discount_end?: Discount.DiscountEnd;
|
|
697
|
+
|
|
529
698
|
/**
|
|
530
699
|
* ID of the promotion code to create a new discount for.
|
|
531
700
|
*/
|
|
532
701
|
promotion_code?: string;
|
|
533
702
|
}
|
|
534
703
|
|
|
704
|
+
namespace Discount {
|
|
705
|
+
interface DiscountEnd {
|
|
706
|
+
/**
|
|
707
|
+
* Time span for the redeemed discount.
|
|
708
|
+
*/
|
|
709
|
+
duration?: DiscountEnd.Duration;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
713
|
+
*/
|
|
714
|
+
timestamp?: number;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* The type of calculation made to determine when the discount ends.
|
|
718
|
+
*/
|
|
719
|
+
type: DiscountEnd.Type;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
namespace DiscountEnd {
|
|
723
|
+
interface Duration {
|
|
724
|
+
/**
|
|
725
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
726
|
+
*/
|
|
727
|
+
interval: Duration.Interval;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
731
|
+
*/
|
|
732
|
+
interval_count: number;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
namespace Duration {
|
|
736
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
type Type = 'duration' | 'timestamp';
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
|
|
535
743
|
interface Duration {
|
|
536
744
|
/**
|
|
537
745
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -623,6 +831,11 @@ declare module 'stripe' {
|
|
|
623
831
|
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
624
832
|
*/
|
|
625
833
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Options that configure the trial on the subscription item.
|
|
837
|
+
*/
|
|
838
|
+
trial?: Item.Trial;
|
|
626
839
|
}
|
|
627
840
|
|
|
628
841
|
namespace Item {
|
|
@@ -644,12 +857,56 @@ declare module 'stripe' {
|
|
|
644
857
|
*/
|
|
645
858
|
discount?: string;
|
|
646
859
|
|
|
860
|
+
/**
|
|
861
|
+
* Details to determine how long the discount should be applied for.
|
|
862
|
+
*/
|
|
863
|
+
discount_end?: Discount.DiscountEnd;
|
|
864
|
+
|
|
647
865
|
/**
|
|
648
866
|
* ID of the promotion code to create a new discount for.
|
|
649
867
|
*/
|
|
650
868
|
promotion_code?: string;
|
|
651
869
|
}
|
|
652
870
|
|
|
871
|
+
namespace Discount {
|
|
872
|
+
interface DiscountEnd {
|
|
873
|
+
/**
|
|
874
|
+
* Time span for the redeemed discount.
|
|
875
|
+
*/
|
|
876
|
+
duration?: DiscountEnd.Duration;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
880
|
+
*/
|
|
881
|
+
timestamp?: number;
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* The type of calculation made to determine when the discount ends.
|
|
885
|
+
*/
|
|
886
|
+
type: DiscountEnd.Type;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
namespace DiscountEnd {
|
|
890
|
+
interface Duration {
|
|
891
|
+
/**
|
|
892
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
893
|
+
*/
|
|
894
|
+
interval: Duration.Interval;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
898
|
+
*/
|
|
899
|
+
interval_count: number;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
namespace Duration {
|
|
903
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
type Type = 'duration' | 'timestamp';
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
653
910
|
interface PriceData {
|
|
654
911
|
/**
|
|
655
912
|
* 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).
|
|
@@ -701,6 +958,33 @@ declare module 'stripe' {
|
|
|
701
958
|
|
|
702
959
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
703
960
|
}
|
|
961
|
+
|
|
962
|
+
interface Trial {
|
|
963
|
+
/**
|
|
964
|
+
* 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.
|
|
965
|
+
*/
|
|
966
|
+
converts_to?: Array<string>;
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* Determines the type of trial for this item.
|
|
970
|
+
*/
|
|
971
|
+
type: Trial.Type;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
namespace Trial {
|
|
975
|
+
type Type = 'free' | 'paid';
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
interface PauseCollection {
|
|
980
|
+
/**
|
|
981
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
982
|
+
*/
|
|
983
|
+
behavior: PauseCollection.Behavior;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
namespace PauseCollection {
|
|
987
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
704
988
|
}
|
|
705
989
|
|
|
706
990
|
type ProrationBehavior =
|
|
@@ -719,6 +1003,44 @@ declare module 'stripe' {
|
|
|
719
1003
|
*/
|
|
720
1004
|
destination: string;
|
|
721
1005
|
}
|
|
1006
|
+
|
|
1007
|
+
type TrialContinuation = 'continue' | 'none';
|
|
1008
|
+
|
|
1009
|
+
interface TrialSettings {
|
|
1010
|
+
/**
|
|
1011
|
+
* Defines how the subscription should behave when a trial ends.
|
|
1012
|
+
*/
|
|
1013
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
namespace TrialSettings {
|
|
1017
|
+
interface EndBehavior {
|
|
1018
|
+
/**
|
|
1019
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1020
|
+
*/
|
|
1021
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
namespace EndBehavior {
|
|
1025
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
interface Prebilling {
|
|
1031
|
+
/**
|
|
1032
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
1033
|
+
*/
|
|
1034
|
+
iterations: number;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
1038
|
+
*/
|
|
1039
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
namespace Prebilling {
|
|
1043
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
722
1044
|
}
|
|
723
1045
|
}
|
|
724
1046
|
|
|
@@ -730,6 +1052,18 @@ declare module 'stripe' {
|
|
|
730
1052
|
}
|
|
731
1053
|
|
|
732
1054
|
interface SubscriptionScheduleUpdateParams {
|
|
1055
|
+
/**
|
|
1056
|
+
* 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.
|
|
1057
|
+
*/
|
|
1058
|
+
billing_behavior?: SubscriptionScheduleUpdateParams.BillingBehavior;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Sets the billing schedules for the subscription schedule.
|
|
1062
|
+
*/
|
|
1063
|
+
billing_schedules?: Array<
|
|
1064
|
+
SubscriptionScheduleUpdateParams.BillingSchedule
|
|
1065
|
+
>;
|
|
1066
|
+
|
|
733
1067
|
/**
|
|
734
1068
|
* Object representing the subscription schedule's default settings.
|
|
735
1069
|
*/
|
|
@@ -755,6 +1089,11 @@ declare module 'stripe' {
|
|
|
755
1089
|
*/
|
|
756
1090
|
phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
|
|
757
1091
|
|
|
1092
|
+
/**
|
|
1093
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
1094
|
+
*/
|
|
1095
|
+
prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
|
|
1096
|
+
|
|
758
1097
|
/**
|
|
759
1098
|
* 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`.
|
|
760
1099
|
*/
|
|
@@ -762,6 +1101,82 @@ declare module 'stripe' {
|
|
|
762
1101
|
}
|
|
763
1102
|
|
|
764
1103
|
namespace SubscriptionScheduleUpdateParams {
|
|
1104
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1105
|
+
|
|
1106
|
+
interface BillingSchedule {
|
|
1107
|
+
/**
|
|
1108
|
+
* Configure billing schedule differently for individual subscription items.
|
|
1109
|
+
*/
|
|
1110
|
+
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* The end date for the billing schedule.
|
|
1114
|
+
*/
|
|
1115
|
+
bill_until?: BillingSchedule.BillUntil;
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* 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.
|
|
1119
|
+
*/
|
|
1120
|
+
key?: string;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
namespace BillingSchedule {
|
|
1124
|
+
interface AppliesTo {
|
|
1125
|
+
/**
|
|
1126
|
+
* The ID of the price object.
|
|
1127
|
+
*/
|
|
1128
|
+
price?: string;
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Controls which subscription items the billing schedule applies to.
|
|
1132
|
+
*/
|
|
1133
|
+
type: 'price';
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
interface BillUntil {
|
|
1137
|
+
/**
|
|
1138
|
+
* Specifies the billing period.
|
|
1139
|
+
*/
|
|
1140
|
+
duration?: BillUntil.Duration;
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* The end date of the billing schedule.
|
|
1144
|
+
*/
|
|
1145
|
+
timestamp?: number;
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
1149
|
+
*/
|
|
1150
|
+
type: BillUntil.Type;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
namespace BillUntil {
|
|
1154
|
+
interface Duration {
|
|
1155
|
+
/**
|
|
1156
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
1157
|
+
*/
|
|
1158
|
+
interval: Duration.Interval;
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* The multiplier applied to the interval.
|
|
1162
|
+
*/
|
|
1163
|
+
interval_count?: number;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
namespace Duration {
|
|
1167
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
type Type =
|
|
1171
|
+
| 'amendment_end'
|
|
1172
|
+
| 'duration'
|
|
1173
|
+
| 'line_ends_at'
|
|
1174
|
+
| 'schedule_end'
|
|
1175
|
+
| 'timestamp'
|
|
1176
|
+
| 'upcoming_invoice';
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
|
|
765
1180
|
interface DefaultSettings {
|
|
766
1181
|
/**
|
|
767
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).
|
|
@@ -814,6 +1229,11 @@ declare module 'stripe' {
|
|
|
814
1229
|
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
815
1230
|
*/
|
|
816
1231
|
transfer_data?: Stripe.Emptyable<DefaultSettings.TransferData>;
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
1235
|
+
*/
|
|
1236
|
+
phase_effective_at?: DefaultSettings.PhaseEffectiveAt;
|
|
817
1237
|
}
|
|
818
1238
|
|
|
819
1239
|
namespace DefaultSettings {
|
|
@@ -898,6 +1318,8 @@ declare module 'stripe' {
|
|
|
898
1318
|
}
|
|
899
1319
|
}
|
|
900
1320
|
|
|
1321
|
+
type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
|
|
1322
|
+
|
|
901
1323
|
interface TransferData {
|
|
902
1324
|
/**
|
|
903
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.
|
|
@@ -999,6 +1421,11 @@ declare module 'stripe' {
|
|
|
999
1421
|
*/
|
|
1000
1422
|
on_behalf_of?: string;
|
|
1001
1423
|
|
|
1424
|
+
/**
|
|
1425
|
+
* If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
|
1426
|
+
*/
|
|
1427
|
+
pause_collection?: Phase.PauseCollection;
|
|
1428
|
+
|
|
1002
1429
|
/**
|
|
1003
1430
|
* Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
|
1004
1431
|
*/
|
|
@@ -1019,10 +1446,20 @@ declare module 'stripe' {
|
|
|
1019
1446
|
*/
|
|
1020
1447
|
trial?: boolean;
|
|
1021
1448
|
|
|
1449
|
+
/**
|
|
1450
|
+
* Specify trial behavior when crossing phase boundaries
|
|
1451
|
+
*/
|
|
1452
|
+
trial_continuation?: Phase.TrialContinuation;
|
|
1453
|
+
|
|
1022
1454
|
/**
|
|
1023
1455
|
* 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`
|
|
1024
1456
|
*/
|
|
1025
1457
|
trial_end?: number | 'now';
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* Settings related to subscription trials.
|
|
1461
|
+
*/
|
|
1462
|
+
trial_settings?: Phase.TrialSettings;
|
|
1026
1463
|
}
|
|
1027
1464
|
|
|
1028
1465
|
namespace Phase {
|
|
@@ -1075,12 +1512,56 @@ declare module 'stripe' {
|
|
|
1075
1512
|
*/
|
|
1076
1513
|
discount?: string;
|
|
1077
1514
|
|
|
1515
|
+
/**
|
|
1516
|
+
* Details to determine how long the discount should be applied for.
|
|
1517
|
+
*/
|
|
1518
|
+
discount_end?: Discount.DiscountEnd;
|
|
1519
|
+
|
|
1078
1520
|
/**
|
|
1079
1521
|
* ID of the promotion code to create a new discount for.
|
|
1080
1522
|
*/
|
|
1081
1523
|
promotion_code?: string;
|
|
1082
1524
|
}
|
|
1083
1525
|
|
|
1526
|
+
namespace Discount {
|
|
1527
|
+
interface DiscountEnd {
|
|
1528
|
+
/**
|
|
1529
|
+
* Time span for the redeemed discount.
|
|
1530
|
+
*/
|
|
1531
|
+
duration?: DiscountEnd.Duration;
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1535
|
+
*/
|
|
1536
|
+
timestamp?: number;
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* The type of calculation made to determine when the discount ends.
|
|
1540
|
+
*/
|
|
1541
|
+
type: DiscountEnd.Type;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
namespace DiscountEnd {
|
|
1545
|
+
interface Duration {
|
|
1546
|
+
/**
|
|
1547
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1548
|
+
*/
|
|
1549
|
+
interval: Duration.Interval;
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1553
|
+
*/
|
|
1554
|
+
interval_count: number;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
namespace Duration {
|
|
1558
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
type Type = 'duration' | 'timestamp';
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1084
1565
|
interface Period {
|
|
1085
1566
|
/**
|
|
1086
1567
|
* End of the invoice item period.
|
|
@@ -1216,12 +1697,56 @@ declare module 'stripe' {
|
|
|
1216
1697
|
*/
|
|
1217
1698
|
discount?: string;
|
|
1218
1699
|
|
|
1700
|
+
/**
|
|
1701
|
+
* Details to determine how long the discount should be applied for.
|
|
1702
|
+
*/
|
|
1703
|
+
discount_end?: Discount.DiscountEnd;
|
|
1704
|
+
|
|
1219
1705
|
/**
|
|
1220
1706
|
* ID of the promotion code to create a new discount for.
|
|
1221
1707
|
*/
|
|
1222
1708
|
promotion_code?: string;
|
|
1223
1709
|
}
|
|
1224
1710
|
|
|
1711
|
+
namespace Discount {
|
|
1712
|
+
interface DiscountEnd {
|
|
1713
|
+
/**
|
|
1714
|
+
* Time span for the redeemed discount.
|
|
1715
|
+
*/
|
|
1716
|
+
duration?: DiscountEnd.Duration;
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1720
|
+
*/
|
|
1721
|
+
timestamp?: number;
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* The type of calculation made to determine when the discount ends.
|
|
1725
|
+
*/
|
|
1726
|
+
type: DiscountEnd.Type;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
namespace DiscountEnd {
|
|
1730
|
+
interface Duration {
|
|
1731
|
+
/**
|
|
1732
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1733
|
+
*/
|
|
1734
|
+
interval: Duration.Interval;
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1738
|
+
*/
|
|
1739
|
+
interval_count: number;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
namespace Duration {
|
|
1743
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
type Type = 'duration' | 'timestamp';
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1225
1750
|
interface Duration {
|
|
1226
1751
|
/**
|
|
1227
1752
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -1313,6 +1838,11 @@ declare module 'stripe' {
|
|
|
1313
1838
|
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
1314
1839
|
*/
|
|
1315
1840
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* Options that configure the trial on the subscription item.
|
|
1844
|
+
*/
|
|
1845
|
+
trial?: Item.Trial;
|
|
1316
1846
|
}
|
|
1317
1847
|
|
|
1318
1848
|
namespace Item {
|
|
@@ -1334,12 +1864,56 @@ declare module 'stripe' {
|
|
|
1334
1864
|
*/
|
|
1335
1865
|
discount?: string;
|
|
1336
1866
|
|
|
1867
|
+
/**
|
|
1868
|
+
* Details to determine how long the discount should be applied for.
|
|
1869
|
+
*/
|
|
1870
|
+
discount_end?: Discount.DiscountEnd;
|
|
1871
|
+
|
|
1337
1872
|
/**
|
|
1338
1873
|
* ID of the promotion code to create a new discount for.
|
|
1339
1874
|
*/
|
|
1340
1875
|
promotion_code?: string;
|
|
1341
1876
|
}
|
|
1342
1877
|
|
|
1878
|
+
namespace Discount {
|
|
1879
|
+
interface DiscountEnd {
|
|
1880
|
+
/**
|
|
1881
|
+
* Time span for the redeemed discount.
|
|
1882
|
+
*/
|
|
1883
|
+
duration?: DiscountEnd.Duration;
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1887
|
+
*/
|
|
1888
|
+
timestamp?: number;
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* The type of calculation made to determine when the discount ends.
|
|
1892
|
+
*/
|
|
1893
|
+
type: DiscountEnd.Type;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
namespace DiscountEnd {
|
|
1897
|
+
interface Duration {
|
|
1898
|
+
/**
|
|
1899
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1900
|
+
*/
|
|
1901
|
+
interval: Duration.Interval;
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1905
|
+
*/
|
|
1906
|
+
interval_count: number;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
namespace Duration {
|
|
1910
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
type Type = 'duration' | 'timestamp';
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1343
1917
|
interface PriceData {
|
|
1344
1918
|
/**
|
|
1345
1919
|
* 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).
|
|
@@ -1391,6 +1965,33 @@ declare module 'stripe' {
|
|
|
1391
1965
|
|
|
1392
1966
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1393
1967
|
}
|
|
1968
|
+
|
|
1969
|
+
interface Trial {
|
|
1970
|
+
/**
|
|
1971
|
+
* 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.
|
|
1972
|
+
*/
|
|
1973
|
+
converts_to?: Array<string>;
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Determines the type of trial for this item.
|
|
1977
|
+
*/
|
|
1978
|
+
type: Trial.Type;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
namespace Trial {
|
|
1982
|
+
type Type = 'free' | 'paid';
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
interface PauseCollection {
|
|
1987
|
+
/**
|
|
1988
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1989
|
+
*/
|
|
1990
|
+
behavior: PauseCollection.Behavior;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
namespace PauseCollection {
|
|
1994
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1394
1995
|
}
|
|
1395
1996
|
|
|
1396
1997
|
type ProrationBehavior =
|
|
@@ -1409,6 +2010,44 @@ declare module 'stripe' {
|
|
|
1409
2010
|
*/
|
|
1410
2011
|
destination: string;
|
|
1411
2012
|
}
|
|
2013
|
+
|
|
2014
|
+
type TrialContinuation = 'continue' | 'none';
|
|
2015
|
+
|
|
2016
|
+
interface TrialSettings {
|
|
2017
|
+
/**
|
|
2018
|
+
* Defines how the subscription should behave when a trial ends.
|
|
2019
|
+
*/
|
|
2020
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
namespace TrialSettings {
|
|
2024
|
+
interface EndBehavior {
|
|
2025
|
+
/**
|
|
2026
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2027
|
+
*/
|
|
2028
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
namespace EndBehavior {
|
|
2032
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
interface Prebilling {
|
|
2038
|
+
/**
|
|
2039
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
2040
|
+
*/
|
|
2041
|
+
iterations: number;
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2045
|
+
*/
|
|
2046
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
namespace Prebilling {
|
|
2050
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
1412
2051
|
}
|
|
1413
2052
|
|
|
1414
2053
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
@@ -1435,6 +2074,11 @@ declare module 'stripe' {
|
|
|
1435
2074
|
*/
|
|
1436
2075
|
customer?: string;
|
|
1437
2076
|
|
|
2077
|
+
/**
|
|
2078
|
+
* Only return subscription schedules for the given account.
|
|
2079
|
+
*/
|
|
2080
|
+
customer_account?: string;
|
|
2081
|
+
|
|
1438
2082
|
/**
|
|
1439
2083
|
* Specifies which fields in the response should be expanded.
|
|
1440
2084
|
*/
|
|
@@ -1451,6 +2095,753 @@ declare module 'stripe' {
|
|
|
1451
2095
|
scheduled?: boolean;
|
|
1452
2096
|
}
|
|
1453
2097
|
|
|
2098
|
+
interface SubscriptionScheduleAmendParams {
|
|
2099
|
+
/**
|
|
2100
|
+
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
2101
|
+
*/
|
|
2102
|
+
amendments?: Array<SubscriptionScheduleAmendParams.Amendment>;
|
|
2103
|
+
|
|
2104
|
+
/**
|
|
2105
|
+
* Specifies which fields in the response should be expanded.
|
|
2106
|
+
*/
|
|
2107
|
+
expand?: Array<string>;
|
|
2108
|
+
|
|
2109
|
+
/**
|
|
2110
|
+
* Provide any time periods to bill in advance.
|
|
2111
|
+
*/
|
|
2112
|
+
prebilling?: Stripe.Emptyable<
|
|
2113
|
+
Array<SubscriptionScheduleAmendParams.Prebilling>
|
|
2114
|
+
>;
|
|
2115
|
+
|
|
2116
|
+
/**
|
|
2117
|
+
* In cases where the amendment changes the currently active phase,
|
|
2118
|
+
* specifies if and how to prorate at the time of the request.
|
|
2119
|
+
*/
|
|
2120
|
+
proration_behavior?: SubscriptionScheduleAmendParams.ProrationBehavior;
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* Changes to apply to the subscription schedule.
|
|
2124
|
+
*/
|
|
2125
|
+
schedule_settings?: SubscriptionScheduleAmendParams.ScheduleSettings;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
namespace SubscriptionScheduleAmendParams {
|
|
2129
|
+
interface Amendment {
|
|
2130
|
+
/**
|
|
2131
|
+
* 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.
|
|
2132
|
+
*/
|
|
2133
|
+
amendment_end?: Amendment.AmendmentEnd;
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2137
|
+
*/
|
|
2138
|
+
amendment_start: Amendment.AmendmentStart;
|
|
2139
|
+
|
|
2140
|
+
/**
|
|
2141
|
+
* 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.
|
|
2142
|
+
*/
|
|
2143
|
+
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
2147
|
+
*/
|
|
2148
|
+
discount_actions?: Array<Amendment.DiscountAction>;
|
|
2149
|
+
|
|
2150
|
+
/**
|
|
2151
|
+
* Changes to the subscription items during the amendment time span.
|
|
2152
|
+
*/
|
|
2153
|
+
item_actions?: Array<Amendment.ItemAction>;
|
|
2154
|
+
|
|
2155
|
+
/**
|
|
2156
|
+
* Instructions for how to modify phase metadata
|
|
2157
|
+
*/
|
|
2158
|
+
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* 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`.
|
|
2162
|
+
*/
|
|
2163
|
+
proration_behavior?: Amendment.ProrationBehavior;
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2167
|
+
*/
|
|
2168
|
+
set_pause_collection?: Amendment.SetPauseCollection;
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
2172
|
+
*/
|
|
2173
|
+
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* Settings related to subscription trials.
|
|
2177
|
+
*/
|
|
2178
|
+
trial_settings?: Amendment.TrialSettings;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
namespace Amendment {
|
|
2182
|
+
interface AmendmentEnd {
|
|
2183
|
+
/**
|
|
2184
|
+
* Use the `end` time of a given discount.
|
|
2185
|
+
*/
|
|
2186
|
+
discount_end?: AmendmentEnd.DiscountEnd;
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* Time span for the amendment starting from the `amendment_start`.
|
|
2190
|
+
*/
|
|
2191
|
+
duration?: AmendmentEnd.Duration;
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
2195
|
+
*/
|
|
2196
|
+
timestamp?: number;
|
|
2197
|
+
|
|
2198
|
+
/**
|
|
2199
|
+
* Select one of three ways to pass the `amendment_end`.
|
|
2200
|
+
*/
|
|
2201
|
+
type: AmendmentEnd.Type;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
namespace AmendmentEnd {
|
|
2205
|
+
interface DiscountEnd {
|
|
2206
|
+
/**
|
|
2207
|
+
* The ID of a specific discount.
|
|
2208
|
+
*/
|
|
2209
|
+
discount: string;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
interface Duration {
|
|
2213
|
+
/**
|
|
2214
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2215
|
+
*/
|
|
2216
|
+
interval: Duration.Interval;
|
|
2217
|
+
|
|
2218
|
+
/**
|
|
2219
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2220
|
+
*/
|
|
2221
|
+
interval_count: number;
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
namespace Duration {
|
|
2225
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
type Type =
|
|
2229
|
+
| 'discount_end'
|
|
2230
|
+
| 'duration'
|
|
2231
|
+
| 'schedule_end'
|
|
2232
|
+
| 'timestamp'
|
|
2233
|
+
| 'trial_end'
|
|
2234
|
+
| 'trial_start'
|
|
2235
|
+
| 'upcoming_invoice';
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
interface AmendmentStart {
|
|
2239
|
+
/**
|
|
2240
|
+
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
2241
|
+
*/
|
|
2242
|
+
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
2243
|
+
|
|
2244
|
+
/**
|
|
2245
|
+
* Use the `end` time of a given discount.
|
|
2246
|
+
*/
|
|
2247
|
+
discount_end?: AmendmentStart.DiscountEnd;
|
|
2248
|
+
|
|
2249
|
+
/**
|
|
2250
|
+
* A precise Unix timestamp for the amendment to start.
|
|
2251
|
+
*/
|
|
2252
|
+
timestamp?: number;
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* Select one of three ways to pass the `amendment_start`.
|
|
2256
|
+
*/
|
|
2257
|
+
type: AmendmentStart.Type;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
namespace AmendmentStart {
|
|
2261
|
+
interface AmendmentEnd {
|
|
2262
|
+
/**
|
|
2263
|
+
* 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.
|
|
2264
|
+
*/
|
|
2265
|
+
index: number;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
interface DiscountEnd {
|
|
2269
|
+
/**
|
|
2270
|
+
* The ID of a specific discount.
|
|
2271
|
+
*/
|
|
2272
|
+
discount: string;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
type Type =
|
|
2276
|
+
| 'amendment_end'
|
|
2277
|
+
| 'discount_end'
|
|
2278
|
+
| 'now'
|
|
2279
|
+
| 'schedule_end'
|
|
2280
|
+
| 'timestamp'
|
|
2281
|
+
| 'trial_end'
|
|
2282
|
+
| 'trial_start'
|
|
2283
|
+
| 'upcoming_invoice';
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
2287
|
+
|
|
2288
|
+
interface DiscountAction {
|
|
2289
|
+
/**
|
|
2290
|
+
* Details of the discount to add.
|
|
2291
|
+
*/
|
|
2292
|
+
add?: DiscountAction.Add;
|
|
2293
|
+
|
|
2294
|
+
/**
|
|
2295
|
+
* Details of the discount to remove.
|
|
2296
|
+
*/
|
|
2297
|
+
remove?: DiscountAction.Remove;
|
|
2298
|
+
|
|
2299
|
+
/**
|
|
2300
|
+
* Details of the discount to replace the existing discounts with.
|
|
2301
|
+
*/
|
|
2302
|
+
set?: DiscountAction.Set;
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* Determines the type of discount action.
|
|
2306
|
+
*/
|
|
2307
|
+
type: DiscountAction.Type;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
namespace DiscountAction {
|
|
2311
|
+
interface Add {
|
|
2312
|
+
/**
|
|
2313
|
+
* The coupon code to redeem.
|
|
2314
|
+
*/
|
|
2315
|
+
coupon?: string;
|
|
2316
|
+
|
|
2317
|
+
/**
|
|
2318
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
2319
|
+
*/
|
|
2320
|
+
discount?: string;
|
|
2321
|
+
|
|
2322
|
+
/**
|
|
2323
|
+
* Details to determine how long the discount should be applied for.
|
|
2324
|
+
*/
|
|
2325
|
+
discount_end?: Add.DiscountEnd;
|
|
2326
|
+
|
|
2327
|
+
/**
|
|
2328
|
+
* 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.
|
|
2329
|
+
*/
|
|
2330
|
+
index?: number;
|
|
2331
|
+
|
|
2332
|
+
/**
|
|
2333
|
+
* The promotion code to redeem.
|
|
2334
|
+
*/
|
|
2335
|
+
promotion_code?: string;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
namespace Add {
|
|
2339
|
+
interface DiscountEnd {
|
|
2340
|
+
/**
|
|
2341
|
+
* The type of calculation made to determine when the discount ends.
|
|
2342
|
+
*/
|
|
2343
|
+
type: 'amendment_end';
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
interface Remove {
|
|
2348
|
+
/**
|
|
2349
|
+
* The coupon code to remove from the `discounts` array.
|
|
2350
|
+
*/
|
|
2351
|
+
coupon?: string;
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
2355
|
+
*/
|
|
2356
|
+
discount?: string;
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
2360
|
+
*/
|
|
2361
|
+
promotion_code?: string;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
interface Set {
|
|
2365
|
+
/**
|
|
2366
|
+
* The coupon code to replace the `discounts` array with.
|
|
2367
|
+
*/
|
|
2368
|
+
coupon?: string;
|
|
2369
|
+
|
|
2370
|
+
/**
|
|
2371
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
2372
|
+
*/
|
|
2373
|
+
discount?: string;
|
|
2374
|
+
|
|
2375
|
+
/**
|
|
2376
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2377
|
+
*/
|
|
2378
|
+
promotion_code?: string;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
type Type = 'add' | 'remove' | 'set';
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
interface ItemAction {
|
|
2385
|
+
/**
|
|
2386
|
+
* 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.
|
|
2387
|
+
*/
|
|
2388
|
+
add?: ItemAction.Add;
|
|
2389
|
+
|
|
2390
|
+
/**
|
|
2391
|
+
* Details of the subscription item to remove.
|
|
2392
|
+
*/
|
|
2393
|
+
remove?: ItemAction.Remove;
|
|
2394
|
+
|
|
2395
|
+
/**
|
|
2396
|
+
* 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.
|
|
2397
|
+
*/
|
|
2398
|
+
set?: ItemAction.Set;
|
|
2399
|
+
|
|
2400
|
+
/**
|
|
2401
|
+
* Determines the type of item action.
|
|
2402
|
+
*/
|
|
2403
|
+
type: ItemAction.Type;
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
namespace ItemAction {
|
|
2407
|
+
interface Add {
|
|
2408
|
+
/**
|
|
2409
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
2410
|
+
*/
|
|
2411
|
+
discounts?: Array<Add.Discount>;
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
2415
|
+
*/
|
|
2416
|
+
metadata?: Stripe.MetadataParam;
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* The ID of the price object.
|
|
2420
|
+
*/
|
|
2421
|
+
price: string;
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* Quantity for this item.
|
|
2425
|
+
*/
|
|
2426
|
+
quantity?: number;
|
|
2427
|
+
|
|
2428
|
+
/**
|
|
2429
|
+
* 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`.
|
|
2430
|
+
*/
|
|
2431
|
+
tax_rates?: Array<string>;
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* Options that configure the trial on the subscription item.
|
|
2435
|
+
*/
|
|
2436
|
+
trial?: Add.Trial;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
namespace Add {
|
|
2440
|
+
interface Discount {
|
|
2441
|
+
/**
|
|
2442
|
+
* ID of the coupon to create a new discount for.
|
|
2443
|
+
*/
|
|
2444
|
+
coupon?: string;
|
|
2445
|
+
|
|
2446
|
+
/**
|
|
2447
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2448
|
+
*/
|
|
2449
|
+
discount?: string;
|
|
2450
|
+
|
|
2451
|
+
/**
|
|
2452
|
+
* Details to determine how long the discount should be applied for.
|
|
2453
|
+
*/
|
|
2454
|
+
discount_end?: Discount.DiscountEnd;
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* ID of the promotion code to create a new discount for.
|
|
2458
|
+
*/
|
|
2459
|
+
promotion_code?: string;
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
namespace Discount {
|
|
2463
|
+
interface DiscountEnd {
|
|
2464
|
+
/**
|
|
2465
|
+
* Time span for the redeemed discount.
|
|
2466
|
+
*/
|
|
2467
|
+
duration?: DiscountEnd.Duration;
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2471
|
+
*/
|
|
2472
|
+
timestamp?: number;
|
|
2473
|
+
|
|
2474
|
+
/**
|
|
2475
|
+
* The type of calculation made to determine when the discount ends.
|
|
2476
|
+
*/
|
|
2477
|
+
type: DiscountEnd.Type;
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
namespace DiscountEnd {
|
|
2481
|
+
interface Duration {
|
|
2482
|
+
/**
|
|
2483
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2484
|
+
*/
|
|
2485
|
+
interval: Duration.Interval;
|
|
2486
|
+
|
|
2487
|
+
/**
|
|
2488
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2489
|
+
*/
|
|
2490
|
+
interval_count: number;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
namespace Duration {
|
|
2494
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
type Type = 'duration' | 'timestamp';
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
interface Trial {
|
|
2502
|
+
/**
|
|
2503
|
+
* 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.
|
|
2504
|
+
*/
|
|
2505
|
+
converts_to?: Array<string>;
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* Determines the type of trial for this item.
|
|
2509
|
+
*/
|
|
2510
|
+
type: Trial.Type;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
namespace Trial {
|
|
2514
|
+
type Type = 'free' | 'paid';
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
interface Remove {
|
|
2519
|
+
/**
|
|
2520
|
+
* ID of a price to remove.
|
|
2521
|
+
*/
|
|
2522
|
+
price: string;
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
interface Set {
|
|
2526
|
+
/**
|
|
2527
|
+
* 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`.
|
|
2528
|
+
*/
|
|
2529
|
+
discounts?: Array<Set.Discount>;
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* 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`.
|
|
2533
|
+
*/
|
|
2534
|
+
metadata?: Stripe.MetadataParam;
|
|
2535
|
+
|
|
2536
|
+
/**
|
|
2537
|
+
* The ID of the price object.
|
|
2538
|
+
*/
|
|
2539
|
+
price: string;
|
|
2540
|
+
|
|
2541
|
+
/**
|
|
2542
|
+
* 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`.
|
|
2543
|
+
*/
|
|
2544
|
+
quantity?: number;
|
|
2545
|
+
|
|
2546
|
+
/**
|
|
2547
|
+
* 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`.
|
|
2548
|
+
*/
|
|
2549
|
+
tax_rates?: Array<string>;
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* 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`.
|
|
2553
|
+
*/
|
|
2554
|
+
trial?: Set.Trial;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
namespace Set {
|
|
2558
|
+
interface Discount {
|
|
2559
|
+
/**
|
|
2560
|
+
* ID of the coupon to create a new discount for.
|
|
2561
|
+
*/
|
|
2562
|
+
coupon?: string;
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2566
|
+
*/
|
|
2567
|
+
discount?: string;
|
|
2568
|
+
|
|
2569
|
+
/**
|
|
2570
|
+
* Details to determine how long the discount should be applied for.
|
|
2571
|
+
*/
|
|
2572
|
+
discount_end?: Discount.DiscountEnd;
|
|
2573
|
+
|
|
2574
|
+
/**
|
|
2575
|
+
* ID of the promotion code to create a new discount for.
|
|
2576
|
+
*/
|
|
2577
|
+
promotion_code?: string;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
namespace Discount {
|
|
2581
|
+
interface DiscountEnd {
|
|
2582
|
+
/**
|
|
2583
|
+
* Time span for the redeemed discount.
|
|
2584
|
+
*/
|
|
2585
|
+
duration?: DiscountEnd.Duration;
|
|
2586
|
+
|
|
2587
|
+
/**
|
|
2588
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2589
|
+
*/
|
|
2590
|
+
timestamp?: number;
|
|
2591
|
+
|
|
2592
|
+
/**
|
|
2593
|
+
* The type of calculation made to determine when the discount ends.
|
|
2594
|
+
*/
|
|
2595
|
+
type: DiscountEnd.Type;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
namespace DiscountEnd {
|
|
2599
|
+
interface Duration {
|
|
2600
|
+
/**
|
|
2601
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2602
|
+
*/
|
|
2603
|
+
interval: Duration.Interval;
|
|
2604
|
+
|
|
2605
|
+
/**
|
|
2606
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2607
|
+
*/
|
|
2608
|
+
interval_count: number;
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
namespace Duration {
|
|
2612
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
type Type = 'duration' | 'timestamp';
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
interface Trial {
|
|
2620
|
+
/**
|
|
2621
|
+
* 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.
|
|
2622
|
+
*/
|
|
2623
|
+
converts_to?: Array<string>;
|
|
2624
|
+
|
|
2625
|
+
/**
|
|
2626
|
+
* Determines the type of trial for this item.
|
|
2627
|
+
*/
|
|
2628
|
+
type: Trial.Type;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
namespace Trial {
|
|
2632
|
+
type Type = 'free' | 'paid';
|
|
2633
|
+
}
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
type Type = 'add' | 'remove' | 'set';
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
interface MetadataAction {
|
|
2640
|
+
/**
|
|
2641
|
+
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
2642
|
+
*/
|
|
2643
|
+
add?: {
|
|
2644
|
+
[key: string]: string;
|
|
2645
|
+
};
|
|
2646
|
+
|
|
2647
|
+
/**
|
|
2648
|
+
* Keys to remove from schedule phase metadata.
|
|
2649
|
+
*/
|
|
2650
|
+
remove?: Array<string>;
|
|
2651
|
+
|
|
2652
|
+
/**
|
|
2653
|
+
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
2654
|
+
*/
|
|
2655
|
+
set?: Stripe.Emptyable<{
|
|
2656
|
+
[key: string]: string;
|
|
2657
|
+
}>;
|
|
2658
|
+
|
|
2659
|
+
/**
|
|
2660
|
+
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
2661
|
+
*/
|
|
2662
|
+
type: MetadataAction.Type;
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
namespace MetadataAction {
|
|
2666
|
+
type Type = 'add' | 'remove' | 'set';
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
type ProrationBehavior =
|
|
2670
|
+
| 'always_invoice'
|
|
2671
|
+
| 'create_prorations'
|
|
2672
|
+
| 'none';
|
|
2673
|
+
|
|
2674
|
+
interface SetPauseCollection {
|
|
2675
|
+
/**
|
|
2676
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
2677
|
+
*/
|
|
2678
|
+
set?: SetPauseCollection.Set;
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* Determines the type of the pause_collection amendment.
|
|
2682
|
+
*/
|
|
2683
|
+
type: SetPauseCollection.Type;
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
namespace SetPauseCollection {
|
|
2687
|
+
interface Set {
|
|
2688
|
+
/**
|
|
2689
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2690
|
+
*/
|
|
2691
|
+
behavior: Set.Behavior;
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
namespace Set {
|
|
2695
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
type Type = 'remove' | 'set';
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
2702
|
+
|
|
2703
|
+
interface TrialSettings {
|
|
2704
|
+
/**
|
|
2705
|
+
* Defines how the subscription should behave when a trial ends.
|
|
2706
|
+
*/
|
|
2707
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
namespace TrialSettings {
|
|
2711
|
+
interface EndBehavior {
|
|
2712
|
+
/**
|
|
2713
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2714
|
+
*/
|
|
2715
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
namespace EndBehavior {
|
|
2719
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
interface Prebilling {
|
|
2725
|
+
/**
|
|
2726
|
+
* The beginning of the prebilled time period. The default value is `now`.
|
|
2727
|
+
*/
|
|
2728
|
+
bill_from?: Prebilling.BillFrom;
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* The end of the prebilled time period.
|
|
2732
|
+
*/
|
|
2733
|
+
bill_until?: Prebilling.BillUntil;
|
|
2734
|
+
|
|
2735
|
+
/**
|
|
2736
|
+
* When the prebilling invoice should be created. The default value is `now`.
|
|
2737
|
+
*/
|
|
2738
|
+
invoice_at?: 'now';
|
|
2739
|
+
|
|
2740
|
+
/**
|
|
2741
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2742
|
+
*/
|
|
2743
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
namespace Prebilling {
|
|
2747
|
+
interface BillFrom {
|
|
2748
|
+
/**
|
|
2749
|
+
* Start the prebilled period when a specified amendment begins.
|
|
2750
|
+
*/
|
|
2751
|
+
amendment_start?: BillFrom.AmendmentStart;
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2755
|
+
*/
|
|
2756
|
+
timestamp?: number;
|
|
2757
|
+
|
|
2758
|
+
/**
|
|
2759
|
+
* Select one of several ways to pass the `bill_from` value.
|
|
2760
|
+
*/
|
|
2761
|
+
type: BillFrom.Type;
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
namespace BillFrom {
|
|
2765
|
+
interface AmendmentStart {
|
|
2766
|
+
/**
|
|
2767
|
+
* 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.
|
|
2768
|
+
*/
|
|
2769
|
+
index: number;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
type Type = 'amendment_start' | 'now' | 'timestamp';
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
interface BillUntil {
|
|
2776
|
+
/**
|
|
2777
|
+
* End the prebilled period when a specified amendment ends.
|
|
2778
|
+
*/
|
|
2779
|
+
amendment_end?: BillUntil.AmendmentEnd;
|
|
2780
|
+
|
|
2781
|
+
/**
|
|
2782
|
+
* Time span for prebilling, starting from `bill_from`.
|
|
2783
|
+
*/
|
|
2784
|
+
duration?: BillUntil.Duration;
|
|
2785
|
+
|
|
2786
|
+
/**
|
|
2787
|
+
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
2788
|
+
*/
|
|
2789
|
+
timestamp?: number;
|
|
2790
|
+
|
|
2791
|
+
/**
|
|
2792
|
+
* Select one of several ways to pass the `bill_until` value.
|
|
2793
|
+
*/
|
|
2794
|
+
type: BillUntil.Type;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
namespace BillUntil {
|
|
2798
|
+
interface AmendmentEnd {
|
|
2799
|
+
/**
|
|
2800
|
+
* 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.
|
|
2801
|
+
*/
|
|
2802
|
+
index: number;
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
interface Duration {
|
|
2806
|
+
/**
|
|
2807
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2808
|
+
*/
|
|
2809
|
+
interval: Duration.Interval;
|
|
2810
|
+
|
|
2811
|
+
/**
|
|
2812
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2813
|
+
*/
|
|
2814
|
+
interval_count: number;
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
namespace Duration {
|
|
2818
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
type Type =
|
|
2822
|
+
| 'amendment_end'
|
|
2823
|
+
| 'duration'
|
|
2824
|
+
| 'schedule_end'
|
|
2825
|
+
| 'timestamp';
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2832
|
+
|
|
2833
|
+
interface ScheduleSettings {
|
|
2834
|
+
/**
|
|
2835
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2836
|
+
*/
|
|
2837
|
+
end_behavior?: ScheduleSettings.EndBehavior;
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
namespace ScheduleSettings {
|
|
2841
|
+
type EndBehavior = 'cancel' | 'release';
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
|
|
1454
2845
|
interface SubscriptionScheduleCancelParams {
|
|
1455
2846
|
/**
|
|
1456
2847
|
* Specifies which fields in the response should be expanded.
|
|
@@ -1525,6 +2916,19 @@ declare module 'stripe' {
|
|
|
1525
2916
|
options?: RequestOptions
|
|
1526
2917
|
): ApiListPromise<Stripe.SubscriptionSchedule>;
|
|
1527
2918
|
|
|
2919
|
+
/**
|
|
2920
|
+
* Amends an existing subscription schedule.
|
|
2921
|
+
*/
|
|
2922
|
+
amend(
|
|
2923
|
+
id: string,
|
|
2924
|
+
params?: SubscriptionScheduleAmendParams,
|
|
2925
|
+
options?: RequestOptions
|
|
2926
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2927
|
+
amend(
|
|
2928
|
+
id: string,
|
|
2929
|
+
options?: RequestOptions
|
|
2930
|
+
): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
|
|
2931
|
+
|
|
1528
2932
|
/**
|
|
1529
2933
|
* 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.
|
|
1530
2934
|
*/
|