stripe 20.1.0-beta.1 → 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 -1500
- 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/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources/Subscriptions.js +0 -4
- package/cjs/resources.js +2 -88
- 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/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/Subscriptions.js +0 -4
- package/esm/resources.js +0 -81
- 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 -47
- package/types/AccountSessionsResource.d.ts +0 -264
- package/types/Accounts.d.ts +25 -249
- package/types/AccountsResource.d.ts +114 -620
- package/types/ApplicationFeesResource.d.ts +2 -2
- package/types/Apps/Secrets.d.ts +1 -1
- package/types/Balance.d.ts +2 -2
- package/types/BalanceSettings.d.ts +1 -1
- package/types/BalanceTransactions.d.ts +1 -1
- package/types/BankAccounts.d.ts +10 -12
- package/types/Billing/AlertTriggereds.d.ts +1 -1
- package/types/Billing/Alerts.d.ts +1 -1
- package/types/Billing/CreditBalanceSummary.d.ts +1 -1
- package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -2
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +2 -2
- package/types/Billing/CreditGrants.d.ts +3 -3
- package/types/Billing/CreditGrantsResource.d.ts +3 -3
- package/types/Billing/MeterEvents.d.ts +1 -1
- package/types/Billing/MeterEventsResource.d.ts +1 -1
- 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 -7
- package/types/CashBalances.d.ts +3 -3
- package/types/Charges.d.ts +59 -179
- package/types/ChargesResource.d.ts +88 -3868
- package/types/Checkout/Sessions.d.ts +20 -297
- package/types/Checkout/SessionsResource.d.ts +59 -417
- package/types/Climate/Orders.d.ts +1 -1
- package/types/Climate/OrdersResource.d.ts +2 -2
- package/types/ConfirmationTokens.d.ts +8 -109
- 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 -6
- 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 -8
- package/types/Identity/VerificationSessions.d.ts +11 -11
- package/types/Identity/VerificationSessionsResource.d.ts +18 -12
- package/types/InvoiceItems.d.ts +8 -13
- package/types/InvoiceItemsResource.d.ts +16 -114
- package/types/InvoiceLineItems.d.ts +10 -46
- package/types/InvoicePayments.d.ts +1 -1
- package/types/InvoiceRenderingTemplates.d.ts +1 -1
- package/types/Invoices.d.ts +60 -204
- package/types/InvoicesResource.d.ts +132 -1651
- 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 -705
- package/types/PaymentIntentsResource.d.ts +6867 -19451
- 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 -116
- package/types/PaymentMethodsResource.d.ts +7 -116
- 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 -23
- 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 -602
- package/types/QuotesResource.d.ts +298 -2628
- 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 -157
- package/types/SetupIntentsResource.d.ts +50 -673
- 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 -33
- package/types/SubscriptionItemsResource.d.ts +22 -131
- package/types/SubscriptionSchedules.d.ts +9 -209
- package/types/SubscriptionSchedulesResource.d.ts +39 -1257
- package/types/Subscriptions.d.ts +41 -251
- package/types/SubscriptionsResource.d.ts +94 -734
- 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 -17
- 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 -10
- package/types/TransfersResource.d.ts +6 -11
- 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 +129 -24
- 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 +256 -1349
- package/types/V2/Core/AccountsResource.d.ts +282 -567
- package/types/V2/Core/EventTypes.d.ts +10 -1542
- package/types/WebhookEndpoints.d.ts +1 -1
- package/types/WebhookEndpointsResource.d.ts +5 -79
- package/types/apiVersion.d.ts +2 -1
- package/types/index.d.ts +0 -134
- package/types/lib.d.ts +0 -10
- package/cjs/resources/AccountNotices.js +0 -21
- 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/ExternalAccounts.js +0 -23
- package/cjs/resources/FinancialConnections/Institutions.js +0 -17
- package/cjs/resources/FxQuotes.js +0 -15
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/Privacy/RedactionJobs.js +0 -42
- package/cjs/resources/Tax/Forms.js +0 -20
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- 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/Profiles.js +0 -19
- 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/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/TransactionEntries.js +0 -17
- package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
- package/esm/resources/AccountNotices.js +0 -18
- 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/ExternalAccounts.js +0 -20
- package/esm/resources/FinancialConnections/Institutions.js +0 -14
- package/esm/resources/FxQuotes.js +0 -12
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/Privacy/RedactionJobs.js +0 -39
- package/esm/resources/Tax/Forms.js +0 -17
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- 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/Profiles.js +0 -16
- 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/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/TransactionEntries.js +0 -14
- package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/Billing/Analytics/MeterUsage.d.ts +0 -31
- package/types/Billing/Analytics/MeterUsageResource.d.ts +0 -689
- package/types/Billing/Analytics/MeterUsageRows.d.ts +0 -51
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/ExternalAccountsResource.d.ts +0 -304
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -98
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/FxQuotes.d.ts +0 -155
- package/types/FxQuotesResource.d.ts +0 -130
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
- package/types/Issuing/Settlements.d.ts +0 -113
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1163
- package/types/OrdersResource.d.ts +0 -5505
- package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
- package/types/Privacy/RedactionJobs.d.ts +0 -111
- package/types/Privacy/RedactionJobsResource.d.ts +0 -230
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1771
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -908
- 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/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 -690
- package/types/V2/Billing/CadencesResource.d.ts +0 -487
- 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/Profiles.d.ts +0 -70
- package/types/V2/Billing/ProfilesResource.d.ts +0 -150
- 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 -32
- package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -148
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -172
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -175
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -109
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -212
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -170
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -208
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -160
- package/types/V2/MoneyManagement/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 -302
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -162
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
- package/types/V2/MoneyManagement/Transactions.d.ts +0 -177
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -68
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
declare module 'stripe' {
|
|
4
4
|
namespace Stripe {
|
|
5
5
|
interface 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,2595 +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
|
-
|
|
204
|
+
interface LineItem {
|
|
291
205
|
/**
|
|
292
|
-
*
|
|
206
|
+
* The discounts applied to this line item.
|
|
293
207
|
*/
|
|
294
|
-
|
|
208
|
+
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
295
209
|
|
|
296
210
|
/**
|
|
297
|
-
*
|
|
211
|
+
* The ID of the price object. One of `price` or `price_data` is required.
|
|
298
212
|
*/
|
|
299
|
-
|
|
213
|
+
price?: string;
|
|
300
214
|
|
|
301
215
|
/**
|
|
302
|
-
*
|
|
216
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
|
|
303
217
|
*/
|
|
304
|
-
|
|
218
|
+
price_data?: LineItem.PriceData;
|
|
305
219
|
|
|
306
220
|
/**
|
|
307
|
-
*
|
|
221
|
+
* The quantity of the line item.
|
|
308
222
|
*/
|
|
309
|
-
|
|
223
|
+
quantity?: number;
|
|
310
224
|
|
|
311
225
|
/**
|
|
312
|
-
*
|
|
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.
|
|
313
227
|
*/
|
|
314
|
-
|
|
228
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
315
229
|
}
|
|
316
230
|
|
|
317
|
-
namespace
|
|
318
|
-
interface
|
|
319
|
-
/**
|
|
320
|
-
* Details for the `add_discount` type.
|
|
321
|
-
*/
|
|
322
|
-
add_discount?: Action.AddDiscount;
|
|
323
|
-
|
|
231
|
+
namespace LineItem {
|
|
232
|
+
interface Discount {
|
|
324
233
|
/**
|
|
325
|
-
*
|
|
234
|
+
* ID of the coupon to create a new discount for.
|
|
326
235
|
*/
|
|
327
|
-
|
|
236
|
+
coupon?: string;
|
|
328
237
|
|
|
329
238
|
/**
|
|
330
|
-
*
|
|
239
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
331
240
|
*/
|
|
332
|
-
|
|
333
|
-
[key: string]: string;
|
|
334
|
-
};
|
|
241
|
+
discount?: string;
|
|
335
242
|
|
|
336
243
|
/**
|
|
337
|
-
*
|
|
244
|
+
* ID of the promotion code to create a new discount for.
|
|
338
245
|
*/
|
|
339
|
-
|
|
246
|
+
promotion_code?: string;
|
|
247
|
+
}
|
|
340
248
|
|
|
249
|
+
interface PriceData {
|
|
341
250
|
/**
|
|
342
|
-
*
|
|
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).
|
|
343
252
|
*/
|
|
344
|
-
|
|
253
|
+
currency: string;
|
|
345
254
|
|
|
346
255
|
/**
|
|
347
|
-
*
|
|
256
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
348
257
|
*/
|
|
349
|
-
|
|
258
|
+
product: string;
|
|
350
259
|
|
|
351
260
|
/**
|
|
352
|
-
*
|
|
261
|
+
* The recurring components of a price such as `interval` and `interval_count`.
|
|
353
262
|
*/
|
|
354
|
-
|
|
263
|
+
recurring?: PriceData.Recurring;
|
|
355
264
|
|
|
356
265
|
/**
|
|
357
|
-
*
|
|
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.
|
|
358
267
|
*/
|
|
359
|
-
|
|
268
|
+
tax_behavior?: PriceData.TaxBehavior;
|
|
360
269
|
|
|
361
270
|
/**
|
|
362
|
-
*
|
|
271
|
+
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
363
272
|
*/
|
|
364
|
-
|
|
365
|
-
[key: string]: string;
|
|
366
|
-
}>;
|
|
273
|
+
unit_amount?: number;
|
|
367
274
|
|
|
368
275
|
/**
|
|
369
|
-
*
|
|
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.
|
|
370
277
|
*/
|
|
371
|
-
|
|
278
|
+
unit_amount_decimal?: string;
|
|
372
279
|
}
|
|
373
280
|
|
|
374
|
-
namespace
|
|
375
|
-
interface
|
|
376
|
-
/**
|
|
377
|
-
* The coupon code to redeem.
|
|
378
|
-
*/
|
|
379
|
-
coupon?: string;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
383
|
-
*/
|
|
384
|
-
discount?: string;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Details to determine how long the discount should be applied for.
|
|
388
|
-
*/
|
|
389
|
-
discount_end?: AddDiscount.DiscountEnd;
|
|
390
|
-
|
|
281
|
+
namespace PriceData {
|
|
282
|
+
interface Recurring {
|
|
391
283
|
/**
|
|
392
|
-
*
|
|
284
|
+
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
393
285
|
*/
|
|
394
|
-
|
|
286
|
+
interval: Recurring.Interval;
|
|
395
287
|
|
|
396
288
|
/**
|
|
397
|
-
* 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).
|
|
398
290
|
*/
|
|
399
|
-
|
|
291
|
+
interval_count?: number;
|
|
400
292
|
}
|
|
401
293
|
|
|
402
|
-
namespace
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* The type of calculation made to determine when the discount ends.
|
|
406
|
-
*/
|
|
407
|
-
type: 'line_ends_at';
|
|
408
|
-
}
|
|
294
|
+
namespace Recurring {
|
|
295
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
409
296
|
}
|
|
410
297
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
*/
|
|
415
|
-
discounts?: Array<AddItem.Discount>;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* 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`.
|
|
419
|
-
*/
|
|
420
|
-
metadata?: Stripe.MetadataParam;
|
|
298
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
299
|
+
}
|
|
300
|
+
}
|
|
421
301
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
302
|
+
interface SubscriptionData {
|
|
303
|
+
/**
|
|
304
|
+
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
305
|
+
*/
|
|
306
|
+
billing_mode?: SubscriptionData.BillingMode;
|
|
426
307
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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;
|
|
431
312
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
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>;
|
|
436
317
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
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;
|
|
442
322
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
coupon?: string;
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
452
|
-
*/
|
|
453
|
-
discount?: string;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Details to determine how long the discount should be applied for.
|
|
457
|
-
*/
|
|
458
|
-
discount_end?: Discount.DiscountEnd;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* ID of the promotion code to create a new discount for.
|
|
462
|
-
*/
|
|
463
|
-
promotion_code?: string;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
namespace Discount {
|
|
467
|
-
interface DiscountEnd {
|
|
468
|
-
/**
|
|
469
|
-
* Time span for the redeemed discount.
|
|
470
|
-
*/
|
|
471
|
-
duration?: DiscountEnd.Duration;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
475
|
-
*/
|
|
476
|
-
timestamp?: number;
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* The type of calculation made to determine when the discount ends.
|
|
480
|
-
*/
|
|
481
|
-
type: DiscountEnd.Type;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
namespace DiscountEnd {
|
|
485
|
-
interface Duration {
|
|
486
|
-
/**
|
|
487
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
488
|
-
*/
|
|
489
|
-
interval: Duration.Interval;
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
493
|
-
*/
|
|
494
|
-
interval_count: number;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
namespace Duration {
|
|
498
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
type Type = 'duration' | 'timestamp';
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
interface Trial {
|
|
506
|
-
/**
|
|
507
|
-
* 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.
|
|
508
|
-
*/
|
|
509
|
-
converts_to?: Array<string>;
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Determines the type of trial for this item.
|
|
513
|
-
*/
|
|
514
|
-
type: Trial.Type;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
namespace Trial {
|
|
518
|
-
type Type = 'free' | 'paid';
|
|
519
|
-
}
|
|
520
|
-
}
|
|
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
|
+
}
|
|
521
328
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
329
|
+
namespace SubscriptionData {
|
|
330
|
+
interface BillingMode {
|
|
331
|
+
/**
|
|
332
|
+
* Configure behavior for flexible billing mode.
|
|
333
|
+
*/
|
|
334
|
+
flexible?: BillingMode.Flexible;
|
|
527
335
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
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
|
+
}
|
|
532
341
|
|
|
342
|
+
namespace BillingMode {
|
|
343
|
+
interface Flexible {
|
|
533
344
|
/**
|
|
534
|
-
*
|
|
345
|
+
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
535
346
|
*/
|
|
536
|
-
|
|
347
|
+
proration_discounts?: Flexible.ProrationDiscounts;
|
|
537
348
|
}
|
|
538
349
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
* ID of a price to remove.
|
|
542
|
-
*/
|
|
543
|
-
price: string;
|
|
350
|
+
namespace Flexible {
|
|
351
|
+
type ProrationDiscounts = 'included' | 'itemized';
|
|
544
352
|
}
|
|
545
353
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
*/
|
|
550
|
-
coupon?: string;
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
554
|
-
*/
|
|
555
|
-
discount?: string;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
559
|
-
*/
|
|
560
|
-
promotion_code?: string;
|
|
561
|
-
}
|
|
354
|
+
type Type = 'classic' | 'flexible';
|
|
355
|
+
}
|
|
356
|
+
}
|
|
562
357
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
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;
|
|
568
363
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
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;
|
|
573
368
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
369
|
+
/**
|
|
370
|
+
* ID of an existing, connected Stripe account.
|
|
371
|
+
*/
|
|
372
|
+
destination: string;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
578
375
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
376
|
+
interface QuoteRetrieveParams {
|
|
377
|
+
/**
|
|
378
|
+
* Specifies which fields in the response should be expanded.
|
|
379
|
+
*/
|
|
380
|
+
expand?: Array<string>;
|
|
381
|
+
}
|
|
583
382
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
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>;
|
|
588
388
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
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>;
|
|
594
393
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
*/
|
|
600
|
-
coupon?: string;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
604
|
-
*/
|
|
605
|
-
discount?: string;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Details to determine how long the discount should be applied for.
|
|
609
|
-
*/
|
|
610
|
-
discount_end?: Discount.DiscountEnd;
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* ID of the promotion code to create a new discount for.
|
|
614
|
-
*/
|
|
615
|
-
promotion_code?: string;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
namespace Discount {
|
|
619
|
-
interface DiscountEnd {
|
|
620
|
-
/**
|
|
621
|
-
* Time span for the redeemed discount.
|
|
622
|
-
*/
|
|
623
|
-
duration?: DiscountEnd.Duration;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
627
|
-
*/
|
|
628
|
-
timestamp?: number;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* The type of calculation made to determine when the discount ends.
|
|
632
|
-
*/
|
|
633
|
-
type: DiscountEnd.Type;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
namespace DiscountEnd {
|
|
637
|
-
interface Duration {
|
|
638
|
-
/**
|
|
639
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
640
|
-
*/
|
|
641
|
-
interval: Duration.Interval;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
645
|
-
*/
|
|
646
|
-
interval_count: number;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
namespace Duration {
|
|
650
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
type Type = 'duration' | 'timestamp';
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
interface Trial {
|
|
658
|
-
/**
|
|
659
|
-
* 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.
|
|
660
|
-
*/
|
|
661
|
-
converts_to?: Array<string>;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Determines the type of trial for this item.
|
|
665
|
-
*/
|
|
666
|
-
type: Trial.Type;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
namespace Trial {
|
|
670
|
-
type Type = 'free' | 'paid';
|
|
671
|
-
}
|
|
672
|
-
}
|
|
394
|
+
/**
|
|
395
|
+
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
396
|
+
*/
|
|
397
|
+
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
673
398
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
| 'clear_discounts'
|
|
679
|
-
| 'clear_metadata'
|
|
680
|
-
| 'remove_discount'
|
|
681
|
-
| 'remove_item'
|
|
682
|
-
| 'remove_metadata'
|
|
683
|
-
| 'set_discounts'
|
|
684
|
-
| 'set_items'
|
|
685
|
-
| 'set_metadata';
|
|
686
|
-
}
|
|
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;
|
|
687
403
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
new_reference?: string;
|
|
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;
|
|
693
408
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
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;
|
|
698
413
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
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>>;
|
|
704
418
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
419
|
+
/**
|
|
420
|
+
* A description that will be displayed on the quote PDF.
|
|
421
|
+
*/
|
|
422
|
+
description?: Stripe.Emptyable<string>;
|
|
708
423
|
|
|
709
|
-
|
|
424
|
+
/**
|
|
425
|
+
* The discounts applied to the quote.
|
|
426
|
+
*/
|
|
427
|
+
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
710
428
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
cancel_at: 'line_starts_at';
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* 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`.
|
|
719
|
-
*/
|
|
720
|
-
invoice_now?: boolean;
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
724
|
-
*/
|
|
725
|
-
prorate?: boolean;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
interface EndsAt {
|
|
729
|
-
/**
|
|
730
|
-
* Use the `end` time of a given discount.
|
|
731
|
-
*/
|
|
732
|
-
discount_end?: EndsAt.DiscountEnd;
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
736
|
-
*/
|
|
737
|
-
duration?: EndsAt.Duration;
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* A precise Unix timestamp.
|
|
741
|
-
*/
|
|
742
|
-
timestamp?: number;
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* Select a way to pass in `ends_at`.
|
|
746
|
-
*/
|
|
747
|
-
type: EndsAt.Type;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
namespace EndsAt {
|
|
751
|
-
interface DiscountEnd {
|
|
752
|
-
/**
|
|
753
|
-
* The ID of a specific discount.
|
|
754
|
-
*/
|
|
755
|
-
discount: string;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
interface Duration {
|
|
759
|
-
/**
|
|
760
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
761
|
-
*/
|
|
762
|
-
interval: Duration.Interval;
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
766
|
-
*/
|
|
767
|
-
interval_count: number;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
namespace Duration {
|
|
771
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
type Type =
|
|
775
|
-
| 'billing_period_end'
|
|
776
|
-
| 'discount_end'
|
|
777
|
-
| 'duration'
|
|
778
|
-
| 'quote_acceptance_date'
|
|
779
|
-
| 'schedule_end'
|
|
780
|
-
| 'timestamp'
|
|
781
|
-
| 'upcoming_invoice';
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
type ProrationBehavior =
|
|
785
|
-
| 'always_invoice'
|
|
786
|
-
| 'create_prorations'
|
|
787
|
-
| 'none';
|
|
788
|
-
|
|
789
|
-
interface SetPauseCollection {
|
|
790
|
-
/**
|
|
791
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
792
|
-
*/
|
|
793
|
-
set?: SetPauseCollection.Set;
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* Determines the type of the pause_collection amendment.
|
|
797
|
-
*/
|
|
798
|
-
type: SetPauseCollection.Type;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
namespace SetPauseCollection {
|
|
802
|
-
interface Set {
|
|
803
|
-
/**
|
|
804
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
805
|
-
*/
|
|
806
|
-
behavior: Set.Behavior;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
namespace Set {
|
|
810
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
type Type = 'remove' | 'set';
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
817
|
-
|
|
818
|
-
interface StartsAt {
|
|
819
|
-
/**
|
|
820
|
-
* Use the `end` time of a given discount.
|
|
821
|
-
*/
|
|
822
|
-
discount_end?: StartsAt.DiscountEnd;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* The timestamp the given line ends at.
|
|
826
|
-
*/
|
|
827
|
-
line_ends_at?: StartsAt.LineEndsAt;
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* A precise Unix timestamp.
|
|
831
|
-
*/
|
|
832
|
-
timestamp?: number;
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Select a way to pass in `starts_at`.
|
|
836
|
-
*/
|
|
837
|
-
type: StartsAt.Type;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
namespace StartsAt {
|
|
841
|
-
interface DiscountEnd {
|
|
842
|
-
/**
|
|
843
|
-
* The ID of a specific discount.
|
|
844
|
-
*/
|
|
845
|
-
discount: string;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
interface LineEndsAt {
|
|
849
|
-
/**
|
|
850
|
-
* 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.
|
|
851
|
-
*/
|
|
852
|
-
index?: number;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
type Type =
|
|
856
|
-
| 'discount_end'
|
|
857
|
-
| 'line_ends_at'
|
|
858
|
-
| 'now'
|
|
859
|
-
| 'quote_acceptance_date'
|
|
860
|
-
| 'schedule_end'
|
|
861
|
-
| 'timestamp'
|
|
862
|
-
| 'upcoming_invoice';
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
interface TrialSettings {
|
|
866
|
-
/**
|
|
867
|
-
* Defines how the subscription should behave when a trial ends.
|
|
868
|
-
*/
|
|
869
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
namespace TrialSettings {
|
|
873
|
-
interface EndBehavior {
|
|
874
|
-
/**
|
|
875
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
876
|
-
*/
|
|
877
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
namespace EndBehavior {
|
|
881
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
interface LineItem {
|
|
887
|
-
/**
|
|
888
|
-
* The discounts applied to this line item.
|
|
889
|
-
*/
|
|
890
|
-
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
* The ID of the price object. One of `price` or `price_data` is required.
|
|
894
|
-
*/
|
|
895
|
-
price?: string;
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
899
|
-
*/
|
|
900
|
-
price_data?: LineItem.PriceData;
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* The quantity of the line item.
|
|
904
|
-
*/
|
|
905
|
-
quantity?: number;
|
|
906
|
-
|
|
907
|
-
/**
|
|
908
|
-
* 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.
|
|
909
|
-
*/
|
|
910
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
namespace LineItem {
|
|
914
|
-
interface Discount {
|
|
915
|
-
/**
|
|
916
|
-
* ID of the coupon to create a new discount for.
|
|
917
|
-
*/
|
|
918
|
-
coupon?: string;
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
922
|
-
*/
|
|
923
|
-
discount?: string;
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* Details to determine how long the discount should be applied for.
|
|
927
|
-
*/
|
|
928
|
-
discount_end?: Discount.DiscountEnd;
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* ID of the promotion code to create a new discount for.
|
|
932
|
-
*/
|
|
933
|
-
promotion_code?: string;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
namespace Discount {
|
|
937
|
-
interface DiscountEnd {
|
|
938
|
-
/**
|
|
939
|
-
* Time span for the redeemed discount.
|
|
940
|
-
*/
|
|
941
|
-
duration?: DiscountEnd.Duration;
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
945
|
-
*/
|
|
946
|
-
timestamp?: number;
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* The type of calculation made to determine when the discount ends.
|
|
950
|
-
*/
|
|
951
|
-
type: DiscountEnd.Type;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
namespace DiscountEnd {
|
|
955
|
-
interface Duration {
|
|
956
|
-
/**
|
|
957
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
958
|
-
*/
|
|
959
|
-
interval: Duration.Interval;
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
963
|
-
*/
|
|
964
|
-
interval_count: number;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
namespace Duration {
|
|
968
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
type Type = 'duration' | 'timestamp';
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
interface PriceData {
|
|
976
|
-
/**
|
|
977
|
-
* 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).
|
|
978
|
-
*/
|
|
979
|
-
currency: string;
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
983
|
-
*/
|
|
984
|
-
product: string;
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
988
|
-
*/
|
|
989
|
-
recurring?: PriceData.Recurring;
|
|
990
|
-
|
|
991
|
-
/**
|
|
992
|
-
* 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.
|
|
993
|
-
*/
|
|
994
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
998
|
-
*/
|
|
999
|
-
unit_amount?: number;
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* 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.
|
|
1003
|
-
*/
|
|
1004
|
-
unit_amount_decimal?: string;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
namespace PriceData {
|
|
1008
|
-
interface Recurring {
|
|
1009
|
-
/**
|
|
1010
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
1011
|
-
*/
|
|
1012
|
-
interval: Recurring.Interval;
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* 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).
|
|
1016
|
-
*/
|
|
1017
|
-
interval_count?: number;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
namespace Recurring {
|
|
1021
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
interface SubscriptionData {
|
|
1029
|
-
/**
|
|
1030
|
-
* Describes the period to bill for upon accepting the quote.
|
|
1031
|
-
*/
|
|
1032
|
-
bill_on_acceptance?: SubscriptionData.BillOnAcceptance;
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* 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.
|
|
1036
|
-
*/
|
|
1037
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
1041
|
-
*/
|
|
1042
|
-
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
1046
|
-
*/
|
|
1047
|
-
billing_mode?: SubscriptionData.BillingMode;
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* 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.
|
|
1051
|
-
*/
|
|
1052
|
-
description?: string;
|
|
1053
|
-
|
|
1054
|
-
/**
|
|
1055
|
-
* 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.
|
|
1056
|
-
*/
|
|
1057
|
-
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1061
|
-
*/
|
|
1062
|
-
end_behavior?: SubscriptionData.EndBehavior;
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* 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.
|
|
1066
|
-
*/
|
|
1067
|
-
from_subscription?: string;
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* 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.
|
|
1071
|
-
*/
|
|
1072
|
-
metadata?: Stripe.MetadataParam;
|
|
1073
|
-
|
|
1074
|
-
/**
|
|
1075
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
1076
|
-
*/
|
|
1077
|
-
prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
|
|
1078
|
-
|
|
1079
|
-
/**
|
|
1080
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1081
|
-
*
|
|
1082
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1083
|
-
*
|
|
1084
|
-
* 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`.
|
|
1085
|
-
*
|
|
1086
|
-
* Prorations can be disabled by passing `none`.
|
|
1087
|
-
*/
|
|
1088
|
-
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
1092
|
-
*/
|
|
1093
|
-
trial_period_days?: Stripe.Emptyable<number>;
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
namespace SubscriptionData {
|
|
1097
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1098
|
-
|
|
1099
|
-
interface BillingMode {
|
|
1100
|
-
/**
|
|
1101
|
-
* Configure behavior for flexible billing mode.
|
|
1102
|
-
*/
|
|
1103
|
-
flexible?: BillingMode.Flexible;
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
|
|
1107
|
-
*/
|
|
1108
|
-
type: BillingMode.Type;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
namespace BillingMode {
|
|
1112
|
-
interface Flexible {
|
|
1113
|
-
/**
|
|
1114
|
-
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
1115
|
-
*/
|
|
1116
|
-
proration_discounts?: Flexible.ProrationDiscounts;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
namespace Flexible {
|
|
1120
|
-
type ProrationDiscounts = 'included' | 'itemized';
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
type Type = 'classic' | 'flexible';
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
interface BillOnAcceptance {
|
|
1127
|
-
/**
|
|
1128
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1129
|
-
*/
|
|
1130
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1134
|
-
*/
|
|
1135
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
namespace BillOnAcceptance {
|
|
1139
|
-
interface BillFrom {
|
|
1140
|
-
/**
|
|
1141
|
-
* Details of a Quote line to start the bill period from.
|
|
1142
|
-
*/
|
|
1143
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1144
|
-
|
|
1145
|
-
/**
|
|
1146
|
-
* A precise Unix timestamp.
|
|
1147
|
-
*/
|
|
1148
|
-
timestamp?: number;
|
|
1149
|
-
|
|
1150
|
-
/**
|
|
1151
|
-
* The type of method to specify the `bill_from` time.
|
|
1152
|
-
*/
|
|
1153
|
-
type: BillFrom.Type;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
namespace BillFrom {
|
|
1157
|
-
interface LineStartsAt {
|
|
1158
|
-
/**
|
|
1159
|
-
* The ID of a quote line.
|
|
1160
|
-
*/
|
|
1161
|
-
id?: string;
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* 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.
|
|
1165
|
-
*/
|
|
1166
|
-
index?: number;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
type Type =
|
|
1170
|
-
| 'line_starts_at'
|
|
1171
|
-
| 'now'
|
|
1172
|
-
| 'pause_collection_start'
|
|
1173
|
-
| 'quote_acceptance_date'
|
|
1174
|
-
| 'timestamp';
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
interface BillUntil {
|
|
1178
|
-
/**
|
|
1179
|
-
* Details of the duration over which to bill.
|
|
1180
|
-
*/
|
|
1181
|
-
duration?: BillUntil.Duration;
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
* Details of a Quote line item from which to bill until.
|
|
1185
|
-
*/
|
|
1186
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1187
|
-
|
|
1188
|
-
/**
|
|
1189
|
-
* A precise Unix timestamp.
|
|
1190
|
-
*/
|
|
1191
|
-
timestamp?: number;
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* The type of method to specify the `bill_until` time.
|
|
1195
|
-
*/
|
|
1196
|
-
type: BillUntil.Type;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
namespace BillUntil {
|
|
1200
|
-
interface Duration {
|
|
1201
|
-
/**
|
|
1202
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1203
|
-
*/
|
|
1204
|
-
interval: Duration.Interval;
|
|
1205
|
-
|
|
1206
|
-
/**
|
|
1207
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1208
|
-
*/
|
|
1209
|
-
interval_count: number;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
namespace Duration {
|
|
1213
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
interface LineEndsAt {
|
|
1217
|
-
/**
|
|
1218
|
-
* The ID of a quote line.
|
|
1219
|
-
*/
|
|
1220
|
-
id?: string;
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* 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.
|
|
1224
|
-
*/
|
|
1225
|
-
index?: number;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
type Type =
|
|
1229
|
-
| 'duration'
|
|
1230
|
-
| 'line_ends_at'
|
|
1231
|
-
| 'schedule_end'
|
|
1232
|
-
| 'timestamp'
|
|
1233
|
-
| 'upcoming_invoice';
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1238
|
-
|
|
1239
|
-
interface Prebilling {
|
|
1240
|
-
/**
|
|
1241
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
1242
|
-
*/
|
|
1243
|
-
iterations: number;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
type ProrationBehavior =
|
|
1247
|
-
| 'always_invoice'
|
|
1248
|
-
| 'create_prorations'
|
|
1249
|
-
| 'none';
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
interface SubscriptionDataOverride {
|
|
1253
|
-
/**
|
|
1254
|
-
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
1255
|
-
*/
|
|
1256
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
1257
|
-
|
|
1258
|
-
/**
|
|
1259
|
-
* Describes the period to bill for upon accepting the quote.
|
|
1260
|
-
*/
|
|
1261
|
-
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
* 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.
|
|
1265
|
-
*/
|
|
1266
|
-
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
1267
|
-
|
|
1268
|
-
/**
|
|
1269
|
-
* The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
|
1270
|
-
*/
|
|
1271
|
-
customer?: string;
|
|
1272
|
-
|
|
1273
|
-
/**
|
|
1274
|
-
* 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.
|
|
1275
|
-
*/
|
|
1276
|
-
description?: string;
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1280
|
-
*/
|
|
1281
|
-
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
1282
|
-
|
|
1283
|
-
/**
|
|
1284
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1285
|
-
*
|
|
1286
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1287
|
-
*
|
|
1288
|
-
* 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`.
|
|
1289
|
-
*
|
|
1290
|
-
* Prorations can be disabled by passing `none`.
|
|
1291
|
-
*/
|
|
1292
|
-
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
namespace SubscriptionDataOverride {
|
|
1296
|
-
interface AppliesTo {
|
|
1297
|
-
/**
|
|
1298
|
-
* 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.
|
|
1299
|
-
*/
|
|
1300
|
-
new_reference?: string;
|
|
1301
|
-
|
|
1302
|
-
/**
|
|
1303
|
-
* The ID of the schedule the line applies to.
|
|
1304
|
-
*/
|
|
1305
|
-
subscription_schedule?: string;
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1309
|
-
*/
|
|
1310
|
-
type: AppliesTo.Type;
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
namespace AppliesTo {
|
|
1314
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1318
|
-
|
|
1319
|
-
interface BillOnAcceptance {
|
|
1320
|
-
/**
|
|
1321
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1322
|
-
*/
|
|
1323
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1327
|
-
*/
|
|
1328
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
namespace BillOnAcceptance {
|
|
1332
|
-
interface BillFrom {
|
|
1333
|
-
/**
|
|
1334
|
-
* Details of a Quote line to start the bill period from.
|
|
1335
|
-
*/
|
|
1336
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1337
|
-
|
|
1338
|
-
/**
|
|
1339
|
-
* A precise Unix timestamp.
|
|
1340
|
-
*/
|
|
1341
|
-
timestamp?: number;
|
|
1342
|
-
|
|
1343
|
-
/**
|
|
1344
|
-
* The type of method to specify the `bill_from` time.
|
|
1345
|
-
*/
|
|
1346
|
-
type: BillFrom.Type;
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
namespace BillFrom {
|
|
1350
|
-
interface LineStartsAt {
|
|
1351
|
-
/**
|
|
1352
|
-
* The ID of a quote line.
|
|
1353
|
-
*/
|
|
1354
|
-
id?: string;
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
* 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.
|
|
1358
|
-
*/
|
|
1359
|
-
index?: number;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
type Type =
|
|
1363
|
-
| 'line_starts_at'
|
|
1364
|
-
| 'now'
|
|
1365
|
-
| 'pause_collection_start'
|
|
1366
|
-
| 'quote_acceptance_date'
|
|
1367
|
-
| 'timestamp';
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
interface BillUntil {
|
|
1371
|
-
/**
|
|
1372
|
-
* Details of the duration over which to bill.
|
|
1373
|
-
*/
|
|
1374
|
-
duration?: BillUntil.Duration;
|
|
1375
|
-
|
|
1376
|
-
/**
|
|
1377
|
-
* Details of a Quote line item from which to bill until.
|
|
1378
|
-
*/
|
|
1379
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1380
|
-
|
|
1381
|
-
/**
|
|
1382
|
-
* A precise Unix timestamp.
|
|
1383
|
-
*/
|
|
1384
|
-
timestamp?: number;
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* The type of method to specify the `bill_until` time.
|
|
1388
|
-
*/
|
|
1389
|
-
type: BillUntil.Type;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
namespace BillUntil {
|
|
1393
|
-
interface Duration {
|
|
1394
|
-
/**
|
|
1395
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1396
|
-
*/
|
|
1397
|
-
interval: Duration.Interval;
|
|
1398
|
-
|
|
1399
|
-
/**
|
|
1400
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1401
|
-
*/
|
|
1402
|
-
interval_count: number;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
namespace Duration {
|
|
1406
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
interface LineEndsAt {
|
|
1410
|
-
/**
|
|
1411
|
-
* The ID of a quote line.
|
|
1412
|
-
*/
|
|
1413
|
-
id?: string;
|
|
1414
|
-
|
|
1415
|
-
/**
|
|
1416
|
-
* 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.
|
|
1417
|
-
*/
|
|
1418
|
-
index?: number;
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
type Type =
|
|
1422
|
-
| 'duration'
|
|
1423
|
-
| 'line_ends_at'
|
|
1424
|
-
| 'schedule_end'
|
|
1425
|
-
| 'timestamp'
|
|
1426
|
-
| 'upcoming_invoice';
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1431
|
-
|
|
1432
|
-
type ProrationBehavior =
|
|
1433
|
-
| 'always_invoice'
|
|
1434
|
-
| 'create_prorations'
|
|
1435
|
-
| 'none';
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
interface TransferData {
|
|
1439
|
-
/**
|
|
1440
|
-
* 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.
|
|
1441
|
-
*/
|
|
1442
|
-
amount?: number;
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* 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.
|
|
1446
|
-
*/
|
|
1447
|
-
amount_percent?: number;
|
|
1448
|
-
|
|
1449
|
-
/**
|
|
1450
|
-
* ID of an existing, connected Stripe account.
|
|
1451
|
-
*/
|
|
1452
|
-
destination: string;
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
interface QuoteRetrieveParams {
|
|
1457
|
-
/**
|
|
1458
|
-
* Specifies which fields in the response should be expanded.
|
|
1459
|
-
*/
|
|
1460
|
-
expand?: Array<string>;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
interface QuoteUpdateParams {
|
|
1464
|
-
/**
|
|
1465
|
-
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
1466
|
-
*/
|
|
1467
|
-
allow_backdated_lines?: boolean;
|
|
1468
|
-
|
|
1469
|
-
/**
|
|
1470
|
-
* 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.
|
|
1471
|
-
*/
|
|
1472
|
-
application_fee_amount?: Stripe.Emptyable<number>;
|
|
1473
|
-
|
|
1474
|
-
/**
|
|
1475
|
-
* 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.
|
|
1476
|
-
*/
|
|
1477
|
-
application_fee_percent?: Stripe.Emptyable<number>;
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
1481
|
-
*/
|
|
1482
|
-
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
1483
|
-
|
|
1484
|
-
/**
|
|
1485
|
-
* 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`.
|
|
1486
|
-
*/
|
|
1487
|
-
collection_method?: QuoteUpdateParams.CollectionMethod;
|
|
1488
|
-
|
|
1489
|
-
/**
|
|
1490
|
-
* The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1491
|
-
*/
|
|
1492
|
-
customer?: string;
|
|
1493
|
-
|
|
1494
|
-
/**
|
|
1495
|
-
* The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1496
|
-
*/
|
|
1497
|
-
customer_account?: string;
|
|
1498
|
-
|
|
1499
|
-
/**
|
|
1500
|
-
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
1501
|
-
*/
|
|
1502
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* A description that will be displayed on the quote PDF.
|
|
1506
|
-
*/
|
|
1507
|
-
description?: Stripe.Emptyable<string>;
|
|
1508
|
-
|
|
1509
|
-
/**
|
|
1510
|
-
* The discounts applied to the quote.
|
|
1511
|
-
*/
|
|
1512
|
-
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* Specifies which fields in the response should be expanded.
|
|
1516
|
-
*/
|
|
1517
|
-
expand?: Array<string>;
|
|
1518
|
-
|
|
1519
|
-
/**
|
|
1520
|
-
* A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
|
1521
|
-
*/
|
|
1522
|
-
expires_at?: number;
|
|
1523
|
-
|
|
1524
|
-
/**
|
|
1525
|
-
* A footer that will be displayed on the quote PDF.
|
|
1526
|
-
*/
|
|
1527
|
-
footer?: Stripe.Emptyable<string>;
|
|
1528
|
-
|
|
1529
|
-
/**
|
|
1530
|
-
* A header that will be displayed on the quote PDF.
|
|
1531
|
-
*/
|
|
1532
|
-
header?: Stripe.Emptyable<string>;
|
|
1533
|
-
|
|
1534
|
-
/**
|
|
1535
|
-
* All invoices will be billed using the specified settings.
|
|
1536
|
-
*/
|
|
1537
|
-
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
1538
|
-
|
|
1539
|
-
/**
|
|
1540
|
-
* 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.
|
|
1541
|
-
*/
|
|
1542
|
-
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* 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.
|
|
1546
|
-
*/
|
|
1547
|
-
lines?: Array<QuoteUpdateParams.Line>;
|
|
1548
|
-
|
|
1549
|
-
/**
|
|
1550
|
-
* 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`.
|
|
1551
|
-
*/
|
|
1552
|
-
metadata?: Stripe.MetadataParam;
|
|
1553
|
-
|
|
1554
|
-
/**
|
|
1555
|
-
* The account on behalf of which to charge.
|
|
1556
|
-
*/
|
|
1557
|
-
on_behalf_of?: Stripe.Emptyable<string>;
|
|
1558
|
-
|
|
1559
|
-
/**
|
|
1560
|
-
* 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.
|
|
1561
|
-
*/
|
|
1562
|
-
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
1563
|
-
|
|
1564
|
-
/**
|
|
1565
|
-
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
1566
|
-
*/
|
|
1567
|
-
subscription_data_overrides?: Stripe.Emptyable<
|
|
1568
|
-
Array<QuoteUpdateParams.SubscriptionDataOverride>
|
|
1569
|
-
>;
|
|
1570
|
-
|
|
1571
|
-
/**
|
|
1572
|
-
* The data with which to automatically create a Transfer for each of the invoices.
|
|
1573
|
-
*/
|
|
1574
|
-
transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
namespace QuoteUpdateParams {
|
|
1578
|
-
interface AutomaticTax {
|
|
1579
|
-
/**
|
|
1580
|
-
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
1581
|
-
*/
|
|
1582
|
-
enabled: boolean;
|
|
1583
|
-
|
|
1584
|
-
/**
|
|
1585
|
-
* 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.
|
|
1586
|
-
*/
|
|
1587
|
-
liability?: AutomaticTax.Liability;
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
namespace AutomaticTax {
|
|
1591
|
-
interface Liability {
|
|
1592
|
-
/**
|
|
1593
|
-
* The connected account being referenced when `type` is `account`.
|
|
1594
|
-
*/
|
|
1595
|
-
account?: string;
|
|
1596
|
-
|
|
1597
|
-
/**
|
|
1598
|
-
* Type of the account referenced in the request.
|
|
1599
|
-
*/
|
|
1600
|
-
type: Liability.Type;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
namespace Liability {
|
|
1604
|
-
type Type = 'account' | 'self';
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
1609
|
-
|
|
1610
|
-
interface Discount {
|
|
1611
|
-
/**
|
|
1612
|
-
* ID of the coupon to create a new discount for.
|
|
1613
|
-
*/
|
|
1614
|
-
coupon?: string;
|
|
1615
|
-
|
|
1616
|
-
/**
|
|
1617
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1618
|
-
*/
|
|
1619
|
-
discount?: string;
|
|
1620
|
-
|
|
1621
|
-
/**
|
|
1622
|
-
* Details to determine how long the discount should be applied for.
|
|
1623
|
-
*/
|
|
1624
|
-
discount_end?: Discount.DiscountEnd;
|
|
1625
|
-
|
|
1626
|
-
/**
|
|
1627
|
-
* ID of the promotion code to create a new discount for.
|
|
1628
|
-
*/
|
|
1629
|
-
promotion_code?: string;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
namespace Discount {
|
|
1633
|
-
interface DiscountEnd {
|
|
1634
|
-
/**
|
|
1635
|
-
* Time span for the redeemed discount.
|
|
1636
|
-
*/
|
|
1637
|
-
duration?: DiscountEnd.Duration;
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1641
|
-
*/
|
|
1642
|
-
timestamp?: number;
|
|
1643
|
-
|
|
1644
|
-
/**
|
|
1645
|
-
* The type of calculation made to determine when the discount ends.
|
|
1646
|
-
*/
|
|
1647
|
-
type: DiscountEnd.Type;
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
namespace DiscountEnd {
|
|
1651
|
-
interface Duration {
|
|
1652
|
-
/**
|
|
1653
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1654
|
-
*/
|
|
1655
|
-
interval: Duration.Interval;
|
|
1656
|
-
|
|
1657
|
-
/**
|
|
1658
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1659
|
-
*/
|
|
1660
|
-
interval_count: number;
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
namespace Duration {
|
|
1664
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
type Type = 'duration' | 'timestamp';
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
interface InvoiceSettings {
|
|
1672
|
-
/**
|
|
1673
|
-
* 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`.
|
|
1674
|
-
*/
|
|
1675
|
-
days_until_due?: number;
|
|
1676
|
-
|
|
1677
|
-
/**
|
|
1678
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
1679
|
-
*/
|
|
1680
|
-
issuer?: InvoiceSettings.Issuer;
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
namespace InvoiceSettings {
|
|
1684
|
-
interface Issuer {
|
|
1685
|
-
/**
|
|
1686
|
-
* The connected account being referenced when `type` is `account`.
|
|
1687
|
-
*/
|
|
1688
|
-
account?: string;
|
|
1689
|
-
|
|
1690
|
-
/**
|
|
1691
|
-
* Type of the account referenced in the request.
|
|
1692
|
-
*/
|
|
1693
|
-
type: Issuer.Type;
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
namespace Issuer {
|
|
1697
|
-
type Type = 'account' | 'self';
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
interface Line {
|
|
1702
|
-
/**
|
|
1703
|
-
* An array of operations the quote line performs.
|
|
1704
|
-
*/
|
|
1705
|
-
actions?: Array<Line.Action>;
|
|
1706
|
-
|
|
1707
|
-
/**
|
|
1708
|
-
* Details to identify the subscription schedule the quote line applies to.
|
|
1709
|
-
*/
|
|
1710
|
-
applies_to?: Line.AppliesTo;
|
|
1711
|
-
|
|
1712
|
-
/**
|
|
1713
|
-
* 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.
|
|
1714
|
-
*/
|
|
1715
|
-
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
1716
|
-
|
|
1717
|
-
/**
|
|
1718
|
-
* 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.
|
|
1719
|
-
*/
|
|
1720
|
-
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
1721
|
-
|
|
1722
|
-
/**
|
|
1723
|
-
* 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.
|
|
1724
|
-
*/
|
|
1725
|
-
ends_at?: Line.EndsAt;
|
|
1726
|
-
|
|
1727
|
-
/**
|
|
1728
|
-
* The ID of an existing line on the quote.
|
|
1729
|
-
*/
|
|
1730
|
-
id?: string;
|
|
1731
|
-
|
|
1732
|
-
/**
|
|
1733
|
-
* 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.
|
|
1734
|
-
*/
|
|
1735
|
-
proration_behavior?: Line.ProrationBehavior;
|
|
1736
|
-
|
|
1737
|
-
/**
|
|
1738
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
1739
|
-
*/
|
|
1740
|
-
set_pause_collection?: Line.SetPauseCollection;
|
|
1741
|
-
|
|
1742
|
-
/**
|
|
1743
|
-
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
1744
|
-
*/
|
|
1745
|
-
set_schedule_end?: Line.SetScheduleEnd;
|
|
1746
|
-
|
|
1747
|
-
/**
|
|
1748
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1749
|
-
*/
|
|
1750
|
-
starts_at?: Line.StartsAt;
|
|
1751
|
-
|
|
1752
|
-
/**
|
|
1753
|
-
* Settings related to subscription trials.
|
|
1754
|
-
*/
|
|
1755
|
-
trial_settings?: Line.TrialSettings;
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
namespace Line {
|
|
1759
|
-
interface Action {
|
|
1760
|
-
/**
|
|
1761
|
-
* Details for the `add_discount` type.
|
|
1762
|
-
*/
|
|
1763
|
-
add_discount?: Action.AddDiscount;
|
|
1764
|
-
|
|
1765
|
-
/**
|
|
1766
|
-
* Details for the `add_item` type.
|
|
1767
|
-
*/
|
|
1768
|
-
add_item?: Action.AddItem;
|
|
1769
|
-
|
|
1770
|
-
/**
|
|
1771
|
-
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
1772
|
-
*/
|
|
1773
|
-
add_metadata?: {
|
|
1774
|
-
[key: string]: string;
|
|
1775
|
-
};
|
|
1776
|
-
|
|
1777
|
-
/**
|
|
1778
|
-
* Details for the `remove_discount` type.
|
|
1779
|
-
*/
|
|
1780
|
-
remove_discount?: Action.RemoveDiscount;
|
|
1781
|
-
|
|
1782
|
-
/**
|
|
1783
|
-
* Details for the `remove_item` type.
|
|
1784
|
-
*/
|
|
1785
|
-
remove_item?: Action.RemoveItem;
|
|
1786
|
-
|
|
1787
|
-
/**
|
|
1788
|
-
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
1789
|
-
*/
|
|
1790
|
-
remove_metadata?: Array<string>;
|
|
1791
|
-
|
|
1792
|
-
/**
|
|
1793
|
-
* Details for the `set_discounts` type.
|
|
1794
|
-
*/
|
|
1795
|
-
set_discounts?: Array<Action.SetDiscount>;
|
|
1796
|
-
|
|
1797
|
-
/**
|
|
1798
|
-
* Details for the `set_items` type.
|
|
1799
|
-
*/
|
|
1800
|
-
set_items?: Array<Action.SetItem>;
|
|
1801
|
-
|
|
1802
|
-
/**
|
|
1803
|
-
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
1804
|
-
*/
|
|
1805
|
-
set_metadata?: Stripe.Emptyable<{
|
|
1806
|
-
[key: string]: string;
|
|
1807
|
-
}>;
|
|
1808
|
-
|
|
1809
|
-
/**
|
|
1810
|
-
* The type of action the quote line performs.
|
|
1811
|
-
*/
|
|
1812
|
-
type: Action.Type;
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
namespace Action {
|
|
1816
|
-
interface AddDiscount {
|
|
1817
|
-
/**
|
|
1818
|
-
* The coupon code to redeem.
|
|
1819
|
-
*/
|
|
1820
|
-
coupon?: string;
|
|
1821
|
-
|
|
1822
|
-
/**
|
|
1823
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
1824
|
-
*/
|
|
1825
|
-
discount?: string;
|
|
1826
|
-
|
|
1827
|
-
/**
|
|
1828
|
-
* Details to determine how long the discount should be applied for.
|
|
1829
|
-
*/
|
|
1830
|
-
discount_end?: AddDiscount.DiscountEnd;
|
|
1831
|
-
|
|
1832
|
-
/**
|
|
1833
|
-
* 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.
|
|
1834
|
-
*/
|
|
1835
|
-
index?: number;
|
|
1836
|
-
|
|
1837
|
-
/**
|
|
1838
|
-
* The promotion code to redeem.
|
|
1839
|
-
*/
|
|
1840
|
-
promotion_code?: string;
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
namespace AddDiscount {
|
|
1844
|
-
interface DiscountEnd {
|
|
1845
|
-
/**
|
|
1846
|
-
* The type of calculation made to determine when the discount ends.
|
|
1847
|
-
*/
|
|
1848
|
-
type: 'line_ends_at';
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
interface AddItem {
|
|
1853
|
-
/**
|
|
1854
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
1855
|
-
*/
|
|
1856
|
-
discounts?: Array<AddItem.Discount>;
|
|
1857
|
-
|
|
1858
|
-
/**
|
|
1859
|
-
* 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`.
|
|
1860
|
-
*/
|
|
1861
|
-
metadata?: Stripe.MetadataParam;
|
|
1862
|
-
|
|
1863
|
-
/**
|
|
1864
|
-
* The ID of the price object.
|
|
1865
|
-
*/
|
|
1866
|
-
price: string;
|
|
1867
|
-
|
|
1868
|
-
/**
|
|
1869
|
-
* Quantity for this item.
|
|
1870
|
-
*/
|
|
1871
|
-
quantity?: number;
|
|
1872
|
-
|
|
1873
|
-
/**
|
|
1874
|
-
* 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`.
|
|
1875
|
-
*/
|
|
1876
|
-
tax_rates?: Array<string>;
|
|
1877
|
-
|
|
1878
|
-
/**
|
|
1879
|
-
* Options that configure the trial on the subscription item.
|
|
1880
|
-
*/
|
|
1881
|
-
trial?: AddItem.Trial;
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
namespace AddItem {
|
|
1885
|
-
interface Discount {
|
|
1886
|
-
/**
|
|
1887
|
-
* ID of the coupon to create a new discount for.
|
|
1888
|
-
*/
|
|
1889
|
-
coupon?: string;
|
|
1890
|
-
|
|
1891
|
-
/**
|
|
1892
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1893
|
-
*/
|
|
1894
|
-
discount?: string;
|
|
1895
|
-
|
|
1896
|
-
/**
|
|
1897
|
-
* Details to determine how long the discount should be applied for.
|
|
1898
|
-
*/
|
|
1899
|
-
discount_end?: Discount.DiscountEnd;
|
|
1900
|
-
|
|
1901
|
-
/**
|
|
1902
|
-
* ID of the promotion code to create a new discount for.
|
|
1903
|
-
*/
|
|
1904
|
-
promotion_code?: string;
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
namespace Discount {
|
|
1908
|
-
interface DiscountEnd {
|
|
1909
|
-
/**
|
|
1910
|
-
* Time span for the redeemed discount.
|
|
1911
|
-
*/
|
|
1912
|
-
duration?: DiscountEnd.Duration;
|
|
1913
|
-
|
|
1914
|
-
/**
|
|
1915
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1916
|
-
*/
|
|
1917
|
-
timestamp?: number;
|
|
1918
|
-
|
|
1919
|
-
/**
|
|
1920
|
-
* The type of calculation made to determine when the discount ends.
|
|
1921
|
-
*/
|
|
1922
|
-
type: DiscountEnd.Type;
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
namespace DiscountEnd {
|
|
1926
|
-
interface Duration {
|
|
1927
|
-
/**
|
|
1928
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1929
|
-
*/
|
|
1930
|
-
interval: Duration.Interval;
|
|
1931
|
-
|
|
1932
|
-
/**
|
|
1933
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1934
|
-
*/
|
|
1935
|
-
interval_count: number;
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
namespace Duration {
|
|
1939
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
type Type = 'duration' | 'timestamp';
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
interface Trial {
|
|
1947
|
-
/**
|
|
1948
|
-
* 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.
|
|
1949
|
-
*/
|
|
1950
|
-
converts_to?: Array<string>;
|
|
1951
|
-
|
|
1952
|
-
/**
|
|
1953
|
-
* Determines the type of trial for this item.
|
|
1954
|
-
*/
|
|
1955
|
-
type: Trial.Type;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
namespace Trial {
|
|
1959
|
-
type Type = 'free' | 'paid';
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
interface RemoveDiscount {
|
|
1964
|
-
/**
|
|
1965
|
-
* The coupon code to remove from the `discounts` array.
|
|
1966
|
-
*/
|
|
1967
|
-
coupon?: string;
|
|
1968
|
-
|
|
1969
|
-
/**
|
|
1970
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
1971
|
-
*/
|
|
1972
|
-
discount?: string;
|
|
1973
|
-
|
|
1974
|
-
/**
|
|
1975
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
1976
|
-
*/
|
|
1977
|
-
promotion_code?: string;
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
interface RemoveItem {
|
|
1981
|
-
/**
|
|
1982
|
-
* ID of a price to remove.
|
|
1983
|
-
*/
|
|
1984
|
-
price: string;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
interface SetDiscount {
|
|
1988
|
-
/**
|
|
1989
|
-
* The coupon code to replace the `discounts` array with.
|
|
1990
|
-
*/
|
|
1991
|
-
coupon?: string;
|
|
1992
|
-
|
|
1993
|
-
/**
|
|
1994
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
1995
|
-
*/
|
|
1996
|
-
discount?: string;
|
|
1997
|
-
|
|
1998
|
-
/**
|
|
1999
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2000
|
-
*/
|
|
2001
|
-
promotion_code?: string;
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
interface SetItem {
|
|
2005
|
-
/**
|
|
2006
|
-
* 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`.
|
|
2007
|
-
*/
|
|
2008
|
-
discounts?: Array<SetItem.Discount>;
|
|
2009
|
-
|
|
2010
|
-
/**
|
|
2011
|
-
* 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`.
|
|
2012
|
-
*/
|
|
2013
|
-
metadata?: Stripe.MetadataParam;
|
|
2014
|
-
|
|
2015
|
-
/**
|
|
2016
|
-
* The ID of the price object.
|
|
2017
|
-
*/
|
|
2018
|
-
price: string;
|
|
2019
|
-
|
|
2020
|
-
/**
|
|
2021
|
-
* 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`.
|
|
2022
|
-
*/
|
|
2023
|
-
quantity?: number;
|
|
2024
|
-
|
|
2025
|
-
/**
|
|
2026
|
-
* 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`.
|
|
2027
|
-
*/
|
|
2028
|
-
tax_rates?: Array<string>;
|
|
2029
|
-
|
|
2030
|
-
/**
|
|
2031
|
-
* 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`.
|
|
2032
|
-
*/
|
|
2033
|
-
trial?: SetItem.Trial;
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
namespace SetItem {
|
|
2037
|
-
interface Discount {
|
|
2038
|
-
/**
|
|
2039
|
-
* ID of the coupon to create a new discount for.
|
|
2040
|
-
*/
|
|
2041
|
-
coupon?: string;
|
|
2042
|
-
|
|
2043
|
-
/**
|
|
2044
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2045
|
-
*/
|
|
2046
|
-
discount?: string;
|
|
2047
|
-
|
|
2048
|
-
/**
|
|
2049
|
-
* Details to determine how long the discount should be applied for.
|
|
2050
|
-
*/
|
|
2051
|
-
discount_end?: Discount.DiscountEnd;
|
|
2052
|
-
|
|
2053
|
-
/**
|
|
2054
|
-
* ID of the promotion code to create a new discount for.
|
|
2055
|
-
*/
|
|
2056
|
-
promotion_code?: string;
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
namespace Discount {
|
|
2060
|
-
interface DiscountEnd {
|
|
2061
|
-
/**
|
|
2062
|
-
* Time span for the redeemed discount.
|
|
2063
|
-
*/
|
|
2064
|
-
duration?: DiscountEnd.Duration;
|
|
2065
|
-
|
|
2066
|
-
/**
|
|
2067
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2068
|
-
*/
|
|
2069
|
-
timestamp?: number;
|
|
2070
|
-
|
|
2071
|
-
/**
|
|
2072
|
-
* The type of calculation made to determine when the discount ends.
|
|
2073
|
-
*/
|
|
2074
|
-
type: DiscountEnd.Type;
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
|
-
namespace DiscountEnd {
|
|
2078
|
-
interface Duration {
|
|
2079
|
-
/**
|
|
2080
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2081
|
-
*/
|
|
2082
|
-
interval: Duration.Interval;
|
|
2083
|
-
|
|
2084
|
-
/**
|
|
2085
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2086
|
-
*/
|
|
2087
|
-
interval_count: number;
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
namespace Duration {
|
|
2091
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
type Type = 'duration' | 'timestamp';
|
|
2095
|
-
}
|
|
2096
|
-
}
|
|
2097
|
-
|
|
2098
|
-
interface Trial {
|
|
2099
|
-
/**
|
|
2100
|
-
* 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.
|
|
2101
|
-
*/
|
|
2102
|
-
converts_to?: Array<string>;
|
|
2103
|
-
|
|
2104
|
-
/**
|
|
2105
|
-
* Determines the type of trial for this item.
|
|
2106
|
-
*/
|
|
2107
|
-
type: Trial.Type;
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
namespace Trial {
|
|
2111
|
-
type Type = 'free' | 'paid';
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
type Type =
|
|
2116
|
-
| 'add_discount'
|
|
2117
|
-
| 'add_item'
|
|
2118
|
-
| 'add_metadata'
|
|
2119
|
-
| 'clear_discounts'
|
|
2120
|
-
| 'clear_metadata'
|
|
2121
|
-
| 'remove_discount'
|
|
2122
|
-
| 'remove_item'
|
|
2123
|
-
| 'remove_metadata'
|
|
2124
|
-
| 'set_discounts'
|
|
2125
|
-
| 'set_items'
|
|
2126
|
-
| 'set_metadata';
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
interface AppliesTo {
|
|
2130
|
-
/**
|
|
2131
|
-
* 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.
|
|
2132
|
-
*/
|
|
2133
|
-
new_reference?: string;
|
|
2134
|
-
|
|
2135
|
-
/**
|
|
2136
|
-
* The ID of the schedule the line applies to.
|
|
2137
|
-
*/
|
|
2138
|
-
subscription_schedule?: string;
|
|
2139
|
-
|
|
2140
|
-
/**
|
|
2141
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2142
|
-
*/
|
|
2143
|
-
type: AppliesTo.Type;
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
namespace AppliesTo {
|
|
2147
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
2151
|
-
|
|
2152
|
-
interface CancelSubscriptionSchedule {
|
|
2153
|
-
/**
|
|
2154
|
-
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
2155
|
-
*/
|
|
2156
|
-
cancel_at: 'line_starts_at';
|
|
2157
|
-
|
|
2158
|
-
/**
|
|
2159
|
-
* 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`.
|
|
2160
|
-
*/
|
|
2161
|
-
invoice_now?: boolean;
|
|
2162
|
-
|
|
2163
|
-
/**
|
|
2164
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
2165
|
-
*/
|
|
2166
|
-
prorate?: boolean;
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
interface EndsAt {
|
|
2170
|
-
/**
|
|
2171
|
-
* Use the `end` time of a given discount.
|
|
2172
|
-
*/
|
|
2173
|
-
discount_end?: EndsAt.DiscountEnd;
|
|
2174
|
-
|
|
2175
|
-
/**
|
|
2176
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
2177
|
-
*/
|
|
2178
|
-
duration?: EndsAt.Duration;
|
|
2179
|
-
|
|
2180
|
-
/**
|
|
2181
|
-
* A precise Unix timestamp.
|
|
2182
|
-
*/
|
|
2183
|
-
timestamp?: number;
|
|
2184
|
-
|
|
2185
|
-
/**
|
|
2186
|
-
* Select a way to pass in `ends_at`.
|
|
2187
|
-
*/
|
|
2188
|
-
type: EndsAt.Type;
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
namespace EndsAt {
|
|
2192
|
-
interface DiscountEnd {
|
|
2193
|
-
/**
|
|
2194
|
-
* The ID of a specific discount.
|
|
2195
|
-
*/
|
|
2196
|
-
discount: string;
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
interface Duration {
|
|
2200
|
-
/**
|
|
2201
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2202
|
-
*/
|
|
2203
|
-
interval: Duration.Interval;
|
|
2204
|
-
|
|
2205
|
-
/**
|
|
2206
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2207
|
-
*/
|
|
2208
|
-
interval_count: number;
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
|
-
namespace Duration {
|
|
2212
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
type Type =
|
|
2216
|
-
| 'billing_period_end'
|
|
2217
|
-
| 'discount_end'
|
|
2218
|
-
| 'duration'
|
|
2219
|
-
| 'quote_acceptance_date'
|
|
2220
|
-
| 'schedule_end'
|
|
2221
|
-
| 'timestamp'
|
|
2222
|
-
| 'upcoming_invoice';
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
type ProrationBehavior =
|
|
2226
|
-
| 'always_invoice'
|
|
2227
|
-
| 'create_prorations'
|
|
2228
|
-
| 'none';
|
|
2229
|
-
|
|
2230
|
-
interface SetPauseCollection {
|
|
2231
|
-
/**
|
|
2232
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
2233
|
-
*/
|
|
2234
|
-
set?: SetPauseCollection.Set;
|
|
2235
|
-
|
|
2236
|
-
/**
|
|
2237
|
-
* Determines the type of the pause_collection amendment.
|
|
2238
|
-
*/
|
|
2239
|
-
type: SetPauseCollection.Type;
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
namespace SetPauseCollection {
|
|
2243
|
-
interface Set {
|
|
2244
|
-
/**
|
|
2245
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2246
|
-
*/
|
|
2247
|
-
behavior: Set.Behavior;
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
namespace Set {
|
|
2251
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2252
|
-
}
|
|
2253
|
-
|
|
2254
|
-
type Type = 'remove' | 'set';
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
2258
|
-
|
|
2259
|
-
interface StartsAt {
|
|
2260
|
-
/**
|
|
2261
|
-
* Use the `end` time of a given discount.
|
|
2262
|
-
*/
|
|
2263
|
-
discount_end?: StartsAt.DiscountEnd;
|
|
2264
|
-
|
|
2265
|
-
/**
|
|
2266
|
-
* The timestamp the given line ends at.
|
|
2267
|
-
*/
|
|
2268
|
-
line_ends_at?: StartsAt.LineEndsAt;
|
|
2269
|
-
|
|
2270
|
-
/**
|
|
2271
|
-
* A precise Unix timestamp.
|
|
2272
|
-
*/
|
|
2273
|
-
timestamp?: number;
|
|
2274
|
-
|
|
2275
|
-
/**
|
|
2276
|
-
* Select a way to pass in `starts_at`.
|
|
2277
|
-
*/
|
|
2278
|
-
type: StartsAt.Type;
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
namespace StartsAt {
|
|
2282
|
-
interface DiscountEnd {
|
|
2283
|
-
/**
|
|
2284
|
-
* The ID of a specific discount.
|
|
2285
|
-
*/
|
|
2286
|
-
discount: string;
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
interface LineEndsAt {
|
|
2290
|
-
/**
|
|
2291
|
-
* The ID of a quote line.
|
|
2292
|
-
*/
|
|
2293
|
-
id?: string;
|
|
429
|
+
/**
|
|
430
|
+
* Specifies which fields in the response should be expanded.
|
|
431
|
+
*/
|
|
432
|
+
expand?: Array<string>;
|
|
2294
433
|
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
}
|
|
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;
|
|
2300
438
|
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
| 'quote_acceptance_date'
|
|
2306
|
-
| 'schedule_end'
|
|
2307
|
-
| 'timestamp'
|
|
2308
|
-
| 'upcoming_invoice';
|
|
2309
|
-
}
|
|
439
|
+
/**
|
|
440
|
+
* A footer that will be displayed on the quote PDF.
|
|
441
|
+
*/
|
|
442
|
+
footer?: Stripe.Emptyable<string>;
|
|
2310
443
|
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
2316
|
-
}
|
|
444
|
+
/**
|
|
445
|
+
* A header that will be displayed on the quote PDF.
|
|
446
|
+
*/
|
|
447
|
+
header?: Stripe.Emptyable<string>;
|
|
2317
448
|
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
*/
|
|
2323
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2324
|
-
}
|
|
449
|
+
/**
|
|
450
|
+
* All invoices will be billed using the specified settings.
|
|
451
|
+
*/
|
|
452
|
+
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
2325
453
|
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
}
|
|
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>;
|
|
2331
458
|
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
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;
|
|
2337
463
|
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
464
|
+
/**
|
|
465
|
+
* The account on behalf of which to charge.
|
|
466
|
+
*/
|
|
467
|
+
on_behalf_of?: Stripe.Emptyable<string>;
|
|
2342
468
|
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
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;
|
|
2347
473
|
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
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
|
+
}
|
|
2352
479
|
|
|
480
|
+
namespace QuoteUpdateParams {
|
|
481
|
+
interface AutomaticTax {
|
|
2353
482
|
/**
|
|
2354
|
-
*
|
|
483
|
+
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
2355
484
|
*/
|
|
2356
|
-
|
|
485
|
+
enabled: boolean;
|
|
2357
486
|
|
|
2358
487
|
/**
|
|
2359
|
-
* 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.
|
|
2360
489
|
*/
|
|
2361
|
-
|
|
490
|
+
liability?: AutomaticTax.Liability;
|
|
2362
491
|
}
|
|
2363
492
|
|
|
2364
|
-
namespace
|
|
2365
|
-
interface
|
|
2366
|
-
/**
|
|
2367
|
-
* ID of the coupon to create a new discount for.
|
|
2368
|
-
*/
|
|
2369
|
-
coupon?: string;
|
|
2370
|
-
|
|
2371
|
-
/**
|
|
2372
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2373
|
-
*/
|
|
2374
|
-
discount?: string;
|
|
2375
|
-
|
|
2376
|
-
/**
|
|
2377
|
-
* Details to determine how long the discount should be applied for.
|
|
2378
|
-
*/
|
|
2379
|
-
discount_end?: Discount.DiscountEnd;
|
|
2380
|
-
|
|
2381
|
-
/**
|
|
2382
|
-
* ID of the promotion code to create a new discount for.
|
|
2383
|
-
*/
|
|
2384
|
-
promotion_code?: string;
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2387
|
-
namespace Discount {
|
|
2388
|
-
interface DiscountEnd {
|
|
2389
|
-
/**
|
|
2390
|
-
* Time span for the redeemed discount.
|
|
2391
|
-
*/
|
|
2392
|
-
duration?: DiscountEnd.Duration;
|
|
2393
|
-
|
|
2394
|
-
/**
|
|
2395
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2396
|
-
*/
|
|
2397
|
-
timestamp?: number;
|
|
2398
|
-
|
|
2399
|
-
/**
|
|
2400
|
-
* The type of calculation made to determine when the discount ends.
|
|
2401
|
-
*/
|
|
2402
|
-
type: DiscountEnd.Type;
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
namespace DiscountEnd {
|
|
2406
|
-
interface Duration {
|
|
2407
|
-
/**
|
|
2408
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2409
|
-
*/
|
|
2410
|
-
interval: Duration.Interval;
|
|
2411
|
-
|
|
2412
|
-
/**
|
|
2413
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2414
|
-
*/
|
|
2415
|
-
interval_count: number;
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
namespace Duration {
|
|
2419
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
|
-
type Type = 'duration' | 'timestamp';
|
|
2423
|
-
}
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
interface PriceData {
|
|
2427
|
-
/**
|
|
2428
|
-
* 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).
|
|
2429
|
-
*/
|
|
2430
|
-
currency: string;
|
|
2431
|
-
|
|
2432
|
-
/**
|
|
2433
|
-
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
2434
|
-
*/
|
|
2435
|
-
product: string;
|
|
2436
|
-
|
|
2437
|
-
/**
|
|
2438
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
2439
|
-
*/
|
|
2440
|
-
recurring?: PriceData.Recurring;
|
|
2441
|
-
|
|
2442
|
-
/**
|
|
2443
|
-
* 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.
|
|
2444
|
-
*/
|
|
2445
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2446
|
-
|
|
493
|
+
namespace AutomaticTax {
|
|
494
|
+
interface Liability {
|
|
2447
495
|
/**
|
|
2448
|
-
*
|
|
496
|
+
* The connected account being referenced when `type` is `account`.
|
|
2449
497
|
*/
|
|
2450
|
-
|
|
498
|
+
account?: string;
|
|
2451
499
|
|
|
2452
500
|
/**
|
|
2453
|
-
*
|
|
501
|
+
* Type of the account referenced in the request.
|
|
2454
502
|
*/
|
|
2455
|
-
|
|
503
|
+
type: Liability.Type;
|
|
2456
504
|
}
|
|
2457
505
|
|
|
2458
|
-
namespace
|
|
2459
|
-
|
|
2460
|
-
/**
|
|
2461
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2462
|
-
*/
|
|
2463
|
-
interval: Recurring.Interval;
|
|
2464
|
-
|
|
2465
|
-
/**
|
|
2466
|
-
* 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).
|
|
2467
|
-
*/
|
|
2468
|
-
interval_count?: number;
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
namespace Recurring {
|
|
2472
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
506
|
+
namespace Liability {
|
|
507
|
+
type Type = 'account' | 'self';
|
|
2476
508
|
}
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2479
|
-
interface SubscriptionData {
|
|
2480
|
-
/**
|
|
2481
|
-
* Describes the period to bill for upon accepting the quote.
|
|
2482
|
-
*/
|
|
2483
|
-
bill_on_acceptance?: Stripe.Emptyable<
|
|
2484
|
-
SubscriptionData.BillOnAcceptance
|
|
2485
|
-
>;
|
|
2486
|
-
|
|
2487
|
-
/**
|
|
2488
|
-
* 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.
|
|
2489
|
-
*/
|
|
2490
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
2491
|
-
|
|
2492
|
-
/**
|
|
2493
|
-
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
2494
|
-
*/
|
|
2495
|
-
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
2496
|
-
|
|
2497
|
-
/**
|
|
2498
|
-
* 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.
|
|
2499
|
-
*/
|
|
2500
|
-
description?: Stripe.Emptyable<string>;
|
|
509
|
+
}
|
|
2501
510
|
|
|
2502
|
-
|
|
2503
|
-
* 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.
|
|
2504
|
-
*/
|
|
2505
|
-
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
511
|
+
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
2506
512
|
|
|
513
|
+
interface Discount {
|
|
2507
514
|
/**
|
|
2508
|
-
*
|
|
515
|
+
* ID of the coupon to create a new discount for.
|
|
2509
516
|
*/
|
|
2510
|
-
|
|
517
|
+
coupon?: string;
|
|
2511
518
|
|
|
2512
519
|
/**
|
|
2513
|
-
*
|
|
520
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2514
521
|
*/
|
|
2515
|
-
|
|
522
|
+
discount?: string;
|
|
2516
523
|
|
|
2517
524
|
/**
|
|
2518
|
-
*
|
|
525
|
+
* ID of the promotion code to create a new discount for.
|
|
2519
526
|
*/
|
|
2520
|
-
|
|
527
|
+
promotion_code?: string;
|
|
528
|
+
}
|
|
2521
529
|
|
|
530
|
+
interface InvoiceSettings {
|
|
2522
531
|
/**
|
|
2523
|
-
*
|
|
2524
|
-
*
|
|
2525
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2526
|
-
*
|
|
2527
|
-
* 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`.
|
|
2528
|
-
*
|
|
2529
|
-
* Prorations can be disabled by passing `none`.
|
|
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`.
|
|
2530
533
|
*/
|
|
2531
|
-
|
|
534
|
+
days_until_due?: number;
|
|
2532
535
|
|
|
2533
536
|
/**
|
|
2534
|
-
*
|
|
537
|
+
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
2535
538
|
*/
|
|
2536
|
-
|
|
539
|
+
issuer?: InvoiceSettings.Issuer;
|
|
2537
540
|
}
|
|
2538
541
|
|
|
2539
|
-
namespace
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
interface BillOnAcceptance {
|
|
542
|
+
namespace InvoiceSettings {
|
|
543
|
+
interface Issuer {
|
|
2543
544
|
/**
|
|
2544
|
-
* The
|
|
545
|
+
* The connected account being referenced when `type` is `account`.
|
|
2545
546
|
*/
|
|
2546
|
-
|
|
547
|
+
account?: string;
|
|
2547
548
|
|
|
2548
549
|
/**
|
|
2549
|
-
*
|
|
550
|
+
* Type of the account referenced in the request.
|
|
2550
551
|
*/
|
|
2551
|
-
|
|
2552
|
-
}
|
|
2553
|
-
|
|
2554
|
-
namespace BillOnAcceptance {
|
|
2555
|
-
interface BillFrom {
|
|
2556
|
-
/**
|
|
2557
|
-
* Details of a Quote line to start the bill period from.
|
|
2558
|
-
*/
|
|
2559
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
2560
|
-
|
|
2561
|
-
/**
|
|
2562
|
-
* A precise Unix timestamp.
|
|
2563
|
-
*/
|
|
2564
|
-
timestamp?: number;
|
|
2565
|
-
|
|
2566
|
-
/**
|
|
2567
|
-
* The type of method to specify the `bill_from` time.
|
|
2568
|
-
*/
|
|
2569
|
-
type: BillFrom.Type;
|
|
2570
|
-
}
|
|
2571
|
-
|
|
2572
|
-
namespace BillFrom {
|
|
2573
|
-
interface LineStartsAt {
|
|
2574
|
-
/**
|
|
2575
|
-
* The ID of a quote line.
|
|
2576
|
-
*/
|
|
2577
|
-
id?: string;
|
|
2578
|
-
|
|
2579
|
-
/**
|
|
2580
|
-
* 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.
|
|
2581
|
-
*/
|
|
2582
|
-
index?: number;
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
|
-
type Type =
|
|
2586
|
-
| 'line_starts_at'
|
|
2587
|
-
| 'now'
|
|
2588
|
-
| 'pause_collection_start'
|
|
2589
|
-
| 'quote_acceptance_date'
|
|
2590
|
-
| 'timestamp';
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
interface BillUntil {
|
|
2594
|
-
/**
|
|
2595
|
-
* Details of the duration over which to bill.
|
|
2596
|
-
*/
|
|
2597
|
-
duration?: BillUntil.Duration;
|
|
2598
|
-
|
|
2599
|
-
/**
|
|
2600
|
-
* Details of a Quote line item from which to bill until.
|
|
2601
|
-
*/
|
|
2602
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
2603
|
-
|
|
2604
|
-
/**
|
|
2605
|
-
* A precise Unix timestamp.
|
|
2606
|
-
*/
|
|
2607
|
-
timestamp?: number;
|
|
2608
|
-
|
|
2609
|
-
/**
|
|
2610
|
-
* The type of method to specify the `bill_until` time.
|
|
2611
|
-
*/
|
|
2612
|
-
type: BillUntil.Type;
|
|
2613
|
-
}
|
|
2614
|
-
|
|
2615
|
-
namespace BillUntil {
|
|
2616
|
-
interface Duration {
|
|
2617
|
-
/**
|
|
2618
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2619
|
-
*/
|
|
2620
|
-
interval: Duration.Interval;
|
|
2621
|
-
|
|
2622
|
-
/**
|
|
2623
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2624
|
-
*/
|
|
2625
|
-
interval_count: number;
|
|
2626
|
-
}
|
|
2627
|
-
|
|
2628
|
-
namespace Duration {
|
|
2629
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
interface LineEndsAt {
|
|
2633
|
-
/**
|
|
2634
|
-
* The ID of a quote line.
|
|
2635
|
-
*/
|
|
2636
|
-
id?: string;
|
|
2637
|
-
|
|
2638
|
-
/**
|
|
2639
|
-
* 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.
|
|
2640
|
-
*/
|
|
2641
|
-
index?: number;
|
|
2642
|
-
}
|
|
2643
|
-
|
|
2644
|
-
type Type =
|
|
2645
|
-
| 'duration'
|
|
2646
|
-
| 'line_ends_at'
|
|
2647
|
-
| 'schedule_end'
|
|
2648
|
-
| 'timestamp'
|
|
2649
|
-
| 'upcoming_invoice';
|
|
2650
|
-
}
|
|
552
|
+
type: Issuer.Type;
|
|
2651
553
|
}
|
|
2652
554
|
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
interface Prebilling {
|
|
2656
|
-
/**
|
|
2657
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
2658
|
-
*/
|
|
2659
|
-
iterations: number;
|
|
555
|
+
namespace Issuer {
|
|
556
|
+
type Type = 'account' | 'self';
|
|
2660
557
|
}
|
|
2661
|
-
|
|
2662
|
-
type ProrationBehavior =
|
|
2663
|
-
| 'always_invoice'
|
|
2664
|
-
| 'create_prorations'
|
|
2665
|
-
| 'none';
|
|
2666
558
|
}
|
|
2667
559
|
|
|
2668
|
-
interface
|
|
2669
|
-
/**
|
|
2670
|
-
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
2671
|
-
*/
|
|
2672
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
2673
|
-
|
|
560
|
+
interface LineItem {
|
|
2674
561
|
/**
|
|
2675
|
-
*
|
|
562
|
+
* The discounts applied to this line item.
|
|
2676
563
|
*/
|
|
2677
|
-
|
|
2678
|
-
SubscriptionDataOverride.BillOnAcceptance
|
|
2679
|
-
>;
|
|
564
|
+
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
2680
565
|
|
|
2681
566
|
/**
|
|
2682
|
-
*
|
|
567
|
+
* The ID of an existing line item on the quote.
|
|
2683
568
|
*/
|
|
2684
|
-
|
|
569
|
+
id?: string;
|
|
2685
570
|
|
|
2686
571
|
/**
|
|
2687
|
-
* The
|
|
572
|
+
* The ID of the price object. One of `price` or `price_data` is required.
|
|
2688
573
|
*/
|
|
2689
|
-
|
|
574
|
+
price?: string;
|
|
2690
575
|
|
|
2691
576
|
/**
|
|
2692
|
-
*
|
|
577
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
|
|
2693
578
|
*/
|
|
2694
|
-
|
|
579
|
+
price_data?: LineItem.PriceData;
|
|
2695
580
|
|
|
2696
581
|
/**
|
|
2697
|
-
*
|
|
582
|
+
* The quantity of the line item.
|
|
2698
583
|
*/
|
|
2699
|
-
|
|
584
|
+
quantity?: number;
|
|
2700
585
|
|
|
2701
586
|
/**
|
|
2702
|
-
*
|
|
2703
|
-
*
|
|
2704
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2705
|
-
*
|
|
2706
|
-
* 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`.
|
|
2707
|
-
*
|
|
2708
|
-
* 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.
|
|
2709
588
|
*/
|
|
2710
|
-
|
|
589
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2711
590
|
}
|
|
2712
591
|
|
|
2713
|
-
namespace
|
|
2714
|
-
interface
|
|
592
|
+
namespace LineItem {
|
|
593
|
+
interface Discount {
|
|
2715
594
|
/**
|
|
2716
|
-
*
|
|
595
|
+
* ID of the coupon to create a new discount for.
|
|
2717
596
|
*/
|
|
2718
|
-
|
|
597
|
+
coupon?: string;
|
|
2719
598
|
|
|
2720
599
|
/**
|
|
2721
|
-
*
|
|
600
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2722
601
|
*/
|
|
2723
|
-
|
|
602
|
+
discount?: string;
|
|
2724
603
|
|
|
2725
604
|
/**
|
|
2726
|
-
*
|
|
605
|
+
* ID of the promotion code to create a new discount for.
|
|
2727
606
|
*/
|
|
2728
|
-
|
|
607
|
+
promotion_code?: string;
|
|
2729
608
|
}
|
|
2730
609
|
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
610
|
+
interface PriceData {
|
|
611
|
+
/**
|
|
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).
|
|
613
|
+
*/
|
|
614
|
+
currency: string;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
618
|
+
*/
|
|
619
|
+
product: string;
|
|
2734
620
|
|
|
2735
|
-
|
|
621
|
+
/**
|
|
622
|
+
* The recurring components of a price such as `interval` and `interval_count`.
|
|
623
|
+
*/
|
|
624
|
+
recurring?: PriceData.Recurring;
|
|
2736
625
|
|
|
2737
|
-
interface BillOnAcceptance {
|
|
2738
626
|
/**
|
|
2739
|
-
*
|
|
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.
|
|
2740
628
|
*/
|
|
2741
|
-
|
|
629
|
+
tax_behavior?: PriceData.TaxBehavior;
|
|
2742
630
|
|
|
2743
631
|
/**
|
|
2744
|
-
*
|
|
632
|
+
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
2745
633
|
*/
|
|
2746
|
-
|
|
2747
|
-
}
|
|
634
|
+
unit_amount?: number;
|
|
2748
635
|
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
636
|
+
/**
|
|
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.
|
|
638
|
+
*/
|
|
639
|
+
unit_amount_decimal?: string;
|
|
640
|
+
}
|
|
2755
641
|
|
|
642
|
+
namespace PriceData {
|
|
643
|
+
interface Recurring {
|
|
2756
644
|
/**
|
|
2757
|
-
*
|
|
645
|
+
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2758
646
|
*/
|
|
2759
|
-
|
|
647
|
+
interval: Recurring.Interval;
|
|
2760
648
|
|
|
2761
649
|
/**
|
|
2762
|
-
* 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).
|
|
2763
651
|
*/
|
|
2764
|
-
|
|
652
|
+
interval_count?: number;
|
|
2765
653
|
}
|
|
2766
654
|
|
|
2767
|
-
namespace
|
|
2768
|
-
|
|
2769
|
-
/**
|
|
2770
|
-
* The ID of a quote line.
|
|
2771
|
-
*/
|
|
2772
|
-
id?: string;
|
|
2773
|
-
|
|
2774
|
-
/**
|
|
2775
|
-
* 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.
|
|
2776
|
-
*/
|
|
2777
|
-
index?: number;
|
|
2778
|
-
}
|
|
2779
|
-
|
|
2780
|
-
type Type =
|
|
2781
|
-
| 'line_starts_at'
|
|
2782
|
-
| 'now'
|
|
2783
|
-
| 'pause_collection_start'
|
|
2784
|
-
| 'quote_acceptance_date'
|
|
2785
|
-
| 'timestamp';
|
|
655
|
+
namespace Recurring {
|
|
656
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2786
657
|
}
|
|
2787
658
|
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
*/
|
|
2792
|
-
duration?: BillUntil.Duration;
|
|
2793
|
-
|
|
2794
|
-
/**
|
|
2795
|
-
* Details of a Quote line item from which to bill until.
|
|
2796
|
-
*/
|
|
2797
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
2798
|
-
|
|
2799
|
-
/**
|
|
2800
|
-
* A precise Unix timestamp.
|
|
2801
|
-
*/
|
|
2802
|
-
timestamp?: number;
|
|
659
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
660
|
+
}
|
|
661
|
+
}
|
|
2803
662
|
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
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>;
|
|
2809
668
|
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
*/
|
|
2815
|
-
interval: Duration.Interval;
|
|
2816
|
-
|
|
2817
|
-
/**
|
|
2818
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2819
|
-
*/
|
|
2820
|
-
interval_count: number;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
namespace Duration {
|
|
2824
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
interface LineEndsAt {
|
|
2828
|
-
/**
|
|
2829
|
-
* The ID of a quote line.
|
|
2830
|
-
*/
|
|
2831
|
-
id?: string;
|
|
2832
|
-
|
|
2833
|
-
/**
|
|
2834
|
-
* 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.
|
|
2835
|
-
*/
|
|
2836
|
-
index?: number;
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
type Type =
|
|
2840
|
-
| 'duration'
|
|
2841
|
-
| 'line_ends_at'
|
|
2842
|
-
| 'schedule_end'
|
|
2843
|
-
| 'timestamp'
|
|
2844
|
-
| 'upcoming_invoice';
|
|
2845
|
-
}
|
|
2846
|
-
}
|
|
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>;
|
|
2847
673
|
|
|
2848
|
-
|
|
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;
|
|
2849
678
|
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
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>;
|
|
2854
683
|
}
|
|
2855
684
|
|
|
2856
685
|
interface TransferData {
|
|
@@ -2873,12 +702,12 @@ declare module 'stripe' {
|
|
|
2873
702
|
|
|
2874
703
|
interface QuoteListParams extends PaginationParams {
|
|
2875
704
|
/**
|
|
2876
|
-
* The ID of the customer whose quotes
|
|
705
|
+
* The ID of the customer whose quotes you're retrieving.
|
|
2877
706
|
*/
|
|
2878
707
|
customer?: string;
|
|
2879
708
|
|
|
2880
709
|
/**
|
|
2881
|
-
* The ID of the account whose quotes
|
|
710
|
+
* The ID of the account representing the customer whose quotes you're retrieving.
|
|
2882
711
|
*/
|
|
2883
712
|
customer_account?: string;
|
|
2884
713
|
|
|
@@ -2887,11 +716,6 @@ declare module 'stripe' {
|
|
|
2887
716
|
*/
|
|
2888
717
|
expand?: Array<string>;
|
|
2889
718
|
|
|
2890
|
-
/**
|
|
2891
|
-
* The subscription which the quote updates.
|
|
2892
|
-
*/
|
|
2893
|
-
from_subscription?: string;
|
|
2894
|
-
|
|
2895
719
|
/**
|
|
2896
720
|
* The status of the quote.
|
|
2897
721
|
*/
|
|
@@ -2904,13 +728,7 @@ declare module 'stripe' {
|
|
|
2904
728
|
}
|
|
2905
729
|
|
|
2906
730
|
namespace QuoteListParams {
|
|
2907
|
-
type Status =
|
|
2908
|
-
| 'accepted'
|
|
2909
|
-
| 'accepting'
|
|
2910
|
-
| 'canceled'
|
|
2911
|
-
| 'draft'
|
|
2912
|
-
| 'open'
|
|
2913
|
-
| 'stale';
|
|
731
|
+
type Status = 'accepted' | 'canceled' | 'draft' | 'open';
|
|
2914
732
|
}
|
|
2915
733
|
|
|
2916
734
|
interface QuoteAcceptParams {
|
|
@@ -2939,13 +757,6 @@ declare module 'stripe' {
|
|
|
2939
757
|
expires_at?: number;
|
|
2940
758
|
}
|
|
2941
759
|
|
|
2942
|
-
interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
|
|
2943
|
-
/**
|
|
2944
|
-
* Specifies which fields in the response should be expanded.
|
|
2945
|
-
*/
|
|
2946
|
-
expand?: Array<string>;
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
760
|
interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
|
|
2950
761
|
/**
|
|
2951
762
|
* Specifies which fields in the response should be expanded.
|
|
@@ -2960,47 +771,6 @@ declare module 'stripe' {
|
|
|
2960
771
|
expand?: Array<string>;
|
|
2961
772
|
}
|
|
2962
773
|
|
|
2963
|
-
interface QuoteListLinesParams extends PaginationParams {
|
|
2964
|
-
/**
|
|
2965
|
-
* Specifies which fields in the response should be expanded.
|
|
2966
|
-
*/
|
|
2967
|
-
expand?: Array<string>;
|
|
2968
|
-
}
|
|
2969
|
-
|
|
2970
|
-
interface QuoteListPreviewInvoicesParams extends PaginationParams {
|
|
2971
|
-
/**
|
|
2972
|
-
* Specifies which fields in the response should be expanded.
|
|
2973
|
-
*/
|
|
2974
|
-
expand?: Array<string>;
|
|
2975
|
-
}
|
|
2976
|
-
|
|
2977
|
-
interface QuoteListPreviewSubscriptionSchedulesParams
|
|
2978
|
-
extends PaginationParams {
|
|
2979
|
-
/**
|
|
2980
|
-
* Specifies which fields in the response should be expanded.
|
|
2981
|
-
*/
|
|
2982
|
-
expand?: Array<string>;
|
|
2983
|
-
}
|
|
2984
|
-
|
|
2985
|
-
interface QuoteMarkDraftParams {
|
|
2986
|
-
/**
|
|
2987
|
-
* Specifies which fields in the response should be expanded.
|
|
2988
|
-
*/
|
|
2989
|
-
expand?: Array<string>;
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
interface QuoteMarkStaleParams {
|
|
2993
|
-
/**
|
|
2994
|
-
* Specifies which fields in the response should be expanded.
|
|
2995
|
-
*/
|
|
2996
|
-
expand?: Array<string>;
|
|
2997
|
-
|
|
2998
|
-
/**
|
|
2999
|
-
* Reason the Quote is being marked stale.
|
|
3000
|
-
*/
|
|
3001
|
-
reason?: string;
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
774
|
interface QuotePdfParams {
|
|
3005
775
|
/**
|
|
3006
776
|
* Specifies which fields in the response should be expanded.
|
|
@@ -3008,13 +778,6 @@ declare module 'stripe' {
|
|
|
3008
778
|
expand?: Array<string>;
|
|
3009
779
|
}
|
|
3010
780
|
|
|
3011
|
-
interface QuoteReestimateParams {
|
|
3012
|
-
/**
|
|
3013
|
-
* Specifies which fields in the response should be expanded.
|
|
3014
|
-
*/
|
|
3015
|
-
expand?: Array<string>;
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
781
|
class QuotesResource {
|
|
3019
782
|
/**
|
|
3020
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).
|
|
@@ -3095,21 +858,6 @@ declare module 'stripe' {
|
|
|
3095
858
|
options?: RequestOptions
|
|
3096
859
|
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3097
860
|
|
|
3098
|
-
/**
|
|
3099
|
-
* Preview the invoice line items that would be generated by accepting the quote.
|
|
3100
|
-
*/
|
|
3101
|
-
listPreviewInvoiceLines(
|
|
3102
|
-
quoteId: string,
|
|
3103
|
-
id: string,
|
|
3104
|
-
params?: QuoteListPreviewInvoiceLinesParams,
|
|
3105
|
-
options?: RequestOptions
|
|
3106
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3107
|
-
listPreviewInvoiceLines(
|
|
3108
|
-
quoteId: string,
|
|
3109
|
-
id: string,
|
|
3110
|
-
options?: RequestOptions
|
|
3111
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3112
|
-
|
|
3113
861
|
/**
|
|
3114
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.
|
|
3115
863
|
*/
|
|
@@ -3136,71 +884,6 @@ declare module 'stripe' {
|
|
|
3136
884
|
options?: RequestOptions
|
|
3137
885
|
): ApiListPromise<Stripe.LineItem>;
|
|
3138
886
|
|
|
3139
|
-
/**
|
|
3140
|
-
* 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.
|
|
3141
|
-
*/
|
|
3142
|
-
listLines(
|
|
3143
|
-
id: string,
|
|
3144
|
-
params?: QuoteListLinesParams,
|
|
3145
|
-
options?: RequestOptions
|
|
3146
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3147
|
-
listLines(
|
|
3148
|
-
id: string,
|
|
3149
|
-
options?: RequestOptions
|
|
3150
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3151
|
-
|
|
3152
|
-
/**
|
|
3153
|
-
* Preview the invoices that would be generated by accepting the quote.
|
|
3154
|
-
*/
|
|
3155
|
-
listPreviewInvoices(
|
|
3156
|
-
id: string,
|
|
3157
|
-
params?: QuoteListPreviewInvoicesParams,
|
|
3158
|
-
options?: RequestOptions
|
|
3159
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3160
|
-
listPreviewInvoices(
|
|
3161
|
-
id: string,
|
|
3162
|
-
options?: RequestOptions
|
|
3163
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3164
|
-
|
|
3165
|
-
/**
|
|
3166
|
-
* Preview the schedules that would be generated by accepting the quote
|
|
3167
|
-
*/
|
|
3168
|
-
listPreviewSubscriptionSchedules(
|
|
3169
|
-
id: string,
|
|
3170
|
-
params?: QuoteListPreviewSubscriptionSchedulesParams,
|
|
3171
|
-
options?: RequestOptions
|
|
3172
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3173
|
-
listPreviewSubscriptionSchedules(
|
|
3174
|
-
id: string,
|
|
3175
|
-
options?: RequestOptions
|
|
3176
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3177
|
-
|
|
3178
|
-
/**
|
|
3179
|
-
* Converts a stale quote to draft.
|
|
3180
|
-
*/
|
|
3181
|
-
markDraft(
|
|
3182
|
-
id: string,
|
|
3183
|
-
params?: QuoteMarkDraftParams,
|
|
3184
|
-
options?: RequestOptions
|
|
3185
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3186
|
-
markDraft(
|
|
3187
|
-
id: string,
|
|
3188
|
-
options?: RequestOptions
|
|
3189
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3190
|
-
|
|
3191
|
-
/**
|
|
3192
|
-
* Converts a draft or open quote to stale.
|
|
3193
|
-
*/
|
|
3194
|
-
markStale(
|
|
3195
|
-
id: string,
|
|
3196
|
-
params?: QuoteMarkStaleParams,
|
|
3197
|
-
options?: RequestOptions
|
|
3198
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3199
|
-
markStale(
|
|
3200
|
-
id: string,
|
|
3201
|
-
options?: RequestOptions
|
|
3202
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3203
|
-
|
|
3204
887
|
/**
|
|
3205
888
|
* Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
|
3206
889
|
*/
|
|
@@ -3210,19 +893,6 @@ declare module 'stripe' {
|
|
|
3210
893
|
options?: RequestOptions
|
|
3211
894
|
): Promise<StripeStreamResponse>;
|
|
3212
895
|
pdf(id: string, options?: RequestOptions): Promise<StripeStreamResponse>;
|
|
3213
|
-
|
|
3214
|
-
/**
|
|
3215
|
-
* Recompute the upcoming invoice estimate for the quote.
|
|
3216
|
-
*/
|
|
3217
|
-
reestimate(
|
|
3218
|
-
id: string,
|
|
3219
|
-
params?: QuoteReestimateParams,
|
|
3220
|
-
options?: RequestOptions
|
|
3221
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3222
|
-
reestimate(
|
|
3223
|
-
id: string,
|
|
3224
|
-
options?: RequestOptions
|
|
3225
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3226
896
|
}
|
|
3227
897
|
}
|
|
3228
898
|
}
|