stripe 19.2.1 → 19.3.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 +1686 -15
- package/OPENAPI_VERSION +1 -1
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/Error.js +115 -1
- package/cjs/RequestSender.js +1 -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/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/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/Tax/AutomaticRules.js +22 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
- package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
- package/cjs/resources.js +142 -8
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +100 -0
- package/esm/RequestSender.js +1 -1
- 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/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/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/Tax/AutomaticRules.js +19 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
- package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
- package/esm/resources.js +129 -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 +214 -1
- package/types/AccountsResource.d.ts +544 -0
- 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 +185 -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 +33 -0
- package/types/CouponsResource.d.ts +21 -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 +47 -1
- package/types/Customers.d.ts +2 -0
- package/types/CustomersResource.d.ts +8 -0
- package/types/DelegatedCheckout/RequestedSessions.d.ts +360 -0
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +593 -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 +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 +114 -2
- package/types/InvoiceItemsResource.d.ts +117 -6
- package/types/InvoiceLineItems.d.ts +158 -3
- package/types/InvoicePayments.d.ts +1 -1
- package/types/Invoices.d.ts +203 -4
- package/types/InvoicesResource.d.ts +1625 -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/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 -20
- package/types/PaymentIntentsResource.d.ts +9765 -4959
- 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 +2 -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 +1771 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +908 -0
- package/types/Quotes.d.ts +594 -1
- package/types/QuotesResource.d.ts +2588 -243
- 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 +205 -0
- package/types/SubscriptionSchedulesResource.d.ts +1233 -5
- package/types/Subscriptions.d.ts +262 -1
- package/types/SubscriptionsResource.d.ts +745 -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 +28 -0
- 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/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/Transfers.d.ts +9 -0
- package/types/TransfersResource.d.ts +7 -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 +731 -0
- package/types/V2/Billing/CadencesResource.d.ts +516 -0
- package/types/V2/Billing/CollectionSettingVersions.d.ts +314 -0
- package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
- package/types/V2/Billing/CollectionSettings.d.ts +337 -0
- package/types/V2/Billing/CollectionSettingsResource.d.ts +675 -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/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 +8589 -10
- package/types/V2/Core/Events.d.ts +12 -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 +206 -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/Tax/AutomaticRules.d.ts +53 -0
- package/types/V2/Tax/AutomaticRulesResource.d.ts +102 -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 +222 -0
- package/types/lib.d.ts +10 -0
|
@@ -8,6 +8,11 @@ declare module 'stripe' {
|
|
|
8
8
|
*/
|
|
9
9
|
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
|
13
|
+
*/
|
|
14
|
+
amounts_due?: Stripe.Emptyable<Array<InvoiceCreateParams.AmountsDue>>;
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
|
13
18
|
*/
|
|
@@ -48,11 +53,21 @@ declare module 'stripe' {
|
|
|
48
53
|
*/
|
|
49
54
|
customer?: string;
|
|
50
55
|
|
|
56
|
+
/**
|
|
57
|
+
* The ID of the account who will be billed.
|
|
58
|
+
*/
|
|
59
|
+
customer_account?: string;
|
|
60
|
+
|
|
51
61
|
/**
|
|
52
62
|
* The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
|
53
63
|
*/
|
|
54
64
|
days_until_due?: number;
|
|
55
65
|
|
|
66
|
+
/**
|
|
67
|
+
* The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
|
68
|
+
*/
|
|
69
|
+
default_margins?: Array<string>;
|
|
70
|
+
|
|
56
71
|
/**
|
|
57
72
|
* ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
|
58
73
|
*/
|
|
@@ -165,6 +180,28 @@ declare module 'stripe' {
|
|
|
165
180
|
}
|
|
166
181
|
|
|
167
182
|
namespace InvoiceCreateParams {
|
|
183
|
+
interface AmountsDue {
|
|
184
|
+
/**
|
|
185
|
+
* The amount in cents (or local equivalent).
|
|
186
|
+
*/
|
|
187
|
+
amount: number;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Number of days from when invoice is finalized until the payment is due.
|
|
191
|
+
*/
|
|
192
|
+
days_until_due?: number;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
196
|
+
*/
|
|
197
|
+
description: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Date on which a payment plan's payment is due.
|
|
201
|
+
*/
|
|
202
|
+
due_date?: number;
|
|
203
|
+
}
|
|
204
|
+
|
|
168
205
|
interface AutomaticTax {
|
|
169
206
|
/**
|
|
170
207
|
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
@@ -220,12 +257,56 @@ declare module 'stripe' {
|
|
|
220
257
|
*/
|
|
221
258
|
discount?: string;
|
|
222
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Details to determine how long the discount should be applied for.
|
|
262
|
+
*/
|
|
263
|
+
discount_end?: Discount.DiscountEnd;
|
|
264
|
+
|
|
223
265
|
/**
|
|
224
266
|
* ID of the promotion code to create a new discount for.
|
|
225
267
|
*/
|
|
226
268
|
promotion_code?: string;
|
|
227
269
|
}
|
|
228
270
|
|
|
271
|
+
namespace Discount {
|
|
272
|
+
interface DiscountEnd {
|
|
273
|
+
/**
|
|
274
|
+
* Time span for the redeemed discount.
|
|
275
|
+
*/
|
|
276
|
+
duration?: DiscountEnd.Duration;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
280
|
+
*/
|
|
281
|
+
timestamp?: number;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The type of calculation made to determine when the discount ends.
|
|
285
|
+
*/
|
|
286
|
+
type: DiscountEnd.Type;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
namespace DiscountEnd {
|
|
290
|
+
interface Duration {
|
|
291
|
+
/**
|
|
292
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
293
|
+
*/
|
|
294
|
+
interval: Duration.Interval;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
298
|
+
*/
|
|
299
|
+
interval_count: number;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
namespace Duration {
|
|
303
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
type Type = 'duration' | 'timestamp';
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
229
310
|
interface FromInvoice {
|
|
230
311
|
/**
|
|
231
312
|
* The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
|
|
@@ -297,16 +378,33 @@ declare module 'stripe' {
|
|
|
297
378
|
PaymentMethodOptions.CustomerBalance
|
|
298
379
|
>;
|
|
299
380
|
|
|
381
|
+
/**
|
|
382
|
+
* If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
|
|
383
|
+
*/
|
|
384
|
+
id_bank_transfer?: Stripe.Emptyable<
|
|
385
|
+
PaymentMethodOptions.IdBankTransfer
|
|
386
|
+
>;
|
|
387
|
+
|
|
300
388
|
/**
|
|
301
389
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
302
390
|
*/
|
|
303
391
|
konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
|
|
304
392
|
|
|
393
|
+
/**
|
|
394
|
+
* If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
|
|
395
|
+
*/
|
|
396
|
+
pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
|
|
397
|
+
|
|
305
398
|
/**
|
|
306
399
|
* If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
|
|
307
400
|
*/
|
|
308
401
|
sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
|
|
309
402
|
|
|
403
|
+
/**
|
|
404
|
+
* If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
|
|
405
|
+
*/
|
|
406
|
+
upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
|
|
407
|
+
|
|
310
408
|
/**
|
|
311
409
|
* If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
|
|
312
410
|
*/
|
|
@@ -444,10 +542,58 @@ declare module 'stripe' {
|
|
|
444
542
|
}
|
|
445
543
|
}
|
|
446
544
|
|
|
545
|
+
interface IdBankTransfer {}
|
|
546
|
+
|
|
447
547
|
interface Konbini {}
|
|
448
548
|
|
|
549
|
+
interface Pix {
|
|
550
|
+
/**
|
|
551
|
+
* Determines if the amount includes the IOF tax. Defaults to `never`.
|
|
552
|
+
*/
|
|
553
|
+
amount_includes_iof?: Pix.AmountIncludesIof;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
namespace Pix {
|
|
557
|
+
type AmountIncludesIof = 'always' | 'never';
|
|
558
|
+
}
|
|
559
|
+
|
|
449
560
|
interface SepaDebit {}
|
|
450
561
|
|
|
562
|
+
interface Upi {
|
|
563
|
+
/**
|
|
564
|
+
* Configuration options for setting up an eMandate
|
|
565
|
+
*/
|
|
566
|
+
mandate_options?: Upi.MandateOptions;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
namespace Upi {
|
|
570
|
+
interface MandateOptions {
|
|
571
|
+
/**
|
|
572
|
+
* Amount to be charged for future payments.
|
|
573
|
+
*/
|
|
574
|
+
amount?: number;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
|
578
|
+
*/
|
|
579
|
+
amount_type?: MandateOptions.AmountType;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* A description of the mandate or subscription that is meant to be displayed to the customer.
|
|
583
|
+
*/
|
|
584
|
+
description?: string;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
|
588
|
+
*/
|
|
589
|
+
end_date?: number;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
namespace MandateOptions {
|
|
593
|
+
type AmountType = 'fixed' | 'maximum';
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
451
597
|
interface UsBankAccount {
|
|
452
598
|
/**
|
|
453
599
|
* Additional fields for Financial Connections Session creation
|
|
@@ -484,6 +630,11 @@ declare module 'stripe' {
|
|
|
484
630
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
485
631
|
*/
|
|
486
632
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
636
|
+
*/
|
|
637
|
+
institution?: string;
|
|
487
638
|
}
|
|
488
639
|
|
|
489
640
|
namespace Filters {
|
|
@@ -496,7 +647,11 @@ declare module 'stripe' {
|
|
|
496
647
|
| 'payment_method'
|
|
497
648
|
| 'transactions';
|
|
498
649
|
|
|
499
|
-
type Prefetch =
|
|
650
|
+
type Prefetch =
|
|
651
|
+
| 'balances'
|
|
652
|
+
| 'inferred_balances'
|
|
653
|
+
| 'ownership'
|
|
654
|
+
| 'transactions';
|
|
500
655
|
}
|
|
501
656
|
|
|
502
657
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -522,6 +677,7 @@ declare module 'stripe' {
|
|
|
522
677
|
| 'fpx'
|
|
523
678
|
| 'giropay'
|
|
524
679
|
| 'grabpay'
|
|
680
|
+
| 'id_bank_transfer'
|
|
525
681
|
| 'ideal'
|
|
526
682
|
| 'jp_credit_transfer'
|
|
527
683
|
| 'kakao_pay'
|
|
@@ -536,12 +692,15 @@ declare module 'stripe' {
|
|
|
536
692
|
| 'payco'
|
|
537
693
|
| 'paynow'
|
|
538
694
|
| 'paypal'
|
|
695
|
+
| 'pix'
|
|
539
696
|
| 'promptpay'
|
|
540
697
|
| 'revolut_pay'
|
|
541
698
|
| 'sepa_credit_transfer'
|
|
542
699
|
| 'sepa_debit'
|
|
543
700
|
| 'sofort'
|
|
701
|
+
| 'stripe_balance'
|
|
544
702
|
| 'swish'
|
|
703
|
+
| 'upi'
|
|
545
704
|
| 'us_bank_account'
|
|
546
705
|
| 'wechat_pay';
|
|
547
706
|
}
|
|
@@ -768,6 +927,11 @@ declare module 'stripe' {
|
|
|
768
927
|
*/
|
|
769
928
|
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
770
929
|
|
|
930
|
+
/**
|
|
931
|
+
* List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
|
932
|
+
*/
|
|
933
|
+
amounts_due?: Stripe.Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
|
|
934
|
+
|
|
771
935
|
/**
|
|
772
936
|
* A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
|
773
937
|
*/
|
|
@@ -803,6 +967,11 @@ declare module 'stripe' {
|
|
|
803
967
|
*/
|
|
804
968
|
days_until_due?: number;
|
|
805
969
|
|
|
970
|
+
/**
|
|
971
|
+
* The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
|
972
|
+
*/
|
|
973
|
+
default_margins?: Stripe.Emptyable<Array<string>>;
|
|
974
|
+
|
|
806
975
|
/**
|
|
807
976
|
* ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
|
808
977
|
*/
|
|
@@ -900,6 +1069,28 @@ declare module 'stripe' {
|
|
|
900
1069
|
}
|
|
901
1070
|
|
|
902
1071
|
namespace InvoiceUpdateParams {
|
|
1072
|
+
interface AmountsDue {
|
|
1073
|
+
/**
|
|
1074
|
+
* The amount in cents (or local equivalent).
|
|
1075
|
+
*/
|
|
1076
|
+
amount: number;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Number of days from when invoice is finalized until the payment is due.
|
|
1080
|
+
*/
|
|
1081
|
+
days_until_due?: number;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
1085
|
+
*/
|
|
1086
|
+
description: string;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* Date on which a payment plan's payment is due.
|
|
1090
|
+
*/
|
|
1091
|
+
due_date?: number;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
903
1094
|
interface AutomaticTax {
|
|
904
1095
|
/**
|
|
905
1096
|
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
@@ -955,12 +1146,56 @@ declare module 'stripe' {
|
|
|
955
1146
|
*/
|
|
956
1147
|
discount?: string;
|
|
957
1148
|
|
|
1149
|
+
/**
|
|
1150
|
+
* Details to determine how long the discount should be applied for.
|
|
1151
|
+
*/
|
|
1152
|
+
discount_end?: Discount.DiscountEnd;
|
|
1153
|
+
|
|
958
1154
|
/**
|
|
959
1155
|
* ID of the promotion code to create a new discount for.
|
|
960
1156
|
*/
|
|
961
1157
|
promotion_code?: string;
|
|
962
1158
|
}
|
|
963
1159
|
|
|
1160
|
+
namespace Discount {
|
|
1161
|
+
interface DiscountEnd {
|
|
1162
|
+
/**
|
|
1163
|
+
* Time span for the redeemed discount.
|
|
1164
|
+
*/
|
|
1165
|
+
duration?: DiscountEnd.Duration;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1169
|
+
*/
|
|
1170
|
+
timestamp?: number;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* The type of calculation made to determine when the discount ends.
|
|
1174
|
+
*/
|
|
1175
|
+
type: DiscountEnd.Type;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
namespace DiscountEnd {
|
|
1179
|
+
interface Duration {
|
|
1180
|
+
/**
|
|
1181
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1182
|
+
*/
|
|
1183
|
+
interval: Duration.Interval;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1187
|
+
*/
|
|
1188
|
+
interval_count: number;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
namespace Duration {
|
|
1192
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
type Type = 'duration' | 'timestamp';
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
|
|
964
1199
|
interface Issuer {
|
|
965
1200
|
/**
|
|
966
1201
|
* The connected account being referenced when `type` is `account`.
|
|
@@ -1020,16 +1255,33 @@ declare module 'stripe' {
|
|
|
1020
1255
|
PaymentMethodOptions.CustomerBalance
|
|
1021
1256
|
>;
|
|
1022
1257
|
|
|
1258
|
+
/**
|
|
1259
|
+
* If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
|
|
1260
|
+
*/
|
|
1261
|
+
id_bank_transfer?: Stripe.Emptyable<
|
|
1262
|
+
PaymentMethodOptions.IdBankTransfer
|
|
1263
|
+
>;
|
|
1264
|
+
|
|
1023
1265
|
/**
|
|
1024
1266
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
1025
1267
|
*/
|
|
1026
1268
|
konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
|
|
1027
1269
|
|
|
1270
|
+
/**
|
|
1271
|
+
* If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
|
|
1272
|
+
*/
|
|
1273
|
+
pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
|
|
1274
|
+
|
|
1028
1275
|
/**
|
|
1029
1276
|
* If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
|
|
1030
1277
|
*/
|
|
1031
1278
|
sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
|
|
1032
1279
|
|
|
1280
|
+
/**
|
|
1281
|
+
* If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
|
|
1282
|
+
*/
|
|
1283
|
+
upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
|
|
1284
|
+
|
|
1033
1285
|
/**
|
|
1034
1286
|
* If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
|
|
1035
1287
|
*/
|
|
@@ -1167,10 +1419,58 @@ declare module 'stripe' {
|
|
|
1167
1419
|
}
|
|
1168
1420
|
}
|
|
1169
1421
|
|
|
1422
|
+
interface IdBankTransfer {}
|
|
1423
|
+
|
|
1170
1424
|
interface Konbini {}
|
|
1171
1425
|
|
|
1426
|
+
interface Pix {
|
|
1427
|
+
/**
|
|
1428
|
+
* Determines if the amount includes the IOF tax. Defaults to `never`.
|
|
1429
|
+
*/
|
|
1430
|
+
amount_includes_iof?: Pix.AmountIncludesIof;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
namespace Pix {
|
|
1434
|
+
type AmountIncludesIof = 'always' | 'never';
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1172
1437
|
interface SepaDebit {}
|
|
1173
1438
|
|
|
1439
|
+
interface Upi {
|
|
1440
|
+
/**
|
|
1441
|
+
* Configuration options for setting up an eMandate
|
|
1442
|
+
*/
|
|
1443
|
+
mandate_options?: Upi.MandateOptions;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
namespace Upi {
|
|
1447
|
+
interface MandateOptions {
|
|
1448
|
+
/**
|
|
1449
|
+
* Amount to be charged for future payments.
|
|
1450
|
+
*/
|
|
1451
|
+
amount?: number;
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
|
1455
|
+
*/
|
|
1456
|
+
amount_type?: MandateOptions.AmountType;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* A description of the mandate or subscription that is meant to be displayed to the customer.
|
|
1460
|
+
*/
|
|
1461
|
+
description?: string;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
|
1465
|
+
*/
|
|
1466
|
+
end_date?: number;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
namespace MandateOptions {
|
|
1470
|
+
type AmountType = 'fixed' | 'maximum';
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1174
1474
|
interface UsBankAccount {
|
|
1175
1475
|
/**
|
|
1176
1476
|
* Additional fields for Financial Connections Session creation
|
|
@@ -1207,6 +1507,11 @@ declare module 'stripe' {
|
|
|
1207
1507
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
1208
1508
|
*/
|
|
1209
1509
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
1513
|
+
*/
|
|
1514
|
+
institution?: string;
|
|
1210
1515
|
}
|
|
1211
1516
|
|
|
1212
1517
|
namespace Filters {
|
|
@@ -1219,7 +1524,11 @@ declare module 'stripe' {
|
|
|
1219
1524
|
| 'payment_method'
|
|
1220
1525
|
| 'transactions';
|
|
1221
1526
|
|
|
1222
|
-
type Prefetch =
|
|
1527
|
+
type Prefetch =
|
|
1528
|
+
| 'balances'
|
|
1529
|
+
| 'inferred_balances'
|
|
1530
|
+
| 'ownership'
|
|
1531
|
+
| 'transactions';
|
|
1223
1532
|
}
|
|
1224
1533
|
|
|
1225
1534
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1245,6 +1554,7 @@ declare module 'stripe' {
|
|
|
1245
1554
|
| 'fpx'
|
|
1246
1555
|
| 'giropay'
|
|
1247
1556
|
| 'grabpay'
|
|
1557
|
+
| 'id_bank_transfer'
|
|
1248
1558
|
| 'ideal'
|
|
1249
1559
|
| 'jp_credit_transfer'
|
|
1250
1560
|
| 'kakao_pay'
|
|
@@ -1259,12 +1569,15 @@ declare module 'stripe' {
|
|
|
1259
1569
|
| 'payco'
|
|
1260
1570
|
| 'paynow'
|
|
1261
1571
|
| 'paypal'
|
|
1572
|
+
| 'pix'
|
|
1262
1573
|
| 'promptpay'
|
|
1263
1574
|
| 'revolut_pay'
|
|
1264
1575
|
| 'sepa_credit_transfer'
|
|
1265
1576
|
| 'sepa_debit'
|
|
1266
1577
|
| 'sofort'
|
|
1578
|
+
| 'stripe_balance'
|
|
1267
1579
|
| 'swish'
|
|
1580
|
+
| 'upi'
|
|
1268
1581
|
| 'us_bank_account'
|
|
1269
1582
|
| 'wechat_pay';
|
|
1270
1583
|
}
|
|
@@ -1477,6 +1790,11 @@ declare module 'stripe' {
|
|
|
1477
1790
|
}
|
|
1478
1791
|
|
|
1479
1792
|
interface InvoiceListParams extends PaginationParams {
|
|
1793
|
+
/**
|
|
1794
|
+
* Only return invoices for the cadence specified by this billing cadence ID.
|
|
1795
|
+
*/
|
|
1796
|
+
billing_cadence?: string;
|
|
1797
|
+
|
|
1480
1798
|
/**
|
|
1481
1799
|
* The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
|
|
1482
1800
|
*/
|
|
@@ -1492,6 +1810,11 @@ declare module 'stripe' {
|
|
|
1492
1810
|
*/
|
|
1493
1811
|
customer?: string;
|
|
1494
1812
|
|
|
1813
|
+
/**
|
|
1814
|
+
* Only return invoices for the account specified by this account ID.
|
|
1815
|
+
*/
|
|
1816
|
+
customer_account?: string;
|
|
1817
|
+
|
|
1495
1818
|
due_date?: Stripe.RangeQueryParam | number;
|
|
1496
1819
|
|
|
1497
1820
|
/**
|
|
@@ -1564,6 +1887,11 @@ declare module 'stripe' {
|
|
|
1564
1887
|
*/
|
|
1565
1888
|
invoice_item?: string;
|
|
1566
1889
|
|
|
1890
|
+
/**
|
|
1891
|
+
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
1892
|
+
*/
|
|
1893
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
1894
|
+
|
|
1567
1895
|
/**
|
|
1568
1896
|
* 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`.
|
|
1569
1897
|
*/
|
|
@@ -1612,12 +1940,56 @@ declare module 'stripe' {
|
|
|
1612
1940
|
*/
|
|
1613
1941
|
discount?: string;
|
|
1614
1942
|
|
|
1943
|
+
/**
|
|
1944
|
+
* Details to determine how long the discount should be applied for.
|
|
1945
|
+
*/
|
|
1946
|
+
discount_end?: Discount.DiscountEnd;
|
|
1947
|
+
|
|
1615
1948
|
/**
|
|
1616
1949
|
* ID of the promotion code to create a new discount for.
|
|
1617
1950
|
*/
|
|
1618
1951
|
promotion_code?: string;
|
|
1619
1952
|
}
|
|
1620
1953
|
|
|
1954
|
+
namespace Discount {
|
|
1955
|
+
interface DiscountEnd {
|
|
1956
|
+
/**
|
|
1957
|
+
* Time span for the redeemed discount.
|
|
1958
|
+
*/
|
|
1959
|
+
duration?: DiscountEnd.Duration;
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1963
|
+
*/
|
|
1964
|
+
timestamp?: number;
|
|
1965
|
+
|
|
1966
|
+
/**
|
|
1967
|
+
* The type of calculation made to determine when the discount ends.
|
|
1968
|
+
*/
|
|
1969
|
+
type: DiscountEnd.Type;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
namespace DiscountEnd {
|
|
1973
|
+
interface Duration {
|
|
1974
|
+
/**
|
|
1975
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1976
|
+
*/
|
|
1977
|
+
interval: Duration.Interval;
|
|
1978
|
+
|
|
1979
|
+
/**
|
|
1980
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1981
|
+
*/
|
|
1982
|
+
interval_count: number;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
namespace Duration {
|
|
1986
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
type Type = 'duration' | 'timestamp';
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1621
1993
|
interface Period {
|
|
1622
1994
|
/**
|
|
1623
1995
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -1824,6 +2196,11 @@ declare module 'stripe' {
|
|
|
1824
2196
|
}
|
|
1825
2197
|
|
|
1826
2198
|
interface InvoiceAttachPaymentParams {
|
|
2199
|
+
/**
|
|
2200
|
+
* The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
|
2201
|
+
*/
|
|
2202
|
+
amount_requested?: number;
|
|
2203
|
+
|
|
1827
2204
|
/**
|
|
1828
2205
|
* Specifies which fields in the response should be expanded.
|
|
1829
2206
|
*/
|
|
@@ -1838,6 +2215,45 @@ declare module 'stripe' {
|
|
|
1838
2215
|
* The ID of the PaymentRecord to attach to the invoice.
|
|
1839
2216
|
*/
|
|
1840
2217
|
payment_record?: string;
|
|
2218
|
+
|
|
2219
|
+
/**
|
|
2220
|
+
* The PaymentRecord data for attaching an out of band payment to the invoice.
|
|
2221
|
+
*/
|
|
2222
|
+
payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
namespace InvoiceAttachPaymentParams {
|
|
2226
|
+
interface PaymentRecordData {
|
|
2227
|
+
/**
|
|
2228
|
+
* The amount that was paid out of band.
|
|
2229
|
+
*/
|
|
2230
|
+
amount: number;
|
|
2231
|
+
|
|
2232
|
+
/**
|
|
2233
|
+
* The currency that was paid out of band.
|
|
2234
|
+
*/
|
|
2235
|
+
currency: string;
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* 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`.
|
|
2239
|
+
*/
|
|
2240
|
+
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* The type of money movement for this out of band payment record.
|
|
2244
|
+
*/
|
|
2245
|
+
money_movement_type: string;
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* The timestamp when this out of band payment was paid.
|
|
2249
|
+
*/
|
|
2250
|
+
paid_at?: number;
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* The reference for this out of band payment record.
|
|
2254
|
+
*/
|
|
2255
|
+
payment_reference?: string;
|
|
2256
|
+
}
|
|
1841
2257
|
}
|
|
1842
2258
|
|
|
1843
2259
|
interface InvoiceCreatePreviewParams {
|
|
@@ -1846,6 +2262,11 @@ declare module 'stripe' {
|
|
|
1846
2262
|
*/
|
|
1847
2263
|
automatic_tax?: InvoiceCreatePreviewParams.AutomaticTax;
|
|
1848
2264
|
|
|
2265
|
+
/**
|
|
2266
|
+
* The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
|
|
2267
|
+
*/
|
|
2268
|
+
billing_cadence?: string;
|
|
2269
|
+
|
|
1849
2270
|
/**
|
|
1850
2271
|
* The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
|
1851
2272
|
*/
|
|
@@ -1856,6 +2277,11 @@ declare module 'stripe' {
|
|
|
1856
2277
|
*/
|
|
1857
2278
|
customer?: string;
|
|
1858
2279
|
|
|
2280
|
+
/**
|
|
2281
|
+
* The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2282
|
+
*/
|
|
2283
|
+
customer_account?: string;
|
|
2284
|
+
|
|
1859
2285
|
/**
|
|
1860
2286
|
* Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
1861
2287
|
*/
|
|
@@ -2135,12 +2561,56 @@ declare module 'stripe' {
|
|
|
2135
2561
|
*/
|
|
2136
2562
|
discount?: string;
|
|
2137
2563
|
|
|
2564
|
+
/**
|
|
2565
|
+
* Details to determine how long the discount should be applied for.
|
|
2566
|
+
*/
|
|
2567
|
+
discount_end?: Discount.DiscountEnd;
|
|
2568
|
+
|
|
2138
2569
|
/**
|
|
2139
2570
|
* ID of the promotion code to create a new discount for.
|
|
2140
2571
|
*/
|
|
2141
2572
|
promotion_code?: string;
|
|
2142
2573
|
}
|
|
2143
2574
|
|
|
2575
|
+
namespace Discount {
|
|
2576
|
+
interface DiscountEnd {
|
|
2577
|
+
/**
|
|
2578
|
+
* Time span for the redeemed discount.
|
|
2579
|
+
*/
|
|
2580
|
+
duration?: DiscountEnd.Duration;
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2584
|
+
*/
|
|
2585
|
+
timestamp?: number;
|
|
2586
|
+
|
|
2587
|
+
/**
|
|
2588
|
+
* The type of calculation made to determine when the discount ends.
|
|
2589
|
+
*/
|
|
2590
|
+
type: DiscountEnd.Type;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
namespace DiscountEnd {
|
|
2594
|
+
interface Duration {
|
|
2595
|
+
/**
|
|
2596
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2597
|
+
*/
|
|
2598
|
+
interval: Duration.Interval;
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2602
|
+
*/
|
|
2603
|
+
interval_count: number;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
namespace Duration {
|
|
2607
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
type Type = 'duration' | 'timestamp';
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2144
2614
|
interface InvoiceItem {
|
|
2145
2615
|
/**
|
|
2146
2616
|
* The integer amount in cents (or local equivalent) of previewed invoice item.
|
|
@@ -2235,12 +2705,56 @@ declare module 'stripe' {
|
|
|
2235
2705
|
*/
|
|
2236
2706
|
discount?: string;
|
|
2237
2707
|
|
|
2708
|
+
/**
|
|
2709
|
+
* Details to determine how long the discount should be applied for.
|
|
2710
|
+
*/
|
|
2711
|
+
discount_end?: Discount.DiscountEnd;
|
|
2712
|
+
|
|
2238
2713
|
/**
|
|
2239
2714
|
* ID of the promotion code to create a new discount for.
|
|
2240
2715
|
*/
|
|
2241
2716
|
promotion_code?: string;
|
|
2242
2717
|
}
|
|
2243
2718
|
|
|
2719
|
+
namespace Discount {
|
|
2720
|
+
interface DiscountEnd {
|
|
2721
|
+
/**
|
|
2722
|
+
* Time span for the redeemed discount.
|
|
2723
|
+
*/
|
|
2724
|
+
duration?: DiscountEnd.Duration;
|
|
2725
|
+
|
|
2726
|
+
/**
|
|
2727
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2728
|
+
*/
|
|
2729
|
+
timestamp?: number;
|
|
2730
|
+
|
|
2731
|
+
/**
|
|
2732
|
+
* The type of calculation made to determine when the discount ends.
|
|
2733
|
+
*/
|
|
2734
|
+
type: DiscountEnd.Type;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
namespace DiscountEnd {
|
|
2738
|
+
interface Duration {
|
|
2739
|
+
/**
|
|
2740
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2741
|
+
*/
|
|
2742
|
+
interval: Duration.Interval;
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2746
|
+
*/
|
|
2747
|
+
interval_count: number;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
namespace Duration {
|
|
2751
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
type Type = 'duration' | 'timestamp';
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2244
2758
|
interface Period {
|
|
2245
2759
|
/**
|
|
2246
2760
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -2306,6 +2820,16 @@ declare module 'stripe' {
|
|
|
2306
2820
|
type PreviewMode = 'next' | 'recurring';
|
|
2307
2821
|
|
|
2308
2822
|
interface ScheduleDetails {
|
|
2823
|
+
/**
|
|
2824
|
+
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
2825
|
+
*/
|
|
2826
|
+
amendments?: Array<ScheduleDetails.Amendment>;
|
|
2827
|
+
|
|
2828
|
+
/**
|
|
2829
|
+
* 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.
|
|
2830
|
+
*/
|
|
2831
|
+
billing_behavior?: ScheduleDetails.BillingBehavior;
|
|
2832
|
+
|
|
2309
2833
|
/**
|
|
2310
2834
|
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
2311
2835
|
*/
|
|
@@ -2321,6 +2845,11 @@ declare module 'stripe' {
|
|
|
2321
2845
|
*/
|
|
2322
2846
|
phases?: Array<ScheduleDetails.Phase>;
|
|
2323
2847
|
|
|
2848
|
+
/**
|
|
2849
|
+
* Provide any time periods to bill in advance.
|
|
2850
|
+
*/
|
|
2851
|
+
prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
|
|
2852
|
+
|
|
2324
2853
|
/**
|
|
2325
2854
|
* In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
|
2326
2855
|
*/
|
|
@@ -2328,6 +2857,603 @@ declare module 'stripe' {
|
|
|
2328
2857
|
}
|
|
2329
2858
|
|
|
2330
2859
|
namespace ScheduleDetails {
|
|
2860
|
+
interface Amendment {
|
|
2861
|
+
/**
|
|
2862
|
+
* 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.
|
|
2863
|
+
*/
|
|
2864
|
+
amendment_end?: Amendment.AmendmentEnd;
|
|
2865
|
+
|
|
2866
|
+
/**
|
|
2867
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2868
|
+
*/
|
|
2869
|
+
amendment_start: Amendment.AmendmentStart;
|
|
2870
|
+
|
|
2871
|
+
/**
|
|
2872
|
+
* 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.
|
|
2873
|
+
*/
|
|
2874
|
+
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
2878
|
+
*/
|
|
2879
|
+
discount_actions?: Array<Amendment.DiscountAction>;
|
|
2880
|
+
|
|
2881
|
+
/**
|
|
2882
|
+
* Changes to the subscription items during the amendment time span.
|
|
2883
|
+
*/
|
|
2884
|
+
item_actions?: Array<Amendment.ItemAction>;
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* Instructions for how to modify phase metadata
|
|
2888
|
+
*/
|
|
2889
|
+
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
2890
|
+
|
|
2891
|
+
/**
|
|
2892
|
+
* 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`.
|
|
2893
|
+
*/
|
|
2894
|
+
proration_behavior?: Amendment.ProrationBehavior;
|
|
2895
|
+
|
|
2896
|
+
/**
|
|
2897
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2898
|
+
*/
|
|
2899
|
+
set_pause_collection?: Amendment.SetPauseCollection;
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
2903
|
+
*/
|
|
2904
|
+
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
2905
|
+
|
|
2906
|
+
/**
|
|
2907
|
+
* Settings related to subscription trials.
|
|
2908
|
+
*/
|
|
2909
|
+
trial_settings?: Amendment.TrialSettings;
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
namespace Amendment {
|
|
2913
|
+
interface AmendmentEnd {
|
|
2914
|
+
/**
|
|
2915
|
+
* Use the `end` time of a given discount.
|
|
2916
|
+
*/
|
|
2917
|
+
discount_end?: AmendmentEnd.DiscountEnd;
|
|
2918
|
+
|
|
2919
|
+
/**
|
|
2920
|
+
* Time span for the amendment starting from the `amendment_start`.
|
|
2921
|
+
*/
|
|
2922
|
+
duration?: AmendmentEnd.Duration;
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
2926
|
+
*/
|
|
2927
|
+
timestamp?: number;
|
|
2928
|
+
|
|
2929
|
+
/**
|
|
2930
|
+
* Select one of three ways to pass the `amendment_end`.
|
|
2931
|
+
*/
|
|
2932
|
+
type: AmendmentEnd.Type;
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
namespace AmendmentEnd {
|
|
2936
|
+
interface DiscountEnd {
|
|
2937
|
+
/**
|
|
2938
|
+
* The ID of a specific discount.
|
|
2939
|
+
*/
|
|
2940
|
+
discount: string;
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
interface Duration {
|
|
2944
|
+
/**
|
|
2945
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2946
|
+
*/
|
|
2947
|
+
interval: Duration.Interval;
|
|
2948
|
+
|
|
2949
|
+
/**
|
|
2950
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2951
|
+
*/
|
|
2952
|
+
interval_count: number;
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2955
|
+
namespace Duration {
|
|
2956
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
type Type =
|
|
2960
|
+
| 'discount_end'
|
|
2961
|
+
| 'duration'
|
|
2962
|
+
| 'schedule_end'
|
|
2963
|
+
| 'timestamp'
|
|
2964
|
+
| 'trial_end'
|
|
2965
|
+
| 'trial_start'
|
|
2966
|
+
| 'upcoming_invoice';
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
interface AmendmentStart {
|
|
2970
|
+
/**
|
|
2971
|
+
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
2972
|
+
*/
|
|
2973
|
+
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
2974
|
+
|
|
2975
|
+
/**
|
|
2976
|
+
* Use the `end` time of a given discount.
|
|
2977
|
+
*/
|
|
2978
|
+
discount_end?: AmendmentStart.DiscountEnd;
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* A precise Unix timestamp for the amendment to start.
|
|
2982
|
+
*/
|
|
2983
|
+
timestamp?: number;
|
|
2984
|
+
|
|
2985
|
+
/**
|
|
2986
|
+
* Select one of three ways to pass the `amendment_start`.
|
|
2987
|
+
*/
|
|
2988
|
+
type: AmendmentStart.Type;
|
|
2989
|
+
}
|
|
2990
|
+
|
|
2991
|
+
namespace AmendmentStart {
|
|
2992
|
+
interface AmendmentEnd {
|
|
2993
|
+
/**
|
|
2994
|
+
* 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.
|
|
2995
|
+
*/
|
|
2996
|
+
index: number;
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
interface DiscountEnd {
|
|
3000
|
+
/**
|
|
3001
|
+
* The ID of a specific discount.
|
|
3002
|
+
*/
|
|
3003
|
+
discount: string;
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
type Type =
|
|
3007
|
+
| 'amendment_end'
|
|
3008
|
+
| 'discount_end'
|
|
3009
|
+
| 'now'
|
|
3010
|
+
| 'schedule_end'
|
|
3011
|
+
| 'timestamp'
|
|
3012
|
+
| 'trial_end'
|
|
3013
|
+
| 'trial_start'
|
|
3014
|
+
| 'upcoming_invoice';
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
3018
|
+
|
|
3019
|
+
interface DiscountAction {
|
|
3020
|
+
/**
|
|
3021
|
+
* Details of the discount to add.
|
|
3022
|
+
*/
|
|
3023
|
+
add?: DiscountAction.Add;
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* Details of the discount to remove.
|
|
3027
|
+
*/
|
|
3028
|
+
remove?: DiscountAction.Remove;
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* Details of the discount to replace the existing discounts with.
|
|
3032
|
+
*/
|
|
3033
|
+
set?: DiscountAction.Set;
|
|
3034
|
+
|
|
3035
|
+
/**
|
|
3036
|
+
* Determines the type of discount action.
|
|
3037
|
+
*/
|
|
3038
|
+
type: DiscountAction.Type;
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3041
|
+
namespace DiscountAction {
|
|
3042
|
+
interface Add {
|
|
3043
|
+
/**
|
|
3044
|
+
* The coupon code to redeem.
|
|
3045
|
+
*/
|
|
3046
|
+
coupon?: string;
|
|
3047
|
+
|
|
3048
|
+
/**
|
|
3049
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
3050
|
+
*/
|
|
3051
|
+
discount?: string;
|
|
3052
|
+
|
|
3053
|
+
/**
|
|
3054
|
+
* Details to determine how long the discount should be applied for.
|
|
3055
|
+
*/
|
|
3056
|
+
discount_end?: Add.DiscountEnd;
|
|
3057
|
+
|
|
3058
|
+
/**
|
|
3059
|
+
* 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.
|
|
3060
|
+
*/
|
|
3061
|
+
index?: number;
|
|
3062
|
+
|
|
3063
|
+
/**
|
|
3064
|
+
* The promotion code to redeem.
|
|
3065
|
+
*/
|
|
3066
|
+
promotion_code?: string;
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
namespace Add {
|
|
3070
|
+
interface DiscountEnd {
|
|
3071
|
+
/**
|
|
3072
|
+
* The type of calculation made to determine when the discount ends.
|
|
3073
|
+
*/
|
|
3074
|
+
type: 'amendment_end';
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
interface Remove {
|
|
3079
|
+
/**
|
|
3080
|
+
* The coupon code to remove from the `discounts` array.
|
|
3081
|
+
*/
|
|
3082
|
+
coupon?: string;
|
|
3083
|
+
|
|
3084
|
+
/**
|
|
3085
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
3086
|
+
*/
|
|
3087
|
+
discount?: string;
|
|
3088
|
+
|
|
3089
|
+
/**
|
|
3090
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
3091
|
+
*/
|
|
3092
|
+
promotion_code?: string;
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
interface Set {
|
|
3096
|
+
/**
|
|
3097
|
+
* The coupon code to replace the `discounts` array with.
|
|
3098
|
+
*/
|
|
3099
|
+
coupon?: string;
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
3103
|
+
*/
|
|
3104
|
+
discount?: string;
|
|
3105
|
+
|
|
3106
|
+
/**
|
|
3107
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
3108
|
+
*/
|
|
3109
|
+
promotion_code?: string;
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
interface ItemAction {
|
|
3116
|
+
/**
|
|
3117
|
+
* 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.
|
|
3118
|
+
*/
|
|
3119
|
+
add?: ItemAction.Add;
|
|
3120
|
+
|
|
3121
|
+
/**
|
|
3122
|
+
* Details of the subscription item to remove.
|
|
3123
|
+
*/
|
|
3124
|
+
remove?: ItemAction.Remove;
|
|
3125
|
+
|
|
3126
|
+
/**
|
|
3127
|
+
* 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.
|
|
3128
|
+
*/
|
|
3129
|
+
set?: ItemAction.Set;
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* Determines the type of item action.
|
|
3133
|
+
*/
|
|
3134
|
+
type: ItemAction.Type;
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
namespace ItemAction {
|
|
3138
|
+
interface Add {
|
|
3139
|
+
/**
|
|
3140
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
3141
|
+
*/
|
|
3142
|
+
discounts?: Array<Add.Discount>;
|
|
3143
|
+
|
|
3144
|
+
/**
|
|
3145
|
+
* 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`.
|
|
3146
|
+
*/
|
|
3147
|
+
metadata?: Stripe.MetadataParam;
|
|
3148
|
+
|
|
3149
|
+
/**
|
|
3150
|
+
* The ID of the price object.
|
|
3151
|
+
*/
|
|
3152
|
+
price: string;
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* Quantity for this item.
|
|
3156
|
+
*/
|
|
3157
|
+
quantity?: number;
|
|
3158
|
+
|
|
3159
|
+
/**
|
|
3160
|
+
* 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`.
|
|
3161
|
+
*/
|
|
3162
|
+
tax_rates?: Array<string>;
|
|
3163
|
+
|
|
3164
|
+
/**
|
|
3165
|
+
* Options that configure the trial on the subscription item.
|
|
3166
|
+
*/
|
|
3167
|
+
trial?: Add.Trial;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
namespace Add {
|
|
3171
|
+
interface Discount {
|
|
3172
|
+
/**
|
|
3173
|
+
* ID of the coupon to create a new discount for.
|
|
3174
|
+
*/
|
|
3175
|
+
coupon?: string;
|
|
3176
|
+
|
|
3177
|
+
/**
|
|
3178
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3179
|
+
*/
|
|
3180
|
+
discount?: string;
|
|
3181
|
+
|
|
3182
|
+
/**
|
|
3183
|
+
* Details to determine how long the discount should be applied for.
|
|
3184
|
+
*/
|
|
3185
|
+
discount_end?: Discount.DiscountEnd;
|
|
3186
|
+
|
|
3187
|
+
/**
|
|
3188
|
+
* ID of the promotion code to create a new discount for.
|
|
3189
|
+
*/
|
|
3190
|
+
promotion_code?: string;
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
namespace Discount {
|
|
3194
|
+
interface DiscountEnd {
|
|
3195
|
+
/**
|
|
3196
|
+
* Time span for the redeemed discount.
|
|
3197
|
+
*/
|
|
3198
|
+
duration?: DiscountEnd.Duration;
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3202
|
+
*/
|
|
3203
|
+
timestamp?: number;
|
|
3204
|
+
|
|
3205
|
+
/**
|
|
3206
|
+
* The type of calculation made to determine when the discount ends.
|
|
3207
|
+
*/
|
|
3208
|
+
type: DiscountEnd.Type;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
namespace DiscountEnd {
|
|
3212
|
+
interface Duration {
|
|
3213
|
+
/**
|
|
3214
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3215
|
+
*/
|
|
3216
|
+
interval: Duration.Interval;
|
|
3217
|
+
|
|
3218
|
+
/**
|
|
3219
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3220
|
+
*/
|
|
3221
|
+
interval_count: number;
|
|
3222
|
+
}
|
|
3223
|
+
|
|
3224
|
+
namespace Duration {
|
|
3225
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
type Type = 'duration' | 'timestamp';
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3232
|
+
interface Trial {
|
|
3233
|
+
/**
|
|
3234
|
+
* 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.
|
|
3235
|
+
*/
|
|
3236
|
+
converts_to?: Array<string>;
|
|
3237
|
+
|
|
3238
|
+
/**
|
|
3239
|
+
* Determines the type of trial for this item.
|
|
3240
|
+
*/
|
|
3241
|
+
type: Trial.Type;
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
namespace Trial {
|
|
3245
|
+
type Type = 'free' | 'paid';
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
interface Remove {
|
|
3250
|
+
/**
|
|
3251
|
+
* ID of a price to remove.
|
|
3252
|
+
*/
|
|
3253
|
+
price: string;
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
interface Set {
|
|
3257
|
+
/**
|
|
3258
|
+
* 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`.
|
|
3259
|
+
*/
|
|
3260
|
+
discounts?: Array<Set.Discount>;
|
|
3261
|
+
|
|
3262
|
+
/**
|
|
3263
|
+
* 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`.
|
|
3264
|
+
*/
|
|
3265
|
+
metadata?: Stripe.MetadataParam;
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* The ID of the price object.
|
|
3269
|
+
*/
|
|
3270
|
+
price: string;
|
|
3271
|
+
|
|
3272
|
+
/**
|
|
3273
|
+
* 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`.
|
|
3274
|
+
*/
|
|
3275
|
+
quantity?: number;
|
|
3276
|
+
|
|
3277
|
+
/**
|
|
3278
|
+
* 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`.
|
|
3279
|
+
*/
|
|
3280
|
+
tax_rates?: Array<string>;
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* 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`.
|
|
3284
|
+
*/
|
|
3285
|
+
trial?: Set.Trial;
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
namespace Set {
|
|
3289
|
+
interface Discount {
|
|
3290
|
+
/**
|
|
3291
|
+
* ID of the coupon to create a new discount for.
|
|
3292
|
+
*/
|
|
3293
|
+
coupon?: string;
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3297
|
+
*/
|
|
3298
|
+
discount?: string;
|
|
3299
|
+
|
|
3300
|
+
/**
|
|
3301
|
+
* Details to determine how long the discount should be applied for.
|
|
3302
|
+
*/
|
|
3303
|
+
discount_end?: Discount.DiscountEnd;
|
|
3304
|
+
|
|
3305
|
+
/**
|
|
3306
|
+
* ID of the promotion code to create a new discount for.
|
|
3307
|
+
*/
|
|
3308
|
+
promotion_code?: string;
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
namespace Discount {
|
|
3312
|
+
interface DiscountEnd {
|
|
3313
|
+
/**
|
|
3314
|
+
* Time span for the redeemed discount.
|
|
3315
|
+
*/
|
|
3316
|
+
duration?: DiscountEnd.Duration;
|
|
3317
|
+
|
|
3318
|
+
/**
|
|
3319
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3320
|
+
*/
|
|
3321
|
+
timestamp?: number;
|
|
3322
|
+
|
|
3323
|
+
/**
|
|
3324
|
+
* The type of calculation made to determine when the discount ends.
|
|
3325
|
+
*/
|
|
3326
|
+
type: DiscountEnd.Type;
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
namespace DiscountEnd {
|
|
3330
|
+
interface Duration {
|
|
3331
|
+
/**
|
|
3332
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3333
|
+
*/
|
|
3334
|
+
interval: Duration.Interval;
|
|
3335
|
+
|
|
3336
|
+
/**
|
|
3337
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3338
|
+
*/
|
|
3339
|
+
interval_count: number;
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
namespace Duration {
|
|
3343
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
type Type = 'duration' | 'timestamp';
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
interface Trial {
|
|
3351
|
+
/**
|
|
3352
|
+
* 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.
|
|
3353
|
+
*/
|
|
3354
|
+
converts_to?: Array<string>;
|
|
3355
|
+
|
|
3356
|
+
/**
|
|
3357
|
+
* Determines the type of trial for this item.
|
|
3358
|
+
*/
|
|
3359
|
+
type: Trial.Type;
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
namespace Trial {
|
|
3363
|
+
type Type = 'free' | 'paid';
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
interface MetadataAction {
|
|
3371
|
+
/**
|
|
3372
|
+
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
3373
|
+
*/
|
|
3374
|
+
add?: {
|
|
3375
|
+
[key: string]: string;
|
|
3376
|
+
};
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* Keys to remove from schedule phase metadata.
|
|
3380
|
+
*/
|
|
3381
|
+
remove?: Array<string>;
|
|
3382
|
+
|
|
3383
|
+
/**
|
|
3384
|
+
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
3385
|
+
*/
|
|
3386
|
+
set?: Stripe.Emptyable<{
|
|
3387
|
+
[key: string]: string;
|
|
3388
|
+
}>;
|
|
3389
|
+
|
|
3390
|
+
/**
|
|
3391
|
+
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
3392
|
+
*/
|
|
3393
|
+
type: MetadataAction.Type;
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
namespace MetadataAction {
|
|
3397
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3398
|
+
}
|
|
3399
|
+
|
|
3400
|
+
type ProrationBehavior =
|
|
3401
|
+
| 'always_invoice'
|
|
3402
|
+
| 'create_prorations'
|
|
3403
|
+
| 'none';
|
|
3404
|
+
|
|
3405
|
+
interface SetPauseCollection {
|
|
3406
|
+
/**
|
|
3407
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
3408
|
+
*/
|
|
3409
|
+
set?: SetPauseCollection.Set;
|
|
3410
|
+
|
|
3411
|
+
/**
|
|
3412
|
+
* Determines the type of the pause_collection amendment.
|
|
3413
|
+
*/
|
|
3414
|
+
type: SetPauseCollection.Type;
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
namespace SetPauseCollection {
|
|
3418
|
+
interface Set {
|
|
3419
|
+
/**
|
|
3420
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
3421
|
+
*/
|
|
3422
|
+
behavior: Set.Behavior;
|
|
3423
|
+
}
|
|
3424
|
+
|
|
3425
|
+
namespace Set {
|
|
3426
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
type Type = 'remove' | 'set';
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
3433
|
+
|
|
3434
|
+
interface TrialSettings {
|
|
3435
|
+
/**
|
|
3436
|
+
* Defines how the subscription should behave when a trial ends.
|
|
3437
|
+
*/
|
|
3438
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
namespace TrialSettings {
|
|
3442
|
+
interface EndBehavior {
|
|
3443
|
+
/**
|
|
3444
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
3445
|
+
*/
|
|
3446
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
namespace EndBehavior {
|
|
3450
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
3456
|
+
|
|
2331
3457
|
interface BillingMode {
|
|
2332
3458
|
/**
|
|
2333
3459
|
* Configure behavior for flexible billing mode.
|
|
@@ -2443,6 +3569,11 @@ declare module 'stripe' {
|
|
|
2443
3569
|
*/
|
|
2444
3570
|
on_behalf_of?: string;
|
|
2445
3571
|
|
|
3572
|
+
/**
|
|
3573
|
+
* 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).
|
|
3574
|
+
*/
|
|
3575
|
+
pause_collection?: Phase.PauseCollection;
|
|
3576
|
+
|
|
2446
3577
|
/**
|
|
2447
3578
|
* 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.
|
|
2448
3579
|
*/
|
|
@@ -2463,10 +3594,20 @@ declare module 'stripe' {
|
|
|
2463
3594
|
*/
|
|
2464
3595
|
trial?: boolean;
|
|
2465
3596
|
|
|
3597
|
+
/**
|
|
3598
|
+
* Specify trial behavior when crossing phase boundaries
|
|
3599
|
+
*/
|
|
3600
|
+
trial_continuation?: Phase.TrialContinuation;
|
|
3601
|
+
|
|
2466
3602
|
/**
|
|
2467
3603
|
* 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`
|
|
2468
3604
|
*/
|
|
2469
3605
|
trial_end?: number | 'now';
|
|
3606
|
+
|
|
3607
|
+
/**
|
|
3608
|
+
* Settings related to subscription trials.
|
|
3609
|
+
*/
|
|
3610
|
+
trial_settings?: Phase.TrialSettings;
|
|
2470
3611
|
}
|
|
2471
3612
|
|
|
2472
3613
|
namespace Phase {
|
|
@@ -2519,12 +3660,56 @@ declare module 'stripe' {
|
|
|
2519
3660
|
*/
|
|
2520
3661
|
discount?: string;
|
|
2521
3662
|
|
|
3663
|
+
/**
|
|
3664
|
+
* Details to determine how long the discount should be applied for.
|
|
3665
|
+
*/
|
|
3666
|
+
discount_end?: Discount.DiscountEnd;
|
|
3667
|
+
|
|
2522
3668
|
/**
|
|
2523
3669
|
* ID of the promotion code to create a new discount for.
|
|
2524
3670
|
*/
|
|
2525
3671
|
promotion_code?: string;
|
|
2526
3672
|
}
|
|
2527
3673
|
|
|
3674
|
+
namespace Discount {
|
|
3675
|
+
interface DiscountEnd {
|
|
3676
|
+
/**
|
|
3677
|
+
* Time span for the redeemed discount.
|
|
3678
|
+
*/
|
|
3679
|
+
duration?: DiscountEnd.Duration;
|
|
3680
|
+
|
|
3681
|
+
/**
|
|
3682
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3683
|
+
*/
|
|
3684
|
+
timestamp?: number;
|
|
3685
|
+
|
|
3686
|
+
/**
|
|
3687
|
+
* The type of calculation made to determine when the discount ends.
|
|
3688
|
+
*/
|
|
3689
|
+
type: DiscountEnd.Type;
|
|
3690
|
+
}
|
|
3691
|
+
|
|
3692
|
+
namespace DiscountEnd {
|
|
3693
|
+
interface Duration {
|
|
3694
|
+
/**
|
|
3695
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3696
|
+
*/
|
|
3697
|
+
interval: Duration.Interval;
|
|
3698
|
+
|
|
3699
|
+
/**
|
|
3700
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3701
|
+
*/
|
|
3702
|
+
interval_count: number;
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
namespace Duration {
|
|
3706
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3709
|
+
type Type = 'duration' | 'timestamp';
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3712
|
+
|
|
2528
3713
|
interface Period {
|
|
2529
3714
|
/**
|
|
2530
3715
|
* End of the invoice item period.
|
|
@@ -2663,12 +3848,56 @@ declare module 'stripe' {
|
|
|
2663
3848
|
*/
|
|
2664
3849
|
discount?: string;
|
|
2665
3850
|
|
|
3851
|
+
/**
|
|
3852
|
+
* Details to determine how long the discount should be applied for.
|
|
3853
|
+
*/
|
|
3854
|
+
discount_end?: Discount.DiscountEnd;
|
|
3855
|
+
|
|
2666
3856
|
/**
|
|
2667
3857
|
* ID of the promotion code to create a new discount for.
|
|
2668
3858
|
*/
|
|
2669
3859
|
promotion_code?: string;
|
|
2670
3860
|
}
|
|
2671
3861
|
|
|
3862
|
+
namespace Discount {
|
|
3863
|
+
interface DiscountEnd {
|
|
3864
|
+
/**
|
|
3865
|
+
* Time span for the redeemed discount.
|
|
3866
|
+
*/
|
|
3867
|
+
duration?: DiscountEnd.Duration;
|
|
3868
|
+
|
|
3869
|
+
/**
|
|
3870
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3871
|
+
*/
|
|
3872
|
+
timestamp?: number;
|
|
3873
|
+
|
|
3874
|
+
/**
|
|
3875
|
+
* The type of calculation made to determine when the discount ends.
|
|
3876
|
+
*/
|
|
3877
|
+
type: DiscountEnd.Type;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
namespace DiscountEnd {
|
|
3881
|
+
interface Duration {
|
|
3882
|
+
/**
|
|
3883
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3884
|
+
*/
|
|
3885
|
+
interval: Duration.Interval;
|
|
3886
|
+
|
|
3887
|
+
/**
|
|
3888
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3889
|
+
*/
|
|
3890
|
+
interval_count: number;
|
|
3891
|
+
}
|
|
3892
|
+
|
|
3893
|
+
namespace Duration {
|
|
3894
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3895
|
+
}
|
|
3896
|
+
|
|
3897
|
+
type Type = 'duration' | 'timestamp';
|
|
3898
|
+
}
|
|
3899
|
+
}
|
|
3900
|
+
|
|
2672
3901
|
interface Duration {
|
|
2673
3902
|
/**
|
|
2674
3903
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -2760,6 +3989,11 @@ declare module 'stripe' {
|
|
|
2760
3989
|
* 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.
|
|
2761
3990
|
*/
|
|
2762
3991
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3992
|
+
|
|
3993
|
+
/**
|
|
3994
|
+
* Options that configure the trial on the subscription item.
|
|
3995
|
+
*/
|
|
3996
|
+
trial?: Item.Trial;
|
|
2763
3997
|
}
|
|
2764
3998
|
|
|
2765
3999
|
namespace Item {
|
|
@@ -2781,12 +4015,56 @@ declare module 'stripe' {
|
|
|
2781
4015
|
*/
|
|
2782
4016
|
discount?: string;
|
|
2783
4017
|
|
|
4018
|
+
/**
|
|
4019
|
+
* Details to determine how long the discount should be applied for.
|
|
4020
|
+
*/
|
|
4021
|
+
discount_end?: Discount.DiscountEnd;
|
|
4022
|
+
|
|
2784
4023
|
/**
|
|
2785
4024
|
* ID of the promotion code to create a new discount for.
|
|
2786
4025
|
*/
|
|
2787
4026
|
promotion_code?: string;
|
|
2788
4027
|
}
|
|
2789
4028
|
|
|
4029
|
+
namespace Discount {
|
|
4030
|
+
interface DiscountEnd {
|
|
4031
|
+
/**
|
|
4032
|
+
* Time span for the redeemed discount.
|
|
4033
|
+
*/
|
|
4034
|
+
duration?: DiscountEnd.Duration;
|
|
4035
|
+
|
|
4036
|
+
/**
|
|
4037
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4038
|
+
*/
|
|
4039
|
+
timestamp?: number;
|
|
4040
|
+
|
|
4041
|
+
/**
|
|
4042
|
+
* The type of calculation made to determine when the discount ends.
|
|
4043
|
+
*/
|
|
4044
|
+
type: DiscountEnd.Type;
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
namespace DiscountEnd {
|
|
4048
|
+
interface Duration {
|
|
4049
|
+
/**
|
|
4050
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4051
|
+
*/
|
|
4052
|
+
interval: Duration.Interval;
|
|
4053
|
+
|
|
4054
|
+
/**
|
|
4055
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4056
|
+
*/
|
|
4057
|
+
interval_count: number;
|
|
4058
|
+
}
|
|
4059
|
+
|
|
4060
|
+
namespace Duration {
|
|
4061
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4062
|
+
}
|
|
4063
|
+
|
|
4064
|
+
type Type = 'duration' | 'timestamp';
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
|
|
2790
4068
|
interface PriceData {
|
|
2791
4069
|
/**
|
|
2792
4070
|
* 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).
|
|
@@ -2838,6 +4116,33 @@ declare module 'stripe' {
|
|
|
2838
4116
|
|
|
2839
4117
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2840
4118
|
}
|
|
4119
|
+
|
|
4120
|
+
interface Trial {
|
|
4121
|
+
/**
|
|
4122
|
+
* 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.
|
|
4123
|
+
*/
|
|
4124
|
+
converts_to?: Array<string>;
|
|
4125
|
+
|
|
4126
|
+
/**
|
|
4127
|
+
* Determines the type of trial for this item.
|
|
4128
|
+
*/
|
|
4129
|
+
type: Trial.Type;
|
|
4130
|
+
}
|
|
4131
|
+
|
|
4132
|
+
namespace Trial {
|
|
4133
|
+
type Type = 'free' | 'paid';
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
4136
|
+
|
|
4137
|
+
interface PauseCollection {
|
|
4138
|
+
/**
|
|
4139
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
4140
|
+
*/
|
|
4141
|
+
behavior: PauseCollection.Behavior;
|
|
4142
|
+
}
|
|
4143
|
+
|
|
4144
|
+
namespace PauseCollection {
|
|
4145
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2841
4146
|
}
|
|
2842
4147
|
|
|
2843
4148
|
type ProrationBehavior =
|
|
@@ -2856,6 +4161,95 @@ declare module 'stripe' {
|
|
|
2856
4161
|
*/
|
|
2857
4162
|
destination: string;
|
|
2858
4163
|
}
|
|
4164
|
+
|
|
4165
|
+
type TrialContinuation = 'continue' | 'none';
|
|
4166
|
+
|
|
4167
|
+
interface TrialSettings {
|
|
4168
|
+
/**
|
|
4169
|
+
* Defines how the subscription should behave when a trial ends.
|
|
4170
|
+
*/
|
|
4171
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
4172
|
+
}
|
|
4173
|
+
|
|
4174
|
+
namespace TrialSettings {
|
|
4175
|
+
interface EndBehavior {
|
|
4176
|
+
/**
|
|
4177
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
4178
|
+
*/
|
|
4179
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
namespace EndBehavior {
|
|
4183
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
|
|
4188
|
+
interface Prebilling {
|
|
4189
|
+
/**
|
|
4190
|
+
* The end of the prebilled time period.
|
|
4191
|
+
*/
|
|
4192
|
+
bill_until?: Prebilling.BillUntil;
|
|
4193
|
+
|
|
4194
|
+
/**
|
|
4195
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
4196
|
+
*/
|
|
4197
|
+
iterations?: number;
|
|
4198
|
+
}
|
|
4199
|
+
|
|
4200
|
+
namespace Prebilling {
|
|
4201
|
+
interface BillUntil {
|
|
4202
|
+
/**
|
|
4203
|
+
* End the prebilled period when a specified amendment ends.
|
|
4204
|
+
*/
|
|
4205
|
+
amendment_end?: BillUntil.AmendmentEnd;
|
|
4206
|
+
|
|
4207
|
+
/**
|
|
4208
|
+
* Time span for prebilling, starting from `bill_from`.
|
|
4209
|
+
*/
|
|
4210
|
+
duration?: BillUntil.Duration;
|
|
4211
|
+
|
|
4212
|
+
/**
|
|
4213
|
+
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
4214
|
+
*/
|
|
4215
|
+
timestamp?: number;
|
|
4216
|
+
|
|
4217
|
+
/**
|
|
4218
|
+
* Select one of several ways to pass the `bill_until` value.
|
|
4219
|
+
*/
|
|
4220
|
+
type: BillUntil.Type;
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
namespace BillUntil {
|
|
4224
|
+
interface AmendmentEnd {
|
|
4225
|
+
/**
|
|
4226
|
+
* 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.
|
|
4227
|
+
*/
|
|
4228
|
+
index: number;
|
|
4229
|
+
}
|
|
4230
|
+
|
|
4231
|
+
interface Duration {
|
|
4232
|
+
/**
|
|
4233
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4234
|
+
*/
|
|
4235
|
+
interval: Duration.Interval;
|
|
4236
|
+
|
|
4237
|
+
/**
|
|
4238
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4239
|
+
*/
|
|
4240
|
+
interval_count: number;
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4243
|
+
namespace Duration {
|
|
4244
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
type Type =
|
|
4248
|
+
| 'amendment_end'
|
|
4249
|
+
| 'duration'
|
|
4250
|
+
| 'schedule_end'
|
|
4251
|
+
| 'timestamp';
|
|
4252
|
+
}
|
|
2859
4253
|
}
|
|
2860
4254
|
|
|
2861
4255
|
type ProrationBehavior =
|
|
@@ -2875,6 +4269,13 @@ declare module 'stripe' {
|
|
|
2875
4269
|
*/
|
|
2876
4270
|
billing_mode?: SubscriptionDetails.BillingMode;
|
|
2877
4271
|
|
|
4272
|
+
/**
|
|
4273
|
+
* Sets the billing schedules for the subscription.
|
|
4274
|
+
*/
|
|
4275
|
+
billing_schedules?: Stripe.Emptyable<
|
|
4276
|
+
Array<SubscriptionDetails.BillingSchedule>
|
|
4277
|
+
>;
|
|
4278
|
+
|
|
2878
4279
|
/**
|
|
2879
4280
|
* A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
|
2880
4281
|
*/
|
|
@@ -2900,6 +4301,11 @@ declare module 'stripe' {
|
|
|
2900
4301
|
*/
|
|
2901
4302
|
items?: Array<SubscriptionDetails.Item>;
|
|
2902
4303
|
|
|
4304
|
+
/**
|
|
4305
|
+
* The pre-billing to apply to the subscription as a preview.
|
|
4306
|
+
*/
|
|
4307
|
+
prebilling?: SubscriptionDetails.Prebilling;
|
|
4308
|
+
|
|
2903
4309
|
/**
|
|
2904
4310
|
* Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
|
2905
4311
|
*/
|
|
@@ -2956,6 +4362,74 @@ declare module 'stripe' {
|
|
|
2956
4362
|
type Type = 'classic' | 'flexible';
|
|
2957
4363
|
}
|
|
2958
4364
|
|
|
4365
|
+
interface BillingSchedule {
|
|
4366
|
+
/**
|
|
4367
|
+
* Configure billing schedule differently for individual subscription items.
|
|
4368
|
+
*/
|
|
4369
|
+
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
4370
|
+
|
|
4371
|
+
/**
|
|
4372
|
+
* The end date for the billing schedule.
|
|
4373
|
+
*/
|
|
4374
|
+
bill_until?: BillingSchedule.BillUntil;
|
|
4375
|
+
|
|
4376
|
+
/**
|
|
4377
|
+
* 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.
|
|
4378
|
+
*/
|
|
4379
|
+
key?: string;
|
|
4380
|
+
}
|
|
4381
|
+
|
|
4382
|
+
namespace BillingSchedule {
|
|
4383
|
+
interface AppliesTo {
|
|
4384
|
+
/**
|
|
4385
|
+
* The ID of the price object.
|
|
4386
|
+
*/
|
|
4387
|
+
price?: string;
|
|
4388
|
+
|
|
4389
|
+
/**
|
|
4390
|
+
* Controls which subscription items the billing schedule applies to.
|
|
4391
|
+
*/
|
|
4392
|
+
type: 'price';
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
interface BillUntil {
|
|
4396
|
+
/**
|
|
4397
|
+
* Specifies the billing period.
|
|
4398
|
+
*/
|
|
4399
|
+
duration?: BillUntil.Duration;
|
|
4400
|
+
|
|
4401
|
+
/**
|
|
4402
|
+
* The end date of the billing schedule.
|
|
4403
|
+
*/
|
|
4404
|
+
timestamp?: number;
|
|
4405
|
+
|
|
4406
|
+
/**
|
|
4407
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
4408
|
+
*/
|
|
4409
|
+
type: BillUntil.Type;
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4412
|
+
namespace BillUntil {
|
|
4413
|
+
interface Duration {
|
|
4414
|
+
/**
|
|
4415
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
4416
|
+
*/
|
|
4417
|
+
interval: Duration.Interval;
|
|
4418
|
+
|
|
4419
|
+
/**
|
|
4420
|
+
* The multiplier applied to the interval.
|
|
4421
|
+
*/
|
|
4422
|
+
interval_count?: number;
|
|
4423
|
+
}
|
|
4424
|
+
|
|
4425
|
+
namespace Duration {
|
|
4426
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4427
|
+
}
|
|
4428
|
+
|
|
4429
|
+
type Type = 'duration' | 'timestamp';
|
|
4430
|
+
}
|
|
4431
|
+
}
|
|
4432
|
+
|
|
2959
4433
|
type CancelAt = 'max_period_end' | 'min_period_end';
|
|
2960
4434
|
|
|
2961
4435
|
interface Item {
|
|
@@ -3034,12 +4508,56 @@ declare module 'stripe' {
|
|
|
3034
4508
|
*/
|
|
3035
4509
|
discount?: string;
|
|
3036
4510
|
|
|
4511
|
+
/**
|
|
4512
|
+
* Details to determine how long the discount should be applied for.
|
|
4513
|
+
*/
|
|
4514
|
+
discount_end?: Discount.DiscountEnd;
|
|
4515
|
+
|
|
3037
4516
|
/**
|
|
3038
4517
|
* ID of the promotion code to create a new discount for.
|
|
3039
4518
|
*/
|
|
3040
4519
|
promotion_code?: string;
|
|
3041
4520
|
}
|
|
3042
4521
|
|
|
4522
|
+
namespace Discount {
|
|
4523
|
+
interface DiscountEnd {
|
|
4524
|
+
/**
|
|
4525
|
+
* Time span for the redeemed discount.
|
|
4526
|
+
*/
|
|
4527
|
+
duration?: DiscountEnd.Duration;
|
|
4528
|
+
|
|
4529
|
+
/**
|
|
4530
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4531
|
+
*/
|
|
4532
|
+
timestamp?: number;
|
|
4533
|
+
|
|
4534
|
+
/**
|
|
4535
|
+
* The type of calculation made to determine when the discount ends.
|
|
4536
|
+
*/
|
|
4537
|
+
type: DiscountEnd.Type;
|
|
4538
|
+
}
|
|
4539
|
+
|
|
4540
|
+
namespace DiscountEnd {
|
|
4541
|
+
interface Duration {
|
|
4542
|
+
/**
|
|
4543
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4544
|
+
*/
|
|
4545
|
+
interval: Duration.Interval;
|
|
4546
|
+
|
|
4547
|
+
/**
|
|
4548
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4549
|
+
*/
|
|
4550
|
+
interval_count: number;
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
namespace Duration {
|
|
4554
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
type Type = 'duration' | 'timestamp';
|
|
4558
|
+
}
|
|
4559
|
+
}
|
|
4560
|
+
|
|
3043
4561
|
interface PriceData {
|
|
3044
4562
|
/**
|
|
3045
4563
|
* 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).
|
|
@@ -3093,6 +4611,13 @@ declare module 'stripe' {
|
|
|
3093
4611
|
}
|
|
3094
4612
|
}
|
|
3095
4613
|
|
|
4614
|
+
interface Prebilling {
|
|
4615
|
+
/**
|
|
4616
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
4617
|
+
*/
|
|
4618
|
+
iterations: number;
|
|
4619
|
+
}
|
|
4620
|
+
|
|
3096
4621
|
type ProrationBehavior =
|
|
3097
4622
|
| 'always_invoice'
|
|
3098
4623
|
| 'create_prorations'
|
|
@@ -3277,6 +4802,11 @@ declare module 'stripe' {
|
|
|
3277
4802
|
*/
|
|
3278
4803
|
id: string;
|
|
3279
4804
|
|
|
4805
|
+
/**
|
|
4806
|
+
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
4807
|
+
*/
|
|
4808
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
4809
|
+
|
|
3280
4810
|
/**
|
|
3281
4811
|
* 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
|
3282
4812
|
*/
|
|
@@ -3325,12 +4855,56 @@ declare module 'stripe' {
|
|
|
3325
4855
|
*/
|
|
3326
4856
|
discount?: string;
|
|
3327
4857
|
|
|
4858
|
+
/**
|
|
4859
|
+
* Details to determine how long the discount should be applied for.
|
|
4860
|
+
*/
|
|
4861
|
+
discount_end?: Discount.DiscountEnd;
|
|
4862
|
+
|
|
3328
4863
|
/**
|
|
3329
4864
|
* ID of the promotion code to create a new discount for.
|
|
3330
4865
|
*/
|
|
3331
4866
|
promotion_code?: string;
|
|
3332
4867
|
}
|
|
3333
4868
|
|
|
4869
|
+
namespace Discount {
|
|
4870
|
+
interface DiscountEnd {
|
|
4871
|
+
/**
|
|
4872
|
+
* Time span for the redeemed discount.
|
|
4873
|
+
*/
|
|
4874
|
+
duration?: DiscountEnd.Duration;
|
|
4875
|
+
|
|
4876
|
+
/**
|
|
4877
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4878
|
+
*/
|
|
4879
|
+
timestamp?: number;
|
|
4880
|
+
|
|
4881
|
+
/**
|
|
4882
|
+
* The type of calculation made to determine when the discount ends.
|
|
4883
|
+
*/
|
|
4884
|
+
type: DiscountEnd.Type;
|
|
4885
|
+
}
|
|
4886
|
+
|
|
4887
|
+
namespace DiscountEnd {
|
|
4888
|
+
interface Duration {
|
|
4889
|
+
/**
|
|
4890
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4891
|
+
*/
|
|
4892
|
+
interval: Duration.Interval;
|
|
4893
|
+
|
|
4894
|
+
/**
|
|
4895
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4896
|
+
*/
|
|
4897
|
+
interval_count: number;
|
|
4898
|
+
}
|
|
4899
|
+
|
|
4900
|
+
namespace Duration {
|
|
4901
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4902
|
+
}
|
|
4903
|
+
|
|
4904
|
+
type Type = 'duration' | 'timestamp';
|
|
4905
|
+
}
|
|
4906
|
+
}
|
|
4907
|
+
|
|
3334
4908
|
interface Period {
|
|
3335
4909
|
/**
|
|
3336
4910
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -3562,6 +5136,11 @@ declare module 'stripe' {
|
|
|
3562
5136
|
*/
|
|
3563
5137
|
expand?: Array<string>;
|
|
3564
5138
|
|
|
5139
|
+
/**
|
|
5140
|
+
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
5141
|
+
*/
|
|
5142
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
5143
|
+
|
|
3565
5144
|
/**
|
|
3566
5145
|
* 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
|
3567
5146
|
*/
|
|
@@ -3612,12 +5191,56 @@ declare module 'stripe' {
|
|
|
3612
5191
|
*/
|
|
3613
5192
|
discount?: string;
|
|
3614
5193
|
|
|
5194
|
+
/**
|
|
5195
|
+
* Details to determine how long the discount should be applied for.
|
|
5196
|
+
*/
|
|
5197
|
+
discount_end?: Discount.DiscountEnd;
|
|
5198
|
+
|
|
3615
5199
|
/**
|
|
3616
5200
|
* ID of the promotion code to create a new discount for.
|
|
3617
5201
|
*/
|
|
3618
5202
|
promotion_code?: string;
|
|
3619
5203
|
}
|
|
3620
5204
|
|
|
5205
|
+
namespace Discount {
|
|
5206
|
+
interface DiscountEnd {
|
|
5207
|
+
/**
|
|
5208
|
+
* Time span for the redeemed discount.
|
|
5209
|
+
*/
|
|
5210
|
+
duration?: DiscountEnd.Duration;
|
|
5211
|
+
|
|
5212
|
+
/**
|
|
5213
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
5214
|
+
*/
|
|
5215
|
+
timestamp?: number;
|
|
5216
|
+
|
|
5217
|
+
/**
|
|
5218
|
+
* The type of calculation made to determine when the discount ends.
|
|
5219
|
+
*/
|
|
5220
|
+
type: DiscountEnd.Type;
|
|
5221
|
+
}
|
|
5222
|
+
|
|
5223
|
+
namespace DiscountEnd {
|
|
5224
|
+
interface Duration {
|
|
5225
|
+
/**
|
|
5226
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
5227
|
+
*/
|
|
5228
|
+
interval: Duration.Interval;
|
|
5229
|
+
|
|
5230
|
+
/**
|
|
5231
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
5232
|
+
*/
|
|
5233
|
+
interval_count: number;
|
|
5234
|
+
}
|
|
5235
|
+
|
|
5236
|
+
namespace Duration {
|
|
5237
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
5238
|
+
}
|
|
5239
|
+
|
|
5240
|
+
type Type = 'duration' | 'timestamp';
|
|
5241
|
+
}
|
|
5242
|
+
}
|
|
5243
|
+
|
|
3621
5244
|
interface Period {
|
|
3622
5245
|
/**
|
|
3623
5246
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|