stripe 19.0.0 → 19.1.0-beta.1
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 +1431 -11
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/Error.js +115 -1
- package/cjs/apiVersion.js +2 -3
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Billing/Analytics/MeterUsage.js +12 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/ExternalAccounts.js +23 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/FxQuotes.js +15 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
- package/cjs/resources/Mandates.js +5 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentAttemptRecords.js +17 -0
- package/cjs/resources/PaymentIntents.js +13 -0
- package/cjs/resources/PaymentRecords.js +33 -0
- package/cjs/resources/Privacy/RedactionJobs.js +42 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Subscriptions.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/OnboardingLinks.js +12 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
- package/cjs/resources/V2/Billing/BillSettings.js +27 -0
- package/cjs/resources/V2/Billing/Cadences.js +23 -0
- package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
- package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
- package/cjs/resources/V2/Billing/Profiles.js +19 -0
- package/cjs/resources/V2/Core/AccountLinks.js +9 -0
- package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
- package/cjs/resources/V2/Core/Accounts.js +25 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +28 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +24 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +25 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
- package/cjs/resources/V2/Payments/OffSessionPayments.js +29 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
- package/cjs/resources.js +110 -8
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +100 -0
- package/esm/apiVersion.js +1 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Billing/Analytics/MeterUsage.js +9 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/ExternalAccounts.js +20 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/FxQuotes.js +12 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
- package/esm/resources/Mandates.js +5 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentAttemptRecords.js +14 -0
- package/esm/resources/PaymentIntents.js +13 -0
- package/esm/resources/PaymentRecords.js +30 -0
- package/esm/resources/Privacy/RedactionJobs.js +39 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Subscriptions.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/OnboardingLinks.js +9 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
- package/esm/resources/V2/Billing/BillSettings.js +24 -0
- package/esm/resources/V2/Billing/Cadences.js +20 -0
- package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
- package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
- package/esm/resources/V2/Billing/Profiles.js +16 -0
- package/esm/resources/V2/Core/AccountLinks.js +6 -0
- package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
- package/esm/resources/V2/Core/Accounts.js +22 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +25 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +21 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +22 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
- package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
- package/esm/resources/V2/Payments/OffSessionPayments.js +26 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
- package/esm/resources.js +95 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +45 -0
- package/types/AccountSessionsResource.d.ts +264 -0
- package/types/Accounts.d.ts +212 -1
- package/types/AccountsResource.d.ts +544 -0
- package/types/Billing/AlertTriggereds.d.ts +1 -1
- package/types/Billing/Analytics/MeterUsage.d.ts +31 -0
- package/types/Billing/Analytics/MeterUsageResource.d.ts +689 -0
- package/types/Billing/Analytics/MeterUsageRows.d.ts +51 -0
- package/types/Billing/CreditBalanceSummary.d.ts +5 -0
- package/types/Billing/CreditBalanceSummaryResource.d.ts +8 -3
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
- package/types/Billing/CreditGrants.d.ts +5 -0
- package/types/Billing/CreditGrantsResource.d.ts +11 -1
- package/types/BillingPortal/Sessions.d.ts +5 -0
- package/types/BillingPortal/SessionsResource.d.ts +12 -4
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Cards.d.ts +5 -0
- package/types/CashBalances.d.ts +5 -0
- package/types/Charges.d.ts +171 -0
- package/types/ChargesResource.d.ts +1406 -0
- package/types/Checkout/Sessions.d.ts +369 -2
- package/types/Checkout/SessionsResource.d.ts +634 -2
- package/types/ConfirmationTokens.d.ts +125 -0
- package/types/Coupons.d.ts +33 -0
- package/types/CouponsResource.d.ts +21 -0
- package/types/CreditNoteLineItems.d.ts +17 -0
- package/types/CreditNotes.d.ts +5 -0
- package/types/CreditNotesResource.d.ts +5 -0
- package/types/CustomerBalanceTransactions.d.ts +2 -0
- package/types/CustomerCashBalanceTransactions.d.ts +2 -0
- package/types/CustomerSessions.d.ts +5 -0
- package/types/CustomerSessionsResource.d.ts +6 -1
- package/types/Customers.d.ts +2 -0
- package/types/CustomersResource.d.ts +8 -0
- package/types/Discounts.d.ts +10 -0
- package/types/Disputes.d.ts +40 -0
- package/types/DisputesResource.d.ts +11 -0
- package/types/Errors.d.ts +85 -0
- package/types/EventTypes.d.ts +664 -0
- package/types/Events.d.ts +97 -0
- package/types/ExternalAccountsResource.d.ts +304 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +36 -1
- package/types/FinancialConnections/AccountsResource.d.ts +40 -3
- package/types/FinancialConnections/Institutions.d.ts +98 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +51 -1
- package/types/FinancialConnections/SessionsResource.d.ts +43 -1
- package/types/FxQuotes.d.ts +155 -0
- package/types/FxQuotesResource.d.ts +130 -0
- package/types/Identity/VerificationSessions.d.ts +5 -0
- package/types/Identity/VerificationSessionsResource.d.ts +7 -0
- package/types/InvoiceItems.d.ts +10 -0
- package/types/InvoiceItemsResource.d.ts +117 -6
- package/types/InvoiceLineItems.d.ts +45 -1
- package/types/InvoicePayments.d.ts +5 -0
- package/types/InvoicePaymentsResource.d.ts +10 -1
- package/types/Invoices.d.ts +204 -4
- package/types/InvoicesResource.d.ts +1646 -21
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/Settlements.d.ts +113 -0
- package/types/Issuing/Transactions.d.ts +5 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +49 -0
- package/types/Mandates.d.ts +135 -1
- package/types/MandatesResource.d.ts +31 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1163 -0
- package/types/OrdersResource.d.ts +3139 -0
- package/types/PaymentAttemptRecords.d.ts +2360 -0
- package/types/PaymentAttemptRecordsResource.d.ts +52 -0
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +116 -0
- package/types/PaymentIntents.d.ts +825 -3
- package/types/PaymentIntentsResource.d.ts +11753 -5914
- package/types/PaymentLinks.d.ts +7 -0
- package/types/PaymentLinksResource.d.ts +14 -0
- package/types/PaymentMethodConfigurations.d.ts +216 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +300 -0
- package/types/PaymentMethods.d.ts +130 -0
- package/types/PaymentMethodsResource.d.ts +167 -2
- package/types/PaymentRecords.d.ts +2353 -0
- package/types/PaymentRecordsResource.d.ts +559 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
- package/types/Privacy/RedactionJobs.d.ts +111 -0
- package/types/Privacy/RedactionJobsResource.d.ts +230 -0
- package/types/PromotionCodes.d.ts +5 -0
- package/types/PromotionCodesResource.d.ts +10 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1770 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +908 -0
- package/types/Quotes.d.ts +594 -1
- package/types/QuotesResource.d.ts +2588 -243
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +51 -1
- package/types/SetupIntents.d.ts +210 -2
- package/types/SetupIntentsResource.d.ts +938 -4
- package/types/Sources.d.ts +29 -0
- package/types/SubscriptionItems.d.ts +26 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +205 -0
- package/types/SubscriptionSchedulesResource.d.ts +1233 -5
- package/types/Subscriptions.d.ts +263 -1
- package/types/SubscriptionsResource.d.ts +747 -8
- package/types/Tax/Associations.d.ts +82 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/TaxIds.d.ts +10 -0
- package/types/TaxIdsResource.d.ts +10 -0
- package/types/Terminal/Configurations.d.ts +9 -0
- package/types/Terminal/ConfigurationsResource.d.ts +28 -0
- package/types/Terminal/OnboardingLinks.d.ts +57 -0
- package/types/Terminal/OnboardingLinksResource.d.ts +62 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +20 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Transfers.d.ts +5 -0
- package/types/TransfersResource.d.ts +5 -0
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
- package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/BillSettings.d.ts +120 -0
- package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
- package/types/V2/Billing/Cadences.d.ts +686 -0
- package/types/V2/Billing/CadencesResource.d.ts +487 -0
- package/types/V2/Billing/CollectionSettingVersions.d.ts +314 -0
- package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
- package/types/V2/Billing/CollectionSettings.d.ts +337 -0
- package/types/V2/Billing/CollectionSettingsResource.d.ts +675 -0
- package/types/V2/Billing/Profiles.d.ts +70 -0
- package/types/V2/Billing/ProfilesResource.d.ts +150 -0
- package/types/V2/Core/AccountLinks.d.ts +168 -0
- package/types/V2/Core/AccountLinksResource.d.ts +152 -0
- package/types/V2/Core/AccountPersons.d.ts +615 -0
- package/types/V2/Core/Accounts/PersonsResource.d.ts +1153 -0
- package/types/V2/Core/Accounts.d.ts +5919 -0
- package/types/V2/Core/AccountsResource.d.ts +4999 -0
- package/types/V2/Core/EventTypes.d.ts +1646 -9
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +172 -0
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +70 -0
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +123 -0
- package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
- package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +148 -0
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +147 -0
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +178 -0
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +112 -0
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +206 -0
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +170 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +278 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +242 -0
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +296 -0
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +251 -0
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +208 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +160 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +93 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +302 -0
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +176 -0
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +162 -0
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
- package/types/V2/MoneyManagement/Transactions.d.ts +177 -0
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
- package/types/V2/Payments/OffSessionPayments.d.ts +326 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +401 -0
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +68 -0
- package/types/WebhookEndpointsResource.d.ts +78 -0
- package/types/apiVersion.d.ts +1 -2
- package/types/index.d.ts +160 -0
- package/types/lib.d.ts +10 -0
|
@@ -8,6 +8,11 @@ declare module 'stripe' {
|
|
|
8
8
|
*/
|
|
9
9
|
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
|
13
|
+
*/
|
|
14
|
+
amounts_due?: Stripe.Emptyable<Array<InvoiceCreateParams.AmountsDue>>;
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
|
13
18
|
*/
|
|
@@ -48,11 +53,21 @@ declare module 'stripe' {
|
|
|
48
53
|
*/
|
|
49
54
|
customer?: string;
|
|
50
55
|
|
|
56
|
+
/**
|
|
57
|
+
* The ID of the account who will be billed.
|
|
58
|
+
*/
|
|
59
|
+
customer_account?: string;
|
|
60
|
+
|
|
51
61
|
/**
|
|
52
62
|
* The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
|
53
63
|
*/
|
|
54
64
|
days_until_due?: number;
|
|
55
65
|
|
|
66
|
+
/**
|
|
67
|
+
* The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
|
68
|
+
*/
|
|
69
|
+
default_margins?: Array<string>;
|
|
70
|
+
|
|
56
71
|
/**
|
|
57
72
|
* ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
|
58
73
|
*/
|
|
@@ -165,6 +180,28 @@ declare module 'stripe' {
|
|
|
165
180
|
}
|
|
166
181
|
|
|
167
182
|
namespace InvoiceCreateParams {
|
|
183
|
+
interface AmountsDue {
|
|
184
|
+
/**
|
|
185
|
+
* The amount in cents (or local equivalent).
|
|
186
|
+
*/
|
|
187
|
+
amount: number;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Number of days from when invoice is finalized until the payment is due.
|
|
191
|
+
*/
|
|
192
|
+
days_until_due?: number;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
196
|
+
*/
|
|
197
|
+
description: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Date on which a payment plan's payment is due.
|
|
201
|
+
*/
|
|
202
|
+
due_date?: number;
|
|
203
|
+
}
|
|
204
|
+
|
|
168
205
|
interface AutomaticTax {
|
|
169
206
|
/**
|
|
170
207
|
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
@@ -220,12 +257,56 @@ declare module 'stripe' {
|
|
|
220
257
|
*/
|
|
221
258
|
discount?: string;
|
|
222
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Details to determine how long the discount should be applied for.
|
|
262
|
+
*/
|
|
263
|
+
discount_end?: Discount.DiscountEnd;
|
|
264
|
+
|
|
223
265
|
/**
|
|
224
266
|
* ID of the promotion code to create a new discount for.
|
|
225
267
|
*/
|
|
226
268
|
promotion_code?: string;
|
|
227
269
|
}
|
|
228
270
|
|
|
271
|
+
namespace Discount {
|
|
272
|
+
interface DiscountEnd {
|
|
273
|
+
/**
|
|
274
|
+
* Time span for the redeemed discount.
|
|
275
|
+
*/
|
|
276
|
+
duration?: DiscountEnd.Duration;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
280
|
+
*/
|
|
281
|
+
timestamp?: number;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The type of calculation made to determine when the discount ends.
|
|
285
|
+
*/
|
|
286
|
+
type: DiscountEnd.Type;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
namespace DiscountEnd {
|
|
290
|
+
interface Duration {
|
|
291
|
+
/**
|
|
292
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
293
|
+
*/
|
|
294
|
+
interval: Duration.Interval;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
298
|
+
*/
|
|
299
|
+
interval_count: number;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
namespace Duration {
|
|
303
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
type Type = 'duration' | 'timestamp';
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
229
310
|
interface FromInvoice {
|
|
230
311
|
/**
|
|
231
312
|
* The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
|
|
@@ -297,16 +378,33 @@ declare module 'stripe' {
|
|
|
297
378
|
PaymentMethodOptions.CustomerBalance
|
|
298
379
|
>;
|
|
299
380
|
|
|
381
|
+
/**
|
|
382
|
+
* If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
|
|
383
|
+
*/
|
|
384
|
+
id_bank_transfer?: Stripe.Emptyable<
|
|
385
|
+
PaymentMethodOptions.IdBankTransfer
|
|
386
|
+
>;
|
|
387
|
+
|
|
300
388
|
/**
|
|
301
389
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
302
390
|
*/
|
|
303
391
|
konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
|
|
304
392
|
|
|
393
|
+
/**
|
|
394
|
+
* If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
|
|
395
|
+
*/
|
|
396
|
+
pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
|
|
397
|
+
|
|
305
398
|
/**
|
|
306
399
|
* If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
|
|
307
400
|
*/
|
|
308
401
|
sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
|
|
309
402
|
|
|
403
|
+
/**
|
|
404
|
+
* If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
|
|
405
|
+
*/
|
|
406
|
+
upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
|
|
407
|
+
|
|
310
408
|
/**
|
|
311
409
|
* If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
|
|
312
410
|
*/
|
|
@@ -444,10 +542,58 @@ declare module 'stripe' {
|
|
|
444
542
|
}
|
|
445
543
|
}
|
|
446
544
|
|
|
545
|
+
interface IdBankTransfer {}
|
|
546
|
+
|
|
447
547
|
interface Konbini {}
|
|
448
548
|
|
|
549
|
+
interface Pix {
|
|
550
|
+
/**
|
|
551
|
+
* Determines if the amount includes the IOF tax. Defaults to `never`.
|
|
552
|
+
*/
|
|
553
|
+
amount_includes_iof?: Pix.AmountIncludesIof;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
namespace Pix {
|
|
557
|
+
type AmountIncludesIof = 'always' | 'never';
|
|
558
|
+
}
|
|
559
|
+
|
|
449
560
|
interface SepaDebit {}
|
|
450
561
|
|
|
562
|
+
interface Upi {
|
|
563
|
+
/**
|
|
564
|
+
* Configuration options for setting up an eMandate
|
|
565
|
+
*/
|
|
566
|
+
mandate_options?: Upi.MandateOptions;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
namespace Upi {
|
|
570
|
+
interface MandateOptions {
|
|
571
|
+
/**
|
|
572
|
+
* Amount to be charged for future payments.
|
|
573
|
+
*/
|
|
574
|
+
amount?: number;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
|
578
|
+
*/
|
|
579
|
+
amount_type?: MandateOptions.AmountType;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* A description of the mandate or subscription that is meant to be displayed to the customer.
|
|
583
|
+
*/
|
|
584
|
+
description?: string;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
|
588
|
+
*/
|
|
589
|
+
end_date?: number;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
namespace MandateOptions {
|
|
593
|
+
type AmountType = 'fixed' | 'maximum';
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
451
597
|
interface UsBankAccount {
|
|
452
598
|
/**
|
|
453
599
|
* Additional fields for Financial Connections Session creation
|
|
@@ -484,6 +630,11 @@ declare module 'stripe' {
|
|
|
484
630
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
485
631
|
*/
|
|
486
632
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
636
|
+
*/
|
|
637
|
+
institution?: string;
|
|
487
638
|
}
|
|
488
639
|
|
|
489
640
|
namespace Filters {
|
|
@@ -496,7 +647,11 @@ declare module 'stripe' {
|
|
|
496
647
|
| 'payment_method'
|
|
497
648
|
| 'transactions';
|
|
498
649
|
|
|
499
|
-
type Prefetch =
|
|
650
|
+
type Prefetch =
|
|
651
|
+
| 'balances'
|
|
652
|
+
| 'inferred_balances'
|
|
653
|
+
| 'ownership'
|
|
654
|
+
| 'transactions';
|
|
500
655
|
}
|
|
501
656
|
|
|
502
657
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -516,11 +671,13 @@ declare module 'stripe' {
|
|
|
516
671
|
| 'card'
|
|
517
672
|
| 'cashapp'
|
|
518
673
|
| 'crypto'
|
|
674
|
+
| 'custom'
|
|
519
675
|
| 'customer_balance'
|
|
520
676
|
| 'eps'
|
|
521
677
|
| 'fpx'
|
|
522
678
|
| 'giropay'
|
|
523
679
|
| 'grabpay'
|
|
680
|
+
| 'id_bank_transfer'
|
|
524
681
|
| 'ideal'
|
|
525
682
|
| 'jp_credit_transfer'
|
|
526
683
|
| 'kakao_pay'
|
|
@@ -535,12 +692,15 @@ declare module 'stripe' {
|
|
|
535
692
|
| 'payco'
|
|
536
693
|
| 'paynow'
|
|
537
694
|
| 'paypal'
|
|
695
|
+
| 'pix'
|
|
538
696
|
| 'promptpay'
|
|
539
697
|
| 'revolut_pay'
|
|
540
698
|
| 'sepa_credit_transfer'
|
|
541
699
|
| 'sepa_debit'
|
|
542
700
|
| 'sofort'
|
|
701
|
+
| 'stripe_balance'
|
|
543
702
|
| 'swish'
|
|
703
|
+
| 'upi'
|
|
544
704
|
| 'us_bank_account'
|
|
545
705
|
| 'wechat_pay';
|
|
546
706
|
}
|
|
@@ -767,6 +927,11 @@ declare module 'stripe' {
|
|
|
767
927
|
*/
|
|
768
928
|
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
769
929
|
|
|
930
|
+
/**
|
|
931
|
+
* List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
|
932
|
+
*/
|
|
933
|
+
amounts_due?: Stripe.Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
|
|
934
|
+
|
|
770
935
|
/**
|
|
771
936
|
* A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
|
772
937
|
*/
|
|
@@ -802,6 +967,11 @@ declare module 'stripe' {
|
|
|
802
967
|
*/
|
|
803
968
|
days_until_due?: number;
|
|
804
969
|
|
|
970
|
+
/**
|
|
971
|
+
* The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
|
972
|
+
*/
|
|
973
|
+
default_margins?: Stripe.Emptyable<Array<string>>;
|
|
974
|
+
|
|
805
975
|
/**
|
|
806
976
|
* ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
|
807
977
|
*/
|
|
@@ -899,6 +1069,28 @@ declare module 'stripe' {
|
|
|
899
1069
|
}
|
|
900
1070
|
|
|
901
1071
|
namespace InvoiceUpdateParams {
|
|
1072
|
+
interface AmountsDue {
|
|
1073
|
+
/**
|
|
1074
|
+
* The amount in cents (or local equivalent).
|
|
1075
|
+
*/
|
|
1076
|
+
amount: number;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Number of days from when invoice is finalized until the payment is due.
|
|
1080
|
+
*/
|
|
1081
|
+
days_until_due?: number;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
1085
|
+
*/
|
|
1086
|
+
description: string;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* Date on which a payment plan's payment is due.
|
|
1090
|
+
*/
|
|
1091
|
+
due_date?: number;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
902
1094
|
interface AutomaticTax {
|
|
903
1095
|
/**
|
|
904
1096
|
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
@@ -954,12 +1146,56 @@ declare module 'stripe' {
|
|
|
954
1146
|
*/
|
|
955
1147
|
discount?: string;
|
|
956
1148
|
|
|
1149
|
+
/**
|
|
1150
|
+
* Details to determine how long the discount should be applied for.
|
|
1151
|
+
*/
|
|
1152
|
+
discount_end?: Discount.DiscountEnd;
|
|
1153
|
+
|
|
957
1154
|
/**
|
|
958
1155
|
* ID of the promotion code to create a new discount for.
|
|
959
1156
|
*/
|
|
960
1157
|
promotion_code?: string;
|
|
961
1158
|
}
|
|
962
1159
|
|
|
1160
|
+
namespace Discount {
|
|
1161
|
+
interface DiscountEnd {
|
|
1162
|
+
/**
|
|
1163
|
+
* Time span for the redeemed discount.
|
|
1164
|
+
*/
|
|
1165
|
+
duration?: DiscountEnd.Duration;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1169
|
+
*/
|
|
1170
|
+
timestamp?: number;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* The type of calculation made to determine when the discount ends.
|
|
1174
|
+
*/
|
|
1175
|
+
type: DiscountEnd.Type;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
namespace DiscountEnd {
|
|
1179
|
+
interface Duration {
|
|
1180
|
+
/**
|
|
1181
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1182
|
+
*/
|
|
1183
|
+
interval: Duration.Interval;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1187
|
+
*/
|
|
1188
|
+
interval_count: number;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
namespace Duration {
|
|
1192
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
type Type = 'duration' | 'timestamp';
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
|
|
963
1199
|
interface Issuer {
|
|
964
1200
|
/**
|
|
965
1201
|
* The connected account being referenced when `type` is `account`.
|
|
@@ -1019,16 +1255,33 @@ declare module 'stripe' {
|
|
|
1019
1255
|
PaymentMethodOptions.CustomerBalance
|
|
1020
1256
|
>;
|
|
1021
1257
|
|
|
1258
|
+
/**
|
|
1259
|
+
* If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
|
|
1260
|
+
*/
|
|
1261
|
+
id_bank_transfer?: Stripe.Emptyable<
|
|
1262
|
+
PaymentMethodOptions.IdBankTransfer
|
|
1263
|
+
>;
|
|
1264
|
+
|
|
1022
1265
|
/**
|
|
1023
1266
|
* If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
|
|
1024
1267
|
*/
|
|
1025
1268
|
konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
|
|
1026
1269
|
|
|
1270
|
+
/**
|
|
1271
|
+
* If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
|
|
1272
|
+
*/
|
|
1273
|
+
pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
|
|
1274
|
+
|
|
1027
1275
|
/**
|
|
1028
1276
|
* If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
|
|
1029
1277
|
*/
|
|
1030
1278
|
sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
|
|
1031
1279
|
|
|
1280
|
+
/**
|
|
1281
|
+
* If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
|
|
1282
|
+
*/
|
|
1283
|
+
upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
|
|
1284
|
+
|
|
1032
1285
|
/**
|
|
1033
1286
|
* If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
|
|
1034
1287
|
*/
|
|
@@ -1166,10 +1419,58 @@ declare module 'stripe' {
|
|
|
1166
1419
|
}
|
|
1167
1420
|
}
|
|
1168
1421
|
|
|
1422
|
+
interface IdBankTransfer {}
|
|
1423
|
+
|
|
1169
1424
|
interface Konbini {}
|
|
1170
1425
|
|
|
1426
|
+
interface Pix {
|
|
1427
|
+
/**
|
|
1428
|
+
* Determines if the amount includes the IOF tax. Defaults to `never`.
|
|
1429
|
+
*/
|
|
1430
|
+
amount_includes_iof?: Pix.AmountIncludesIof;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
namespace Pix {
|
|
1434
|
+
type AmountIncludesIof = 'always' | 'never';
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1171
1437
|
interface SepaDebit {}
|
|
1172
1438
|
|
|
1439
|
+
interface Upi {
|
|
1440
|
+
/**
|
|
1441
|
+
* Configuration options for setting up an eMandate
|
|
1442
|
+
*/
|
|
1443
|
+
mandate_options?: Upi.MandateOptions;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
namespace Upi {
|
|
1447
|
+
interface MandateOptions {
|
|
1448
|
+
/**
|
|
1449
|
+
* Amount to be charged for future payments.
|
|
1450
|
+
*/
|
|
1451
|
+
amount?: number;
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
|
1455
|
+
*/
|
|
1456
|
+
amount_type?: MandateOptions.AmountType;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* A description of the mandate or subscription that is meant to be displayed to the customer.
|
|
1460
|
+
*/
|
|
1461
|
+
description?: string;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
|
1465
|
+
*/
|
|
1466
|
+
end_date?: number;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
namespace MandateOptions {
|
|
1470
|
+
type AmountType = 'fixed' | 'maximum';
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1173
1474
|
interface UsBankAccount {
|
|
1174
1475
|
/**
|
|
1175
1476
|
* Additional fields for Financial Connections Session creation
|
|
@@ -1206,6 +1507,11 @@ declare module 'stripe' {
|
|
|
1206
1507
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
1207
1508
|
*/
|
|
1208
1509
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
1513
|
+
*/
|
|
1514
|
+
institution?: string;
|
|
1209
1515
|
}
|
|
1210
1516
|
|
|
1211
1517
|
namespace Filters {
|
|
@@ -1218,7 +1524,11 @@ declare module 'stripe' {
|
|
|
1218
1524
|
| 'payment_method'
|
|
1219
1525
|
| 'transactions';
|
|
1220
1526
|
|
|
1221
|
-
type Prefetch =
|
|
1527
|
+
type Prefetch =
|
|
1528
|
+
| 'balances'
|
|
1529
|
+
| 'inferred_balances'
|
|
1530
|
+
| 'ownership'
|
|
1531
|
+
| 'transactions';
|
|
1222
1532
|
}
|
|
1223
1533
|
|
|
1224
1534
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1238,11 +1548,13 @@ declare module 'stripe' {
|
|
|
1238
1548
|
| 'card'
|
|
1239
1549
|
| 'cashapp'
|
|
1240
1550
|
| 'crypto'
|
|
1551
|
+
| 'custom'
|
|
1241
1552
|
| 'customer_balance'
|
|
1242
1553
|
| 'eps'
|
|
1243
1554
|
| 'fpx'
|
|
1244
1555
|
| 'giropay'
|
|
1245
1556
|
| 'grabpay'
|
|
1557
|
+
| 'id_bank_transfer'
|
|
1246
1558
|
| 'ideal'
|
|
1247
1559
|
| 'jp_credit_transfer'
|
|
1248
1560
|
| 'kakao_pay'
|
|
@@ -1257,12 +1569,15 @@ declare module 'stripe' {
|
|
|
1257
1569
|
| 'payco'
|
|
1258
1570
|
| 'paynow'
|
|
1259
1571
|
| 'paypal'
|
|
1572
|
+
| 'pix'
|
|
1260
1573
|
| 'promptpay'
|
|
1261
1574
|
| 'revolut_pay'
|
|
1262
1575
|
| 'sepa_credit_transfer'
|
|
1263
1576
|
| 'sepa_debit'
|
|
1264
1577
|
| 'sofort'
|
|
1578
|
+
| 'stripe_balance'
|
|
1265
1579
|
| 'swish'
|
|
1580
|
+
| 'upi'
|
|
1266
1581
|
| 'us_bank_account'
|
|
1267
1582
|
| 'wechat_pay';
|
|
1268
1583
|
}
|
|
@@ -1490,6 +1805,11 @@ declare module 'stripe' {
|
|
|
1490
1805
|
*/
|
|
1491
1806
|
customer?: string;
|
|
1492
1807
|
|
|
1808
|
+
/**
|
|
1809
|
+
* Only return invoices for the account specified by this account ID.
|
|
1810
|
+
*/
|
|
1811
|
+
customer_account?: string;
|
|
1812
|
+
|
|
1493
1813
|
due_date?: Stripe.RangeQueryParam | number;
|
|
1494
1814
|
|
|
1495
1815
|
/**
|
|
@@ -1562,6 +1882,11 @@ declare module 'stripe' {
|
|
|
1562
1882
|
*/
|
|
1563
1883
|
invoice_item?: string;
|
|
1564
1884
|
|
|
1885
|
+
/**
|
|
1886
|
+
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
1887
|
+
*/
|
|
1888
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
1889
|
+
|
|
1565
1890
|
/**
|
|
1566
1891
|
* 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`.
|
|
1567
1892
|
*/
|
|
@@ -1610,12 +1935,56 @@ declare module 'stripe' {
|
|
|
1610
1935
|
*/
|
|
1611
1936
|
discount?: string;
|
|
1612
1937
|
|
|
1938
|
+
/**
|
|
1939
|
+
* Details to determine how long the discount should be applied for.
|
|
1940
|
+
*/
|
|
1941
|
+
discount_end?: Discount.DiscountEnd;
|
|
1942
|
+
|
|
1613
1943
|
/**
|
|
1614
1944
|
* ID of the promotion code to create a new discount for.
|
|
1615
1945
|
*/
|
|
1616
1946
|
promotion_code?: string;
|
|
1617
1947
|
}
|
|
1618
1948
|
|
|
1949
|
+
namespace Discount {
|
|
1950
|
+
interface DiscountEnd {
|
|
1951
|
+
/**
|
|
1952
|
+
* Time span for the redeemed discount.
|
|
1953
|
+
*/
|
|
1954
|
+
duration?: DiscountEnd.Duration;
|
|
1955
|
+
|
|
1956
|
+
/**
|
|
1957
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1958
|
+
*/
|
|
1959
|
+
timestamp?: number;
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* The type of calculation made to determine when the discount ends.
|
|
1963
|
+
*/
|
|
1964
|
+
type: DiscountEnd.Type;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
namespace DiscountEnd {
|
|
1968
|
+
interface Duration {
|
|
1969
|
+
/**
|
|
1970
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1971
|
+
*/
|
|
1972
|
+
interval: Duration.Interval;
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1976
|
+
*/
|
|
1977
|
+
interval_count: number;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
namespace Duration {
|
|
1981
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
type Type = 'duration' | 'timestamp';
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1619
1988
|
interface Period {
|
|
1620
1989
|
/**
|
|
1621
1990
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -1822,6 +2191,11 @@ declare module 'stripe' {
|
|
|
1822
2191
|
}
|
|
1823
2192
|
|
|
1824
2193
|
interface InvoiceAttachPaymentParams {
|
|
2194
|
+
/**
|
|
2195
|
+
* The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
|
2196
|
+
*/
|
|
2197
|
+
amount_requested?: number;
|
|
2198
|
+
|
|
1825
2199
|
/**
|
|
1826
2200
|
* Specifies which fields in the response should be expanded.
|
|
1827
2201
|
*/
|
|
@@ -1831,35 +2205,89 @@ declare module 'stripe' {
|
|
|
1831
2205
|
* The ID of the PaymentIntent to attach to the invoice.
|
|
1832
2206
|
*/
|
|
1833
2207
|
payment_intent?: string;
|
|
1834
|
-
}
|
|
1835
2208
|
|
|
1836
|
-
interface InvoiceCreatePreviewParams {
|
|
1837
2209
|
/**
|
|
1838
|
-
*
|
|
2210
|
+
* The ID of the PaymentRecord to attach to the invoice.
|
|
1839
2211
|
*/
|
|
1840
|
-
|
|
2212
|
+
payment_record?: string;
|
|
1841
2213
|
|
|
1842
2214
|
/**
|
|
1843
|
-
* The
|
|
2215
|
+
* The PaymentRecord data for attaching an out of band payment to the invoice.
|
|
1844
2216
|
*/
|
|
1845
|
-
|
|
2217
|
+
payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
|
|
2218
|
+
}
|
|
1846
2219
|
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
2220
|
+
namespace InvoiceAttachPaymentParams {
|
|
2221
|
+
interface PaymentRecordData {
|
|
2222
|
+
/**
|
|
2223
|
+
* The amount that was paid out of band.
|
|
2224
|
+
*/
|
|
2225
|
+
amount: number;
|
|
1851
2226
|
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
2227
|
+
/**
|
|
2228
|
+
* The currency that was paid out of band.
|
|
2229
|
+
*/
|
|
2230
|
+
currency: string;
|
|
1856
2231
|
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
2232
|
+
/**
|
|
2233
|
+
* 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`.
|
|
2234
|
+
*/
|
|
2235
|
+
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
1861
2236
|
|
|
1862
|
-
|
|
2237
|
+
/**
|
|
2238
|
+
* The type of money movement for this out of band payment record.
|
|
2239
|
+
*/
|
|
2240
|
+
money_movement_type: string;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* The timestamp when this out of band payment was paid.
|
|
2244
|
+
*/
|
|
2245
|
+
paid_at?: number;
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* The reference for this out of band payment record.
|
|
2249
|
+
*/
|
|
2250
|
+
payment_reference?: string;
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
interface InvoiceCreatePreviewParams {
|
|
2255
|
+
/**
|
|
2256
|
+
* Settings for automatic tax lookup for this invoice preview.
|
|
2257
|
+
*/
|
|
2258
|
+
automatic_tax?: InvoiceCreatePreviewParams.AutomaticTax;
|
|
2259
|
+
|
|
2260
|
+
/**
|
|
2261
|
+
* The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
|
|
2262
|
+
*/
|
|
2263
|
+
billing_cadence?: string;
|
|
2264
|
+
|
|
2265
|
+
/**
|
|
2266
|
+
* The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
|
2267
|
+
*/
|
|
2268
|
+
currency?: string;
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2272
|
+
*/
|
|
2273
|
+
customer?: string;
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2277
|
+
*/
|
|
2278
|
+
customer_account?: string;
|
|
2279
|
+
|
|
2280
|
+
/**
|
|
2281
|
+
* Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2282
|
+
*/
|
|
2283
|
+
customer_details?: InvoiceCreatePreviewParams.CustomerDetails;
|
|
2284
|
+
|
|
2285
|
+
/**
|
|
2286
|
+
* The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
|
2287
|
+
*/
|
|
2288
|
+
discounts?: Stripe.Emptyable<Array<InvoiceCreatePreviewParams.Discount>>;
|
|
2289
|
+
|
|
2290
|
+
/**
|
|
1863
2291
|
* Specifies which fields in the response should be expanded.
|
|
1864
2292
|
*/
|
|
1865
2293
|
expand?: Array<string>;
|
|
@@ -2128,12 +2556,56 @@ declare module 'stripe' {
|
|
|
2128
2556
|
*/
|
|
2129
2557
|
discount?: string;
|
|
2130
2558
|
|
|
2559
|
+
/**
|
|
2560
|
+
* Details to determine how long the discount should be applied for.
|
|
2561
|
+
*/
|
|
2562
|
+
discount_end?: Discount.DiscountEnd;
|
|
2563
|
+
|
|
2131
2564
|
/**
|
|
2132
2565
|
* ID of the promotion code to create a new discount for.
|
|
2133
2566
|
*/
|
|
2134
2567
|
promotion_code?: string;
|
|
2135
2568
|
}
|
|
2136
2569
|
|
|
2570
|
+
namespace Discount {
|
|
2571
|
+
interface DiscountEnd {
|
|
2572
|
+
/**
|
|
2573
|
+
* Time span for the redeemed discount.
|
|
2574
|
+
*/
|
|
2575
|
+
duration?: DiscountEnd.Duration;
|
|
2576
|
+
|
|
2577
|
+
/**
|
|
2578
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2579
|
+
*/
|
|
2580
|
+
timestamp?: number;
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* The type of calculation made to determine when the discount ends.
|
|
2584
|
+
*/
|
|
2585
|
+
type: DiscountEnd.Type;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
namespace DiscountEnd {
|
|
2589
|
+
interface Duration {
|
|
2590
|
+
/**
|
|
2591
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2592
|
+
*/
|
|
2593
|
+
interval: Duration.Interval;
|
|
2594
|
+
|
|
2595
|
+
/**
|
|
2596
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2597
|
+
*/
|
|
2598
|
+
interval_count: number;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
namespace Duration {
|
|
2602
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
type Type = 'duration' | 'timestamp';
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2137
2609
|
interface InvoiceItem {
|
|
2138
2610
|
/**
|
|
2139
2611
|
* The integer amount in cents (or local equivalent) of previewed invoice item.
|
|
@@ -2228,12 +2700,56 @@ declare module 'stripe' {
|
|
|
2228
2700
|
*/
|
|
2229
2701
|
discount?: string;
|
|
2230
2702
|
|
|
2703
|
+
/**
|
|
2704
|
+
* Details to determine how long the discount should be applied for.
|
|
2705
|
+
*/
|
|
2706
|
+
discount_end?: Discount.DiscountEnd;
|
|
2707
|
+
|
|
2231
2708
|
/**
|
|
2232
2709
|
* ID of the promotion code to create a new discount for.
|
|
2233
2710
|
*/
|
|
2234
2711
|
promotion_code?: string;
|
|
2235
2712
|
}
|
|
2236
2713
|
|
|
2714
|
+
namespace Discount {
|
|
2715
|
+
interface DiscountEnd {
|
|
2716
|
+
/**
|
|
2717
|
+
* Time span for the redeemed discount.
|
|
2718
|
+
*/
|
|
2719
|
+
duration?: DiscountEnd.Duration;
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2723
|
+
*/
|
|
2724
|
+
timestamp?: number;
|
|
2725
|
+
|
|
2726
|
+
/**
|
|
2727
|
+
* The type of calculation made to determine when the discount ends.
|
|
2728
|
+
*/
|
|
2729
|
+
type: DiscountEnd.Type;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
namespace DiscountEnd {
|
|
2733
|
+
interface Duration {
|
|
2734
|
+
/**
|
|
2735
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2736
|
+
*/
|
|
2737
|
+
interval: Duration.Interval;
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2741
|
+
*/
|
|
2742
|
+
interval_count: number;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
namespace Duration {
|
|
2746
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
type Type = 'duration' | 'timestamp';
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2237
2753
|
interface Period {
|
|
2238
2754
|
/**
|
|
2239
2755
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -2299,6 +2815,16 @@ declare module 'stripe' {
|
|
|
2299
2815
|
type PreviewMode = 'next' | 'recurring';
|
|
2300
2816
|
|
|
2301
2817
|
interface ScheduleDetails {
|
|
2818
|
+
/**
|
|
2819
|
+
* Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
2820
|
+
*/
|
|
2821
|
+
amendments?: Array<ScheduleDetails.Amendment>;
|
|
2822
|
+
|
|
2823
|
+
/**
|
|
2824
|
+
* 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.
|
|
2825
|
+
*/
|
|
2826
|
+
billing_behavior?: ScheduleDetails.BillingBehavior;
|
|
2827
|
+
|
|
2302
2828
|
/**
|
|
2303
2829
|
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
2304
2830
|
*/
|
|
@@ -2314,6 +2840,11 @@ declare module 'stripe' {
|
|
|
2314
2840
|
*/
|
|
2315
2841
|
phases?: Array<ScheduleDetails.Phase>;
|
|
2316
2842
|
|
|
2843
|
+
/**
|
|
2844
|
+
* Provide any time periods to bill in advance.
|
|
2845
|
+
*/
|
|
2846
|
+
prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
|
|
2847
|
+
|
|
2317
2848
|
/**
|
|
2318
2849
|
* In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
|
2319
2850
|
*/
|
|
@@ -2321,6 +2852,603 @@ declare module 'stripe' {
|
|
|
2321
2852
|
}
|
|
2322
2853
|
|
|
2323
2854
|
namespace ScheduleDetails {
|
|
2855
|
+
interface Amendment {
|
|
2856
|
+
/**
|
|
2857
|
+
* Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
|
|
2858
|
+
*/
|
|
2859
|
+
amendment_end?: Amendment.AmendmentEnd;
|
|
2860
|
+
|
|
2861
|
+
/**
|
|
2862
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2863
|
+
*/
|
|
2864
|
+
amendment_start: Amendment.AmendmentStart;
|
|
2865
|
+
|
|
2866
|
+
/**
|
|
2867
|
+
* For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
|
|
2868
|
+
*/
|
|
2869
|
+
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
2870
|
+
|
|
2871
|
+
/**
|
|
2872
|
+
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
2873
|
+
*/
|
|
2874
|
+
discount_actions?: Array<Amendment.DiscountAction>;
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* Changes to the subscription items during the amendment time span.
|
|
2878
|
+
*/
|
|
2879
|
+
item_actions?: Array<Amendment.ItemAction>;
|
|
2880
|
+
|
|
2881
|
+
/**
|
|
2882
|
+
* Instructions for how to modify phase metadata
|
|
2883
|
+
*/
|
|
2884
|
+
metadata_actions?: Array<Amendment.MetadataAction>;
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
|
|
2888
|
+
*/
|
|
2889
|
+
proration_behavior?: Amendment.ProrationBehavior;
|
|
2890
|
+
|
|
2891
|
+
/**
|
|
2892
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2893
|
+
*/
|
|
2894
|
+
set_pause_collection?: Amendment.SetPauseCollection;
|
|
2895
|
+
|
|
2896
|
+
/**
|
|
2897
|
+
* Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
2898
|
+
*/
|
|
2899
|
+
set_schedule_end?: Amendment.SetScheduleEnd;
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* Settings related to subscription trials.
|
|
2903
|
+
*/
|
|
2904
|
+
trial_settings?: Amendment.TrialSettings;
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
namespace Amendment {
|
|
2908
|
+
interface AmendmentEnd {
|
|
2909
|
+
/**
|
|
2910
|
+
* Use the `end` time of a given discount.
|
|
2911
|
+
*/
|
|
2912
|
+
discount_end?: AmendmentEnd.DiscountEnd;
|
|
2913
|
+
|
|
2914
|
+
/**
|
|
2915
|
+
* Time span for the amendment starting from the `amendment_start`.
|
|
2916
|
+
*/
|
|
2917
|
+
duration?: AmendmentEnd.Duration;
|
|
2918
|
+
|
|
2919
|
+
/**
|
|
2920
|
+
* A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
2921
|
+
*/
|
|
2922
|
+
timestamp?: number;
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* Select one of three ways to pass the `amendment_end`.
|
|
2926
|
+
*/
|
|
2927
|
+
type: AmendmentEnd.Type;
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2930
|
+
namespace AmendmentEnd {
|
|
2931
|
+
interface DiscountEnd {
|
|
2932
|
+
/**
|
|
2933
|
+
* The ID of a specific discount.
|
|
2934
|
+
*/
|
|
2935
|
+
discount: string;
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
interface Duration {
|
|
2939
|
+
/**
|
|
2940
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2941
|
+
*/
|
|
2942
|
+
interval: Duration.Interval;
|
|
2943
|
+
|
|
2944
|
+
/**
|
|
2945
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2946
|
+
*/
|
|
2947
|
+
interval_count: number;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
namespace Duration {
|
|
2951
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2954
|
+
type Type =
|
|
2955
|
+
| 'discount_end'
|
|
2956
|
+
| 'duration'
|
|
2957
|
+
| 'schedule_end'
|
|
2958
|
+
| 'timestamp'
|
|
2959
|
+
| 'trial_end'
|
|
2960
|
+
| 'trial_start'
|
|
2961
|
+
| 'upcoming_invoice';
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
interface AmendmentStart {
|
|
2965
|
+
/**
|
|
2966
|
+
* Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
2967
|
+
*/
|
|
2968
|
+
amendment_end?: AmendmentStart.AmendmentEnd;
|
|
2969
|
+
|
|
2970
|
+
/**
|
|
2971
|
+
* Use the `end` time of a given discount.
|
|
2972
|
+
*/
|
|
2973
|
+
discount_end?: AmendmentStart.DiscountEnd;
|
|
2974
|
+
|
|
2975
|
+
/**
|
|
2976
|
+
* A precise Unix timestamp for the amendment to start.
|
|
2977
|
+
*/
|
|
2978
|
+
timestamp?: number;
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* Select one of three ways to pass the `amendment_start`.
|
|
2982
|
+
*/
|
|
2983
|
+
type: AmendmentStart.Type;
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
namespace AmendmentStart {
|
|
2987
|
+
interface AmendmentEnd {
|
|
2988
|
+
/**
|
|
2989
|
+
* The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
|
|
2990
|
+
*/
|
|
2991
|
+
index: number;
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
interface DiscountEnd {
|
|
2995
|
+
/**
|
|
2996
|
+
* The ID of a specific discount.
|
|
2997
|
+
*/
|
|
2998
|
+
discount: string;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
type Type =
|
|
3002
|
+
| 'amendment_end'
|
|
3003
|
+
| 'discount_end'
|
|
3004
|
+
| 'now'
|
|
3005
|
+
| 'schedule_end'
|
|
3006
|
+
| 'timestamp'
|
|
3007
|
+
| 'trial_end'
|
|
3008
|
+
| 'trial_start'
|
|
3009
|
+
| 'upcoming_invoice';
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
type BillingCycleAnchor = 'amendment_start' | 'automatic';
|
|
3013
|
+
|
|
3014
|
+
interface DiscountAction {
|
|
3015
|
+
/**
|
|
3016
|
+
* Details of the discount to add.
|
|
3017
|
+
*/
|
|
3018
|
+
add?: DiscountAction.Add;
|
|
3019
|
+
|
|
3020
|
+
/**
|
|
3021
|
+
* Details of the discount to remove.
|
|
3022
|
+
*/
|
|
3023
|
+
remove?: DiscountAction.Remove;
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* Details of the discount to replace the existing discounts with.
|
|
3027
|
+
*/
|
|
3028
|
+
set?: DiscountAction.Set;
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* Determines the type of discount action.
|
|
3032
|
+
*/
|
|
3033
|
+
type: DiscountAction.Type;
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
namespace DiscountAction {
|
|
3037
|
+
interface Add {
|
|
3038
|
+
/**
|
|
3039
|
+
* The coupon code to redeem.
|
|
3040
|
+
*/
|
|
3041
|
+
coupon?: string;
|
|
3042
|
+
|
|
3043
|
+
/**
|
|
3044
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
3045
|
+
*/
|
|
3046
|
+
discount?: string;
|
|
3047
|
+
|
|
3048
|
+
/**
|
|
3049
|
+
* Details to determine how long the discount should be applied for.
|
|
3050
|
+
*/
|
|
3051
|
+
discount_end?: Add.DiscountEnd;
|
|
3052
|
+
|
|
3053
|
+
/**
|
|
3054
|
+
* 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.
|
|
3055
|
+
*/
|
|
3056
|
+
index?: number;
|
|
3057
|
+
|
|
3058
|
+
/**
|
|
3059
|
+
* The promotion code to redeem.
|
|
3060
|
+
*/
|
|
3061
|
+
promotion_code?: string;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
namespace Add {
|
|
3065
|
+
interface DiscountEnd {
|
|
3066
|
+
/**
|
|
3067
|
+
* The type of calculation made to determine when the discount ends.
|
|
3068
|
+
*/
|
|
3069
|
+
type: 'amendment_end';
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
interface Remove {
|
|
3074
|
+
/**
|
|
3075
|
+
* The coupon code to remove from the `discounts` array.
|
|
3076
|
+
*/
|
|
3077
|
+
coupon?: string;
|
|
3078
|
+
|
|
3079
|
+
/**
|
|
3080
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
3081
|
+
*/
|
|
3082
|
+
discount?: string;
|
|
3083
|
+
|
|
3084
|
+
/**
|
|
3085
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
3086
|
+
*/
|
|
3087
|
+
promotion_code?: string;
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
interface Set {
|
|
3091
|
+
/**
|
|
3092
|
+
* The coupon code to replace the `discounts` array with.
|
|
3093
|
+
*/
|
|
3094
|
+
coupon?: string;
|
|
3095
|
+
|
|
3096
|
+
/**
|
|
3097
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
3098
|
+
*/
|
|
3099
|
+
discount?: string;
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
3103
|
+
*/
|
|
3104
|
+
promotion_code?: string;
|
|
3105
|
+
}
|
|
3106
|
+
|
|
3107
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
interface ItemAction {
|
|
3111
|
+
/**
|
|
3112
|
+
* Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
|
|
3113
|
+
*/
|
|
3114
|
+
add?: ItemAction.Add;
|
|
3115
|
+
|
|
3116
|
+
/**
|
|
3117
|
+
* Details of the subscription item to remove.
|
|
3118
|
+
*/
|
|
3119
|
+
remove?: ItemAction.Remove;
|
|
3120
|
+
|
|
3121
|
+
/**
|
|
3122
|
+
* Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
|
|
3123
|
+
*/
|
|
3124
|
+
set?: ItemAction.Set;
|
|
3125
|
+
|
|
3126
|
+
/**
|
|
3127
|
+
* Determines the type of item action.
|
|
3128
|
+
*/
|
|
3129
|
+
type: ItemAction.Type;
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
namespace ItemAction {
|
|
3133
|
+
interface Add {
|
|
3134
|
+
/**
|
|
3135
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
3136
|
+
*/
|
|
3137
|
+
discounts?: Array<Add.Discount>;
|
|
3138
|
+
|
|
3139
|
+
/**
|
|
3140
|
+
* 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`.
|
|
3141
|
+
*/
|
|
3142
|
+
metadata?: Stripe.MetadataParam;
|
|
3143
|
+
|
|
3144
|
+
/**
|
|
3145
|
+
* The ID of the price object.
|
|
3146
|
+
*/
|
|
3147
|
+
price: string;
|
|
3148
|
+
|
|
3149
|
+
/**
|
|
3150
|
+
* Quantity for this item.
|
|
3151
|
+
*/
|
|
3152
|
+
quantity?: number;
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* 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`.
|
|
3156
|
+
*/
|
|
3157
|
+
tax_rates?: Array<string>;
|
|
3158
|
+
|
|
3159
|
+
/**
|
|
3160
|
+
* Options that configure the trial on the subscription item.
|
|
3161
|
+
*/
|
|
3162
|
+
trial?: Add.Trial;
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
namespace Add {
|
|
3166
|
+
interface Discount {
|
|
3167
|
+
/**
|
|
3168
|
+
* ID of the coupon to create a new discount for.
|
|
3169
|
+
*/
|
|
3170
|
+
coupon?: string;
|
|
3171
|
+
|
|
3172
|
+
/**
|
|
3173
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3174
|
+
*/
|
|
3175
|
+
discount?: string;
|
|
3176
|
+
|
|
3177
|
+
/**
|
|
3178
|
+
* Details to determine how long the discount should be applied for.
|
|
3179
|
+
*/
|
|
3180
|
+
discount_end?: Discount.DiscountEnd;
|
|
3181
|
+
|
|
3182
|
+
/**
|
|
3183
|
+
* ID of the promotion code to create a new discount for.
|
|
3184
|
+
*/
|
|
3185
|
+
promotion_code?: string;
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3188
|
+
namespace Discount {
|
|
3189
|
+
interface DiscountEnd {
|
|
3190
|
+
/**
|
|
3191
|
+
* Time span for the redeemed discount.
|
|
3192
|
+
*/
|
|
3193
|
+
duration?: DiscountEnd.Duration;
|
|
3194
|
+
|
|
3195
|
+
/**
|
|
3196
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3197
|
+
*/
|
|
3198
|
+
timestamp?: number;
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* The type of calculation made to determine when the discount ends.
|
|
3202
|
+
*/
|
|
3203
|
+
type: DiscountEnd.Type;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
namespace DiscountEnd {
|
|
3207
|
+
interface Duration {
|
|
3208
|
+
/**
|
|
3209
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3210
|
+
*/
|
|
3211
|
+
interval: Duration.Interval;
|
|
3212
|
+
|
|
3213
|
+
/**
|
|
3214
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3215
|
+
*/
|
|
3216
|
+
interval_count: number;
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
namespace Duration {
|
|
3220
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
type Type = 'duration' | 'timestamp';
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
interface Trial {
|
|
3228
|
+
/**
|
|
3229
|
+
* 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.
|
|
3230
|
+
*/
|
|
3231
|
+
converts_to?: Array<string>;
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* Determines the type of trial for this item.
|
|
3235
|
+
*/
|
|
3236
|
+
type: Trial.Type;
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
namespace Trial {
|
|
3240
|
+
type Type = 'free' | 'paid';
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
interface Remove {
|
|
3245
|
+
/**
|
|
3246
|
+
* ID of a price to remove.
|
|
3247
|
+
*/
|
|
3248
|
+
price: string;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
interface Set {
|
|
3252
|
+
/**
|
|
3253
|
+
* 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`.
|
|
3254
|
+
*/
|
|
3255
|
+
discounts?: Array<Set.Discount>;
|
|
3256
|
+
|
|
3257
|
+
/**
|
|
3258
|
+
* 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`.
|
|
3259
|
+
*/
|
|
3260
|
+
metadata?: Stripe.MetadataParam;
|
|
3261
|
+
|
|
3262
|
+
/**
|
|
3263
|
+
* The ID of the price object.
|
|
3264
|
+
*/
|
|
3265
|
+
price: string;
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* 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`.
|
|
3269
|
+
*/
|
|
3270
|
+
quantity?: number;
|
|
3271
|
+
|
|
3272
|
+
/**
|
|
3273
|
+
* 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`.
|
|
3274
|
+
*/
|
|
3275
|
+
tax_rates?: Array<string>;
|
|
3276
|
+
|
|
3277
|
+
/**
|
|
3278
|
+
* 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`.
|
|
3279
|
+
*/
|
|
3280
|
+
trial?: Set.Trial;
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
namespace Set {
|
|
3284
|
+
interface Discount {
|
|
3285
|
+
/**
|
|
3286
|
+
* ID of the coupon to create a new discount for.
|
|
3287
|
+
*/
|
|
3288
|
+
coupon?: string;
|
|
3289
|
+
|
|
3290
|
+
/**
|
|
3291
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3292
|
+
*/
|
|
3293
|
+
discount?: string;
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* Details to determine how long the discount should be applied for.
|
|
3297
|
+
*/
|
|
3298
|
+
discount_end?: Discount.DiscountEnd;
|
|
3299
|
+
|
|
3300
|
+
/**
|
|
3301
|
+
* ID of the promotion code to create a new discount for.
|
|
3302
|
+
*/
|
|
3303
|
+
promotion_code?: string;
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
namespace Discount {
|
|
3307
|
+
interface DiscountEnd {
|
|
3308
|
+
/**
|
|
3309
|
+
* Time span for the redeemed discount.
|
|
3310
|
+
*/
|
|
3311
|
+
duration?: DiscountEnd.Duration;
|
|
3312
|
+
|
|
3313
|
+
/**
|
|
3314
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3315
|
+
*/
|
|
3316
|
+
timestamp?: number;
|
|
3317
|
+
|
|
3318
|
+
/**
|
|
3319
|
+
* The type of calculation made to determine when the discount ends.
|
|
3320
|
+
*/
|
|
3321
|
+
type: DiscountEnd.Type;
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
namespace DiscountEnd {
|
|
3325
|
+
interface Duration {
|
|
3326
|
+
/**
|
|
3327
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3328
|
+
*/
|
|
3329
|
+
interval: Duration.Interval;
|
|
3330
|
+
|
|
3331
|
+
/**
|
|
3332
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3333
|
+
*/
|
|
3334
|
+
interval_count: number;
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
namespace Duration {
|
|
3338
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3341
|
+
type Type = 'duration' | 'timestamp';
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
interface Trial {
|
|
3346
|
+
/**
|
|
3347
|
+
* 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.
|
|
3348
|
+
*/
|
|
3349
|
+
converts_to?: Array<string>;
|
|
3350
|
+
|
|
3351
|
+
/**
|
|
3352
|
+
* Determines the type of trial for this item.
|
|
3353
|
+
*/
|
|
3354
|
+
type: Trial.Type;
|
|
3355
|
+
}
|
|
3356
|
+
|
|
3357
|
+
namespace Trial {
|
|
3358
|
+
type Type = 'free' | 'paid';
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3365
|
+
interface MetadataAction {
|
|
3366
|
+
/**
|
|
3367
|
+
* Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
3368
|
+
*/
|
|
3369
|
+
add?: {
|
|
3370
|
+
[key: string]: string;
|
|
3371
|
+
};
|
|
3372
|
+
|
|
3373
|
+
/**
|
|
3374
|
+
* Keys to remove from schedule phase metadata.
|
|
3375
|
+
*/
|
|
3376
|
+
remove?: Array<string>;
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
3380
|
+
*/
|
|
3381
|
+
set?: Stripe.Emptyable<{
|
|
3382
|
+
[key: string]: string;
|
|
3383
|
+
}>;
|
|
3384
|
+
|
|
3385
|
+
/**
|
|
3386
|
+
* Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
3387
|
+
*/
|
|
3388
|
+
type: MetadataAction.Type;
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
namespace MetadataAction {
|
|
3392
|
+
type Type = 'add' | 'remove' | 'set';
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
type ProrationBehavior =
|
|
3396
|
+
| 'always_invoice'
|
|
3397
|
+
| 'create_prorations'
|
|
3398
|
+
| 'none';
|
|
3399
|
+
|
|
3400
|
+
interface SetPauseCollection {
|
|
3401
|
+
/**
|
|
3402
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
3403
|
+
*/
|
|
3404
|
+
set?: SetPauseCollection.Set;
|
|
3405
|
+
|
|
3406
|
+
/**
|
|
3407
|
+
* Determines the type of the pause_collection amendment.
|
|
3408
|
+
*/
|
|
3409
|
+
type: SetPauseCollection.Type;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
namespace SetPauseCollection {
|
|
3413
|
+
interface Set {
|
|
3414
|
+
/**
|
|
3415
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
3416
|
+
*/
|
|
3417
|
+
behavior: Set.Behavior;
|
|
3418
|
+
}
|
|
3419
|
+
|
|
3420
|
+
namespace Set {
|
|
3421
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
type Type = 'remove' | 'set';
|
|
3425
|
+
}
|
|
3426
|
+
|
|
3427
|
+
type SetScheduleEnd = 'amendment_end' | 'amendment_start';
|
|
3428
|
+
|
|
3429
|
+
interface TrialSettings {
|
|
3430
|
+
/**
|
|
3431
|
+
* Defines how the subscription should behave when a trial ends.
|
|
3432
|
+
*/
|
|
3433
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3436
|
+
namespace TrialSettings {
|
|
3437
|
+
interface EndBehavior {
|
|
3438
|
+
/**
|
|
3439
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
3440
|
+
*/
|
|
3441
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
3442
|
+
}
|
|
3443
|
+
|
|
3444
|
+
namespace EndBehavior {
|
|
3445
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
3451
|
+
|
|
2324
3452
|
interface BillingMode {
|
|
2325
3453
|
/**
|
|
2326
3454
|
* Configure behavior for flexible billing mode.
|
|
@@ -2436,6 +3564,11 @@ declare module 'stripe' {
|
|
|
2436
3564
|
*/
|
|
2437
3565
|
on_behalf_of?: string;
|
|
2438
3566
|
|
|
3567
|
+
/**
|
|
3568
|
+
* If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
|
3569
|
+
*/
|
|
3570
|
+
pause_collection?: Phase.PauseCollection;
|
|
3571
|
+
|
|
2439
3572
|
/**
|
|
2440
3573
|
* Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
|
2441
3574
|
*/
|
|
@@ -2456,10 +3589,20 @@ declare module 'stripe' {
|
|
|
2456
3589
|
*/
|
|
2457
3590
|
trial?: boolean;
|
|
2458
3591
|
|
|
3592
|
+
/**
|
|
3593
|
+
* Specify trial behavior when crossing phase boundaries
|
|
3594
|
+
*/
|
|
3595
|
+
trial_continuation?: Phase.TrialContinuation;
|
|
3596
|
+
|
|
2459
3597
|
/**
|
|
2460
3598
|
* Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
|
2461
3599
|
*/
|
|
2462
3600
|
trial_end?: number | 'now';
|
|
3601
|
+
|
|
3602
|
+
/**
|
|
3603
|
+
* Settings related to subscription trials.
|
|
3604
|
+
*/
|
|
3605
|
+
trial_settings?: Phase.TrialSettings;
|
|
2463
3606
|
}
|
|
2464
3607
|
|
|
2465
3608
|
namespace Phase {
|
|
@@ -2512,12 +3655,56 @@ declare module 'stripe' {
|
|
|
2512
3655
|
*/
|
|
2513
3656
|
discount?: string;
|
|
2514
3657
|
|
|
3658
|
+
/**
|
|
3659
|
+
* Details to determine how long the discount should be applied for.
|
|
3660
|
+
*/
|
|
3661
|
+
discount_end?: Discount.DiscountEnd;
|
|
3662
|
+
|
|
2515
3663
|
/**
|
|
2516
3664
|
* ID of the promotion code to create a new discount for.
|
|
2517
3665
|
*/
|
|
2518
3666
|
promotion_code?: string;
|
|
2519
3667
|
}
|
|
2520
3668
|
|
|
3669
|
+
namespace Discount {
|
|
3670
|
+
interface DiscountEnd {
|
|
3671
|
+
/**
|
|
3672
|
+
* Time span for the redeemed discount.
|
|
3673
|
+
*/
|
|
3674
|
+
duration?: DiscountEnd.Duration;
|
|
3675
|
+
|
|
3676
|
+
/**
|
|
3677
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3678
|
+
*/
|
|
3679
|
+
timestamp?: number;
|
|
3680
|
+
|
|
3681
|
+
/**
|
|
3682
|
+
* The type of calculation made to determine when the discount ends.
|
|
3683
|
+
*/
|
|
3684
|
+
type: DiscountEnd.Type;
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
namespace DiscountEnd {
|
|
3688
|
+
interface Duration {
|
|
3689
|
+
/**
|
|
3690
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3691
|
+
*/
|
|
3692
|
+
interval: Duration.Interval;
|
|
3693
|
+
|
|
3694
|
+
/**
|
|
3695
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3696
|
+
*/
|
|
3697
|
+
interval_count: number;
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3700
|
+
namespace Duration {
|
|
3701
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3702
|
+
}
|
|
3703
|
+
|
|
3704
|
+
type Type = 'duration' | 'timestamp';
|
|
3705
|
+
}
|
|
3706
|
+
}
|
|
3707
|
+
|
|
2521
3708
|
interface Period {
|
|
2522
3709
|
/**
|
|
2523
3710
|
* End of the invoice item period.
|
|
@@ -2656,12 +3843,56 @@ declare module 'stripe' {
|
|
|
2656
3843
|
*/
|
|
2657
3844
|
discount?: string;
|
|
2658
3845
|
|
|
3846
|
+
/**
|
|
3847
|
+
* Details to determine how long the discount should be applied for.
|
|
3848
|
+
*/
|
|
3849
|
+
discount_end?: Discount.DiscountEnd;
|
|
3850
|
+
|
|
2659
3851
|
/**
|
|
2660
3852
|
* ID of the promotion code to create a new discount for.
|
|
2661
3853
|
*/
|
|
2662
3854
|
promotion_code?: string;
|
|
2663
3855
|
}
|
|
2664
3856
|
|
|
3857
|
+
namespace Discount {
|
|
3858
|
+
interface DiscountEnd {
|
|
3859
|
+
/**
|
|
3860
|
+
* Time span for the redeemed discount.
|
|
3861
|
+
*/
|
|
3862
|
+
duration?: DiscountEnd.Duration;
|
|
3863
|
+
|
|
3864
|
+
/**
|
|
3865
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3866
|
+
*/
|
|
3867
|
+
timestamp?: number;
|
|
3868
|
+
|
|
3869
|
+
/**
|
|
3870
|
+
* The type of calculation made to determine when the discount ends.
|
|
3871
|
+
*/
|
|
3872
|
+
type: DiscountEnd.Type;
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
namespace DiscountEnd {
|
|
3876
|
+
interface Duration {
|
|
3877
|
+
/**
|
|
3878
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3879
|
+
*/
|
|
3880
|
+
interval: Duration.Interval;
|
|
3881
|
+
|
|
3882
|
+
/**
|
|
3883
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3884
|
+
*/
|
|
3885
|
+
interval_count: number;
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
namespace Duration {
|
|
3889
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
type Type = 'duration' | 'timestamp';
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
|
|
2665
3896
|
interface Duration {
|
|
2666
3897
|
/**
|
|
2667
3898
|
* Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
|
@@ -2753,6 +3984,11 @@ declare module 'stripe' {
|
|
|
2753
3984
|
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
2754
3985
|
*/
|
|
2755
3986
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3987
|
+
|
|
3988
|
+
/**
|
|
3989
|
+
* Options that configure the trial on the subscription item.
|
|
3990
|
+
*/
|
|
3991
|
+
trial?: Item.Trial;
|
|
2756
3992
|
}
|
|
2757
3993
|
|
|
2758
3994
|
namespace Item {
|
|
@@ -2774,12 +4010,56 @@ declare module 'stripe' {
|
|
|
2774
4010
|
*/
|
|
2775
4011
|
discount?: string;
|
|
2776
4012
|
|
|
4013
|
+
/**
|
|
4014
|
+
* Details to determine how long the discount should be applied for.
|
|
4015
|
+
*/
|
|
4016
|
+
discount_end?: Discount.DiscountEnd;
|
|
4017
|
+
|
|
2777
4018
|
/**
|
|
2778
4019
|
* ID of the promotion code to create a new discount for.
|
|
2779
4020
|
*/
|
|
2780
4021
|
promotion_code?: string;
|
|
2781
4022
|
}
|
|
2782
4023
|
|
|
4024
|
+
namespace Discount {
|
|
4025
|
+
interface DiscountEnd {
|
|
4026
|
+
/**
|
|
4027
|
+
* Time span for the redeemed discount.
|
|
4028
|
+
*/
|
|
4029
|
+
duration?: DiscountEnd.Duration;
|
|
4030
|
+
|
|
4031
|
+
/**
|
|
4032
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4033
|
+
*/
|
|
4034
|
+
timestamp?: number;
|
|
4035
|
+
|
|
4036
|
+
/**
|
|
4037
|
+
* The type of calculation made to determine when the discount ends.
|
|
4038
|
+
*/
|
|
4039
|
+
type: DiscountEnd.Type;
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
namespace DiscountEnd {
|
|
4043
|
+
interface Duration {
|
|
4044
|
+
/**
|
|
4045
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4046
|
+
*/
|
|
4047
|
+
interval: Duration.Interval;
|
|
4048
|
+
|
|
4049
|
+
/**
|
|
4050
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4051
|
+
*/
|
|
4052
|
+
interval_count: number;
|
|
4053
|
+
}
|
|
4054
|
+
|
|
4055
|
+
namespace Duration {
|
|
4056
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
type Type = 'duration' | 'timestamp';
|
|
4060
|
+
}
|
|
4061
|
+
}
|
|
4062
|
+
|
|
2783
4063
|
interface PriceData {
|
|
2784
4064
|
/**
|
|
2785
4065
|
* 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).
|
|
@@ -2831,6 +4111,33 @@ declare module 'stripe' {
|
|
|
2831
4111
|
|
|
2832
4112
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2833
4113
|
}
|
|
4114
|
+
|
|
4115
|
+
interface Trial {
|
|
4116
|
+
/**
|
|
4117
|
+
* 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.
|
|
4118
|
+
*/
|
|
4119
|
+
converts_to?: Array<string>;
|
|
4120
|
+
|
|
4121
|
+
/**
|
|
4122
|
+
* Determines the type of trial for this item.
|
|
4123
|
+
*/
|
|
4124
|
+
type: Trial.Type;
|
|
4125
|
+
}
|
|
4126
|
+
|
|
4127
|
+
namespace Trial {
|
|
4128
|
+
type Type = 'free' | 'paid';
|
|
4129
|
+
}
|
|
4130
|
+
}
|
|
4131
|
+
|
|
4132
|
+
interface PauseCollection {
|
|
4133
|
+
/**
|
|
4134
|
+
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
4135
|
+
*/
|
|
4136
|
+
behavior: PauseCollection.Behavior;
|
|
4137
|
+
}
|
|
4138
|
+
|
|
4139
|
+
namespace PauseCollection {
|
|
4140
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2834
4141
|
}
|
|
2835
4142
|
|
|
2836
4143
|
type ProrationBehavior =
|
|
@@ -2849,6 +4156,95 @@ declare module 'stripe' {
|
|
|
2849
4156
|
*/
|
|
2850
4157
|
destination: string;
|
|
2851
4158
|
}
|
|
4159
|
+
|
|
4160
|
+
type TrialContinuation = 'continue' | 'none';
|
|
4161
|
+
|
|
4162
|
+
interface TrialSettings {
|
|
4163
|
+
/**
|
|
4164
|
+
* Defines how the subscription should behave when a trial ends.
|
|
4165
|
+
*/
|
|
4166
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4169
|
+
namespace TrialSettings {
|
|
4170
|
+
interface EndBehavior {
|
|
4171
|
+
/**
|
|
4172
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
4173
|
+
*/
|
|
4174
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
4175
|
+
}
|
|
4176
|
+
|
|
4177
|
+
namespace EndBehavior {
|
|
4178
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
4179
|
+
}
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
interface Prebilling {
|
|
4184
|
+
/**
|
|
4185
|
+
* The end of the prebilled time period.
|
|
4186
|
+
*/
|
|
4187
|
+
bill_until?: Prebilling.BillUntil;
|
|
4188
|
+
|
|
4189
|
+
/**
|
|
4190
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
4191
|
+
*/
|
|
4192
|
+
iterations?: number;
|
|
4193
|
+
}
|
|
4194
|
+
|
|
4195
|
+
namespace Prebilling {
|
|
4196
|
+
interface BillUntil {
|
|
4197
|
+
/**
|
|
4198
|
+
* End the prebilled period when a specified amendment ends.
|
|
4199
|
+
*/
|
|
4200
|
+
amendment_end?: BillUntil.AmendmentEnd;
|
|
4201
|
+
|
|
4202
|
+
/**
|
|
4203
|
+
* Time span for prebilling, starting from `bill_from`.
|
|
4204
|
+
*/
|
|
4205
|
+
duration?: BillUntil.Duration;
|
|
4206
|
+
|
|
4207
|
+
/**
|
|
4208
|
+
* End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
4209
|
+
*/
|
|
4210
|
+
timestamp?: number;
|
|
4211
|
+
|
|
4212
|
+
/**
|
|
4213
|
+
* Select one of several ways to pass the `bill_until` value.
|
|
4214
|
+
*/
|
|
4215
|
+
type: BillUntil.Type;
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
namespace BillUntil {
|
|
4219
|
+
interface AmendmentEnd {
|
|
4220
|
+
/**
|
|
4221
|
+
* The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
|
|
4222
|
+
*/
|
|
4223
|
+
index: number;
|
|
4224
|
+
}
|
|
4225
|
+
|
|
4226
|
+
interface Duration {
|
|
4227
|
+
/**
|
|
4228
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4229
|
+
*/
|
|
4230
|
+
interval: Duration.Interval;
|
|
4231
|
+
|
|
4232
|
+
/**
|
|
4233
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4234
|
+
*/
|
|
4235
|
+
interval_count: number;
|
|
4236
|
+
}
|
|
4237
|
+
|
|
4238
|
+
namespace Duration {
|
|
4239
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
type Type =
|
|
4243
|
+
| 'amendment_end'
|
|
4244
|
+
| 'duration'
|
|
4245
|
+
| 'schedule_end'
|
|
4246
|
+
| 'timestamp';
|
|
4247
|
+
}
|
|
2852
4248
|
}
|
|
2853
4249
|
|
|
2854
4250
|
type ProrationBehavior =
|
|
@@ -2868,6 +4264,13 @@ declare module 'stripe' {
|
|
|
2868
4264
|
*/
|
|
2869
4265
|
billing_mode?: SubscriptionDetails.BillingMode;
|
|
2870
4266
|
|
|
4267
|
+
/**
|
|
4268
|
+
* Sets the billing schedules for the subscription.
|
|
4269
|
+
*/
|
|
4270
|
+
billing_schedules?: Stripe.Emptyable<
|
|
4271
|
+
Array<SubscriptionDetails.BillingSchedule>
|
|
4272
|
+
>;
|
|
4273
|
+
|
|
2871
4274
|
/**
|
|
2872
4275
|
* A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
|
2873
4276
|
*/
|
|
@@ -2893,6 +4296,11 @@ declare module 'stripe' {
|
|
|
2893
4296
|
*/
|
|
2894
4297
|
items?: Array<SubscriptionDetails.Item>;
|
|
2895
4298
|
|
|
4299
|
+
/**
|
|
4300
|
+
* The pre-billing to apply to the subscription as a preview.
|
|
4301
|
+
*/
|
|
4302
|
+
prebilling?: SubscriptionDetails.Prebilling;
|
|
4303
|
+
|
|
2896
4304
|
/**
|
|
2897
4305
|
* Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
|
2898
4306
|
*/
|
|
@@ -2949,6 +4357,74 @@ declare module 'stripe' {
|
|
|
2949
4357
|
type Type = 'classic' | 'flexible';
|
|
2950
4358
|
}
|
|
2951
4359
|
|
|
4360
|
+
interface BillingSchedule {
|
|
4361
|
+
/**
|
|
4362
|
+
* Configure billing schedule differently for individual subscription items.
|
|
4363
|
+
*/
|
|
4364
|
+
applies_to?: Array<BillingSchedule.AppliesTo>;
|
|
4365
|
+
|
|
4366
|
+
/**
|
|
4367
|
+
* The end date for the billing schedule.
|
|
4368
|
+
*/
|
|
4369
|
+
bill_until?: BillingSchedule.BillUntil;
|
|
4370
|
+
|
|
4371
|
+
/**
|
|
4372
|
+
* Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
4373
|
+
*/
|
|
4374
|
+
key?: string;
|
|
4375
|
+
}
|
|
4376
|
+
|
|
4377
|
+
namespace BillingSchedule {
|
|
4378
|
+
interface AppliesTo {
|
|
4379
|
+
/**
|
|
4380
|
+
* The ID of the price object.
|
|
4381
|
+
*/
|
|
4382
|
+
price?: string;
|
|
4383
|
+
|
|
4384
|
+
/**
|
|
4385
|
+
* Controls which subscription items the billing schedule applies to.
|
|
4386
|
+
*/
|
|
4387
|
+
type: 'price';
|
|
4388
|
+
}
|
|
4389
|
+
|
|
4390
|
+
interface BillUntil {
|
|
4391
|
+
/**
|
|
4392
|
+
* Specifies the billing period.
|
|
4393
|
+
*/
|
|
4394
|
+
duration?: BillUntil.Duration;
|
|
4395
|
+
|
|
4396
|
+
/**
|
|
4397
|
+
* The end date of the billing schedule.
|
|
4398
|
+
*/
|
|
4399
|
+
timestamp?: number;
|
|
4400
|
+
|
|
4401
|
+
/**
|
|
4402
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
4403
|
+
*/
|
|
4404
|
+
type: BillUntil.Type;
|
|
4405
|
+
}
|
|
4406
|
+
|
|
4407
|
+
namespace BillUntil {
|
|
4408
|
+
interface Duration {
|
|
4409
|
+
/**
|
|
4410
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
4411
|
+
*/
|
|
4412
|
+
interval: Duration.Interval;
|
|
4413
|
+
|
|
4414
|
+
/**
|
|
4415
|
+
* The multiplier applied to the interval.
|
|
4416
|
+
*/
|
|
4417
|
+
interval_count?: number;
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
namespace Duration {
|
|
4421
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4422
|
+
}
|
|
4423
|
+
|
|
4424
|
+
type Type = 'duration' | 'timestamp';
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
|
|
2952
4428
|
type CancelAt = 'max_period_end' | 'min_period_end';
|
|
2953
4429
|
|
|
2954
4430
|
interface Item {
|
|
@@ -3027,12 +4503,56 @@ declare module 'stripe' {
|
|
|
3027
4503
|
*/
|
|
3028
4504
|
discount?: string;
|
|
3029
4505
|
|
|
4506
|
+
/**
|
|
4507
|
+
* Details to determine how long the discount should be applied for.
|
|
4508
|
+
*/
|
|
4509
|
+
discount_end?: Discount.DiscountEnd;
|
|
4510
|
+
|
|
3030
4511
|
/**
|
|
3031
4512
|
* ID of the promotion code to create a new discount for.
|
|
3032
4513
|
*/
|
|
3033
4514
|
promotion_code?: string;
|
|
3034
4515
|
}
|
|
3035
4516
|
|
|
4517
|
+
namespace Discount {
|
|
4518
|
+
interface DiscountEnd {
|
|
4519
|
+
/**
|
|
4520
|
+
* Time span for the redeemed discount.
|
|
4521
|
+
*/
|
|
4522
|
+
duration?: DiscountEnd.Duration;
|
|
4523
|
+
|
|
4524
|
+
/**
|
|
4525
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4526
|
+
*/
|
|
4527
|
+
timestamp?: number;
|
|
4528
|
+
|
|
4529
|
+
/**
|
|
4530
|
+
* The type of calculation made to determine when the discount ends.
|
|
4531
|
+
*/
|
|
4532
|
+
type: DiscountEnd.Type;
|
|
4533
|
+
}
|
|
4534
|
+
|
|
4535
|
+
namespace DiscountEnd {
|
|
4536
|
+
interface Duration {
|
|
4537
|
+
/**
|
|
4538
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4539
|
+
*/
|
|
4540
|
+
interval: Duration.Interval;
|
|
4541
|
+
|
|
4542
|
+
/**
|
|
4543
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4544
|
+
*/
|
|
4545
|
+
interval_count: number;
|
|
4546
|
+
}
|
|
4547
|
+
|
|
4548
|
+
namespace Duration {
|
|
4549
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4550
|
+
}
|
|
4551
|
+
|
|
4552
|
+
type Type = 'duration' | 'timestamp';
|
|
4553
|
+
}
|
|
4554
|
+
}
|
|
4555
|
+
|
|
3036
4556
|
interface PriceData {
|
|
3037
4557
|
/**
|
|
3038
4558
|
* 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).
|
|
@@ -3086,6 +4606,13 @@ declare module 'stripe' {
|
|
|
3086
4606
|
}
|
|
3087
4607
|
}
|
|
3088
4608
|
|
|
4609
|
+
interface Prebilling {
|
|
4610
|
+
/**
|
|
4611
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
4612
|
+
*/
|
|
4613
|
+
iterations: number;
|
|
4614
|
+
}
|
|
4615
|
+
|
|
3089
4616
|
type ProrationBehavior =
|
|
3090
4617
|
| 'always_invoice'
|
|
3091
4618
|
| 'create_prorations'
|
|
@@ -3270,6 +4797,11 @@ declare module 'stripe' {
|
|
|
3270
4797
|
*/
|
|
3271
4798
|
id: string;
|
|
3272
4799
|
|
|
4800
|
+
/**
|
|
4801
|
+
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
4802
|
+
*/
|
|
4803
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
4804
|
+
|
|
3273
4805
|
/**
|
|
3274
4806
|
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
|
3275
4807
|
*/
|
|
@@ -3318,12 +4850,56 @@ declare module 'stripe' {
|
|
|
3318
4850
|
*/
|
|
3319
4851
|
discount?: string;
|
|
3320
4852
|
|
|
4853
|
+
/**
|
|
4854
|
+
* Details to determine how long the discount should be applied for.
|
|
4855
|
+
*/
|
|
4856
|
+
discount_end?: Discount.DiscountEnd;
|
|
4857
|
+
|
|
3321
4858
|
/**
|
|
3322
4859
|
* ID of the promotion code to create a new discount for.
|
|
3323
4860
|
*/
|
|
3324
4861
|
promotion_code?: string;
|
|
3325
4862
|
}
|
|
3326
4863
|
|
|
4864
|
+
namespace Discount {
|
|
4865
|
+
interface DiscountEnd {
|
|
4866
|
+
/**
|
|
4867
|
+
* Time span for the redeemed discount.
|
|
4868
|
+
*/
|
|
4869
|
+
duration?: DiscountEnd.Duration;
|
|
4870
|
+
|
|
4871
|
+
/**
|
|
4872
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
4873
|
+
*/
|
|
4874
|
+
timestamp?: number;
|
|
4875
|
+
|
|
4876
|
+
/**
|
|
4877
|
+
* The type of calculation made to determine when the discount ends.
|
|
4878
|
+
*/
|
|
4879
|
+
type: DiscountEnd.Type;
|
|
4880
|
+
}
|
|
4881
|
+
|
|
4882
|
+
namespace DiscountEnd {
|
|
4883
|
+
interface Duration {
|
|
4884
|
+
/**
|
|
4885
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
4886
|
+
*/
|
|
4887
|
+
interval: Duration.Interval;
|
|
4888
|
+
|
|
4889
|
+
/**
|
|
4890
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
4891
|
+
*/
|
|
4892
|
+
interval_count: number;
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4895
|
+
namespace Duration {
|
|
4896
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4897
|
+
}
|
|
4898
|
+
|
|
4899
|
+
type Type = 'duration' | 'timestamp';
|
|
4900
|
+
}
|
|
4901
|
+
}
|
|
4902
|
+
|
|
3327
4903
|
interface Period {
|
|
3328
4904
|
/**
|
|
3329
4905
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
@@ -3555,6 +5131,11 @@ declare module 'stripe' {
|
|
|
3555
5131
|
*/
|
|
3556
5132
|
expand?: Array<string>;
|
|
3557
5133
|
|
|
5134
|
+
/**
|
|
5135
|
+
* The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
|
5136
|
+
*/
|
|
5137
|
+
margins?: Stripe.Emptyable<Array<string>>;
|
|
5138
|
+
|
|
3558
5139
|
/**
|
|
3559
5140
|
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
|
3560
5141
|
*/
|
|
@@ -3605,12 +5186,56 @@ declare module 'stripe' {
|
|
|
3605
5186
|
*/
|
|
3606
5187
|
discount?: string;
|
|
3607
5188
|
|
|
5189
|
+
/**
|
|
5190
|
+
* Details to determine how long the discount should be applied for.
|
|
5191
|
+
*/
|
|
5192
|
+
discount_end?: Discount.DiscountEnd;
|
|
5193
|
+
|
|
3608
5194
|
/**
|
|
3609
5195
|
* ID of the promotion code to create a new discount for.
|
|
3610
5196
|
*/
|
|
3611
5197
|
promotion_code?: string;
|
|
3612
5198
|
}
|
|
3613
5199
|
|
|
5200
|
+
namespace Discount {
|
|
5201
|
+
interface DiscountEnd {
|
|
5202
|
+
/**
|
|
5203
|
+
* Time span for the redeemed discount.
|
|
5204
|
+
*/
|
|
5205
|
+
duration?: DiscountEnd.Duration;
|
|
5206
|
+
|
|
5207
|
+
/**
|
|
5208
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
5209
|
+
*/
|
|
5210
|
+
timestamp?: number;
|
|
5211
|
+
|
|
5212
|
+
/**
|
|
5213
|
+
* The type of calculation made to determine when the discount ends.
|
|
5214
|
+
*/
|
|
5215
|
+
type: DiscountEnd.Type;
|
|
5216
|
+
}
|
|
5217
|
+
|
|
5218
|
+
namespace DiscountEnd {
|
|
5219
|
+
interface Duration {
|
|
5220
|
+
/**
|
|
5221
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
5222
|
+
*/
|
|
5223
|
+
interval: Duration.Interval;
|
|
5224
|
+
|
|
5225
|
+
/**
|
|
5226
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
5227
|
+
*/
|
|
5228
|
+
interval_count: number;
|
|
5229
|
+
}
|
|
5230
|
+
|
|
5231
|
+
namespace Duration {
|
|
5232
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
5233
|
+
}
|
|
5234
|
+
|
|
5235
|
+
type Type = 'duration' | 'timestamp';
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
|
|
3614
5239
|
interface Period {
|
|
3615
5240
|
/**
|
|
3616
5241
|
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|