stripe 20.1.0-alpha.4 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -1920
- package/OPENAPI_VERSION +1 -1
- package/README.md +0 -1
- package/VERSION +1 -1
- package/cjs/Error.js +1 -115
- package/cjs/apiVersion.js +3 -2
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/Mandates.js +0 -5
- package/cjs/resources/PaymentIntents.js +0 -8
- package/cjs/resources/PaymentMethods.js +0 -4
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources/Subscriptions.js +0 -4
- package/cjs/resources.js +2 -148
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +0 -100
- package/esm/apiVersion.js +2 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/Mandates.js +0 -5
- package/esm/resources/PaymentIntents.js +0 -8
- package/esm/resources/PaymentMethods.js +0 -4
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/Subscriptions.js +0 -4
- package/esm/resources.js +0 -140
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinks.d.ts +1 -1
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +2 -65
- package/types/AccountSessionsResource.d.ts +0 -264
- package/types/Accounts.d.ts +25 -249
- package/types/AccountsResource.d.ts +114 -756
- package/types/ApplicationFees.d.ts +1 -6
- package/types/ApplicationFeesResource.d.ts +2 -2
- package/types/Apps/Secrets.d.ts +1 -1
- package/types/Balance.d.ts +2 -84
- package/types/BalanceSettings.d.ts +1 -1
- package/types/BalanceTransactions.d.ts +2 -3
- package/types/BankAccounts.d.ts +10 -12
- package/types/Billing/AlertTriggereds.d.ts +1 -16
- package/types/Billing/Alerts.d.ts +2 -117
- package/types/Billing/AlertsResource.d.ts +2 -149
- package/types/Billing/CreditBalanceSummary.d.ts +3 -119
- package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -14
- package/types/Billing/CreditBalanceTransactions.d.ts +2 -118
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +2 -2
- package/types/Billing/CreditGrants.d.ts +4 -74
- package/types/Billing/CreditGrantsResource.d.ts +4 -35
- package/types/Billing/MeterEventSummaries.d.ts +0 -7
- package/types/Billing/MeterEvents.d.ts +1 -1
- package/types/Billing/MeterEventsResource.d.ts +1 -1
- package/types/Billing/Meters.d.ts +0 -5
- package/types/Billing/MetersResource.d.ts +0 -17
- package/types/BillingPortal/Configurations.d.ts +10 -3
- package/types/BillingPortal/ConfigurationsResource.d.ts +20 -6
- package/types/BillingPortal/Sessions.d.ts +7 -7
- package/types/BillingPortal/SessionsResource.d.ts +7 -7
- package/types/Capabilities.d.ts +16 -18
- package/types/Cards.d.ts +2 -21
- package/types/CashBalances.d.ts +3 -3
- package/types/Charges.d.ts +59 -193
- package/types/ChargesResource.d.ts +88 -3868
- package/types/Checkout/Sessions.d.ts +20 -355
- package/types/Checkout/SessionsResource.d.ts +59 -467
- package/types/Climate/Orders.d.ts +1 -1
- package/types/Climate/OrdersResource.d.ts +2 -2
- package/types/ConfirmationTokens.d.ts +8 -123
- package/types/Coupons.d.ts +3 -38
- package/types/CouponsResource.d.ts +2 -25
- package/types/CreditNoteLineItems.d.ts +3 -17
- package/types/CreditNotes.d.ts +8 -5
- package/types/CreditNotesResource.d.ts +5 -5
- package/types/CustomerBalanceTransactions.d.ts +9 -6
- package/types/CustomerCashBalanceTransactions.d.ts +13 -10
- package/types/CustomerSessions.d.ts +1 -42
- package/types/CustomerSessionsResource.d.ts +0 -41
- package/types/Customers.d.ts +8 -5
- package/types/CustomersResource.d.ts +21 -23
- package/types/Discounts.d.ts +6 -16
- package/types/Disputes.d.ts +3 -43
- package/types/DisputesResource.d.ts +1 -12
- package/types/Entitlements/ActiveEntitlements.d.ts +1 -1
- package/types/Errors.d.ts +0 -85
- package/types/EventTypes.d.ts +0 -630
- package/types/Events.d.ts +1 -97
- package/types/ExchangeRates.d.ts +2 -2
- package/types/FeeRefunds.d.ts +2 -2
- package/types/FileLinks.d.ts +1 -1
- package/types/FileLinksResource.d.ts +2 -2
- package/types/Files.d.ts +4 -4
- package/types/FilesResource.d.ts +3 -3
- package/types/FinancialConnections/Accounts.d.ts +4 -37
- package/types/FinancialConnections/AccountsResource.d.ts +6 -38
- package/types/FinancialConnections/Sessions.d.ts +3 -51
- package/types/FinancialConnections/SessionsResource.d.ts +4 -41
- package/types/Forwarding/Requests.d.ts +1 -1
- package/types/Forwarding/RequestsResource.d.ts +1 -1
- package/types/FundingInstructions.d.ts +2 -2
- package/types/Identity/VerificationReports.d.ts +8 -18
- package/types/Identity/VerificationReportsResource.d.ts +0 -5
- package/types/Identity/VerificationSessions.d.ts +11 -11
- package/types/Identity/VerificationSessionsResource.d.ts +18 -12
- package/types/InvoiceItems.d.ts +10 -130
- package/types/InvoiceItemsResource.d.ts +16 -114
- package/types/InvoiceLineItems.d.ts +12 -172
- package/types/InvoicePayments.d.ts +1 -1
- package/types/InvoiceRenderingTemplates.d.ts +1 -1
- package/types/Invoices.d.ts +60 -217
- package/types/InvoicesResource.d.ts +141 -1819
- package/types/Issuing/Authorizations.d.ts +20 -20
- package/types/Issuing/AuthorizationsResource.d.ts +4 -4
- package/types/Issuing/Cardholders.d.ts +13 -13
- package/types/Issuing/CardholdersResource.d.ts +21 -22
- package/types/Issuing/Cards.d.ts +10 -10
- package/types/Issuing/CardsResource.d.ts +13 -13
- package/types/Issuing/Disputes.d.ts +7 -7
- package/types/Issuing/DisputesResource.d.ts +5 -5
- package/types/Issuing/PersonalizationDesigns.d.ts +1 -1
- package/types/Issuing/PersonalizationDesignsResource.d.ts +2 -2
- package/types/Issuing/Tokens.d.ts +1 -1
- package/types/Issuing/Transactions.d.ts +12 -17
- package/types/Issuing/TransactionsResource.d.ts +1 -6
- package/types/LineItems.d.ts +4 -48
- package/types/LoginLinks.d.ts +1 -1
- package/types/Mandates.d.ts +1 -69
- package/types/MandatesResource.d.ts +0 -31
- package/types/PaymentAttemptRecords.d.ts +119 -135
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +3 -3
- package/types/PaymentIntents.d.ts +48 -744
- package/types/PaymentIntentsResource.d.ts +6824 -19519
- package/types/PaymentLinks.d.ts +7 -12
- package/types/PaymentLinksResource.d.ts +28 -38
- package/types/PaymentMethodConfigurations.d.ts +4 -184
- package/types/PaymentMethodConfigurationsResource.d.ts +76 -326
- package/types/PaymentMethodDomains.d.ts +1 -1
- package/types/PaymentMethods.d.ts +10 -130
- package/types/PaymentMethodsResource.d.ts +7 -136
- package/types/PaymentRecords.d.ts +126 -135
- package/types/PaymentRecordsResource.d.ts +7 -7
- package/types/Payouts.d.ts +7 -7
- package/types/PayoutsResource.d.ts +3 -3
- package/types/Persons.d.ts +21 -51
- package/types/Plans.d.ts +5 -5
- package/types/PlansResource.d.ts +6 -6
- package/types/Prices.d.ts +6 -28
- package/types/PricesResource.d.ts +10 -32
- package/types/Products.d.ts +10 -10
- package/types/ProductsResource.d.ts +14 -14
- package/types/PromotionCodes.d.ts +5 -5
- package/types/PromotionCodesResource.d.ts +5 -5
- package/types/Quotes.d.ts +14 -884
- package/types/QuotesResource.d.ts +302 -3250
- package/types/Radar/EarlyFraudWarnings.d.ts +1 -1
- package/types/Radar/ValueListItems.d.ts +1 -1
- package/types/Radar/ValueLists.d.ts +2 -2
- package/types/Radar/ValueListsResource.d.ts +2 -2
- package/types/Refunds.d.ts +3 -17
- package/types/RefundsResource.d.ts +3 -3
- package/types/Reporting/ReportRuns.d.ts +3 -3
- package/types/Reporting/ReportRunsResource.d.ts +2 -2
- package/types/Reporting/ReportTypes.d.ts +3 -3
- package/types/Reviews.d.ts +1 -1
- package/types/SetupAttempts.d.ts +22 -60
- package/types/SetupIntents.d.ts +22 -178
- package/types/SetupIntentsResource.d.ts +50 -763
- package/types/ShippingRates.d.ts +3 -3
- package/types/ShippingRatesResource.d.ts +3 -3
- package/types/Sigma/ScheduledQueryRuns.d.ts +1 -1
- package/types/SourceMandateNotifications.d.ts +3 -3
- package/types/Sources.d.ts +5 -34
- package/types/SourcesResource.d.ts +2 -2
- package/types/SubscriptionItems.d.ts +7 -46
- package/types/SubscriptionItemsResource.d.ts +22 -165
- package/types/SubscriptionSchedules.d.ts +9 -333
- package/types/SubscriptionSchedulesResource.d.ts +79 -1535
- package/types/Subscriptions.d.ts +41 -273
- package/types/SubscriptionsResource.d.ts +94 -768
- package/types/Tax/Associations.d.ts +3 -3
- package/types/Tax/AssociationsResource.d.ts +1 -1
- package/types/Tax/CalculationLineItems.d.ts +7 -7
- package/types/Tax/Calculations.d.ts +12 -12
- package/types/Tax/CalculationsResource.d.ts +7 -7
- package/types/Tax/Registrations.d.ts +3 -3
- package/types/Tax/Settings.d.ts +1 -1
- package/types/Tax/SettingsResource.d.ts +1 -1
- package/types/Tax/TransactionLineItems.d.ts +5 -5
- package/types/Tax/Transactions.d.ts +9 -9
- package/types/Tax/TransactionsResource.d.ts +10 -10
- package/types/TaxIds.d.ts +6 -6
- package/types/TaxIdsResource.d.ts +4 -4
- package/types/TaxRates.d.ts +1 -1
- package/types/TaxRatesResource.d.ts +2 -2
- package/types/Terminal/Configurations.d.ts +0 -9
- package/types/Terminal/ConfigurationsResource.d.ts +0 -28
- package/types/Terminal/ConnectionTokens.d.ts +1 -1
- package/types/Terminal/Locations.d.ts +2 -2
- package/types/Terminal/LocationsResource.d.ts +3 -3
- package/types/Terminal/Readers.d.ts +10 -30
- package/types/Terminal/ReadersResource.d.ts +7 -7
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +5 -107
- package/types/TestHelpers/CustomersResource.d.ts +2 -2
- package/types/TestHelpers/Issuing/AuthorizationsResource.d.ts +10 -10
- package/types/TestHelpers/Issuing/TransactionsResource.d.ts +5 -5
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +1 -27
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +1 -27
- package/types/Tokens.d.ts +4 -4
- package/types/TokensResource.d.ts +17 -85
- package/types/Topups.d.ts +3 -3
- package/types/TopupsResource.d.ts +3 -3
- package/types/TransferReversals.d.ts +4 -4
- package/types/Transfers.d.ts +5 -14
- package/types/TransfersResource.d.ts +6 -13
- package/types/Treasury/CreditReversals.d.ts +3 -3
- package/types/Treasury/CreditReversalsResource.d.ts +1 -1
- package/types/Treasury/DebitReversals.d.ts +3 -3
- package/types/Treasury/DebitReversalsResource.d.ts +1 -1
- package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
- package/types/Treasury/FinancialAccounts.d.ts +1 -6
- package/types/Treasury/FinancialAccountsResource.d.ts +2 -39
- package/types/Treasury/InboundTransfers.d.ts +4 -4
- package/types/Treasury/InboundTransfersResource.d.ts +2 -2
- package/types/Treasury/OutboundPayments.d.ts +5 -5
- package/types/Treasury/OutboundPaymentsResource.d.ts +4 -4
- package/types/Treasury/OutboundTransfers.d.ts +4 -30
- package/types/Treasury/OutboundTransfersResource.d.ts +3 -29
- package/types/Treasury/ReceivedCredits.d.ts +9 -35
- package/types/Treasury/ReceivedDebits.d.ts +6 -37
- package/types/Treasury/TransactionEntries.d.ts +11 -11
- package/types/Treasury/Transactions.d.ts +11 -11
- package/types/V2/Core/AccountLinks.d.ts +13 -21
- package/types/V2/Core/AccountLinksResource.d.ts +8 -16
- package/types/V2/Core/AccountPersons.d.ts +55 -10
- package/types/V2/Core/AccountTokensResource.d.ts +99 -267
- package/types/V2/Core/Accounts/PersonTokensResource.d.ts +48 -3
- package/types/V2/Core/Accounts/PersonsResource.d.ts +101 -11
- package/types/V2/Core/Accounts.d.ts +263 -2861
- package/types/V2/Core/AccountsResource.d.ts +594 -2554
- package/types/V2/Core/EventTypes.d.ts +10 -4813
- package/types/V2/Core/Events.d.ts +0 -61
- package/types/V2/Core/EventsResource.d.ts +1 -11
- package/types/WebhookEndpoints.d.ts +1 -1
- package/types/WebhookEndpointsResource.d.ts +5 -79
- package/types/Webhooks.d.ts +0 -2
- package/types/apiVersion.d.ts +2 -1
- package/types/index.d.ts +0 -233
- package/types/lib.d.ts +0 -10
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/BalanceTransfers.js +0 -9
- package/cjs/resources/Billing/Analytics/MeterUsage.js +0 -12
- package/cjs/resources/Capital/FinancingOffers.js +0 -21
- package/cjs/resources/Capital/FinancingSummary.js +0 -12
- package/cjs/resources/Capital/FinancingTransactions.js +0 -17
- package/cjs/resources/DelegatedCheckout/RequestedSessions.js +0 -28
- package/cjs/resources/ExternalAccounts.js +0 -23
- package/cjs/resources/FinancialConnections/Institutions.js +0 -17
- package/cjs/resources/FxQuotes.js +0 -15
- package/cjs/resources/Identity/BlocklistEntries.js +0 -25
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
- package/cjs/resources/Issuing/Programs.js +0 -22
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/Privacy/RedactionJobs.js +0 -42
- package/cjs/resources/ProductCatalog/TrialOffers.js +0 -12
- package/cjs/resources/Radar/AccountEvaluations.js +0 -20
- package/cjs/resources/Tax/Forms.js +0 -20
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +0 -16
- package/cjs/resources/V2/Billing/BillSettings/Versions.js +0 -17
- package/cjs/resources/V2/Billing/BillSettings.js +0 -27
- package/cjs/resources/V2/Billing/Cadences.js +0 -23
- package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +0 -17
- package/cjs/resources/V2/Billing/CollectionSettings.js +0 -30
- package/cjs/resources/V2/Billing/CustomPricingUnits.js +0 -25
- package/cjs/resources/V2/Billing/Intents/Actions.js +0 -17
- package/cjs/resources/V2/Billing/Intents.js +0 -36
- package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +0 -12
- package/cjs/resources/V2/Billing/LicenseFees/Versions.js +0 -17
- package/cjs/resources/V2/Billing/LicenseFees.js +0 -27
- package/cjs/resources/V2/Billing/LicensedItems.js +0 -25
- package/cjs/resources/V2/Billing/MeteredItems.js +0 -22
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +0 -12
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +0 -26
- package/cjs/resources/V2/Billing/PricingPlans/Components.js +0 -29
- package/cjs/resources/V2/Billing/PricingPlans/Versions.js +0 -17
- package/cjs/resources/V2/Billing/PricingPlans.js +0 -29
- package/cjs/resources/V2/Billing/Profiles.js +0 -19
- package/cjs/resources/V2/Billing/RateCardSubscriptions.js +0 -29
- package/cjs/resources/V2/Billing/RateCards/Rates.js +0 -25
- package/cjs/resources/V2/Billing/RateCards/Versions.js +0 -17
- package/cjs/resources/V2/Billing/RateCards.js +0 -29
- package/cjs/resources/V2/Billing/ServiceActions.js +0 -20
- package/cjs/resources/V2/Core/ClaimableSandboxes.js +0 -16
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -33
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -37
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
- package/cjs/resources/V2/MoneyManagement/CurrencyConversions.js +0 -21
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -29
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +0 -20
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
- package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
- package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -29
- package/cjs/resources/V2/Reporting/ReportRuns.js +0 -13
- package/cjs/resources/V2/Reporting/Reports.js +0 -12
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
- package/cjs/resources/V2/TestHelpers/MoneyManagement.js +0 -12
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/BalanceTransfers.js +0 -6
- package/esm/resources/Billing/Analytics/MeterUsage.js +0 -9
- package/esm/resources/Capital/FinancingOffers.js +0 -18
- package/esm/resources/Capital/FinancingSummary.js +0 -9
- package/esm/resources/Capital/FinancingTransactions.js +0 -14
- package/esm/resources/DelegatedCheckout/RequestedSessions.js +0 -25
- package/esm/resources/ExternalAccounts.js +0 -20
- package/esm/resources/FinancialConnections/Institutions.js +0 -14
- package/esm/resources/FxQuotes.js +0 -12
- package/esm/resources/Identity/BlocklistEntries.js +0 -22
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
- package/esm/resources/Issuing/Programs.js +0 -19
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/Privacy/RedactionJobs.js +0 -39
- package/esm/resources/ProductCatalog/TrialOffers.js +0 -9
- package/esm/resources/Radar/AccountEvaluations.js +0 -17
- package/esm/resources/Tax/Forms.js +0 -17
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- package/esm/resources/TestHelpers/Capital/FinancingOffers.js +0 -13
- package/esm/resources/V2/Billing/BillSettings/Versions.js +0 -14
- package/esm/resources/V2/Billing/BillSettings.js +0 -24
- package/esm/resources/V2/Billing/Cadences.js +0 -20
- package/esm/resources/V2/Billing/CollectionSettings/Versions.js +0 -14
- package/esm/resources/V2/Billing/CollectionSettings.js +0 -27
- package/esm/resources/V2/Billing/CustomPricingUnits.js +0 -22
- package/esm/resources/V2/Billing/Intents/Actions.js +0 -14
- package/esm/resources/V2/Billing/Intents.js +0 -33
- package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +0 -9
- package/esm/resources/V2/Billing/LicenseFees/Versions.js +0 -14
- package/esm/resources/V2/Billing/LicenseFees.js +0 -24
- package/esm/resources/V2/Billing/LicensedItems.js +0 -22
- package/esm/resources/V2/Billing/MeteredItems.js +0 -19
- package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +0 -9
- package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +0 -23
- package/esm/resources/V2/Billing/PricingPlans/Components.js +0 -26
- package/esm/resources/V2/Billing/PricingPlans/Versions.js +0 -14
- package/esm/resources/V2/Billing/PricingPlans.js +0 -26
- package/esm/resources/V2/Billing/Profiles.js +0 -16
- package/esm/resources/V2/Billing/RateCardSubscriptions.js +0 -26
- package/esm/resources/V2/Billing/RateCards/Rates.js +0 -22
- package/esm/resources/V2/Billing/RateCards/Versions.js +0 -14
- package/esm/resources/V2/Billing/RateCards.js +0 -26
- package/esm/resources/V2/Billing/ServiceActions.js +0 -17
- package/esm/resources/V2/Core/ClaimableSandboxes.js +0 -13
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -30
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -34
- package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
- package/esm/resources/V2/MoneyManagement/CurrencyConversions.js +0 -18
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -26
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
- package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +0 -17
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
- package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
- package/esm/resources/V2/Payments/OffSessionPayments.js +0 -26
- package/esm/resources/V2/Reporting/ReportRuns.js +0 -10
- package/esm/resources/V2/Reporting/Reports.js +0 -9
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
- package/esm/resources/V2/TestHelpers/MoneyManagement.js +0 -9
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/BalanceTransfers.d.ts +0 -122
- package/types/BalanceTransfersResource.d.ts +0 -87
- package/types/Billing/Analytics/MeterUsage.d.ts +0 -31
- package/types/Billing/Analytics/MeterUsageResource.d.ts +0 -694
- package/types/Billing/Analytics/MeterUsageRows.d.ts +0 -58
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/DelegatedCheckout/RequestedSessions.d.ts +0 -399
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +0 -599
- package/types/ExternalAccountsResource.d.ts +0 -304
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -98
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/FxQuotes.d.ts +0 -155
- package/types/FxQuotesResource.d.ts +0 -130
- package/types/Identity/BlocklistEntries.d.ts +0 -78
- package/types/Identity/BlocklistEntriesResource.d.ts +0 -146
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
- package/types/Issuing/Programs.d.ts +0 -42
- package/types/Issuing/ProgramsResource.d.ts +0 -96
- package/types/Issuing/Settlements.d.ts +0 -113
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1163
- package/types/OrdersResource.d.ts +0 -5505
- package/types/PaymentMethodBalances.d.ts +0 -63
- package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
- package/types/Privacy/RedactionJobs.d.ts +0 -111
- package/types/Privacy/RedactionJobsResource.d.ts +0 -230
- package/types/ProductCatalog/TrialOffers.d.ts +0 -77
- package/types/ProductCatalog/TrialOffersResource.d.ts +0 -80
- package/types/QuoteLines.d.ts +0 -651
- package/types/QuotePreviewInvoices.d.ts +0 -1784
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -1034
- package/types/Radar/AccountEvaluations.d.ts +0 -88
- package/types/Radar/AccountEvaluationsResource.d.ts +0 -148
- package/types/Tax/Forms.d.ts +0 -220
- package/types/Tax/FormsResource.d.ts +0 -107
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
- package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +0 -130
- package/types/TransitBalances.d.ts +0 -40
- package/types/V2/Billing/BillSettingVersions.d.ts +0 -97
- package/types/V2/Billing/BillSettings/VersionsResource.d.ts +0 -58
- package/types/V2/Billing/BillSettings.d.ts +0 -120
- package/types/V2/Billing/BillSettingsResource.d.ts +0 -241
- package/types/V2/Billing/Cadences.d.ts +0 -735
- package/types/V2/Billing/CadencesResource.d.ts +0 -516
- package/types/V2/Billing/CollectionSettingVersions.d.ts +0 -318
- package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +0 -62
- package/types/V2/Billing/CollectionSettings.d.ts +0 -341
- package/types/V2/Billing/CollectionSettingsResource.d.ts +0 -683
- package/types/V2/Billing/CustomPricingUnits.d.ts +0 -56
- package/types/V2/Billing/CustomPricingUnitsResource.d.ts +0 -122
- package/types/V2/Billing/IntentActions.d.ts +0 -459
- package/types/V2/Billing/Intents/ActionsResource.d.ts +0 -58
- package/types/V2/Billing/Intents.d.ts +0 -117
- package/types/V2/Billing/IntentsResource.d.ts +0 -575
- package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +0 -64
- package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +0 -28
- package/types/V2/Billing/LicenseFeeVersions.d.ts +0 -106
- package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +0 -58
- package/types/V2/Billing/LicenseFees.d.ts +0 -164
- package/types/V2/Billing/LicenseFeesResource.d.ts +0 -290
- package/types/V2/Billing/LicensedItems.d.ts +0 -73
- package/types/V2/Billing/LicensedItemsResource.d.ts +0 -157
- package/types/V2/Billing/MeteredItems.d.ts +0 -101
- package/types/V2/Billing/MeteredItemsResource.d.ts +0 -189
- package/types/V2/Billing/PricingPlanComponents.d.ts +0 -109
- package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +0 -57
- package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +0 -40
- package/types/V2/Billing/PricingPlanSubscriptions.d.ts +0 -144
- package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +0 -120
- package/types/V2/Billing/PricingPlanVersions.d.ts +0 -49
- package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +0 -197
- package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +0 -58
- package/types/V2/Billing/PricingPlans.d.ts +0 -84
- package/types/V2/Billing/PricingPlansResource.d.ts +0 -151
- package/types/V2/Billing/Profiles.d.ts +0 -70
- package/types/V2/Billing/ProfilesResource.d.ts +0 -150
- package/types/V2/Billing/RateCardRates.d.ts +0 -144
- package/types/V2/Billing/RateCardSubscriptions.d.ts +0 -144
- package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +0 -157
- package/types/V2/Billing/RateCardVersions.d.ts +0 -39
- package/types/V2/Billing/RateCards/RatesResource.d.ts +0 -203
- package/types/V2/Billing/RateCards/VersionsResource.d.ts +0 -58
- package/types/V2/Billing/RateCards.d.ts +0 -98
- package/types/V2/Billing/RateCardsResource.d.ts +0 -162
- package/types/V2/Billing/ServiceActions.d.ts +0 -298
- package/types/V2/Billing/ServiceActionsResource.d.ts +0 -394
- package/types/V2/Core/ClaimableSandboxes.d.ts +0 -132
- package/types/V2/Core/ClaimableSandboxesResource.d.ts +0 -74
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -194
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -116
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -198
- package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -46
- package/types/V2/MoneyManagement/Adjustments.d.ts +0 -122
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
- package/types/V2/MoneyManagement/CurrencyConversions.d.ts +0 -98
- package/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts +0 -141
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -186
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -172
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -178
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -126
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -250
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -156
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -222
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -127
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -323
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -259
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -330
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -296
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -225
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -201
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +0 -93
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -347
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -248
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
- package/types/V2/MoneyManagement/RecipientVerifications.d.ts +0 -112
- package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +0 -77
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -200
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
- package/types/V2/MoneyManagement/Transactions.d.ts +0 -227
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
- package/types/V2/Payments/OffSessionPayments.d.ts +0 -249
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -306
- package/types/V2/Reporting/ReportRuns.d.ts +0 -154
- package/types/V2/Reporting/ReportRunsResource.d.ts +0 -75
- package/types/V2/Reporting/Reports.d.ts +0 -120
- package/types/V2/Reporting/ReportsResource.d.ts +0 -30
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -85
- package/types/V2/TestHelpers/MoneyManagementResource.d.ts +0 -49
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
declare module 'stripe' {
|
|
4
4
|
namespace Stripe {
|
|
5
5
|
interface QuoteCreateParams {
|
|
6
|
-
/**
|
|
7
|
-
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
8
|
-
*/
|
|
9
|
-
allow_backdated_lines?: boolean;
|
|
10
|
-
|
|
11
6
|
/**
|
|
12
7
|
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
|
13
8
|
*/
|
|
@@ -89,12 +84,7 @@ declare module 'stripe' {
|
|
|
89
84
|
line_items?: Array<QuoteCreateParams.LineItem>;
|
|
90
85
|
|
|
91
86
|
/**
|
|
92
|
-
*
|
|
93
|
-
*/
|
|
94
|
-
lines?: Array<QuoteCreateParams.Line>;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* 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`.
|
|
87
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
98
88
|
*/
|
|
99
89
|
metadata?: Stripe.MetadataParam;
|
|
100
90
|
|
|
@@ -108,13 +98,6 @@ declare module 'stripe' {
|
|
|
108
98
|
*/
|
|
109
99
|
subscription_data?: QuoteCreateParams.SubscriptionData;
|
|
110
100
|
|
|
111
|
-
/**
|
|
112
|
-
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
113
|
-
*/
|
|
114
|
-
subscription_data_overrides?: Array<
|
|
115
|
-
QuoteCreateParams.SubscriptionDataOverride
|
|
116
|
-
>;
|
|
117
|
-
|
|
118
101
|
/**
|
|
119
102
|
* ID of the test clock to attach to the quote.
|
|
120
103
|
*/
|
|
@@ -170,56 +153,12 @@ declare module 'stripe' {
|
|
|
170
153
|
*/
|
|
171
154
|
discount?: string;
|
|
172
155
|
|
|
173
|
-
/**
|
|
174
|
-
* Details to determine how long the discount should be applied for.
|
|
175
|
-
*/
|
|
176
|
-
discount_end?: Discount.DiscountEnd;
|
|
177
|
-
|
|
178
156
|
/**
|
|
179
157
|
* ID of the promotion code to create a new discount for.
|
|
180
158
|
*/
|
|
181
159
|
promotion_code?: string;
|
|
182
160
|
}
|
|
183
161
|
|
|
184
|
-
namespace Discount {
|
|
185
|
-
interface DiscountEnd {
|
|
186
|
-
/**
|
|
187
|
-
* Time span for the redeemed discount.
|
|
188
|
-
*/
|
|
189
|
-
duration?: DiscountEnd.Duration;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
193
|
-
*/
|
|
194
|
-
timestamp?: number;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* The type of calculation made to determine when the discount ends.
|
|
198
|
-
*/
|
|
199
|
-
type: DiscountEnd.Type;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
namespace DiscountEnd {
|
|
203
|
-
interface Duration {
|
|
204
|
-
/**
|
|
205
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
206
|
-
*/
|
|
207
|
-
interval: Duration.Interval;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
211
|
-
*/
|
|
212
|
-
interval_count: number;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
namespace Duration {
|
|
216
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
type Type = 'duration' | 'timestamp';
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
162
|
interface FromQuote {
|
|
224
163
|
/**
|
|
225
164
|
* Whether this quote is a revision of the previous quote.
|
|
@@ -262,3213 +201,485 @@ declare module 'stripe' {
|
|
|
262
201
|
}
|
|
263
202
|
}
|
|
264
203
|
|
|
265
|
-
interface
|
|
266
|
-
/**
|
|
267
|
-
* An array of operations the quote line performs.
|
|
268
|
-
*/
|
|
269
|
-
actions?: Array<Line.Action>;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Details to identify the subscription schedule the quote line applies to.
|
|
273
|
-
*/
|
|
274
|
-
applies_to?: Line.AppliesTo;
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
|
278
|
-
*/
|
|
279
|
-
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
|
283
|
-
*/
|
|
284
|
-
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
|
288
|
-
*/
|
|
289
|
-
ends_at?: Line.EndsAt;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
|
|
293
|
-
*/
|
|
294
|
-
proration_behavior?: Line.ProrationBehavior;
|
|
295
|
-
|
|
204
|
+
interface LineItem {
|
|
296
205
|
/**
|
|
297
|
-
*
|
|
206
|
+
* The discounts applied to this line item.
|
|
298
207
|
*/
|
|
299
|
-
|
|
208
|
+
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
300
209
|
|
|
301
210
|
/**
|
|
302
|
-
*
|
|
211
|
+
* The ID of the price object. One of `price` or `price_data` is required.
|
|
303
212
|
*/
|
|
304
|
-
|
|
213
|
+
price?: string;
|
|
305
214
|
|
|
306
215
|
/**
|
|
307
|
-
*
|
|
216
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
|
|
308
217
|
*/
|
|
309
|
-
|
|
218
|
+
price_data?: LineItem.PriceData;
|
|
310
219
|
|
|
311
220
|
/**
|
|
312
|
-
*
|
|
221
|
+
* The quantity of the line item.
|
|
313
222
|
*/
|
|
314
|
-
|
|
223
|
+
quantity?: number;
|
|
315
224
|
|
|
316
225
|
/**
|
|
317
|
-
*
|
|
226
|
+
* The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
|
318
227
|
*/
|
|
319
|
-
|
|
228
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
320
229
|
}
|
|
321
230
|
|
|
322
|
-
namespace
|
|
323
|
-
interface
|
|
324
|
-
/**
|
|
325
|
-
* Details for the `add_discount` type.
|
|
326
|
-
*/
|
|
327
|
-
add_discount?: Action.AddDiscount;
|
|
328
|
-
|
|
231
|
+
namespace LineItem {
|
|
232
|
+
interface Discount {
|
|
329
233
|
/**
|
|
330
|
-
*
|
|
234
|
+
* ID of the coupon to create a new discount for.
|
|
331
235
|
*/
|
|
332
|
-
|
|
236
|
+
coupon?: string;
|
|
333
237
|
|
|
334
238
|
/**
|
|
335
|
-
*
|
|
239
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
336
240
|
*/
|
|
337
|
-
|
|
338
|
-
[key: string]: string;
|
|
339
|
-
};
|
|
241
|
+
discount?: string;
|
|
340
242
|
|
|
341
243
|
/**
|
|
342
|
-
*
|
|
244
|
+
* ID of the promotion code to create a new discount for.
|
|
343
245
|
*/
|
|
344
|
-
|
|
246
|
+
promotion_code?: string;
|
|
247
|
+
}
|
|
345
248
|
|
|
249
|
+
interface PriceData {
|
|
346
250
|
/**
|
|
347
|
-
*
|
|
251
|
+
* 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).
|
|
348
252
|
*/
|
|
349
|
-
|
|
253
|
+
currency: string;
|
|
350
254
|
|
|
351
255
|
/**
|
|
352
|
-
*
|
|
256
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
353
257
|
*/
|
|
354
|
-
|
|
258
|
+
product: string;
|
|
355
259
|
|
|
356
260
|
/**
|
|
357
|
-
*
|
|
261
|
+
* The recurring components of a price such as `interval` and `interval_count`.
|
|
358
262
|
*/
|
|
359
|
-
|
|
263
|
+
recurring?: PriceData.Recurring;
|
|
360
264
|
|
|
361
265
|
/**
|
|
362
|
-
*
|
|
266
|
+
* Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
363
267
|
*/
|
|
364
|
-
|
|
268
|
+
tax_behavior?: PriceData.TaxBehavior;
|
|
365
269
|
|
|
366
270
|
/**
|
|
367
|
-
*
|
|
271
|
+
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
368
272
|
*/
|
|
369
|
-
|
|
370
|
-
[key: string]: string;
|
|
371
|
-
}>;
|
|
273
|
+
unit_amount?: number;
|
|
372
274
|
|
|
373
275
|
/**
|
|
374
|
-
*
|
|
276
|
+
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
375
277
|
*/
|
|
376
|
-
|
|
278
|
+
unit_amount_decimal?: string;
|
|
377
279
|
}
|
|
378
280
|
|
|
379
|
-
namespace
|
|
380
|
-
interface
|
|
381
|
-
/**
|
|
382
|
-
* The coupon code to redeem.
|
|
383
|
-
*/
|
|
384
|
-
coupon?: string;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
388
|
-
*/
|
|
389
|
-
discount?: string;
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Details to determine how long the discount should be applied for.
|
|
393
|
-
*/
|
|
394
|
-
discount_end?: AddDiscount.DiscountEnd;
|
|
395
|
-
|
|
281
|
+
namespace PriceData {
|
|
282
|
+
interface Recurring {
|
|
396
283
|
/**
|
|
397
|
-
*
|
|
284
|
+
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
398
285
|
*/
|
|
399
|
-
|
|
286
|
+
interval: Recurring.Interval;
|
|
400
287
|
|
|
401
288
|
/**
|
|
402
|
-
* The
|
|
289
|
+
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
403
290
|
*/
|
|
404
|
-
|
|
291
|
+
interval_count?: number;
|
|
405
292
|
}
|
|
406
293
|
|
|
407
|
-
namespace
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* The type of calculation made to determine when the discount ends.
|
|
411
|
-
*/
|
|
412
|
-
type: 'line_ends_at';
|
|
413
|
-
}
|
|
294
|
+
namespace Recurring {
|
|
295
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
414
296
|
}
|
|
415
297
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
*/
|
|
420
|
-
discounts?: Array<AddItem.Discount>;
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* 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`.
|
|
424
|
-
*/
|
|
425
|
-
metadata?: Stripe.MetadataParam;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* The ID of the price object.
|
|
429
|
-
*/
|
|
430
|
-
price: string;
|
|
298
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
299
|
+
}
|
|
300
|
+
}
|
|
431
301
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
302
|
+
interface SubscriptionData {
|
|
303
|
+
/**
|
|
304
|
+
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
305
|
+
*/
|
|
306
|
+
billing_mode?: SubscriptionData.BillingMode;
|
|
436
307
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
308
|
+
/**
|
|
309
|
+
* The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
310
|
+
*/
|
|
311
|
+
description?: string;
|
|
441
312
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
313
|
+
/**
|
|
314
|
+
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
315
|
+
*/
|
|
316
|
+
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
446
317
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}
|
|
318
|
+
/**
|
|
319
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
|
320
|
+
*/
|
|
321
|
+
metadata?: Stripe.MetadataParam;
|
|
452
322
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
coupon?: string;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
462
|
-
*/
|
|
463
|
-
discount?: string;
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Details to determine how long the discount should be applied for.
|
|
467
|
-
*/
|
|
468
|
-
discount_end?: Discount.DiscountEnd;
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* ID of the promotion code to create a new discount for.
|
|
472
|
-
*/
|
|
473
|
-
promotion_code?: string;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
namespace Discount {
|
|
477
|
-
interface DiscountEnd {
|
|
478
|
-
/**
|
|
479
|
-
* Time span for the redeemed discount.
|
|
480
|
-
*/
|
|
481
|
-
duration?: DiscountEnd.Duration;
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
485
|
-
*/
|
|
486
|
-
timestamp?: number;
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* The type of calculation made to determine when the discount ends.
|
|
490
|
-
*/
|
|
491
|
-
type: DiscountEnd.Type;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
namespace DiscountEnd {
|
|
495
|
-
interface Duration {
|
|
496
|
-
/**
|
|
497
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
498
|
-
*/
|
|
499
|
-
interval: Duration.Interval;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
503
|
-
*/
|
|
504
|
-
interval_count: number;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
namespace Duration {
|
|
508
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
type Type = 'duration' | 'timestamp';
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
interface Trial {
|
|
516
|
-
/**
|
|
517
|
-
* 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.
|
|
518
|
-
*/
|
|
519
|
-
converts_to?: Array<string>;
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* Determines the type of trial for this item.
|
|
523
|
-
*/
|
|
524
|
-
type: Trial.Type;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
namespace Trial {
|
|
528
|
-
type Type = 'free' | 'paid';
|
|
529
|
-
}
|
|
530
|
-
}
|
|
323
|
+
/**
|
|
324
|
+
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
325
|
+
*/
|
|
326
|
+
trial_period_days?: Stripe.Emptyable<number>;
|
|
327
|
+
}
|
|
531
328
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
329
|
+
namespace SubscriptionData {
|
|
330
|
+
interface BillingMode {
|
|
331
|
+
/**
|
|
332
|
+
* Configure behavior for flexible billing mode.
|
|
333
|
+
*/
|
|
334
|
+
flexible?: BillingMode.Flexible;
|
|
537
335
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
336
|
+
/**
|
|
337
|
+
* Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
|
|
338
|
+
*/
|
|
339
|
+
type: BillingMode.Type;
|
|
340
|
+
}
|
|
542
341
|
|
|
342
|
+
namespace BillingMode {
|
|
343
|
+
interface Flexible {
|
|
543
344
|
/**
|
|
544
|
-
*
|
|
345
|
+
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
545
346
|
*/
|
|
546
|
-
|
|
347
|
+
proration_discounts?: Flexible.ProrationDiscounts;
|
|
547
348
|
}
|
|
548
349
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
* ID of a price to remove.
|
|
552
|
-
*/
|
|
553
|
-
price: string;
|
|
350
|
+
namespace Flexible {
|
|
351
|
+
type ProrationDiscounts = 'included' | 'itemized';
|
|
554
352
|
}
|
|
555
353
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
*/
|
|
560
|
-
coupon?: string;
|
|
561
|
-
|
|
562
|
-
/**
|
|
563
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
564
|
-
*/
|
|
565
|
-
discount?: string;
|
|
354
|
+
type Type = 'classic' | 'flexible';
|
|
355
|
+
}
|
|
356
|
+
}
|
|
566
357
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
358
|
+
interface TransferData {
|
|
359
|
+
/**
|
|
360
|
+
* The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
|
361
|
+
*/
|
|
362
|
+
amount?: number;
|
|
572
363
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
discounts?: Array<SetItem.Discount>;
|
|
364
|
+
/**
|
|
365
|
+
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
|
366
|
+
*/
|
|
367
|
+
amount_percent?: number;
|
|
578
368
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
369
|
+
/**
|
|
370
|
+
* ID of an existing, connected Stripe account.
|
|
371
|
+
*/
|
|
372
|
+
destination: string;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
583
375
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
376
|
+
interface QuoteRetrieveParams {
|
|
377
|
+
/**
|
|
378
|
+
* Specifies which fields in the response should be expanded.
|
|
379
|
+
*/
|
|
380
|
+
expand?: Array<string>;
|
|
381
|
+
}
|
|
588
382
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
383
|
+
interface QuoteUpdateParams {
|
|
384
|
+
/**
|
|
385
|
+
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
|
386
|
+
*/
|
|
387
|
+
application_fee_amount?: Stripe.Emptyable<number>;
|
|
593
388
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
389
|
+
/**
|
|
390
|
+
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
|
391
|
+
*/
|
|
392
|
+
application_fee_percent?: Stripe.Emptyable<number>;
|
|
598
393
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
396
|
+
*/
|
|
397
|
+
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
603
398
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
}
|
|
399
|
+
/**
|
|
400
|
+
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
|
401
|
+
*/
|
|
402
|
+
collection_method?: QuoteUpdateParams.CollectionMethod;
|
|
609
403
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
*/
|
|
615
|
-
coupon?: string;
|
|
616
|
-
|
|
617
|
-
/**
|
|
618
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
619
|
-
*/
|
|
620
|
-
discount?: string;
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Details to determine how long the discount should be applied for.
|
|
624
|
-
*/
|
|
625
|
-
discount_end?: Discount.DiscountEnd;
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* ID of the promotion code to create a new discount for.
|
|
629
|
-
*/
|
|
630
|
-
promotion_code?: string;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
namespace Discount {
|
|
634
|
-
interface DiscountEnd {
|
|
635
|
-
/**
|
|
636
|
-
* Time span for the redeemed discount.
|
|
637
|
-
*/
|
|
638
|
-
duration?: DiscountEnd.Duration;
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
642
|
-
*/
|
|
643
|
-
timestamp?: number;
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* The type of calculation made to determine when the discount ends.
|
|
647
|
-
*/
|
|
648
|
-
type: DiscountEnd.Type;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
namespace DiscountEnd {
|
|
652
|
-
interface Duration {
|
|
653
|
-
/**
|
|
654
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
655
|
-
*/
|
|
656
|
-
interval: Duration.Interval;
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
660
|
-
*/
|
|
661
|
-
interval_count: number;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
namespace Duration {
|
|
665
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
type Type = 'duration' | 'timestamp';
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
interface Trial {
|
|
673
|
-
/**
|
|
674
|
-
* 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.
|
|
675
|
-
*/
|
|
676
|
-
converts_to?: Array<string>;
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* Determines the type of trial for this item.
|
|
680
|
-
*/
|
|
681
|
-
type: Trial.Type;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
namespace Trial {
|
|
685
|
-
type Type = 'free' | 'paid';
|
|
686
|
-
}
|
|
687
|
-
}
|
|
404
|
+
/**
|
|
405
|
+
* The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
406
|
+
*/
|
|
407
|
+
customer?: string;
|
|
688
408
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
| 'clear_discounts'
|
|
694
|
-
| 'clear_metadata'
|
|
695
|
-
| 'remove_discount'
|
|
696
|
-
| 'remove_item'
|
|
697
|
-
| 'remove_metadata'
|
|
698
|
-
| 'set_discounts'
|
|
699
|
-
| 'set_items'
|
|
700
|
-
| 'set_metadata';
|
|
701
|
-
}
|
|
409
|
+
/**
|
|
410
|
+
* The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
411
|
+
*/
|
|
412
|
+
customer_account?: string;
|
|
702
413
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
new_reference?: string;
|
|
414
|
+
/**
|
|
415
|
+
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
416
|
+
*/
|
|
417
|
+
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
708
418
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
419
|
+
/**
|
|
420
|
+
* A description that will be displayed on the quote PDF.
|
|
421
|
+
*/
|
|
422
|
+
description?: Stripe.Emptyable<string>;
|
|
713
423
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
namespace AppliesTo {
|
|
721
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
725
|
-
|
|
726
|
-
interface CancelSubscriptionSchedule {
|
|
727
|
-
/**
|
|
728
|
-
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
729
|
-
*/
|
|
730
|
-
cancel_at: 'line_starts_at';
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
|
734
|
-
*/
|
|
735
|
-
invoice_now?: boolean;
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
739
|
-
*/
|
|
740
|
-
prorate?: boolean;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
type EffectiveAt = 'billing_period_start' | 'line_start';
|
|
744
|
-
|
|
745
|
-
interface EndsAt {
|
|
746
|
-
/**
|
|
747
|
-
* Use the `end` time of a given discount.
|
|
748
|
-
*/
|
|
749
|
-
discount_end?: EndsAt.DiscountEnd;
|
|
750
|
-
|
|
751
|
-
/**
|
|
752
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
753
|
-
*/
|
|
754
|
-
duration?: EndsAt.Duration;
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* A precise Unix timestamp.
|
|
758
|
-
*/
|
|
759
|
-
timestamp?: number;
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* Select a way to pass in `ends_at`.
|
|
763
|
-
*/
|
|
764
|
-
type: EndsAt.Type;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
namespace EndsAt {
|
|
768
|
-
interface DiscountEnd {
|
|
769
|
-
/**
|
|
770
|
-
* The ID of a specific discount.
|
|
771
|
-
*/
|
|
772
|
-
discount: string;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
interface Duration {
|
|
776
|
-
/**
|
|
777
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
778
|
-
*/
|
|
779
|
-
interval: Duration.Interval;
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
783
|
-
*/
|
|
784
|
-
interval_count: number;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
namespace Duration {
|
|
788
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
type Type =
|
|
792
|
-
| 'billing_period_end'
|
|
793
|
-
| 'discount_end'
|
|
794
|
-
| 'duration'
|
|
795
|
-
| 'quote_acceptance_date'
|
|
796
|
-
| 'schedule_end'
|
|
797
|
-
| 'timestamp'
|
|
798
|
-
| 'upcoming_invoice';
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
type ProrationBehavior =
|
|
802
|
-
| 'always_invoice'
|
|
803
|
-
| 'create_prorations'
|
|
804
|
-
| 'none';
|
|
805
|
-
|
|
806
|
-
interface SetPauseCollection {
|
|
807
|
-
/**
|
|
808
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
809
|
-
*/
|
|
810
|
-
set?: SetPauseCollection.Set;
|
|
811
|
-
|
|
812
|
-
/**
|
|
813
|
-
* Determines the type of the pause_collection amendment.
|
|
814
|
-
*/
|
|
815
|
-
type: SetPauseCollection.Type;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
namespace SetPauseCollection {
|
|
819
|
-
interface Set {
|
|
820
|
-
/**
|
|
821
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
822
|
-
*/
|
|
823
|
-
behavior: Set.Behavior;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
namespace Set {
|
|
827
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
type Type = 'remove' | 'set';
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
834
|
-
|
|
835
|
-
interface StartsAt {
|
|
836
|
-
/**
|
|
837
|
-
* Use the `end` time of a given discount.
|
|
838
|
-
*/
|
|
839
|
-
discount_end?: StartsAt.DiscountEnd;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* The timestamp the given line ends at.
|
|
843
|
-
*/
|
|
844
|
-
line_ends_at?: StartsAt.LineEndsAt;
|
|
845
|
-
|
|
846
|
-
/**
|
|
847
|
-
* A precise Unix timestamp.
|
|
848
|
-
*/
|
|
849
|
-
timestamp?: number;
|
|
424
|
+
/**
|
|
425
|
+
* The discounts applied to the quote.
|
|
426
|
+
*/
|
|
427
|
+
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
850
428
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
}
|
|
429
|
+
/**
|
|
430
|
+
* Specifies which fields in the response should be expanded.
|
|
431
|
+
*/
|
|
432
|
+
expand?: Array<string>;
|
|
856
433
|
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
*/
|
|
862
|
-
discount: string;
|
|
863
|
-
}
|
|
434
|
+
/**
|
|
435
|
+
* A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
|
436
|
+
*/
|
|
437
|
+
expires_at?: number;
|
|
864
438
|
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
index?: number;
|
|
870
|
-
}
|
|
439
|
+
/**
|
|
440
|
+
* A footer that will be displayed on the quote PDF.
|
|
441
|
+
*/
|
|
442
|
+
footer?: Stripe.Emptyable<string>;
|
|
871
443
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
| 'quote_acceptance_date'
|
|
877
|
-
| 'schedule_end'
|
|
878
|
-
| 'timestamp'
|
|
879
|
-
| 'upcoming_invoice';
|
|
880
|
-
}
|
|
444
|
+
/**
|
|
445
|
+
* A header that will be displayed on the quote PDF.
|
|
446
|
+
*/
|
|
447
|
+
header?: Stripe.Emptyable<string>;
|
|
881
448
|
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
887
|
-
}
|
|
449
|
+
/**
|
|
450
|
+
* All invoices will be billed using the specified settings.
|
|
451
|
+
*/
|
|
452
|
+
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
888
453
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
*/
|
|
894
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
895
|
-
}
|
|
454
|
+
/**
|
|
455
|
+
* A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
|
456
|
+
*/
|
|
457
|
+
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
896
458
|
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
}
|
|
459
|
+
/**
|
|
460
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
461
|
+
*/
|
|
462
|
+
metadata?: Stripe.MetadataParam;
|
|
902
463
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
464
|
+
/**
|
|
465
|
+
* The account on behalf of which to charge.
|
|
466
|
+
*/
|
|
467
|
+
on_behalf_of?: Stripe.Emptyable<string>;
|
|
908
468
|
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
469
|
+
/**
|
|
470
|
+
* When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
|
471
|
+
*/
|
|
472
|
+
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
913
473
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
474
|
+
/**
|
|
475
|
+
* The data with which to automatically create a Transfer for each of the invoices.
|
|
476
|
+
*/
|
|
477
|
+
transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
|
|
478
|
+
}
|
|
918
479
|
|
|
480
|
+
namespace QuoteUpdateParams {
|
|
481
|
+
interface AutomaticTax {
|
|
919
482
|
/**
|
|
920
|
-
*
|
|
483
|
+
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
921
484
|
*/
|
|
922
|
-
|
|
485
|
+
enabled: boolean;
|
|
923
486
|
|
|
924
487
|
/**
|
|
925
|
-
* The
|
|
488
|
+
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
926
489
|
*/
|
|
927
|
-
|
|
490
|
+
liability?: AutomaticTax.Liability;
|
|
928
491
|
}
|
|
929
492
|
|
|
930
|
-
namespace
|
|
931
|
-
interface
|
|
932
|
-
/**
|
|
933
|
-
* ID of the coupon to create a new discount for.
|
|
934
|
-
*/
|
|
935
|
-
coupon?: string;
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
939
|
-
*/
|
|
940
|
-
discount?: string;
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* Details to determine how long the discount should be applied for.
|
|
944
|
-
*/
|
|
945
|
-
discount_end?: Discount.DiscountEnd;
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* ID of the promotion code to create a new discount for.
|
|
949
|
-
*/
|
|
950
|
-
promotion_code?: string;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
namespace Discount {
|
|
954
|
-
interface DiscountEnd {
|
|
955
|
-
/**
|
|
956
|
-
* Time span for the redeemed discount.
|
|
957
|
-
*/
|
|
958
|
-
duration?: DiscountEnd.Duration;
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
962
|
-
*/
|
|
963
|
-
timestamp?: number;
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* The type of calculation made to determine when the discount ends.
|
|
967
|
-
*/
|
|
968
|
-
type: DiscountEnd.Type;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
namespace DiscountEnd {
|
|
972
|
-
interface Duration {
|
|
973
|
-
/**
|
|
974
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
975
|
-
*/
|
|
976
|
-
interval: Duration.Interval;
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
980
|
-
*/
|
|
981
|
-
interval_count: number;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
namespace Duration {
|
|
985
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
type Type = 'duration' | 'timestamp';
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
interface PriceData {
|
|
993
|
-
/**
|
|
994
|
-
* 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).
|
|
995
|
-
*/
|
|
996
|
-
currency: string;
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
1000
|
-
*/
|
|
1001
|
-
product: string;
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
1005
|
-
*/
|
|
1006
|
-
recurring?: PriceData.Recurring;
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
1010
|
-
*/
|
|
1011
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
1012
|
-
|
|
493
|
+
namespace AutomaticTax {
|
|
494
|
+
interface Liability {
|
|
1013
495
|
/**
|
|
1014
|
-
*
|
|
496
|
+
* The connected account being referenced when `type` is `account`.
|
|
1015
497
|
*/
|
|
1016
|
-
|
|
498
|
+
account?: string;
|
|
1017
499
|
|
|
1018
500
|
/**
|
|
1019
|
-
*
|
|
501
|
+
* Type of the account referenced in the request.
|
|
1020
502
|
*/
|
|
1021
|
-
|
|
503
|
+
type: Liability.Type;
|
|
1022
504
|
}
|
|
1023
505
|
|
|
1024
|
-
namespace
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
1028
|
-
*/
|
|
1029
|
-
interval: Recurring.Interval;
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
1033
|
-
*/
|
|
1034
|
-
interval_count?: number;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
namespace Recurring {
|
|
1038
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
506
|
+
namespace Liability {
|
|
507
|
+
type Type = 'account' | 'self';
|
|
1042
508
|
}
|
|
1043
509
|
}
|
|
1044
510
|
|
|
1045
|
-
|
|
1046
|
-
/**
|
|
1047
|
-
* Describes the period to bill for upon accepting the quote.
|
|
1048
|
-
*/
|
|
1049
|
-
bill_on_acceptance?: SubscriptionData.BillOnAcceptance;
|
|
1050
|
-
|
|
1051
|
-
/**
|
|
1052
|
-
* 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.
|
|
1053
|
-
*/
|
|
1054
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
1058
|
-
*/
|
|
1059
|
-
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
511
|
+
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
1060
512
|
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
/**
|
|
1067
|
-
* Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
|
|
1068
|
-
*/
|
|
1069
|
-
billing_schedules?: Array<SubscriptionData.BillingSchedule>;
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
1073
|
-
*/
|
|
1074
|
-
description?: string;
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
1078
|
-
*/
|
|
1079
|
-
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1083
|
-
*/
|
|
1084
|
-
end_behavior?: SubscriptionData.EndBehavior;
|
|
1085
|
-
|
|
1086
|
-
/**
|
|
1087
|
-
* The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
|
|
1088
|
-
*/
|
|
1089
|
-
from_subscription?: string;
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
|
1093
|
-
*/
|
|
1094
|
-
metadata?: Stripe.MetadataParam;
|
|
1095
|
-
|
|
1096
|
-
/**
|
|
1097
|
-
* Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
1098
|
-
*/
|
|
1099
|
-
phase_effective_at?: SubscriptionData.PhaseEffectiveAt;
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
1103
|
-
*/
|
|
1104
|
-
prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
|
|
1105
|
-
|
|
1106
|
-
/**
|
|
1107
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1108
|
-
*
|
|
1109
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1110
|
-
*
|
|
1111
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
1112
|
-
*
|
|
1113
|
-
* Prorations can be disabled by passing `none`.
|
|
1114
|
-
*/
|
|
1115
|
-
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
1119
|
-
*/
|
|
1120
|
-
trial_period_days?: Stripe.Emptyable<number>;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
namespace SubscriptionData {
|
|
1124
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1125
|
-
|
|
1126
|
-
interface BillingMode {
|
|
1127
|
-
/**
|
|
1128
|
-
* Configure behavior for flexible billing mode.
|
|
1129
|
-
*/
|
|
1130
|
-
flexible?: BillingMode.Flexible;
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
|
|
1134
|
-
*/
|
|
1135
|
-
type: BillingMode.Type;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
namespace BillingMode {
|
|
1139
|
-
interface Flexible {
|
|
1140
|
-
/**
|
|
1141
|
-
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
1142
|
-
*/
|
|
1143
|
-
proration_discounts?: Flexible.ProrationDiscounts;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
namespace Flexible {
|
|
1147
|
-
type ProrationDiscounts = 'included' | 'itemized';
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
type Type = 'classic' | 'flexible';
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
interface BillingSchedule {
|
|
1154
|
-
/**
|
|
1155
|
-
* Configure billing schedule differently for individual subscription items.
|
|
1156
|
-
*/
|
|
1157
|
-
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1161
|
-
*/
|
|
1162
|
-
bill_from: BillingSchedule.BillFrom;
|
|
1163
|
-
|
|
1164
|
-
/**
|
|
1165
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1166
|
-
*/
|
|
1167
|
-
bill_until: BillingSchedule.BillUntil;
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* 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.
|
|
1171
|
-
*/
|
|
1172
|
-
key?: string;
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
namespace BillingSchedule {
|
|
1176
|
-
interface AppliesTo {
|
|
1177
|
-
/**
|
|
1178
|
-
* The ID of the price object.
|
|
1179
|
-
*/
|
|
1180
|
-
price?: string;
|
|
1181
|
-
|
|
1182
|
-
/**
|
|
1183
|
-
* Controls which subscription items the billing schedule applies to.
|
|
1184
|
-
*/
|
|
1185
|
-
type: 'price';
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
interface BillFrom {
|
|
1189
|
-
/**
|
|
1190
|
-
* Details of a Quote line to start the bill period from.
|
|
1191
|
-
*/
|
|
1192
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1193
|
-
|
|
1194
|
-
/**
|
|
1195
|
-
* A precise Unix timestamp.
|
|
1196
|
-
*/
|
|
1197
|
-
timestamp?: number;
|
|
1198
|
-
|
|
1199
|
-
/**
|
|
1200
|
-
* The type of method to specify the `bill_from` time.
|
|
1201
|
-
*/
|
|
1202
|
-
type: BillFrom.Type;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
namespace BillFrom {
|
|
1206
|
-
interface LineStartsAt {
|
|
1207
|
-
/**
|
|
1208
|
-
* The ID of a quote line.
|
|
1209
|
-
*/
|
|
1210
|
-
id?: string;
|
|
1211
|
-
|
|
1212
|
-
/**
|
|
1213
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1214
|
-
*/
|
|
1215
|
-
index?: number;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
type Type =
|
|
1219
|
-
| 'line_starts_at'
|
|
1220
|
-
| 'now'
|
|
1221
|
-
| 'pause_collection_start'
|
|
1222
|
-
| 'quote_acceptance_date'
|
|
1223
|
-
| 'timestamp';
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
interface BillUntil {
|
|
1227
|
-
/**
|
|
1228
|
-
* Details of the duration over which to bill.
|
|
1229
|
-
*/
|
|
1230
|
-
duration?: BillUntil.Duration;
|
|
1231
|
-
|
|
1232
|
-
/**
|
|
1233
|
-
* Details of a Quote line item from which to bill until.
|
|
1234
|
-
*/
|
|
1235
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1236
|
-
|
|
1237
|
-
/**
|
|
1238
|
-
* A precise Unix timestamp.
|
|
1239
|
-
*/
|
|
1240
|
-
timestamp?: number;
|
|
1241
|
-
|
|
1242
|
-
/**
|
|
1243
|
-
* The type of method to specify the `bill_until` time.
|
|
1244
|
-
*/
|
|
1245
|
-
type: BillUntil.Type;
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
namespace BillUntil {
|
|
1249
|
-
interface Duration {
|
|
1250
|
-
/**
|
|
1251
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1252
|
-
*/
|
|
1253
|
-
interval: Duration.Interval;
|
|
1254
|
-
|
|
1255
|
-
/**
|
|
1256
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1257
|
-
*/
|
|
1258
|
-
interval_count: number;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
namespace Duration {
|
|
1262
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
interface LineEndsAt {
|
|
1266
|
-
/**
|
|
1267
|
-
* The ID of a quote line.
|
|
1268
|
-
*/
|
|
1269
|
-
id?: string;
|
|
1270
|
-
|
|
1271
|
-
/**
|
|
1272
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1273
|
-
*/
|
|
1274
|
-
index?: number;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
type Type =
|
|
1278
|
-
| 'duration'
|
|
1279
|
-
| 'line_ends_at'
|
|
1280
|
-
| 'schedule_end'
|
|
1281
|
-
| 'timestamp'
|
|
1282
|
-
| 'upcoming_invoice';
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
interface BillOnAcceptance {
|
|
1287
|
-
/**
|
|
1288
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1289
|
-
*/
|
|
1290
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1291
|
-
|
|
1292
|
-
/**
|
|
1293
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1294
|
-
*/
|
|
1295
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
namespace BillOnAcceptance {
|
|
1299
|
-
interface BillFrom {
|
|
1300
|
-
/**
|
|
1301
|
-
* Details of a Quote line to start the bill period from.
|
|
1302
|
-
*/
|
|
1303
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1304
|
-
|
|
1305
|
-
/**
|
|
1306
|
-
* A precise Unix timestamp.
|
|
1307
|
-
*/
|
|
1308
|
-
timestamp?: number;
|
|
1309
|
-
|
|
1310
|
-
/**
|
|
1311
|
-
* The type of method to specify the `bill_from` time.
|
|
1312
|
-
*/
|
|
1313
|
-
type: BillFrom.Type;
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
namespace BillFrom {
|
|
1317
|
-
interface LineStartsAt {
|
|
1318
|
-
/**
|
|
1319
|
-
* The ID of a quote line.
|
|
1320
|
-
*/
|
|
1321
|
-
id?: string;
|
|
1322
|
-
|
|
1323
|
-
/**
|
|
1324
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1325
|
-
*/
|
|
1326
|
-
index?: number;
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
type Type =
|
|
1330
|
-
| 'line_starts_at'
|
|
1331
|
-
| 'now'
|
|
1332
|
-
| 'pause_collection_start'
|
|
1333
|
-
| 'quote_acceptance_date'
|
|
1334
|
-
| 'timestamp';
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
interface BillUntil {
|
|
1338
|
-
/**
|
|
1339
|
-
* Details of the duration over which to bill.
|
|
1340
|
-
*/
|
|
1341
|
-
duration?: BillUntil.Duration;
|
|
1342
|
-
|
|
1343
|
-
/**
|
|
1344
|
-
* Details of a Quote line item from which to bill until.
|
|
1345
|
-
*/
|
|
1346
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1347
|
-
|
|
1348
|
-
/**
|
|
1349
|
-
* A precise Unix timestamp.
|
|
1350
|
-
*/
|
|
1351
|
-
timestamp?: number;
|
|
1352
|
-
|
|
1353
|
-
/**
|
|
1354
|
-
* The type of method to specify the `bill_until` time.
|
|
1355
|
-
*/
|
|
1356
|
-
type: BillUntil.Type;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
namespace BillUntil {
|
|
1360
|
-
interface Duration {
|
|
1361
|
-
/**
|
|
1362
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1363
|
-
*/
|
|
1364
|
-
interval: Duration.Interval;
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1368
|
-
*/
|
|
1369
|
-
interval_count: number;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
namespace Duration {
|
|
1373
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
interface LineEndsAt {
|
|
1377
|
-
/**
|
|
1378
|
-
* The ID of a quote line.
|
|
1379
|
-
*/
|
|
1380
|
-
id?: string;
|
|
1381
|
-
|
|
1382
|
-
/**
|
|
1383
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1384
|
-
*/
|
|
1385
|
-
index?: number;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
type Type =
|
|
1389
|
-
| 'duration'
|
|
1390
|
-
| 'line_ends_at'
|
|
1391
|
-
| 'schedule_end'
|
|
1392
|
-
| 'timestamp'
|
|
1393
|
-
| 'upcoming_invoice';
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1398
|
-
|
|
1399
|
-
type PhaseEffectiveAt = 'billing_period_start' | 'line_start';
|
|
1400
|
-
|
|
1401
|
-
interface Prebilling {
|
|
1402
|
-
/**
|
|
1403
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
1404
|
-
*/
|
|
1405
|
-
iterations: number;
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
type ProrationBehavior =
|
|
1409
|
-
| 'always_invoice'
|
|
1410
|
-
| 'create_prorations'
|
|
1411
|
-
| 'none';
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
interface SubscriptionDataOverride {
|
|
1415
|
-
/**
|
|
1416
|
-
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
1417
|
-
*/
|
|
1418
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
* Describes the period to bill for upon accepting the quote.
|
|
1422
|
-
*/
|
|
1423
|
-
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* 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.
|
|
1427
|
-
*/
|
|
1428
|
-
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
1429
|
-
|
|
1430
|
-
/**
|
|
1431
|
-
* Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
|
|
1432
|
-
*/
|
|
1433
|
-
billing_schedules?: Array<SubscriptionDataOverride.BillingSchedule>;
|
|
1434
|
-
|
|
1435
|
-
/**
|
|
1436
|
-
* The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
|
1437
|
-
*/
|
|
1438
|
-
customer?: string;
|
|
1439
|
-
|
|
1440
|
-
/**
|
|
1441
|
-
* The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
1442
|
-
*/
|
|
1443
|
-
description?: string;
|
|
1444
|
-
|
|
1445
|
-
/**
|
|
1446
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1447
|
-
*/
|
|
1448
|
-
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
1449
|
-
|
|
1450
|
-
/**
|
|
1451
|
-
* Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
1452
|
-
*/
|
|
1453
|
-
phase_effective_at?: SubscriptionDataOverride.PhaseEffectiveAt;
|
|
1454
|
-
|
|
1455
|
-
/**
|
|
1456
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1457
|
-
*
|
|
1458
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1459
|
-
*
|
|
1460
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
1461
|
-
*
|
|
1462
|
-
* Prorations can be disabled by passing `none`.
|
|
1463
|
-
*/
|
|
1464
|
-
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
namespace SubscriptionDataOverride {
|
|
1468
|
-
interface AppliesTo {
|
|
1469
|
-
/**
|
|
1470
|
-
* A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
|
1471
|
-
*/
|
|
1472
|
-
new_reference?: string;
|
|
1473
|
-
|
|
1474
|
-
/**
|
|
1475
|
-
* The ID of the schedule the line applies to.
|
|
1476
|
-
*/
|
|
1477
|
-
subscription_schedule?: string;
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1481
|
-
*/
|
|
1482
|
-
type: AppliesTo.Type;
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
namespace AppliesTo {
|
|
1486
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1490
|
-
|
|
1491
|
-
interface BillingSchedule {
|
|
1492
|
-
/**
|
|
1493
|
-
* Configure billing schedule differently for individual subscription items.
|
|
1494
|
-
*/
|
|
1495
|
-
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
1496
|
-
|
|
1497
|
-
/**
|
|
1498
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1499
|
-
*/
|
|
1500
|
-
bill_from: BillingSchedule.BillFrom;
|
|
1501
|
-
|
|
1502
|
-
/**
|
|
1503
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1504
|
-
*/
|
|
1505
|
-
bill_until: BillingSchedule.BillUntil;
|
|
1506
|
-
|
|
1507
|
-
/**
|
|
1508
|
-
* 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.
|
|
1509
|
-
*/
|
|
1510
|
-
key?: string;
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
namespace BillingSchedule {
|
|
1514
|
-
interface AppliesTo {
|
|
1515
|
-
/**
|
|
1516
|
-
* The ID of the price object.
|
|
1517
|
-
*/
|
|
1518
|
-
price?: string;
|
|
1519
|
-
|
|
1520
|
-
/**
|
|
1521
|
-
* Controls which subscription items the billing schedule applies to.
|
|
1522
|
-
*/
|
|
1523
|
-
type: 'price';
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
interface BillFrom {
|
|
1527
|
-
/**
|
|
1528
|
-
* Details of a Quote line to start the bill period from.
|
|
1529
|
-
*/
|
|
1530
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1531
|
-
|
|
1532
|
-
/**
|
|
1533
|
-
* A precise Unix timestamp.
|
|
1534
|
-
*/
|
|
1535
|
-
timestamp?: number;
|
|
1536
|
-
|
|
1537
|
-
/**
|
|
1538
|
-
* The type of method to specify the `bill_from` time.
|
|
1539
|
-
*/
|
|
1540
|
-
type: BillFrom.Type;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
namespace BillFrom {
|
|
1544
|
-
interface LineStartsAt {
|
|
1545
|
-
/**
|
|
1546
|
-
* The ID of a quote line.
|
|
1547
|
-
*/
|
|
1548
|
-
id?: string;
|
|
1549
|
-
|
|
1550
|
-
/**
|
|
1551
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1552
|
-
*/
|
|
1553
|
-
index?: number;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
type Type =
|
|
1557
|
-
| 'line_starts_at'
|
|
1558
|
-
| 'now'
|
|
1559
|
-
| 'pause_collection_start'
|
|
1560
|
-
| 'quote_acceptance_date'
|
|
1561
|
-
| 'timestamp';
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
interface BillUntil {
|
|
1565
|
-
/**
|
|
1566
|
-
* Details of the duration over which to bill.
|
|
1567
|
-
*/
|
|
1568
|
-
duration?: BillUntil.Duration;
|
|
1569
|
-
|
|
1570
|
-
/**
|
|
1571
|
-
* Details of a Quote line item from which to bill until.
|
|
1572
|
-
*/
|
|
1573
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1574
|
-
|
|
1575
|
-
/**
|
|
1576
|
-
* A precise Unix timestamp.
|
|
1577
|
-
*/
|
|
1578
|
-
timestamp?: number;
|
|
1579
|
-
|
|
1580
|
-
/**
|
|
1581
|
-
* The type of method to specify the `bill_until` time.
|
|
1582
|
-
*/
|
|
1583
|
-
type: BillUntil.Type;
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
namespace BillUntil {
|
|
1587
|
-
interface Duration {
|
|
1588
|
-
/**
|
|
1589
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1590
|
-
*/
|
|
1591
|
-
interval: Duration.Interval;
|
|
1592
|
-
|
|
1593
|
-
/**
|
|
1594
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1595
|
-
*/
|
|
1596
|
-
interval_count: number;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
namespace Duration {
|
|
1600
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
interface LineEndsAt {
|
|
1604
|
-
/**
|
|
1605
|
-
* The ID of a quote line.
|
|
1606
|
-
*/
|
|
1607
|
-
id?: string;
|
|
1608
|
-
|
|
1609
|
-
/**
|
|
1610
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1611
|
-
*/
|
|
1612
|
-
index?: number;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
type Type =
|
|
1616
|
-
| 'duration'
|
|
1617
|
-
| 'line_ends_at'
|
|
1618
|
-
| 'schedule_end'
|
|
1619
|
-
| 'timestamp'
|
|
1620
|
-
| 'upcoming_invoice';
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
interface BillOnAcceptance {
|
|
1625
|
-
/**
|
|
1626
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1627
|
-
*/
|
|
1628
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1629
|
-
|
|
1630
|
-
/**
|
|
1631
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1632
|
-
*/
|
|
1633
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
namespace BillOnAcceptance {
|
|
1637
|
-
interface BillFrom {
|
|
1638
|
-
/**
|
|
1639
|
-
* Details of a Quote line to start the bill period from.
|
|
1640
|
-
*/
|
|
1641
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1642
|
-
|
|
1643
|
-
/**
|
|
1644
|
-
* A precise Unix timestamp.
|
|
1645
|
-
*/
|
|
1646
|
-
timestamp?: number;
|
|
1647
|
-
|
|
1648
|
-
/**
|
|
1649
|
-
* The type of method to specify the `bill_from` time.
|
|
1650
|
-
*/
|
|
1651
|
-
type: BillFrom.Type;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
namespace BillFrom {
|
|
1655
|
-
interface LineStartsAt {
|
|
1656
|
-
/**
|
|
1657
|
-
* The ID of a quote line.
|
|
1658
|
-
*/
|
|
1659
|
-
id?: string;
|
|
1660
|
-
|
|
1661
|
-
/**
|
|
1662
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1663
|
-
*/
|
|
1664
|
-
index?: number;
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
type Type =
|
|
1668
|
-
| 'line_starts_at'
|
|
1669
|
-
| 'now'
|
|
1670
|
-
| 'pause_collection_start'
|
|
1671
|
-
| 'quote_acceptance_date'
|
|
1672
|
-
| 'timestamp';
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
interface BillUntil {
|
|
1676
|
-
/**
|
|
1677
|
-
* Details of the duration over which to bill.
|
|
1678
|
-
*/
|
|
1679
|
-
duration?: BillUntil.Duration;
|
|
1680
|
-
|
|
1681
|
-
/**
|
|
1682
|
-
* Details of a Quote line item from which to bill until.
|
|
1683
|
-
*/
|
|
1684
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1685
|
-
|
|
1686
|
-
/**
|
|
1687
|
-
* A precise Unix timestamp.
|
|
1688
|
-
*/
|
|
1689
|
-
timestamp?: number;
|
|
1690
|
-
|
|
1691
|
-
/**
|
|
1692
|
-
* The type of method to specify the `bill_until` time.
|
|
1693
|
-
*/
|
|
1694
|
-
type: BillUntil.Type;
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
namespace BillUntil {
|
|
1698
|
-
interface Duration {
|
|
1699
|
-
/**
|
|
1700
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1701
|
-
*/
|
|
1702
|
-
interval: Duration.Interval;
|
|
1703
|
-
|
|
1704
|
-
/**
|
|
1705
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1706
|
-
*/
|
|
1707
|
-
interval_count: number;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
namespace Duration {
|
|
1711
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
interface LineEndsAt {
|
|
1715
|
-
/**
|
|
1716
|
-
* The ID of a quote line.
|
|
1717
|
-
*/
|
|
1718
|
-
id?: string;
|
|
1719
|
-
|
|
1720
|
-
/**
|
|
1721
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1722
|
-
*/
|
|
1723
|
-
index?: number;
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
type Type =
|
|
1727
|
-
| 'duration'
|
|
1728
|
-
| 'line_ends_at'
|
|
1729
|
-
| 'schedule_end'
|
|
1730
|
-
| 'timestamp'
|
|
1731
|
-
| 'upcoming_invoice';
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1736
|
-
|
|
1737
|
-
type PhaseEffectiveAt = 'billing_period_start' | 'line_start';
|
|
1738
|
-
|
|
1739
|
-
type ProrationBehavior =
|
|
1740
|
-
| 'always_invoice'
|
|
1741
|
-
| 'create_prorations'
|
|
1742
|
-
| 'none';
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
interface TransferData {
|
|
1746
|
-
/**
|
|
1747
|
-
* The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
|
1748
|
-
*/
|
|
1749
|
-
amount?: number;
|
|
1750
|
-
|
|
1751
|
-
/**
|
|
1752
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
|
1753
|
-
*/
|
|
1754
|
-
amount_percent?: number;
|
|
1755
|
-
|
|
1756
|
-
/**
|
|
1757
|
-
* ID of an existing, connected Stripe account.
|
|
1758
|
-
*/
|
|
1759
|
-
destination: string;
|
|
1760
|
-
}
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
interface QuoteRetrieveParams {
|
|
1764
|
-
/**
|
|
1765
|
-
* Specifies which fields in the response should be expanded.
|
|
1766
|
-
*/
|
|
1767
|
-
expand?: Array<string>;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
interface QuoteUpdateParams {
|
|
1771
|
-
/**
|
|
1772
|
-
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
1773
|
-
*/
|
|
1774
|
-
allow_backdated_lines?: boolean;
|
|
1775
|
-
|
|
1776
|
-
/**
|
|
1777
|
-
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
|
1778
|
-
*/
|
|
1779
|
-
application_fee_amount?: Stripe.Emptyable<number>;
|
|
1780
|
-
|
|
1781
|
-
/**
|
|
1782
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
|
1783
|
-
*/
|
|
1784
|
-
application_fee_percent?: Stripe.Emptyable<number>;
|
|
1785
|
-
|
|
1786
|
-
/**
|
|
1787
|
-
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
1788
|
-
*/
|
|
1789
|
-
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
1790
|
-
|
|
1791
|
-
/**
|
|
1792
|
-
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
|
1793
|
-
*/
|
|
1794
|
-
collection_method?: QuoteUpdateParams.CollectionMethod;
|
|
1795
|
-
|
|
1796
|
-
/**
|
|
1797
|
-
* The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1798
|
-
*/
|
|
1799
|
-
customer?: string;
|
|
1800
|
-
|
|
1801
|
-
/**
|
|
1802
|
-
* The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1803
|
-
*/
|
|
1804
|
-
customer_account?: string;
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
1808
|
-
*/
|
|
1809
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1810
|
-
|
|
1811
|
-
/**
|
|
1812
|
-
* A description that will be displayed on the quote PDF.
|
|
1813
|
-
*/
|
|
1814
|
-
description?: Stripe.Emptyable<string>;
|
|
1815
|
-
|
|
1816
|
-
/**
|
|
1817
|
-
* The discounts applied to the quote.
|
|
1818
|
-
*/
|
|
1819
|
-
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1822
|
-
* Specifies which fields in the response should be expanded.
|
|
1823
|
-
*/
|
|
1824
|
-
expand?: Array<string>;
|
|
1825
|
-
|
|
1826
|
-
/**
|
|
1827
|
-
* A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
|
1828
|
-
*/
|
|
1829
|
-
expires_at?: number;
|
|
1830
|
-
|
|
1831
|
-
/**
|
|
1832
|
-
* A footer that will be displayed on the quote PDF.
|
|
1833
|
-
*/
|
|
1834
|
-
footer?: Stripe.Emptyable<string>;
|
|
1835
|
-
|
|
1836
|
-
/**
|
|
1837
|
-
* A header that will be displayed on the quote PDF.
|
|
1838
|
-
*/
|
|
1839
|
-
header?: Stripe.Emptyable<string>;
|
|
1840
|
-
|
|
1841
|
-
/**
|
|
1842
|
-
* All invoices will be billed using the specified settings.
|
|
1843
|
-
*/
|
|
1844
|
-
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
1845
|
-
|
|
1846
|
-
/**
|
|
1847
|
-
* A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
|
1848
|
-
*/
|
|
1849
|
-
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
|
1853
|
-
*/
|
|
1854
|
-
lines?: Array<QuoteUpdateParams.Line>;
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* 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`.
|
|
1858
|
-
*/
|
|
1859
|
-
metadata?: Stripe.MetadataParam;
|
|
1860
|
-
|
|
1861
|
-
/**
|
|
1862
|
-
* The account on behalf of which to charge.
|
|
1863
|
-
*/
|
|
1864
|
-
on_behalf_of?: Stripe.Emptyable<string>;
|
|
1865
|
-
|
|
1866
|
-
/**
|
|
1867
|
-
* When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
|
1868
|
-
*/
|
|
1869
|
-
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
1870
|
-
|
|
1871
|
-
/**
|
|
1872
|
-
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
1873
|
-
*/
|
|
1874
|
-
subscription_data_overrides?: Stripe.Emptyable<
|
|
1875
|
-
Array<QuoteUpdateParams.SubscriptionDataOverride>
|
|
1876
|
-
>;
|
|
1877
|
-
|
|
1878
|
-
/**
|
|
1879
|
-
* The data with which to automatically create a Transfer for each of the invoices.
|
|
1880
|
-
*/
|
|
1881
|
-
transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
namespace QuoteUpdateParams {
|
|
1885
|
-
interface AutomaticTax {
|
|
1886
|
-
/**
|
|
1887
|
-
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
1888
|
-
*/
|
|
1889
|
-
enabled: boolean;
|
|
1890
|
-
|
|
1891
|
-
/**
|
|
1892
|
-
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
1893
|
-
*/
|
|
1894
|
-
liability?: AutomaticTax.Liability;
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
namespace AutomaticTax {
|
|
1898
|
-
interface Liability {
|
|
1899
|
-
/**
|
|
1900
|
-
* The connected account being referenced when `type` is `account`.
|
|
1901
|
-
*/
|
|
1902
|
-
account?: string;
|
|
1903
|
-
|
|
1904
|
-
/**
|
|
1905
|
-
* Type of the account referenced in the request.
|
|
1906
|
-
*/
|
|
1907
|
-
type: Liability.Type;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
namespace Liability {
|
|
1911
|
-
type Type = 'account' | 'self';
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
1916
|
-
|
|
1917
|
-
interface Discount {
|
|
1918
|
-
/**
|
|
1919
|
-
* ID of the coupon to create a new discount for.
|
|
1920
|
-
*/
|
|
1921
|
-
coupon?: string;
|
|
1922
|
-
|
|
1923
|
-
/**
|
|
1924
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1925
|
-
*/
|
|
1926
|
-
discount?: string;
|
|
1927
|
-
|
|
1928
|
-
/**
|
|
1929
|
-
* Details to determine how long the discount should be applied for.
|
|
1930
|
-
*/
|
|
1931
|
-
discount_end?: Discount.DiscountEnd;
|
|
1932
|
-
|
|
1933
|
-
/**
|
|
1934
|
-
* ID of the promotion code to create a new discount for.
|
|
1935
|
-
*/
|
|
1936
|
-
promotion_code?: string;
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
|
-
namespace Discount {
|
|
1940
|
-
interface DiscountEnd {
|
|
1941
|
-
/**
|
|
1942
|
-
* Time span for the redeemed discount.
|
|
1943
|
-
*/
|
|
1944
|
-
duration?: DiscountEnd.Duration;
|
|
1945
|
-
|
|
1946
|
-
/**
|
|
1947
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1948
|
-
*/
|
|
1949
|
-
timestamp?: number;
|
|
1950
|
-
|
|
1951
|
-
/**
|
|
1952
|
-
* The type of calculation made to determine when the discount ends.
|
|
1953
|
-
*/
|
|
1954
|
-
type: DiscountEnd.Type;
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
namespace DiscountEnd {
|
|
1958
|
-
interface Duration {
|
|
1959
|
-
/**
|
|
1960
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1961
|
-
*/
|
|
1962
|
-
interval: Duration.Interval;
|
|
1963
|
-
|
|
1964
|
-
/**
|
|
1965
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1966
|
-
*/
|
|
1967
|
-
interval_count: number;
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
namespace Duration {
|
|
1971
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
type Type = 'duration' | 'timestamp';
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
interface InvoiceSettings {
|
|
1979
|
-
/**
|
|
1980
|
-
* Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
|
1981
|
-
*/
|
|
1982
|
-
days_until_due?: number;
|
|
1983
|
-
|
|
1984
|
-
/**
|
|
1985
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
1986
|
-
*/
|
|
1987
|
-
issuer?: InvoiceSettings.Issuer;
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
namespace InvoiceSettings {
|
|
1991
|
-
interface Issuer {
|
|
1992
|
-
/**
|
|
1993
|
-
* The connected account being referenced when `type` is `account`.
|
|
1994
|
-
*/
|
|
1995
|
-
account?: string;
|
|
1996
|
-
|
|
1997
|
-
/**
|
|
1998
|
-
* Type of the account referenced in the request.
|
|
1999
|
-
*/
|
|
2000
|
-
type: Issuer.Type;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
namespace Issuer {
|
|
2004
|
-
type Type = 'account' | 'self';
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
interface Line {
|
|
2009
|
-
/**
|
|
2010
|
-
* An array of operations the quote line performs.
|
|
2011
|
-
*/
|
|
2012
|
-
actions?: Array<Line.Action>;
|
|
2013
|
-
|
|
2014
|
-
/**
|
|
2015
|
-
* Details to identify the subscription schedule the quote line applies to.
|
|
2016
|
-
*/
|
|
2017
|
-
applies_to?: Line.AppliesTo;
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
|
2021
|
-
*/
|
|
2022
|
-
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
2023
|
-
|
|
2024
|
-
/**
|
|
2025
|
-
* A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
|
2026
|
-
*/
|
|
2027
|
-
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
2028
|
-
|
|
2029
|
-
/**
|
|
2030
|
-
* Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
|
2031
|
-
*/
|
|
2032
|
-
ends_at?: Line.EndsAt;
|
|
2033
|
-
|
|
2034
|
-
/**
|
|
2035
|
-
* The ID of an existing line on the quote.
|
|
2036
|
-
*/
|
|
2037
|
-
id?: string;
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
|
|
2041
|
-
*/
|
|
2042
|
-
proration_behavior?: Line.ProrationBehavior;
|
|
2043
|
-
|
|
2044
|
-
/**
|
|
2045
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2046
|
-
*/
|
|
2047
|
-
set_pause_collection?: Line.SetPauseCollection;
|
|
2048
|
-
|
|
2049
|
-
/**
|
|
2050
|
-
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
2051
|
-
*/
|
|
2052
|
-
set_schedule_end?: Line.SetScheduleEnd;
|
|
2053
|
-
|
|
2054
|
-
/**
|
|
2055
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2056
|
-
*/
|
|
2057
|
-
starts_at?: Line.StartsAt;
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* Settings related to subscription trials.
|
|
2061
|
-
*/
|
|
2062
|
-
trial_settings?: Line.TrialSettings;
|
|
2063
|
-
|
|
2064
|
-
/**
|
|
2065
|
-
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
2066
|
-
*/
|
|
2067
|
-
effective_at?: Line.EffectiveAt;
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
namespace Line {
|
|
2071
|
-
interface Action {
|
|
2072
|
-
/**
|
|
2073
|
-
* Details for the `add_discount` type.
|
|
2074
|
-
*/
|
|
2075
|
-
add_discount?: Action.AddDiscount;
|
|
2076
|
-
|
|
2077
|
-
/**
|
|
2078
|
-
* Details for the `add_item` type.
|
|
2079
|
-
*/
|
|
2080
|
-
add_item?: Action.AddItem;
|
|
2081
|
-
|
|
2082
|
-
/**
|
|
2083
|
-
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
2084
|
-
*/
|
|
2085
|
-
add_metadata?: {
|
|
2086
|
-
[key: string]: string;
|
|
2087
|
-
};
|
|
2088
|
-
|
|
2089
|
-
/**
|
|
2090
|
-
* Details for the `remove_discount` type.
|
|
2091
|
-
*/
|
|
2092
|
-
remove_discount?: Action.RemoveDiscount;
|
|
2093
|
-
|
|
2094
|
-
/**
|
|
2095
|
-
* Details for the `remove_item` type.
|
|
2096
|
-
*/
|
|
2097
|
-
remove_item?: Action.RemoveItem;
|
|
2098
|
-
|
|
2099
|
-
/**
|
|
2100
|
-
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
2101
|
-
*/
|
|
2102
|
-
remove_metadata?: Array<string>;
|
|
2103
|
-
|
|
2104
|
-
/**
|
|
2105
|
-
* Details for the `set_discounts` type.
|
|
2106
|
-
*/
|
|
2107
|
-
set_discounts?: Array<Action.SetDiscount>;
|
|
2108
|
-
|
|
2109
|
-
/**
|
|
2110
|
-
* Details for the `set_items` type.
|
|
2111
|
-
*/
|
|
2112
|
-
set_items?: Array<Action.SetItem>;
|
|
2113
|
-
|
|
2114
|
-
/**
|
|
2115
|
-
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
2116
|
-
*/
|
|
2117
|
-
set_metadata?: Stripe.Emptyable<{
|
|
2118
|
-
[key: string]: string;
|
|
2119
|
-
}>;
|
|
2120
|
-
|
|
2121
|
-
/**
|
|
2122
|
-
* The type of action the quote line performs.
|
|
2123
|
-
*/
|
|
2124
|
-
type: Action.Type;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
namespace Action {
|
|
2128
|
-
interface AddDiscount {
|
|
2129
|
-
/**
|
|
2130
|
-
* The coupon code to redeem.
|
|
2131
|
-
*/
|
|
2132
|
-
coupon?: string;
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
2136
|
-
*/
|
|
2137
|
-
discount?: string;
|
|
2138
|
-
|
|
2139
|
-
/**
|
|
2140
|
-
* Details to determine how long the discount should be applied for.
|
|
2141
|
-
*/
|
|
2142
|
-
discount_end?: AddDiscount.DiscountEnd;
|
|
2143
|
-
|
|
2144
|
-
/**
|
|
2145
|
-
* 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.
|
|
2146
|
-
*/
|
|
2147
|
-
index?: number;
|
|
2148
|
-
|
|
2149
|
-
/**
|
|
2150
|
-
* The promotion code to redeem.
|
|
2151
|
-
*/
|
|
2152
|
-
promotion_code?: string;
|
|
2153
|
-
}
|
|
2154
|
-
|
|
2155
|
-
namespace AddDiscount {
|
|
2156
|
-
interface DiscountEnd {
|
|
2157
|
-
/**
|
|
2158
|
-
* The type of calculation made to determine when the discount ends.
|
|
2159
|
-
*/
|
|
2160
|
-
type: 'line_ends_at';
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
interface AddItem {
|
|
2165
|
-
/**
|
|
2166
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
2167
|
-
*/
|
|
2168
|
-
discounts?: Array<AddItem.Discount>;
|
|
2169
|
-
|
|
2170
|
-
/**
|
|
2171
|
-
* 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`.
|
|
2172
|
-
*/
|
|
2173
|
-
metadata?: Stripe.MetadataParam;
|
|
2174
|
-
|
|
2175
|
-
/**
|
|
2176
|
-
* The ID of the price object.
|
|
2177
|
-
*/
|
|
2178
|
-
price: string;
|
|
2179
|
-
|
|
2180
|
-
/**
|
|
2181
|
-
* Quantity for this item.
|
|
2182
|
-
*/
|
|
2183
|
-
quantity?: number;
|
|
2184
|
-
|
|
2185
|
-
/**
|
|
2186
|
-
* 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`.
|
|
2187
|
-
*/
|
|
2188
|
-
tax_rates?: Array<string>;
|
|
2189
|
-
|
|
2190
|
-
/**
|
|
2191
|
-
* Options that configure the trial on the subscription item.
|
|
2192
|
-
*/
|
|
2193
|
-
trial?: AddItem.Trial;
|
|
2194
|
-
|
|
2195
|
-
/**
|
|
2196
|
-
* The ID of the trial offer to apply to the configuration item.
|
|
2197
|
-
*/
|
|
2198
|
-
trial_offer?: string;
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
namespace AddItem {
|
|
2202
|
-
interface Discount {
|
|
2203
|
-
/**
|
|
2204
|
-
* ID of the coupon to create a new discount for.
|
|
2205
|
-
*/
|
|
2206
|
-
coupon?: string;
|
|
2207
|
-
|
|
2208
|
-
/**
|
|
2209
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2210
|
-
*/
|
|
2211
|
-
discount?: string;
|
|
2212
|
-
|
|
2213
|
-
/**
|
|
2214
|
-
* Details to determine how long the discount should be applied for.
|
|
2215
|
-
*/
|
|
2216
|
-
discount_end?: Discount.DiscountEnd;
|
|
2217
|
-
|
|
2218
|
-
/**
|
|
2219
|
-
* ID of the promotion code to create a new discount for.
|
|
2220
|
-
*/
|
|
2221
|
-
promotion_code?: string;
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
namespace Discount {
|
|
2225
|
-
interface DiscountEnd {
|
|
2226
|
-
/**
|
|
2227
|
-
* Time span for the redeemed discount.
|
|
2228
|
-
*/
|
|
2229
|
-
duration?: DiscountEnd.Duration;
|
|
2230
|
-
|
|
2231
|
-
/**
|
|
2232
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2233
|
-
*/
|
|
2234
|
-
timestamp?: number;
|
|
2235
|
-
|
|
2236
|
-
/**
|
|
2237
|
-
* The type of calculation made to determine when the discount ends.
|
|
2238
|
-
*/
|
|
2239
|
-
type: DiscountEnd.Type;
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
namespace DiscountEnd {
|
|
2243
|
-
interface Duration {
|
|
2244
|
-
/**
|
|
2245
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2246
|
-
*/
|
|
2247
|
-
interval: Duration.Interval;
|
|
2248
|
-
|
|
2249
|
-
/**
|
|
2250
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2251
|
-
*/
|
|
2252
|
-
interval_count: number;
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
|
-
namespace Duration {
|
|
2256
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
type Type = 'duration' | 'timestamp';
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
interface Trial {
|
|
2264
|
-
/**
|
|
2265
|
-
* 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.
|
|
2266
|
-
*/
|
|
2267
|
-
converts_to?: Array<string>;
|
|
2268
|
-
|
|
2269
|
-
/**
|
|
2270
|
-
* Determines the type of trial for this item.
|
|
2271
|
-
*/
|
|
2272
|
-
type: Trial.Type;
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
|
-
namespace Trial {
|
|
2276
|
-
type Type = 'free' | 'paid';
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
|
-
interface RemoveDiscount {
|
|
2281
|
-
/**
|
|
2282
|
-
* The coupon code to remove from the `discounts` array.
|
|
2283
|
-
*/
|
|
2284
|
-
coupon?: string;
|
|
2285
|
-
|
|
2286
|
-
/**
|
|
2287
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
2288
|
-
*/
|
|
2289
|
-
discount?: string;
|
|
2290
|
-
|
|
2291
|
-
/**
|
|
2292
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
2293
|
-
*/
|
|
2294
|
-
promotion_code?: string;
|
|
2295
|
-
}
|
|
2296
|
-
|
|
2297
|
-
interface RemoveItem {
|
|
2298
|
-
/**
|
|
2299
|
-
* ID of a price to remove.
|
|
2300
|
-
*/
|
|
2301
|
-
price: string;
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
interface SetDiscount {
|
|
2305
|
-
/**
|
|
2306
|
-
* The coupon code to replace the `discounts` array with.
|
|
2307
|
-
*/
|
|
2308
|
-
coupon?: string;
|
|
2309
|
-
|
|
2310
|
-
/**
|
|
2311
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
2312
|
-
*/
|
|
2313
|
-
discount?: string;
|
|
2314
|
-
|
|
2315
|
-
/**
|
|
2316
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2317
|
-
*/
|
|
2318
|
-
promotion_code?: string;
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
interface SetItem {
|
|
2322
|
-
/**
|
|
2323
|
-
* 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`.
|
|
2324
|
-
*/
|
|
2325
|
-
discounts?: Array<SetItem.Discount>;
|
|
2326
|
-
|
|
2327
|
-
/**
|
|
2328
|
-
* 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`.
|
|
2329
|
-
*/
|
|
2330
|
-
metadata?: Stripe.MetadataParam;
|
|
2331
|
-
|
|
2332
|
-
/**
|
|
2333
|
-
* The ID of the price object.
|
|
2334
|
-
*/
|
|
2335
|
-
price: string;
|
|
2336
|
-
|
|
2337
|
-
/**
|
|
2338
|
-
* 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`.
|
|
2339
|
-
*/
|
|
2340
|
-
quantity?: number;
|
|
2341
|
-
|
|
2342
|
-
/**
|
|
2343
|
-
* 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`.
|
|
2344
|
-
*/
|
|
2345
|
-
tax_rates?: Array<string>;
|
|
2346
|
-
|
|
2347
|
-
/**
|
|
2348
|
-
* 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`.
|
|
2349
|
-
*/
|
|
2350
|
-
trial?: SetItem.Trial;
|
|
2351
|
-
|
|
2352
|
-
/**
|
|
2353
|
-
* The ID of the trial offer to apply to the configuration item.
|
|
2354
|
-
*/
|
|
2355
|
-
trial_offer?: string;
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
namespace SetItem {
|
|
2359
|
-
interface Discount {
|
|
2360
|
-
/**
|
|
2361
|
-
* ID of the coupon to create a new discount for.
|
|
2362
|
-
*/
|
|
2363
|
-
coupon?: string;
|
|
2364
|
-
|
|
2365
|
-
/**
|
|
2366
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2367
|
-
*/
|
|
2368
|
-
discount?: string;
|
|
2369
|
-
|
|
2370
|
-
/**
|
|
2371
|
-
* Details to determine how long the discount should be applied for.
|
|
2372
|
-
*/
|
|
2373
|
-
discount_end?: Discount.DiscountEnd;
|
|
2374
|
-
|
|
2375
|
-
/**
|
|
2376
|
-
* ID of the promotion code to create a new discount for.
|
|
2377
|
-
*/
|
|
2378
|
-
promotion_code?: string;
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
namespace Discount {
|
|
2382
|
-
interface DiscountEnd {
|
|
2383
|
-
/**
|
|
2384
|
-
* Time span for the redeemed discount.
|
|
2385
|
-
*/
|
|
2386
|
-
duration?: DiscountEnd.Duration;
|
|
2387
|
-
|
|
2388
|
-
/**
|
|
2389
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2390
|
-
*/
|
|
2391
|
-
timestamp?: number;
|
|
2392
|
-
|
|
2393
|
-
/**
|
|
2394
|
-
* The type of calculation made to determine when the discount ends.
|
|
2395
|
-
*/
|
|
2396
|
-
type: DiscountEnd.Type;
|
|
2397
|
-
}
|
|
2398
|
-
|
|
2399
|
-
namespace DiscountEnd {
|
|
2400
|
-
interface Duration {
|
|
2401
|
-
/**
|
|
2402
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2403
|
-
*/
|
|
2404
|
-
interval: Duration.Interval;
|
|
2405
|
-
|
|
2406
|
-
/**
|
|
2407
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2408
|
-
*/
|
|
2409
|
-
interval_count: number;
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
namespace Duration {
|
|
2413
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
type Type = 'duration' | 'timestamp';
|
|
2417
|
-
}
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
|
-
interface Trial {
|
|
2421
|
-
/**
|
|
2422
|
-
* 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.
|
|
2423
|
-
*/
|
|
2424
|
-
converts_to?: Array<string>;
|
|
2425
|
-
|
|
2426
|
-
/**
|
|
2427
|
-
* Determines the type of trial for this item.
|
|
2428
|
-
*/
|
|
2429
|
-
type: Trial.Type;
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
namespace Trial {
|
|
2433
|
-
type Type = 'free' | 'paid';
|
|
2434
|
-
}
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
type Type =
|
|
2438
|
-
| 'add_discount'
|
|
2439
|
-
| 'add_item'
|
|
2440
|
-
| 'add_metadata'
|
|
2441
|
-
| 'clear_discounts'
|
|
2442
|
-
| 'clear_metadata'
|
|
2443
|
-
| 'remove_discount'
|
|
2444
|
-
| 'remove_item'
|
|
2445
|
-
| 'remove_metadata'
|
|
2446
|
-
| 'set_discounts'
|
|
2447
|
-
| 'set_items'
|
|
2448
|
-
| 'set_metadata';
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
interface AppliesTo {
|
|
2452
|
-
/**
|
|
2453
|
-
* A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
|
2454
|
-
*/
|
|
2455
|
-
new_reference?: string;
|
|
2456
|
-
|
|
2457
|
-
/**
|
|
2458
|
-
* The ID of the schedule the line applies to.
|
|
2459
|
-
*/
|
|
2460
|
-
subscription_schedule?: string;
|
|
2461
|
-
|
|
2462
|
-
/**
|
|
2463
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2464
|
-
*/
|
|
2465
|
-
type: AppliesTo.Type;
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2468
|
-
namespace AppliesTo {
|
|
2469
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
2473
|
-
|
|
2474
|
-
interface CancelSubscriptionSchedule {
|
|
2475
|
-
/**
|
|
2476
|
-
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
2477
|
-
*/
|
|
2478
|
-
cancel_at: 'line_starts_at';
|
|
2479
|
-
|
|
2480
|
-
/**
|
|
2481
|
-
* If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
|
2482
|
-
*/
|
|
2483
|
-
invoice_now?: boolean;
|
|
2484
|
-
|
|
2485
|
-
/**
|
|
2486
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
2487
|
-
*/
|
|
2488
|
-
prorate?: boolean;
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
|
-
type EffectiveAt = 'billing_period_start' | 'line_start';
|
|
2492
|
-
|
|
2493
|
-
interface EndsAt {
|
|
2494
|
-
/**
|
|
2495
|
-
* Use the `end` time of a given discount.
|
|
2496
|
-
*/
|
|
2497
|
-
discount_end?: EndsAt.DiscountEnd;
|
|
2498
|
-
|
|
2499
|
-
/**
|
|
2500
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
2501
|
-
*/
|
|
2502
|
-
duration?: EndsAt.Duration;
|
|
2503
|
-
|
|
2504
|
-
/**
|
|
2505
|
-
* A precise Unix timestamp.
|
|
2506
|
-
*/
|
|
2507
|
-
timestamp?: number;
|
|
2508
|
-
|
|
2509
|
-
/**
|
|
2510
|
-
* Select a way to pass in `ends_at`.
|
|
2511
|
-
*/
|
|
2512
|
-
type: EndsAt.Type;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
namespace EndsAt {
|
|
2516
|
-
interface DiscountEnd {
|
|
2517
|
-
/**
|
|
2518
|
-
* The ID of a specific discount.
|
|
2519
|
-
*/
|
|
2520
|
-
discount: string;
|
|
2521
|
-
}
|
|
2522
|
-
|
|
2523
|
-
interface Duration {
|
|
2524
|
-
/**
|
|
2525
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2526
|
-
*/
|
|
2527
|
-
interval: Duration.Interval;
|
|
2528
|
-
|
|
2529
|
-
/**
|
|
2530
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2531
|
-
*/
|
|
2532
|
-
interval_count: number;
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
namespace Duration {
|
|
2536
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
type Type =
|
|
2540
|
-
| 'billing_period_end'
|
|
2541
|
-
| 'discount_end'
|
|
2542
|
-
| 'duration'
|
|
2543
|
-
| 'quote_acceptance_date'
|
|
2544
|
-
| 'schedule_end'
|
|
2545
|
-
| 'timestamp'
|
|
2546
|
-
| 'upcoming_invoice';
|
|
2547
|
-
}
|
|
2548
|
-
|
|
2549
|
-
type ProrationBehavior =
|
|
2550
|
-
| 'always_invoice'
|
|
2551
|
-
| 'create_prorations'
|
|
2552
|
-
| 'none';
|
|
2553
|
-
|
|
2554
|
-
interface SetPauseCollection {
|
|
2555
|
-
/**
|
|
2556
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
2557
|
-
*/
|
|
2558
|
-
set?: SetPauseCollection.Set;
|
|
2559
|
-
|
|
2560
|
-
/**
|
|
2561
|
-
* Determines the type of the pause_collection amendment.
|
|
2562
|
-
*/
|
|
2563
|
-
type: SetPauseCollection.Type;
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
|
-
namespace SetPauseCollection {
|
|
2567
|
-
interface Set {
|
|
2568
|
-
/**
|
|
2569
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2570
|
-
*/
|
|
2571
|
-
behavior: Set.Behavior;
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
namespace Set {
|
|
2575
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
|
-
type Type = 'remove' | 'set';
|
|
2579
|
-
}
|
|
2580
|
-
|
|
2581
|
-
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
2582
|
-
|
|
2583
|
-
interface StartsAt {
|
|
2584
|
-
/**
|
|
2585
|
-
* Use the `end` time of a given discount.
|
|
2586
|
-
*/
|
|
2587
|
-
discount_end?: StartsAt.DiscountEnd;
|
|
2588
|
-
|
|
2589
|
-
/**
|
|
2590
|
-
* The timestamp the given line ends at.
|
|
2591
|
-
*/
|
|
2592
|
-
line_ends_at?: StartsAt.LineEndsAt;
|
|
2593
|
-
|
|
2594
|
-
/**
|
|
2595
|
-
* A precise Unix timestamp.
|
|
2596
|
-
*/
|
|
2597
|
-
timestamp?: number;
|
|
2598
|
-
|
|
2599
|
-
/**
|
|
2600
|
-
* Select a way to pass in `starts_at`.
|
|
2601
|
-
*/
|
|
2602
|
-
type: StartsAt.Type;
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
namespace StartsAt {
|
|
2606
|
-
interface DiscountEnd {
|
|
2607
|
-
/**
|
|
2608
|
-
* The ID of a specific discount.
|
|
2609
|
-
*/
|
|
2610
|
-
discount: string;
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
interface LineEndsAt {
|
|
2614
|
-
/**
|
|
2615
|
-
* The ID of a quote line.
|
|
2616
|
-
*/
|
|
2617
|
-
id?: string;
|
|
2618
|
-
|
|
2619
|
-
/**
|
|
2620
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2621
|
-
*/
|
|
2622
|
-
index?: number;
|
|
2623
|
-
}
|
|
2624
|
-
|
|
2625
|
-
type Type =
|
|
2626
|
-
| 'discount_end'
|
|
2627
|
-
| 'line_ends_at'
|
|
2628
|
-
| 'now'
|
|
2629
|
-
| 'quote_acceptance_date'
|
|
2630
|
-
| 'schedule_end'
|
|
2631
|
-
| 'timestamp'
|
|
2632
|
-
| 'upcoming_invoice';
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
interface TrialSettings {
|
|
2636
|
-
/**
|
|
2637
|
-
* Defines how the subscription should behave when a trial ends.
|
|
2638
|
-
*/
|
|
2639
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
namespace TrialSettings {
|
|
2643
|
-
interface EndBehavior {
|
|
2644
|
-
/**
|
|
2645
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2646
|
-
*/
|
|
2647
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
namespace EndBehavior {
|
|
2651
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
}
|
|
2655
|
-
|
|
2656
|
-
interface LineItem {
|
|
2657
|
-
/**
|
|
2658
|
-
* The discounts applied to this line item.
|
|
2659
|
-
*/
|
|
2660
|
-
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
2661
|
-
|
|
2662
|
-
/**
|
|
2663
|
-
* The ID of an existing line item on the quote.
|
|
2664
|
-
*/
|
|
2665
|
-
id?: string;
|
|
2666
|
-
|
|
2667
|
-
/**
|
|
2668
|
-
* The ID of the price object. One of `price` or `price_data` is required.
|
|
2669
|
-
*/
|
|
2670
|
-
price?: string;
|
|
2671
|
-
|
|
2672
|
-
/**
|
|
2673
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
2674
|
-
*/
|
|
2675
|
-
price_data?: LineItem.PriceData;
|
|
2676
|
-
|
|
2677
|
-
/**
|
|
2678
|
-
* The quantity of the line item.
|
|
2679
|
-
*/
|
|
2680
|
-
quantity?: number;
|
|
2681
|
-
|
|
2682
|
-
/**
|
|
2683
|
-
* The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
|
2684
|
-
*/
|
|
2685
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
namespace LineItem {
|
|
2689
|
-
interface Discount {
|
|
2690
|
-
/**
|
|
2691
|
-
* ID of the coupon to create a new discount for.
|
|
2692
|
-
*/
|
|
2693
|
-
coupon?: string;
|
|
2694
|
-
|
|
2695
|
-
/**
|
|
2696
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2697
|
-
*/
|
|
2698
|
-
discount?: string;
|
|
2699
|
-
|
|
2700
|
-
/**
|
|
2701
|
-
* Details to determine how long the discount should be applied for.
|
|
2702
|
-
*/
|
|
2703
|
-
discount_end?: Discount.DiscountEnd;
|
|
2704
|
-
|
|
2705
|
-
/**
|
|
2706
|
-
* ID of the promotion code to create a new discount for.
|
|
2707
|
-
*/
|
|
2708
|
-
promotion_code?: string;
|
|
2709
|
-
}
|
|
2710
|
-
|
|
2711
|
-
namespace Discount {
|
|
2712
|
-
interface DiscountEnd {
|
|
2713
|
-
/**
|
|
2714
|
-
* Time span for the redeemed discount.
|
|
2715
|
-
*/
|
|
2716
|
-
duration?: DiscountEnd.Duration;
|
|
2717
|
-
|
|
2718
|
-
/**
|
|
2719
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2720
|
-
*/
|
|
2721
|
-
timestamp?: number;
|
|
2722
|
-
|
|
2723
|
-
/**
|
|
2724
|
-
* The type of calculation made to determine when the discount ends.
|
|
2725
|
-
*/
|
|
2726
|
-
type: DiscountEnd.Type;
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
namespace DiscountEnd {
|
|
2730
|
-
interface Duration {
|
|
2731
|
-
/**
|
|
2732
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2733
|
-
*/
|
|
2734
|
-
interval: Duration.Interval;
|
|
2735
|
-
|
|
2736
|
-
/**
|
|
2737
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2738
|
-
*/
|
|
2739
|
-
interval_count: number;
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2742
|
-
namespace Duration {
|
|
2743
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
type Type = 'duration' | 'timestamp';
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
|
|
2750
|
-
interface PriceData {
|
|
2751
|
-
/**
|
|
2752
|
-
* 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).
|
|
2753
|
-
*/
|
|
2754
|
-
currency: string;
|
|
2755
|
-
|
|
2756
|
-
/**
|
|
2757
|
-
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
2758
|
-
*/
|
|
2759
|
-
product: string;
|
|
2760
|
-
|
|
2761
|
-
/**
|
|
2762
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
2763
|
-
*/
|
|
2764
|
-
recurring?: PriceData.Recurring;
|
|
2765
|
-
|
|
2766
|
-
/**
|
|
2767
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
2768
|
-
*/
|
|
2769
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2770
|
-
|
|
2771
|
-
/**
|
|
2772
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
2773
|
-
*/
|
|
2774
|
-
unit_amount?: number;
|
|
2775
|
-
|
|
2776
|
-
/**
|
|
2777
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
2778
|
-
*/
|
|
2779
|
-
unit_amount_decimal?: string;
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2782
|
-
namespace PriceData {
|
|
2783
|
-
interface Recurring {
|
|
2784
|
-
/**
|
|
2785
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2786
|
-
*/
|
|
2787
|
-
interval: Recurring.Interval;
|
|
2788
|
-
|
|
2789
|
-
/**
|
|
2790
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
2791
|
-
*/
|
|
2792
|
-
interval_count?: number;
|
|
2793
|
-
}
|
|
2794
|
-
|
|
2795
|
-
namespace Recurring {
|
|
2796
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2800
|
-
}
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
|
-
interface SubscriptionData {
|
|
2804
|
-
/**
|
|
2805
|
-
* Describes the period to bill for upon accepting the quote.
|
|
2806
|
-
*/
|
|
2807
|
-
bill_on_acceptance?: Stripe.Emptyable<
|
|
2808
|
-
SubscriptionData.BillOnAcceptance
|
|
2809
|
-
>;
|
|
2810
|
-
|
|
2811
|
-
/**
|
|
2812
|
-
* 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.
|
|
2813
|
-
*/
|
|
2814
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
2815
|
-
|
|
2816
|
-
/**
|
|
2817
|
-
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
2818
|
-
*/
|
|
2819
|
-
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
2820
|
-
|
|
2821
|
-
/**
|
|
2822
|
-
* Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
|
|
2823
|
-
*/
|
|
2824
|
-
billing_schedules?: Stripe.Emptyable<
|
|
2825
|
-
Array<SubscriptionData.BillingSchedule>
|
|
2826
|
-
>;
|
|
2827
|
-
|
|
2828
|
-
/**
|
|
2829
|
-
* The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
2830
|
-
*/
|
|
2831
|
-
description?: Stripe.Emptyable<string>;
|
|
2832
|
-
|
|
2833
|
-
/**
|
|
2834
|
-
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
2835
|
-
*/
|
|
2836
|
-
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
2837
|
-
|
|
2838
|
-
/**
|
|
2839
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2840
|
-
*/
|
|
2841
|
-
end_behavior?: SubscriptionData.EndBehavior;
|
|
2842
|
-
|
|
2843
|
-
/**
|
|
2844
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
|
2845
|
-
*/
|
|
2846
|
-
metadata?: Stripe.MetadataParam;
|
|
2847
|
-
|
|
2848
|
-
/**
|
|
2849
|
-
* Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
2850
|
-
*/
|
|
2851
|
-
phase_effective_at?: SubscriptionData.PhaseEffectiveAt;
|
|
2852
|
-
|
|
2853
|
-
/**
|
|
2854
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
2855
|
-
*/
|
|
2856
|
-
prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
|
|
2857
|
-
|
|
2858
|
-
/**
|
|
2859
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
2860
|
-
*
|
|
2861
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2862
|
-
*
|
|
2863
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
2864
|
-
*
|
|
2865
|
-
* Prorations can be disabled by passing `none`.
|
|
2866
|
-
*/
|
|
2867
|
-
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
2868
|
-
|
|
2869
|
-
/**
|
|
2870
|
-
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
2871
|
-
*/
|
|
2872
|
-
trial_period_days?: Stripe.Emptyable<number>;
|
|
2873
|
-
}
|
|
2874
|
-
|
|
2875
|
-
namespace SubscriptionData {
|
|
2876
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
2877
|
-
|
|
2878
|
-
interface BillingSchedule {
|
|
2879
|
-
/**
|
|
2880
|
-
* Configure billing schedule differently for individual subscription items.
|
|
2881
|
-
*/
|
|
2882
|
-
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
2883
|
-
|
|
2884
|
-
/**
|
|
2885
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
2886
|
-
*/
|
|
2887
|
-
bill_from?: BillingSchedule.BillFrom;
|
|
2888
|
-
|
|
2889
|
-
/**
|
|
2890
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
2891
|
-
*/
|
|
2892
|
-
bill_until?: BillingSchedule.BillUntil;
|
|
2893
|
-
|
|
2894
|
-
/**
|
|
2895
|
-
* 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.
|
|
2896
|
-
*/
|
|
2897
|
-
key?: string;
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
namespace BillingSchedule {
|
|
2901
|
-
interface AppliesTo {
|
|
2902
|
-
/**
|
|
2903
|
-
* The ID of the price object.
|
|
2904
|
-
*/
|
|
2905
|
-
price?: string;
|
|
2906
|
-
|
|
2907
|
-
/**
|
|
2908
|
-
* Controls which subscription items the billing schedule applies to.
|
|
2909
|
-
*/
|
|
2910
|
-
type: 'price';
|
|
2911
|
-
}
|
|
2912
|
-
|
|
2913
|
-
interface BillFrom {
|
|
2914
|
-
/**
|
|
2915
|
-
* Details of a Quote line to start the bill period from.
|
|
2916
|
-
*/
|
|
2917
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
2918
|
-
|
|
2919
|
-
/**
|
|
2920
|
-
* A precise Unix timestamp.
|
|
2921
|
-
*/
|
|
2922
|
-
timestamp?: number;
|
|
2923
|
-
|
|
2924
|
-
/**
|
|
2925
|
-
* The type of method to specify the `bill_from` time.
|
|
2926
|
-
*/
|
|
2927
|
-
type: BillFrom.Type;
|
|
2928
|
-
}
|
|
2929
|
-
|
|
2930
|
-
namespace BillFrom {
|
|
2931
|
-
interface LineStartsAt {
|
|
2932
|
-
/**
|
|
2933
|
-
* The ID of a quote line.
|
|
2934
|
-
*/
|
|
2935
|
-
id?: string;
|
|
2936
|
-
|
|
2937
|
-
/**
|
|
2938
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2939
|
-
*/
|
|
2940
|
-
index?: number;
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
|
-
type Type =
|
|
2944
|
-
| 'line_starts_at'
|
|
2945
|
-
| 'now'
|
|
2946
|
-
| 'pause_collection_start'
|
|
2947
|
-
| 'quote_acceptance_date'
|
|
2948
|
-
| 'timestamp';
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
|
-
interface BillUntil {
|
|
2952
|
-
/**
|
|
2953
|
-
* Details of the duration over which to bill.
|
|
2954
|
-
*/
|
|
2955
|
-
duration?: BillUntil.Duration;
|
|
2956
|
-
|
|
2957
|
-
/**
|
|
2958
|
-
* Details of a Quote line item from which to bill until.
|
|
2959
|
-
*/
|
|
2960
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
2961
|
-
|
|
2962
|
-
/**
|
|
2963
|
-
* A precise Unix timestamp.
|
|
2964
|
-
*/
|
|
2965
|
-
timestamp?: number;
|
|
2966
|
-
|
|
2967
|
-
/**
|
|
2968
|
-
* The type of method to specify the `bill_until` time.
|
|
2969
|
-
*/
|
|
2970
|
-
type: BillUntil.Type;
|
|
2971
|
-
}
|
|
2972
|
-
|
|
2973
|
-
namespace BillUntil {
|
|
2974
|
-
interface Duration {
|
|
2975
|
-
/**
|
|
2976
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2977
|
-
*/
|
|
2978
|
-
interval: Duration.Interval;
|
|
2979
|
-
|
|
2980
|
-
/**
|
|
2981
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2982
|
-
*/
|
|
2983
|
-
interval_count: number;
|
|
2984
|
-
}
|
|
2985
|
-
|
|
2986
|
-
namespace Duration {
|
|
2987
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2988
|
-
}
|
|
2989
|
-
|
|
2990
|
-
interface LineEndsAt {
|
|
2991
|
-
/**
|
|
2992
|
-
* The ID of a quote line.
|
|
2993
|
-
*/
|
|
2994
|
-
id?: string;
|
|
2995
|
-
|
|
2996
|
-
/**
|
|
2997
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2998
|
-
*/
|
|
2999
|
-
index?: number;
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
|
-
type Type =
|
|
3003
|
-
| 'duration'
|
|
3004
|
-
| 'line_ends_at'
|
|
3005
|
-
| 'schedule_end'
|
|
3006
|
-
| 'timestamp'
|
|
3007
|
-
| 'upcoming_invoice';
|
|
3008
|
-
}
|
|
3009
|
-
}
|
|
3010
|
-
|
|
3011
|
-
interface BillOnAcceptance {
|
|
3012
|
-
/**
|
|
3013
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
3014
|
-
*/
|
|
3015
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
3016
|
-
|
|
3017
|
-
/**
|
|
3018
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
3019
|
-
*/
|
|
3020
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
namespace BillOnAcceptance {
|
|
3024
|
-
interface BillFrom {
|
|
3025
|
-
/**
|
|
3026
|
-
* Details of a Quote line to start the bill period from.
|
|
3027
|
-
*/
|
|
3028
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
3029
|
-
|
|
3030
|
-
/**
|
|
3031
|
-
* A precise Unix timestamp.
|
|
3032
|
-
*/
|
|
3033
|
-
timestamp?: number;
|
|
3034
|
-
|
|
3035
|
-
/**
|
|
3036
|
-
* The type of method to specify the `bill_from` time.
|
|
3037
|
-
*/
|
|
3038
|
-
type: BillFrom.Type;
|
|
3039
|
-
}
|
|
3040
|
-
|
|
3041
|
-
namespace BillFrom {
|
|
3042
|
-
interface LineStartsAt {
|
|
3043
|
-
/**
|
|
3044
|
-
* The ID of a quote line.
|
|
3045
|
-
*/
|
|
3046
|
-
id?: string;
|
|
3047
|
-
|
|
3048
|
-
/**
|
|
3049
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
3050
|
-
*/
|
|
3051
|
-
index?: number;
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
type Type =
|
|
3055
|
-
| 'line_starts_at'
|
|
3056
|
-
| 'now'
|
|
3057
|
-
| 'pause_collection_start'
|
|
3058
|
-
| 'quote_acceptance_date'
|
|
3059
|
-
| 'timestamp';
|
|
3060
|
-
}
|
|
3061
|
-
|
|
3062
|
-
interface BillUntil {
|
|
3063
|
-
/**
|
|
3064
|
-
* Details of the duration over which to bill.
|
|
3065
|
-
*/
|
|
3066
|
-
duration?: BillUntil.Duration;
|
|
3067
|
-
|
|
3068
|
-
/**
|
|
3069
|
-
* Details of a Quote line item from which to bill until.
|
|
3070
|
-
*/
|
|
3071
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
3072
|
-
|
|
3073
|
-
/**
|
|
3074
|
-
* A precise Unix timestamp.
|
|
3075
|
-
*/
|
|
3076
|
-
timestamp?: number;
|
|
3077
|
-
|
|
3078
|
-
/**
|
|
3079
|
-
* The type of method to specify the `bill_until` time.
|
|
3080
|
-
*/
|
|
3081
|
-
type: BillUntil.Type;
|
|
3082
|
-
}
|
|
3083
|
-
|
|
3084
|
-
namespace BillUntil {
|
|
3085
|
-
interface Duration {
|
|
3086
|
-
/**
|
|
3087
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3088
|
-
*/
|
|
3089
|
-
interval: Duration.Interval;
|
|
3090
|
-
|
|
3091
|
-
/**
|
|
3092
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3093
|
-
*/
|
|
3094
|
-
interval_count: number;
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
namespace Duration {
|
|
3098
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
interface LineEndsAt {
|
|
3102
|
-
/**
|
|
3103
|
-
* The ID of a quote line.
|
|
3104
|
-
*/
|
|
3105
|
-
id?: string;
|
|
3106
|
-
|
|
3107
|
-
/**
|
|
3108
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
3109
|
-
*/
|
|
3110
|
-
index?: number;
|
|
3111
|
-
}
|
|
3112
|
-
|
|
3113
|
-
type Type =
|
|
3114
|
-
| 'duration'
|
|
3115
|
-
| 'line_ends_at'
|
|
3116
|
-
| 'schedule_end'
|
|
3117
|
-
| 'timestamp'
|
|
3118
|
-
| 'upcoming_invoice';
|
|
3119
|
-
}
|
|
3120
|
-
}
|
|
3121
|
-
|
|
3122
|
-
type EndBehavior = 'cancel' | 'release';
|
|
3123
|
-
|
|
3124
|
-
type PhaseEffectiveAt = 'billing_period_start' | 'line_start';
|
|
3125
|
-
|
|
3126
|
-
interface Prebilling {
|
|
3127
|
-
/**
|
|
3128
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
3129
|
-
*/
|
|
3130
|
-
iterations: number;
|
|
3131
|
-
}
|
|
513
|
+
interface Discount {
|
|
514
|
+
/**
|
|
515
|
+
* ID of the coupon to create a new discount for.
|
|
516
|
+
*/
|
|
517
|
+
coupon?: string;
|
|
3132
518
|
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
}
|
|
519
|
+
/**
|
|
520
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
521
|
+
*/
|
|
522
|
+
discount?: string;
|
|
3138
523
|
|
|
3139
|
-
interface SubscriptionDataOverride {
|
|
3140
524
|
/**
|
|
3141
|
-
*
|
|
525
|
+
* ID of the promotion code to create a new discount for.
|
|
3142
526
|
*/
|
|
3143
|
-
|
|
527
|
+
promotion_code?: string;
|
|
528
|
+
}
|
|
3144
529
|
|
|
530
|
+
interface InvoiceSettings {
|
|
3145
531
|
/**
|
|
3146
|
-
*
|
|
532
|
+
* Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
|
3147
533
|
*/
|
|
3148
|
-
|
|
3149
|
-
SubscriptionDataOverride.BillOnAcceptance
|
|
3150
|
-
>;
|
|
534
|
+
days_until_due?: number;
|
|
3151
535
|
|
|
3152
536
|
/**
|
|
3153
|
-
*
|
|
537
|
+
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
3154
538
|
*/
|
|
3155
|
-
|
|
539
|
+
issuer?: InvoiceSettings.Issuer;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
namespace InvoiceSettings {
|
|
543
|
+
interface Issuer {
|
|
544
|
+
/**
|
|
545
|
+
* The connected account being referenced when `type` is `account`.
|
|
546
|
+
*/
|
|
547
|
+
account?: string;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Type of the account referenced in the request.
|
|
551
|
+
*/
|
|
552
|
+
type: Issuer.Type;
|
|
553
|
+
}
|
|
3156
554
|
|
|
555
|
+
namespace Issuer {
|
|
556
|
+
type Type = 'account' | 'self';
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
interface LineItem {
|
|
3157
561
|
/**
|
|
3158
|
-
*
|
|
562
|
+
* The discounts applied to this line item.
|
|
3159
563
|
*/
|
|
3160
|
-
|
|
3161
|
-
Array<SubscriptionDataOverride.BillingSchedule>
|
|
3162
|
-
>;
|
|
564
|
+
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
3163
565
|
|
|
3164
566
|
/**
|
|
3165
|
-
* The
|
|
567
|
+
* The ID of an existing line item on the quote.
|
|
3166
568
|
*/
|
|
3167
|
-
|
|
569
|
+
id?: string;
|
|
3168
570
|
|
|
3169
571
|
/**
|
|
3170
|
-
* The
|
|
572
|
+
* The ID of the price object. One of `price` or `price_data` is required.
|
|
3171
573
|
*/
|
|
3172
|
-
|
|
574
|
+
price?: string;
|
|
3173
575
|
|
|
3174
576
|
/**
|
|
3175
|
-
*
|
|
577
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
|
|
3176
578
|
*/
|
|
3177
|
-
|
|
579
|
+
price_data?: LineItem.PriceData;
|
|
3178
580
|
|
|
3179
581
|
/**
|
|
3180
|
-
*
|
|
582
|
+
* The quantity of the line item.
|
|
3181
583
|
*/
|
|
3182
|
-
|
|
584
|
+
quantity?: number;
|
|
3183
585
|
|
|
3184
586
|
/**
|
|
3185
|
-
*
|
|
3186
|
-
*
|
|
3187
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
3188
|
-
*
|
|
3189
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
3190
|
-
*
|
|
3191
|
-
* Prorations can be disabled by passing `none`.
|
|
587
|
+
* The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
|
3192
588
|
*/
|
|
3193
|
-
|
|
589
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3194
590
|
}
|
|
3195
591
|
|
|
3196
|
-
namespace
|
|
3197
|
-
interface
|
|
592
|
+
namespace LineItem {
|
|
593
|
+
interface Discount {
|
|
3198
594
|
/**
|
|
3199
|
-
*
|
|
595
|
+
* ID of the coupon to create a new discount for.
|
|
3200
596
|
*/
|
|
3201
|
-
|
|
597
|
+
coupon?: string;
|
|
3202
598
|
|
|
3203
599
|
/**
|
|
3204
|
-
*
|
|
600
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3205
601
|
*/
|
|
3206
|
-
|
|
602
|
+
discount?: string;
|
|
3207
603
|
|
|
3208
604
|
/**
|
|
3209
|
-
*
|
|
605
|
+
* ID of the promotion code to create a new discount for.
|
|
3210
606
|
*/
|
|
3211
|
-
|
|
3212
|
-
}
|
|
3213
|
-
|
|
3214
|
-
namespace AppliesTo {
|
|
3215
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
607
|
+
promotion_code?: string;
|
|
3216
608
|
}
|
|
3217
609
|
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
interface BillingSchedule {
|
|
610
|
+
interface PriceData {
|
|
3221
611
|
/**
|
|
3222
|
-
*
|
|
612
|
+
* 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).
|
|
3223
613
|
*/
|
|
3224
|
-
|
|
614
|
+
currency: string;
|
|
3225
615
|
|
|
3226
616
|
/**
|
|
3227
|
-
* The
|
|
617
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
3228
618
|
*/
|
|
3229
|
-
|
|
619
|
+
product: string;
|
|
3230
620
|
|
|
3231
621
|
/**
|
|
3232
|
-
* The
|
|
622
|
+
* The recurring components of a price such as `interval` and `interval_count`.
|
|
3233
623
|
*/
|
|
3234
|
-
|
|
624
|
+
recurring?: PriceData.Recurring;
|
|
3235
625
|
|
|
3236
626
|
/**
|
|
3237
|
-
*
|
|
627
|
+
* Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
3238
628
|
*/
|
|
3239
|
-
|
|
3240
|
-
}
|
|
3241
|
-
|
|
3242
|
-
namespace BillingSchedule {
|
|
3243
|
-
interface AppliesTo {
|
|
3244
|
-
/**
|
|
3245
|
-
* The ID of the price object.
|
|
3246
|
-
*/
|
|
3247
|
-
price?: string;
|
|
3248
|
-
|
|
3249
|
-
/**
|
|
3250
|
-
* Controls which subscription items the billing schedule applies to.
|
|
3251
|
-
*/
|
|
3252
|
-
type: 'price';
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
interface BillFrom {
|
|
3256
|
-
/**
|
|
3257
|
-
* Details of a Quote line to start the bill period from.
|
|
3258
|
-
*/
|
|
3259
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
3260
|
-
|
|
3261
|
-
/**
|
|
3262
|
-
* A precise Unix timestamp.
|
|
3263
|
-
*/
|
|
3264
|
-
timestamp?: number;
|
|
3265
|
-
|
|
3266
|
-
/**
|
|
3267
|
-
* The type of method to specify the `bill_from` time.
|
|
3268
|
-
*/
|
|
3269
|
-
type: BillFrom.Type;
|
|
3270
|
-
}
|
|
3271
|
-
|
|
3272
|
-
namespace BillFrom {
|
|
3273
|
-
interface LineStartsAt {
|
|
3274
|
-
/**
|
|
3275
|
-
* The ID of a quote line.
|
|
3276
|
-
*/
|
|
3277
|
-
id?: string;
|
|
3278
|
-
|
|
3279
|
-
/**
|
|
3280
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
3281
|
-
*/
|
|
3282
|
-
index?: number;
|
|
3283
|
-
}
|
|
3284
|
-
|
|
3285
|
-
type Type =
|
|
3286
|
-
| 'line_starts_at'
|
|
3287
|
-
| 'now'
|
|
3288
|
-
| 'pause_collection_start'
|
|
3289
|
-
| 'quote_acceptance_date'
|
|
3290
|
-
| 'timestamp';
|
|
3291
|
-
}
|
|
3292
|
-
|
|
3293
|
-
interface BillUntil {
|
|
3294
|
-
/**
|
|
3295
|
-
* Details of the duration over which to bill.
|
|
3296
|
-
*/
|
|
3297
|
-
duration?: BillUntil.Duration;
|
|
3298
|
-
|
|
3299
|
-
/**
|
|
3300
|
-
* Details of a Quote line item from which to bill until.
|
|
3301
|
-
*/
|
|
3302
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
3303
|
-
|
|
3304
|
-
/**
|
|
3305
|
-
* A precise Unix timestamp.
|
|
3306
|
-
*/
|
|
3307
|
-
timestamp?: number;
|
|
3308
|
-
|
|
3309
|
-
/**
|
|
3310
|
-
* The type of method to specify the `bill_until` time.
|
|
3311
|
-
*/
|
|
3312
|
-
type: BillUntil.Type;
|
|
3313
|
-
}
|
|
3314
|
-
|
|
3315
|
-
namespace BillUntil {
|
|
3316
|
-
interface Duration {
|
|
3317
|
-
/**
|
|
3318
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3319
|
-
*/
|
|
3320
|
-
interval: Duration.Interval;
|
|
3321
|
-
|
|
3322
|
-
/**
|
|
3323
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3324
|
-
*/
|
|
3325
|
-
interval_count: number;
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
|
-
namespace Duration {
|
|
3329
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3330
|
-
}
|
|
3331
|
-
|
|
3332
|
-
interface LineEndsAt {
|
|
3333
|
-
/**
|
|
3334
|
-
* The ID of a quote line.
|
|
3335
|
-
*/
|
|
3336
|
-
id?: string;
|
|
3337
|
-
|
|
3338
|
-
/**
|
|
3339
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
3340
|
-
*/
|
|
3341
|
-
index?: number;
|
|
3342
|
-
}
|
|
3343
|
-
|
|
3344
|
-
type Type =
|
|
3345
|
-
| 'duration'
|
|
3346
|
-
| 'line_ends_at'
|
|
3347
|
-
| 'schedule_end'
|
|
3348
|
-
| 'timestamp'
|
|
3349
|
-
| 'upcoming_invoice';
|
|
3350
|
-
}
|
|
3351
|
-
}
|
|
629
|
+
tax_behavior?: PriceData.TaxBehavior;
|
|
3352
630
|
|
|
3353
|
-
interface BillOnAcceptance {
|
|
3354
631
|
/**
|
|
3355
|
-
*
|
|
632
|
+
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
3356
633
|
*/
|
|
3357
|
-
|
|
634
|
+
unit_amount?: number;
|
|
3358
635
|
|
|
3359
636
|
/**
|
|
3360
|
-
*
|
|
637
|
+
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
3361
638
|
*/
|
|
3362
|
-
|
|
639
|
+
unit_amount_decimal?: string;
|
|
3363
640
|
}
|
|
3364
641
|
|
|
3365
|
-
namespace
|
|
3366
|
-
interface
|
|
3367
|
-
/**
|
|
3368
|
-
* Details of a Quote line to start the bill period from.
|
|
3369
|
-
*/
|
|
3370
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
3371
|
-
|
|
642
|
+
namespace PriceData {
|
|
643
|
+
interface Recurring {
|
|
3372
644
|
/**
|
|
3373
|
-
*
|
|
645
|
+
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
3374
646
|
*/
|
|
3375
|
-
|
|
647
|
+
interval: Recurring.Interval;
|
|
3376
648
|
|
|
3377
649
|
/**
|
|
3378
|
-
* The
|
|
650
|
+
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
3379
651
|
*/
|
|
3380
|
-
|
|
3381
|
-
}
|
|
3382
|
-
|
|
3383
|
-
namespace BillFrom {
|
|
3384
|
-
interface LineStartsAt {
|
|
3385
|
-
/**
|
|
3386
|
-
* The ID of a quote line.
|
|
3387
|
-
*/
|
|
3388
|
-
id?: string;
|
|
3389
|
-
|
|
3390
|
-
/**
|
|
3391
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
3392
|
-
*/
|
|
3393
|
-
index?: number;
|
|
3394
|
-
}
|
|
3395
|
-
|
|
3396
|
-
type Type =
|
|
3397
|
-
| 'line_starts_at'
|
|
3398
|
-
| 'now'
|
|
3399
|
-
| 'pause_collection_start'
|
|
3400
|
-
| 'quote_acceptance_date'
|
|
3401
|
-
| 'timestamp';
|
|
652
|
+
interval_count?: number;
|
|
3402
653
|
}
|
|
3403
654
|
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
* Details of the duration over which to bill.
|
|
3407
|
-
*/
|
|
3408
|
-
duration?: BillUntil.Duration;
|
|
3409
|
-
|
|
3410
|
-
/**
|
|
3411
|
-
* Details of a Quote line item from which to bill until.
|
|
3412
|
-
*/
|
|
3413
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
3414
|
-
|
|
3415
|
-
/**
|
|
3416
|
-
* A precise Unix timestamp.
|
|
3417
|
-
*/
|
|
3418
|
-
timestamp?: number;
|
|
3419
|
-
|
|
3420
|
-
/**
|
|
3421
|
-
* The type of method to specify the `bill_until` time.
|
|
3422
|
-
*/
|
|
3423
|
-
type: BillUntil.Type;
|
|
655
|
+
namespace Recurring {
|
|
656
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3424
657
|
}
|
|
3425
658
|
|
|
3426
|
-
|
|
3427
|
-
interface Duration {
|
|
3428
|
-
/**
|
|
3429
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3430
|
-
*/
|
|
3431
|
-
interval: Duration.Interval;
|
|
3432
|
-
|
|
3433
|
-
/**
|
|
3434
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3435
|
-
*/
|
|
3436
|
-
interval_count: number;
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
|
-
namespace Duration {
|
|
3440
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3441
|
-
}
|
|
3442
|
-
|
|
3443
|
-
interface LineEndsAt {
|
|
3444
|
-
/**
|
|
3445
|
-
* The ID of a quote line.
|
|
3446
|
-
*/
|
|
3447
|
-
id?: string;
|
|
3448
|
-
|
|
3449
|
-
/**
|
|
3450
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
3451
|
-
*/
|
|
3452
|
-
index?: number;
|
|
3453
|
-
}
|
|
3454
|
-
|
|
3455
|
-
type Type =
|
|
3456
|
-
| 'duration'
|
|
3457
|
-
| 'line_ends_at'
|
|
3458
|
-
| 'schedule_end'
|
|
3459
|
-
| 'timestamp'
|
|
3460
|
-
| 'upcoming_invoice';
|
|
3461
|
-
}
|
|
659
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3462
660
|
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
interface SubscriptionData {
|
|
664
|
+
/**
|
|
665
|
+
* The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
666
|
+
*/
|
|
667
|
+
description?: Stripe.Emptyable<string>;
|
|
3463
668
|
|
|
3464
|
-
|
|
669
|
+
/**
|
|
670
|
+
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
671
|
+
*/
|
|
672
|
+
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
3465
673
|
|
|
3466
|
-
|
|
674
|
+
/**
|
|
675
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
|
676
|
+
*/
|
|
677
|
+
metadata?: Stripe.MetadataParam;
|
|
3467
678
|
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
679
|
+
/**
|
|
680
|
+
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
681
|
+
*/
|
|
682
|
+
trial_period_days?: Stripe.Emptyable<number>;
|
|
3472
683
|
}
|
|
3473
684
|
|
|
3474
685
|
interface TransferData {
|
|
@@ -3491,12 +702,12 @@ declare module 'stripe' {
|
|
|
3491
702
|
|
|
3492
703
|
interface QuoteListParams extends PaginationParams {
|
|
3493
704
|
/**
|
|
3494
|
-
* The ID of the customer whose quotes
|
|
705
|
+
* The ID of the customer whose quotes you're retrieving.
|
|
3495
706
|
*/
|
|
3496
707
|
customer?: string;
|
|
3497
708
|
|
|
3498
709
|
/**
|
|
3499
|
-
* The ID of the account whose quotes
|
|
710
|
+
* The ID of the account representing the customer whose quotes you're retrieving.
|
|
3500
711
|
*/
|
|
3501
712
|
customer_account?: string;
|
|
3502
713
|
|
|
@@ -3505,11 +716,6 @@ declare module 'stripe' {
|
|
|
3505
716
|
*/
|
|
3506
717
|
expand?: Array<string>;
|
|
3507
718
|
|
|
3508
|
-
/**
|
|
3509
|
-
* The subscription which the quote updates.
|
|
3510
|
-
*/
|
|
3511
|
-
from_subscription?: string;
|
|
3512
|
-
|
|
3513
719
|
/**
|
|
3514
720
|
* The status of the quote.
|
|
3515
721
|
*/
|
|
@@ -3522,13 +728,7 @@ declare module 'stripe' {
|
|
|
3522
728
|
}
|
|
3523
729
|
|
|
3524
730
|
namespace QuoteListParams {
|
|
3525
|
-
type Status =
|
|
3526
|
-
| 'accepted'
|
|
3527
|
-
| 'accepting'
|
|
3528
|
-
| 'canceled'
|
|
3529
|
-
| 'draft'
|
|
3530
|
-
| 'open'
|
|
3531
|
-
| 'stale';
|
|
731
|
+
type Status = 'accepted' | 'canceled' | 'draft' | 'open';
|
|
3532
732
|
}
|
|
3533
733
|
|
|
3534
734
|
interface QuoteAcceptParams {
|
|
@@ -3557,13 +757,6 @@ declare module 'stripe' {
|
|
|
3557
757
|
expires_at?: number;
|
|
3558
758
|
}
|
|
3559
759
|
|
|
3560
|
-
interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
|
|
3561
|
-
/**
|
|
3562
|
-
* Specifies which fields in the response should be expanded.
|
|
3563
|
-
*/
|
|
3564
|
-
expand?: Array<string>;
|
|
3565
|
-
}
|
|
3566
|
-
|
|
3567
760
|
interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
|
|
3568
761
|
/**
|
|
3569
762
|
* Specifies which fields in the response should be expanded.
|
|
@@ -3578,47 +771,6 @@ declare module 'stripe' {
|
|
|
3578
771
|
expand?: Array<string>;
|
|
3579
772
|
}
|
|
3580
773
|
|
|
3581
|
-
interface QuoteListLinesParams extends PaginationParams {
|
|
3582
|
-
/**
|
|
3583
|
-
* Specifies which fields in the response should be expanded.
|
|
3584
|
-
*/
|
|
3585
|
-
expand?: Array<string>;
|
|
3586
|
-
}
|
|
3587
|
-
|
|
3588
|
-
interface QuoteListPreviewInvoicesParams extends PaginationParams {
|
|
3589
|
-
/**
|
|
3590
|
-
* Specifies which fields in the response should be expanded.
|
|
3591
|
-
*/
|
|
3592
|
-
expand?: Array<string>;
|
|
3593
|
-
}
|
|
3594
|
-
|
|
3595
|
-
interface QuoteListPreviewSubscriptionSchedulesParams
|
|
3596
|
-
extends PaginationParams {
|
|
3597
|
-
/**
|
|
3598
|
-
* Specifies which fields in the response should be expanded.
|
|
3599
|
-
*/
|
|
3600
|
-
expand?: Array<string>;
|
|
3601
|
-
}
|
|
3602
|
-
|
|
3603
|
-
interface QuoteMarkDraftParams {
|
|
3604
|
-
/**
|
|
3605
|
-
* Specifies which fields in the response should be expanded.
|
|
3606
|
-
*/
|
|
3607
|
-
expand?: Array<string>;
|
|
3608
|
-
}
|
|
3609
|
-
|
|
3610
|
-
interface QuoteMarkStaleParams {
|
|
3611
|
-
/**
|
|
3612
|
-
* Specifies which fields in the response should be expanded.
|
|
3613
|
-
*/
|
|
3614
|
-
expand?: Array<string>;
|
|
3615
|
-
|
|
3616
|
-
/**
|
|
3617
|
-
* Reason the Quote is being marked stale.
|
|
3618
|
-
*/
|
|
3619
|
-
reason?: string;
|
|
3620
|
-
}
|
|
3621
|
-
|
|
3622
774
|
interface QuotePdfParams {
|
|
3623
775
|
/**
|
|
3624
776
|
* Specifies which fields in the response should be expanded.
|
|
@@ -3626,13 +778,6 @@ declare module 'stripe' {
|
|
|
3626
778
|
expand?: Array<string>;
|
|
3627
779
|
}
|
|
3628
780
|
|
|
3629
|
-
interface QuoteReestimateParams {
|
|
3630
|
-
/**
|
|
3631
|
-
* Specifies which fields in the response should be expanded.
|
|
3632
|
-
*/
|
|
3633
|
-
expand?: Array<string>;
|
|
3634
|
-
}
|
|
3635
|
-
|
|
3636
781
|
class QuotesResource {
|
|
3637
782
|
/**
|
|
3638
783
|
* A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
|
|
@@ -3713,21 +858,6 @@ declare module 'stripe' {
|
|
|
3713
858
|
options?: RequestOptions
|
|
3714
859
|
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3715
860
|
|
|
3716
|
-
/**
|
|
3717
|
-
* Preview the invoice line items that would be generated by accepting the quote.
|
|
3718
|
-
*/
|
|
3719
|
-
listPreviewInvoiceLines(
|
|
3720
|
-
quoteId: string,
|
|
3721
|
-
id: string,
|
|
3722
|
-
params?: QuoteListPreviewInvoiceLinesParams,
|
|
3723
|
-
options?: RequestOptions
|
|
3724
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3725
|
-
listPreviewInvoiceLines(
|
|
3726
|
-
quoteId: string,
|
|
3727
|
-
id: string,
|
|
3728
|
-
options?: RequestOptions
|
|
3729
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3730
|
-
|
|
3731
861
|
/**
|
|
3732
862
|
* When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
|
|
3733
863
|
*/
|
|
@@ -3754,71 +884,6 @@ declare module 'stripe' {
|
|
|
3754
884
|
options?: RequestOptions
|
|
3755
885
|
): ApiListPromise<Stripe.LineItem>;
|
|
3756
886
|
|
|
3757
|
-
/**
|
|
3758
|
-
* Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
|
3759
|
-
*/
|
|
3760
|
-
listLines(
|
|
3761
|
-
id: string,
|
|
3762
|
-
params?: QuoteListLinesParams,
|
|
3763
|
-
options?: RequestOptions
|
|
3764
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3765
|
-
listLines(
|
|
3766
|
-
id: string,
|
|
3767
|
-
options?: RequestOptions
|
|
3768
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3769
|
-
|
|
3770
|
-
/**
|
|
3771
|
-
* Preview the invoices that would be generated by accepting the quote.
|
|
3772
|
-
*/
|
|
3773
|
-
listPreviewInvoices(
|
|
3774
|
-
id: string,
|
|
3775
|
-
params?: QuoteListPreviewInvoicesParams,
|
|
3776
|
-
options?: RequestOptions
|
|
3777
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3778
|
-
listPreviewInvoices(
|
|
3779
|
-
id: string,
|
|
3780
|
-
options?: RequestOptions
|
|
3781
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3782
|
-
|
|
3783
|
-
/**
|
|
3784
|
-
* Preview the schedules that would be generated by accepting the quote
|
|
3785
|
-
*/
|
|
3786
|
-
listPreviewSubscriptionSchedules(
|
|
3787
|
-
id: string,
|
|
3788
|
-
params?: QuoteListPreviewSubscriptionSchedulesParams,
|
|
3789
|
-
options?: RequestOptions
|
|
3790
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3791
|
-
listPreviewSubscriptionSchedules(
|
|
3792
|
-
id: string,
|
|
3793
|
-
options?: RequestOptions
|
|
3794
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3795
|
-
|
|
3796
|
-
/**
|
|
3797
|
-
* Converts a stale quote to draft.
|
|
3798
|
-
*/
|
|
3799
|
-
markDraft(
|
|
3800
|
-
id: string,
|
|
3801
|
-
params?: QuoteMarkDraftParams,
|
|
3802
|
-
options?: RequestOptions
|
|
3803
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3804
|
-
markDraft(
|
|
3805
|
-
id: string,
|
|
3806
|
-
options?: RequestOptions
|
|
3807
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3808
|
-
|
|
3809
|
-
/**
|
|
3810
|
-
* Converts a draft or open quote to stale.
|
|
3811
|
-
*/
|
|
3812
|
-
markStale(
|
|
3813
|
-
id: string,
|
|
3814
|
-
params?: QuoteMarkStaleParams,
|
|
3815
|
-
options?: RequestOptions
|
|
3816
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3817
|
-
markStale(
|
|
3818
|
-
id: string,
|
|
3819
|
-
options?: RequestOptions
|
|
3820
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3821
|
-
|
|
3822
887
|
/**
|
|
3823
888
|
* Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
|
3824
889
|
*/
|
|
@@ -3828,19 +893,6 @@ declare module 'stripe' {
|
|
|
3828
893
|
options?: RequestOptions
|
|
3829
894
|
): Promise<StripeStreamResponse>;
|
|
3830
895
|
pdf(id: string, options?: RequestOptions): Promise<StripeStreamResponse>;
|
|
3831
|
-
|
|
3832
|
-
/**
|
|
3833
|
-
* Recompute the upcoming invoice estimate for the quote.
|
|
3834
|
-
*/
|
|
3835
|
-
reestimate(
|
|
3836
|
-
id: string,
|
|
3837
|
-
params?: QuoteReestimateParams,
|
|
3838
|
-
options?: RequestOptions
|
|
3839
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3840
|
-
reestimate(
|
|
3841
|
-
id: string,
|
|
3842
|
-
options?: RequestOptions
|
|
3843
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3844
896
|
}
|
|
3845
897
|
}
|
|
3846
898
|
}
|