stripe 20.1.0-alpha.4 → 20.2.0-alpha.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 +39 -0
- package/OPENAPI_VERSION +1 -1
- package/VERSION +1 -1
- package/cjs/Error.js +9 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/SharedPayment/GrantedTokens.js +12 -0
- package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +16 -0
- package/cjs/resources/V2/Iam/ApiKeys.js +24 -0
- package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.js +20 -0
- package/cjs/resources/V2/Payments/SettlementAllocationIntents.js +33 -0
- package/cjs/resources/V2/Tax/ManualRules.js +23 -0
- package/cjs/resources.js +15 -1
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +7 -0
- package/esm/apiVersion.js +1 -1
- package/esm/resources/SharedPayment/GrantedTokens.js +9 -0
- package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +13 -0
- package/esm/resources/V2/Iam/ApiKeys.js +21 -0
- package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.js +17 -0
- package/esm/resources/V2/Payments/SettlementAllocationIntents.js +30 -0
- package/esm/resources/V2/Tax/ManualRules.js +20 -0
- package/esm/resources.js +14 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinks.d.ts +1 -1
- package/types/AccountNotices.d.ts +6 -6
- package/types/AccountNoticesResource.d.ts +1 -1
- package/types/AccountSessions.d.ts +7 -7
- package/types/AccountSessionsResource.d.ts +21 -0
- package/types/Accounts.d.ts +25 -25
- package/types/AccountsResource.d.ts +107 -63
- package/types/ApplicationFeesResource.d.ts +2 -2
- package/types/Apps/Secrets.d.ts +1 -1
- package/types/Balance.d.ts +2 -2
- package/types/BalanceSettings.d.ts +1 -1
- package/types/BalanceTransactions.d.ts +1 -1
- package/types/BalanceTransfers.d.ts +3 -3
- package/types/BalanceTransfersResource.d.ts +1 -1
- package/types/BankAccounts.d.ts +10 -10
- package/types/Billing/Alerts.d.ts +2 -2
- package/types/Billing/CreditBalanceSummary.d.ts +3 -3
- package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -2
- package/types/Billing/CreditBalanceTransactions.d.ts +2 -2
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +2 -2
- package/types/Billing/CreditGrants.d.ts +4 -4
- package/types/Billing/CreditGrantsResource.d.ts +3 -3
- package/types/Billing/MeterEvents.d.ts +1 -1
- package/types/Billing/MeterEventsResource.d.ts +1 -1
- package/types/BillingPortal/Configurations.d.ts +10 -3
- package/types/BillingPortal/ConfigurationsResource.d.ts +20 -6
- package/types/BillingPortal/Sessions.d.ts +7 -7
- package/types/BillingPortal/SessionsResource.d.ts +7 -7
- package/types/Capabilities.d.ts +16 -16
- package/types/Capital/FinancingOffers.d.ts +2 -2
- package/types/Capital/FinancingSummary.d.ts +7 -4
- package/types/Capital/FinancingSummaryResource.d.ts +1 -1
- package/types/Cards.d.ts +2 -2
- package/types/CashBalances.d.ts +3 -3
- package/types/Charges.d.ts +59 -27
- package/types/ChargesResource.d.ts +22 -22
- package/types/Checkout/Sessions.d.ts +18 -18
- package/types/Checkout/SessionsResource.d.ts +90 -60
- package/types/Climate/Orders.d.ts +1 -1
- package/types/Climate/OrdersResource.d.ts +2 -2
- package/types/ConfirmationTokens.d.ts +8 -6
- package/types/Coupons.d.ts +3 -3
- package/types/CouponsResource.d.ts +2 -2
- package/types/CreditNoteLineItems.d.ts +3 -0
- package/types/CreditNotes.d.ts +8 -5
- package/types/CreditNotesResource.d.ts +5 -5
- package/types/CustomerBalanceTransactions.d.ts +9 -6
- package/types/CustomerCashBalanceTransactions.d.ts +13 -10
- package/types/CustomerSessions.d.ts +1 -1
- package/types/Customers.d.ts +8 -5
- package/types/CustomersResource.d.ts +21 -16
- package/types/DelegatedCheckout/RequestedSessions.d.ts +83 -17
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +102 -0
- package/types/Discounts.d.ts +6 -6
- package/types/Disputes.d.ts +3 -3
- package/types/DisputesResource.d.ts +1 -1
- package/types/Entitlements/ActiveEntitlements.d.ts +1 -1
- package/types/Errors.d.ts +6 -0
- package/types/Events.d.ts +1 -1
- package/types/ExchangeRates.d.ts +2 -2
- package/types/ExternalAccountsResource.d.ts +4 -4
- package/types/FeeRefunds.d.ts +2 -2
- package/types/FileLinks.d.ts +1 -1
- package/types/FileLinksResource.d.ts +2 -2
- package/types/Files.d.ts +4 -4
- package/types/FilesResource.d.ts +3 -3
- package/types/FinancialConnections/Accounts.d.ts +3 -3
- package/types/FinancialConnections/AccountsResource.d.ts +3 -3
- package/types/FinancialConnections/Sessions.d.ts +2 -2
- package/types/FinancialConnections/SessionsResource.d.ts +3 -3
- package/types/Forwarding/Requests.d.ts +1 -1
- package/types/Forwarding/RequestsResource.d.ts +1 -1
- package/types/FundingInstructions.d.ts +2 -2
- package/types/Identity/BlocklistEntries.d.ts +1 -1
- package/types/Identity/VerificationReports.d.ts +8 -8
- package/types/Identity/VerificationSessions.d.ts +11 -11
- package/types/Identity/VerificationSessionsResource.d.ts +18 -12
- package/types/InvoiceItems.d.ts +12 -12
- package/types/InvoiceItemsResource.d.ts +16 -16
- package/types/InvoiceLineItems.d.ts +11 -8
- package/types/InvoicePayments.d.ts +1 -1
- package/types/InvoiceRenderingTemplates.d.ts +1 -1
- package/types/Invoices.d.ts +83 -33
- package/types/InvoicesResource.d.ts +237 -111
- package/types/Issuing/Authorizations.d.ts +20 -20
- package/types/Issuing/AuthorizationsResource.d.ts +4 -4
- package/types/Issuing/Cardholders.d.ts +13 -13
- package/types/Issuing/CardholdersResource.d.ts +21 -21
- package/types/Issuing/Cards.d.ts +20 -10
- package/types/Issuing/CardsResource.d.ts +46 -13
- package/types/Issuing/CreditUnderwritingRecords.d.ts +5 -5
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +15 -15
- package/types/Issuing/Disputes.d.ts +7 -7
- package/types/Issuing/DisputesResource.d.ts +5 -5
- package/types/Issuing/FraudLiabilityDebits.d.ts +1 -1
- package/types/Issuing/PersonalizationDesigns.d.ts +1 -1
- package/types/Issuing/PersonalizationDesignsResource.d.ts +2 -2
- package/types/Issuing/Programs.d.ts +1 -1
- package/types/Issuing/ProgramsResource.d.ts +1 -1
- package/types/Issuing/Settlements.d.ts +2 -2
- package/types/Issuing/Tokens.d.ts +1 -1
- package/types/Issuing/Transactions.d.ts +13 -13
- package/types/Issuing/TransactionsResource.d.ts +1 -1
- package/types/LineItems.d.ts +3 -3
- package/types/LoginLinks.d.ts +1 -1
- package/types/MandatesResource.d.ts +1 -1
- package/types/Margins.d.ts +1 -1
- package/types/MarginsResource.d.ts +2 -2
- package/types/Orders.d.ts +11 -11
- package/types/OrdersResource.d.ts +24 -24
- package/types/PaymentAttemptRecords.d.ts +119 -18
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +3 -3
- package/types/PaymentIntents.d.ts +72 -44
- package/types/PaymentIntentsResource.d.ts +172 -159
- package/types/PaymentLinks.d.ts +7 -7
- package/types/PaymentLinksResource.d.ts +42 -28
- package/types/PaymentMethodConfigurations.d.ts +4 -4
- package/types/PaymentMethodConfigurationsResource.d.ts +80 -80
- package/types/PaymentMethodDomains.d.ts +1 -1
- package/types/PaymentMethods.d.ts +10 -8
- package/types/PaymentMethodsResource.d.ts +7 -6
- package/types/PaymentRecords.d.ts +126 -18
- package/types/PaymentRecordsResource.d.ts +7 -7
- package/types/Payouts.d.ts +7 -7
- package/types/PayoutsResource.d.ts +3 -3
- package/types/Persons.d.ts +21 -21
- package/types/Plans.d.ts +5 -5
- package/types/PlansResource.d.ts +6 -6
- package/types/Prices.d.ts +6 -6
- package/types/PricesResource.d.ts +10 -10
- package/types/ProductCatalog/TrialOffers.d.ts +1 -1
- package/types/Products.d.ts +10 -10
- package/types/ProductsResource.d.ts +38 -14
- package/types/PromotionCodes.d.ts +5 -5
- package/types/PromotionCodesResource.d.ts +5 -5
- package/types/QuoteLines.d.ts +3 -3
- package/types/QuotePreviewInvoices.d.ts +81 -31
- package/types/QuotePreviewSubscriptionSchedules.d.ts +18 -18
- package/types/Quotes.d.ts +16 -16
- package/types/QuotesResource.d.ts +30 -30
- package/types/Radar/EarlyFraudWarnings.d.ts +1 -1
- package/types/Radar/ValueListItems.d.ts +1 -1
- package/types/Radar/ValueLists.d.ts +2 -2
- package/types/Radar/ValueListsResource.d.ts +2 -2
- package/types/Refunds.d.ts +3 -3
- package/types/RefundsResource.d.ts +3 -3
- package/types/Reporting/ReportRuns.d.ts +3 -3
- package/types/Reporting/ReportRunsResource.d.ts +2 -2
- package/types/Reporting/ReportTypes.d.ts +3 -3
- package/types/Reviews.d.ts +1 -1
- package/types/SetupAttempts.d.ts +21 -18
- package/types/SetupIntents.d.ts +20 -19
- package/types/SetupIntentsResource.d.ts +47 -44
- package/types/SharedPayment/GrantedTokens.d.ts +102 -0
- package/types/SharedPayment/GrantedTokensResource.d.ts +29 -0
- package/types/ShippingRates.d.ts +3 -3
- package/types/ShippingRatesResource.d.ts +3 -3
- package/types/Sigma/ScheduledQueryRuns.d.ts +1 -1
- package/types/SourceMandateNotifications.d.ts +3 -3
- package/types/Sources.d.ts +5 -5
- package/types/SourcesResource.d.ts +2 -2
- package/types/SubscriptionItems.d.ts +7 -7
- package/types/SubscriptionItemsResource.d.ts +22 -22
- package/types/SubscriptionSchedules.d.ts +19 -19
- package/types/SubscriptionSchedulesResource.d.ts +61 -61
- package/types/Subscriptions.d.ts +61 -15
- package/types/SubscriptionsResource.d.ts +142 -58
- package/types/Tax/Associations.d.ts +3 -3
- package/types/Tax/AssociationsResource.d.ts +1 -1
- package/types/Tax/CalculationLineItems.d.ts +7 -7
- package/types/Tax/Calculations.d.ts +12 -12
- package/types/Tax/CalculationsResource.d.ts +7 -7
- package/types/Tax/Registrations.d.ts +3 -3
- package/types/Tax/Settings.d.ts +1 -1
- package/types/Tax/SettingsResource.d.ts +1 -1
- package/types/Tax/TransactionLineItems.d.ts +5 -5
- package/types/Tax/Transactions.d.ts +9 -9
- package/types/Tax/TransactionsResource.d.ts +10 -10
- package/types/TaxIds.d.ts +6 -6
- package/types/TaxIdsResource.d.ts +4 -4
- package/types/TaxRates.d.ts +1 -1
- package/types/TaxRatesResource.d.ts +2 -2
- package/types/Terminal/ConnectionTokens.d.ts +1 -1
- package/types/Terminal/Locations.d.ts +2 -2
- package/types/Terminal/LocationsResource.d.ts +3 -3
- package/types/Terminal/Readers.d.ts +10 -10
- package/types/Terminal/ReadersResource.d.ts +7 -7
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +5 -4
- package/types/TestHelpers/CustomersResource.d.ts +2 -2
- package/types/TestHelpers/Issuing/AuthorizationsResource.d.ts +10 -10
- package/types/TestHelpers/Issuing/TransactionsResource.d.ts +5 -5
- package/types/TestHelpers/SharedPayment/GrantedTokensResource.d.ts +87 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +1 -1
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +1 -1
- package/types/Tokens.d.ts +4 -4
- package/types/TokensResource.d.ts +17 -17
- package/types/Topups.d.ts +3 -3
- package/types/TopupsResource.d.ts +3 -3
- package/types/TransferReversals.d.ts +4 -4
- package/types/Transfers.d.ts +5 -5
- package/types/TransfersResource.d.ts +6 -6
- package/types/Treasury/CreditReversals.d.ts +3 -3
- package/types/Treasury/CreditReversalsResource.d.ts +1 -1
- package/types/Treasury/DebitReversals.d.ts +3 -3
- package/types/Treasury/DebitReversalsResource.d.ts +1 -1
- package/types/Treasury/FinancialAccounts.d.ts +1 -1
- package/types/Treasury/FinancialAccountsResource.d.ts +2 -2
- package/types/Treasury/InboundTransfers.d.ts +4 -4
- package/types/Treasury/InboundTransfersResource.d.ts +2 -2
- package/types/Treasury/OutboundPayments.d.ts +5 -5
- package/types/Treasury/OutboundPaymentsResource.d.ts +4 -4
- package/types/Treasury/OutboundTransfers.d.ts +4 -4
- package/types/Treasury/OutboundTransfersResource.d.ts +3 -3
- package/types/Treasury/ReceivedCredits.d.ts +9 -9
- package/types/Treasury/ReceivedDebits.d.ts +6 -6
- package/types/Treasury/TransactionEntries.d.ts +11 -11
- package/types/Treasury/Transactions.d.ts +11 -11
- package/types/V2/Billing/IntentActions.d.ts +141 -36
- package/types/V2/Billing/IntentsResource.d.ts +141 -42
- package/types/V2/Core/AccountLinks.d.ts +11 -11
- package/types/V2/Core/AccountLinksResource.d.ts +6 -6
- package/types/V2/Core/AccountPersons.d.ts +55 -10
- package/types/V2/Core/AccountTokensResource.d.ts +99 -10
- package/types/V2/Core/Accounts/PersonTokensResource.d.ts +48 -3
- package/types/V2/Core/Accounts/PersonsResource.d.ts +101 -11
- package/types/V2/Core/Accounts.d.ts +298 -509
- package/types/V2/Core/AccountsResource.d.ts +256 -51
- package/types/V2/Core/ClaimableSandboxesResource.d.ts +1 -1
- package/types/V2/Core/EventTypes.d.ts +601 -0
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +21 -0
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +26 -0
- package/types/V2/Iam/ApiKeys.d.ts +154 -0
- package/types/V2/Iam/ApiKeysResource.d.ts +215 -0
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +31 -1
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +7 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +8 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +7 -0
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +7 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +7 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +2 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +26 -0
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +2 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +10 -1
- package/types/V2/Payments/SettlementAllocationIntentSplits.d.ts +111 -0
- package/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts +126 -0
- package/types/V2/Payments/SettlementAllocationIntents.d.ts +122 -0
- package/types/V2/Payments/SettlementAllocationIntentsResource.d.ts +168 -0
- package/types/V2/Tax/ManualRules.d.ts +142 -0
- package/types/V2/Tax/ManualRulesResource.d.ts +292 -0
- package/types/WebhookEndpoints.d.ts +1 -1
- package/types/WebhookEndpointsResource.d.ts +4 -3
- package/types/apiVersion.d.ts +1 -1
- package/types/index.d.ts +24 -0
|
@@ -51,7 +51,7 @@ declare module 'stripe' {
|
|
|
51
51
|
from_subscription?: string;
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
54
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
55
55
|
*/
|
|
56
56
|
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
57
57
|
|
|
@@ -181,7 +181,7 @@ declare module 'stripe' {
|
|
|
181
181
|
automatic_tax?: DefaultSettings.AutomaticTax;
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/
|
|
184
|
+
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
|
|
185
185
|
*/
|
|
186
186
|
billing_cycle_anchor?: DefaultSettings.BillingCycleAnchor;
|
|
187
187
|
|
|
@@ -218,14 +218,14 @@ declare module 'stripe' {
|
|
|
218
218
|
on_behalf_of?: Stripe.Emptyable<string>;
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
|
-
*
|
|
221
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
222
222
|
*/
|
|
223
|
-
|
|
223
|
+
phase_effective_at?: DefaultSettings.PhaseEffectiveAt;
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
|
-
*
|
|
226
|
+
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
227
227
|
*/
|
|
228
|
-
|
|
228
|
+
transfer_data?: Stripe.Emptyable<DefaultSettings.TransferData>;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
namespace DefaultSettings {
|
|
@@ -344,7 +344,7 @@ declare module 'stripe' {
|
|
|
344
344
|
automatic_tax?: Phase.AutomaticTax;
|
|
345
345
|
|
|
346
346
|
/**
|
|
347
|
-
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/
|
|
347
|
+
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
|
|
348
348
|
*/
|
|
349
349
|
billing_cycle_anchor?: Phase.BillingCycleAnchor;
|
|
350
350
|
|
|
@@ -369,7 +369,7 @@ declare module 'stripe' {
|
|
|
369
369
|
default_payment_method?: string;
|
|
370
370
|
|
|
371
371
|
/**
|
|
372
|
-
* A list of [Tax Rate](https://stripe.com/
|
|
372
|
+
* A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
|
|
373
373
|
*/
|
|
374
374
|
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
375
375
|
|
|
@@ -389,7 +389,12 @@ declare module 'stripe' {
|
|
|
389
389
|
duration?: Phase.Duration;
|
|
390
390
|
|
|
391
391
|
/**
|
|
392
|
-
*
|
|
392
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
393
|
+
*/
|
|
394
|
+
effective_at?: Phase.EffectiveAt;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
|
|
393
398
|
*/
|
|
394
399
|
end_date?: number;
|
|
395
400
|
|
|
@@ -404,7 +409,7 @@ declare module 'stripe' {
|
|
|
404
409
|
items: Array<Phase.Item>;
|
|
405
410
|
|
|
406
411
|
/**
|
|
407
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
412
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
|
408
413
|
*/
|
|
409
414
|
metadata?: Stripe.MetadataParam;
|
|
410
415
|
|
|
@@ -414,12 +419,12 @@ declare module 'stripe' {
|
|
|
414
419
|
on_behalf_of?: string;
|
|
415
420
|
|
|
416
421
|
/**
|
|
417
|
-
* 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/
|
|
422
|
+
* 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
418
423
|
*/
|
|
419
424
|
pause_collection?: Phase.PauseCollection;
|
|
420
425
|
|
|
421
426
|
/**
|
|
422
|
-
* Controls whether the subscription schedule should create [prorations](https://stripe.com/
|
|
427
|
+
* Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/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://docs.stripe.com/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.
|
|
423
428
|
*/
|
|
424
429
|
proration_behavior?: Phase.ProrationBehavior;
|
|
425
430
|
|
|
@@ -447,11 +452,6 @@ declare module 'stripe' {
|
|
|
447
452
|
* Settings related to subscription trials.
|
|
448
453
|
*/
|
|
449
454
|
trial_settings?: Phase.TrialSettings;
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
453
|
-
*/
|
|
454
|
-
effective_at?: Phase.EffectiveAt;
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
namespace Phase {
|
|
@@ -462,7 +462,7 @@ declare module 'stripe' {
|
|
|
462
462
|
discounts?: Array<AddInvoiceItem.Discount>;
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
465
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
466
466
|
*/
|
|
467
467
|
metadata?: Stripe.MetadataParam;
|
|
468
468
|
|
|
@@ -477,7 +477,7 @@ declare module 'stripe' {
|
|
|
477
477
|
price?: string;
|
|
478
478
|
|
|
479
479
|
/**
|
|
480
|
-
* Data used to generate a new [Price](https://stripe.com/
|
|
480
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
|
|
481
481
|
*/
|
|
482
482
|
price_data?: AddInvoiceItem.PriceData;
|
|
483
483
|
|
|
@@ -612,7 +612,7 @@ declare module 'stripe' {
|
|
|
612
612
|
product: string;
|
|
613
613
|
|
|
614
614
|
/**
|
|
615
|
-
* Only required if a [default tax behavior](https://stripe.com/
|
|
615
|
+
* Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
616
616
|
*/
|
|
617
617
|
tax_behavior?: PriceData.TaxBehavior;
|
|
618
618
|
|
|
@@ -804,7 +804,7 @@ declare module 'stripe' {
|
|
|
804
804
|
discounts?: Stripe.Emptyable<Array<Item.Discount>>;
|
|
805
805
|
|
|
806
806
|
/**
|
|
807
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
807
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
|
808
808
|
*/
|
|
809
809
|
metadata?: Stripe.MetadataParam;
|
|
810
810
|
|
|
@@ -819,7 +819,7 @@ declare module 'stripe' {
|
|
|
819
819
|
price?: string;
|
|
820
820
|
|
|
821
821
|
/**
|
|
822
|
-
* Data used to generate a new [Price](https://stripe.com/
|
|
822
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline.
|
|
823
823
|
*/
|
|
824
824
|
price_data?: Item.PriceData;
|
|
825
825
|
|
|
@@ -829,7 +829,7 @@ declare module 'stripe' {
|
|
|
829
829
|
quantity?: number;
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
|
-
* A list of [Tax Rate](https://stripe.com/
|
|
832
|
+
* A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
833
833
|
*/
|
|
834
834
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
835
835
|
|
|
@@ -847,7 +847,7 @@ declare module 'stripe' {
|
|
|
847
847
|
namespace Item {
|
|
848
848
|
interface BillingThresholds {
|
|
849
849
|
/**
|
|
850
|
-
* Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/
|
|
850
|
+
* Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
|
851
851
|
*/
|
|
852
852
|
usage_gte: number;
|
|
853
853
|
}
|
|
@@ -930,7 +930,7 @@ declare module 'stripe' {
|
|
|
930
930
|
recurring: PriceData.Recurring;
|
|
931
931
|
|
|
932
932
|
/**
|
|
933
|
-
* Only required if a [default tax behavior](https://stripe.com/
|
|
933
|
+
* Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
934
934
|
*/
|
|
935
935
|
tax_behavior?: PriceData.TaxBehavior;
|
|
936
936
|
|
|
@@ -1086,7 +1086,7 @@ declare module 'stripe' {
|
|
|
1086
1086
|
expand?: Array<string>;
|
|
1087
1087
|
|
|
1088
1088
|
/**
|
|
1089
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
1089
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
1090
1090
|
*/
|
|
1091
1091
|
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
1092
1092
|
|
|
@@ -1189,7 +1189,7 @@ declare module 'stripe' {
|
|
|
1189
1189
|
automatic_tax?: DefaultSettings.AutomaticTax;
|
|
1190
1190
|
|
|
1191
1191
|
/**
|
|
1192
|
-
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/
|
|
1192
|
+
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
|
|
1193
1193
|
*/
|
|
1194
1194
|
billing_cycle_anchor?: DefaultSettings.BillingCycleAnchor;
|
|
1195
1195
|
|
|
@@ -1226,14 +1226,14 @@ declare module 'stripe' {
|
|
|
1226
1226
|
on_behalf_of?: Stripe.Emptyable<string>;
|
|
1227
1227
|
|
|
1228
1228
|
/**
|
|
1229
|
-
*
|
|
1229
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
1230
1230
|
*/
|
|
1231
|
-
|
|
1231
|
+
phase_effective_at?: DefaultSettings.PhaseEffectiveAt;
|
|
1232
1232
|
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1234
|
+
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
1235
1235
|
*/
|
|
1236
|
-
|
|
1236
|
+
transfer_data?: Stripe.Emptyable<DefaultSettings.TransferData>;
|
|
1237
1237
|
}
|
|
1238
1238
|
|
|
1239
1239
|
namespace DefaultSettings {
|
|
@@ -1352,7 +1352,7 @@ declare module 'stripe' {
|
|
|
1352
1352
|
automatic_tax?: Phase.AutomaticTax;
|
|
1353
1353
|
|
|
1354
1354
|
/**
|
|
1355
|
-
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/
|
|
1355
|
+
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
|
|
1356
1356
|
*/
|
|
1357
1357
|
billing_cycle_anchor?: Phase.BillingCycleAnchor;
|
|
1358
1358
|
|
|
@@ -1377,7 +1377,7 @@ declare module 'stripe' {
|
|
|
1377
1377
|
default_payment_method?: string;
|
|
1378
1378
|
|
|
1379
1379
|
/**
|
|
1380
|
-
* A list of [Tax Rate](https://stripe.com/
|
|
1380
|
+
* A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
|
|
1381
1381
|
*/
|
|
1382
1382
|
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1383
1383
|
|
|
@@ -1397,7 +1397,12 @@ declare module 'stripe' {
|
|
|
1397
1397
|
duration?: Phase.Duration;
|
|
1398
1398
|
|
|
1399
1399
|
/**
|
|
1400
|
-
*
|
|
1400
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
1401
|
+
*/
|
|
1402
|
+
effective_at?: Phase.EffectiveAt;
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
|
|
1401
1406
|
*/
|
|
1402
1407
|
end_date?: number | 'now';
|
|
1403
1408
|
|
|
@@ -1412,7 +1417,7 @@ declare module 'stripe' {
|
|
|
1412
1417
|
items: Array<Phase.Item>;
|
|
1413
1418
|
|
|
1414
1419
|
/**
|
|
1415
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
1420
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
|
1416
1421
|
*/
|
|
1417
1422
|
metadata?: Stripe.MetadataParam;
|
|
1418
1423
|
|
|
@@ -1422,12 +1427,12 @@ declare module 'stripe' {
|
|
|
1422
1427
|
on_behalf_of?: string;
|
|
1423
1428
|
|
|
1424
1429
|
/**
|
|
1425
|
-
* If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/
|
|
1430
|
+
* 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
1426
1431
|
*/
|
|
1427
1432
|
pause_collection?: Phase.PauseCollection;
|
|
1428
1433
|
|
|
1429
1434
|
/**
|
|
1430
|
-
* Controls whether the subscription schedule should create [prorations](https://stripe.com/
|
|
1435
|
+
* Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/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://docs.stripe.com/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.
|
|
1431
1436
|
*/
|
|
1432
1437
|
proration_behavior?: Phase.ProrationBehavior;
|
|
1433
1438
|
|
|
@@ -1460,11 +1465,6 @@ declare module 'stripe' {
|
|
|
1460
1465
|
* Settings related to subscription trials.
|
|
1461
1466
|
*/
|
|
1462
1467
|
trial_settings?: Phase.TrialSettings;
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
1466
|
-
*/
|
|
1467
|
-
effective_at?: Phase.EffectiveAt;
|
|
1468
1468
|
}
|
|
1469
1469
|
|
|
1470
1470
|
namespace Phase {
|
|
@@ -1475,7 +1475,7 @@ declare module 'stripe' {
|
|
|
1475
1475
|
discounts?: Array<AddInvoiceItem.Discount>;
|
|
1476
1476
|
|
|
1477
1477
|
/**
|
|
1478
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
1478
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
1479
1479
|
*/
|
|
1480
1480
|
metadata?: Stripe.MetadataParam;
|
|
1481
1481
|
|
|
@@ -1490,7 +1490,7 @@ declare module 'stripe' {
|
|
|
1490
1490
|
price?: string;
|
|
1491
1491
|
|
|
1492
1492
|
/**
|
|
1493
|
-
* Data used to generate a new [Price](https://stripe.com/
|
|
1493
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
|
|
1494
1494
|
*/
|
|
1495
1495
|
price_data?: AddInvoiceItem.PriceData;
|
|
1496
1496
|
|
|
@@ -1625,7 +1625,7 @@ declare module 'stripe' {
|
|
|
1625
1625
|
product: string;
|
|
1626
1626
|
|
|
1627
1627
|
/**
|
|
1628
|
-
* Only required if a [default tax behavior](https://stripe.com/
|
|
1628
|
+
* Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
1629
1629
|
*/
|
|
1630
1630
|
tax_behavior?: PriceData.TaxBehavior;
|
|
1631
1631
|
|
|
@@ -1817,7 +1817,7 @@ declare module 'stripe' {
|
|
|
1817
1817
|
discounts?: Stripe.Emptyable<Array<Item.Discount>>;
|
|
1818
1818
|
|
|
1819
1819
|
/**
|
|
1820
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
1820
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
|
1821
1821
|
*/
|
|
1822
1822
|
metadata?: Stripe.MetadataParam;
|
|
1823
1823
|
|
|
@@ -1832,7 +1832,7 @@ declare module 'stripe' {
|
|
|
1832
1832
|
price?: string;
|
|
1833
1833
|
|
|
1834
1834
|
/**
|
|
1835
|
-
* Data used to generate a new [Price](https://stripe.com/
|
|
1835
|
+
* Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline.
|
|
1836
1836
|
*/
|
|
1837
1837
|
price_data?: Item.PriceData;
|
|
1838
1838
|
|
|
@@ -1842,7 +1842,7 @@ declare module 'stripe' {
|
|
|
1842
1842
|
quantity?: number;
|
|
1843
1843
|
|
|
1844
1844
|
/**
|
|
1845
|
-
* A list of [Tax Rate](https://stripe.com/
|
|
1845
|
+
* A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
1846
1846
|
*/
|
|
1847
1847
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1848
1848
|
|
|
@@ -1860,7 +1860,7 @@ declare module 'stripe' {
|
|
|
1860
1860
|
namespace Item {
|
|
1861
1861
|
interface BillingThresholds {
|
|
1862
1862
|
/**
|
|
1863
|
-
* Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/
|
|
1863
|
+
* Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
|
1864
1864
|
*/
|
|
1865
1865
|
usage_gte: number;
|
|
1866
1866
|
}
|
|
@@ -1943,7 +1943,7 @@ declare module 'stripe' {
|
|
|
1943
1943
|
recurring: PriceData.Recurring;
|
|
1944
1944
|
|
|
1945
1945
|
/**
|
|
1946
|
-
* Only required if a [default tax behavior](https://stripe.com/
|
|
1946
|
+
* Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
1947
1947
|
*/
|
|
1948
1948
|
tax_behavior?: PriceData.TaxBehavior;
|
|
1949
1949
|
|
|
@@ -2154,11 +2154,21 @@ declare module 'stripe' {
|
|
|
2154
2154
|
*/
|
|
2155
2155
|
billing_cycle_anchor?: Amendment.BillingCycleAnchor;
|
|
2156
2156
|
|
|
2157
|
+
/**
|
|
2158
|
+
* Actions to apply to the billing schedules.
|
|
2159
|
+
*/
|
|
2160
|
+
billing_schedules_actions?: Array<Amendment.BillingSchedulesAction>;
|
|
2161
|
+
|
|
2157
2162
|
/**
|
|
2158
2163
|
* Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
2159
2164
|
*/
|
|
2160
2165
|
discount_actions?: Array<Amendment.DiscountAction>;
|
|
2161
2166
|
|
|
2167
|
+
/**
|
|
2168
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
2169
|
+
*/
|
|
2170
|
+
effective_at?: Amendment.EffectiveAt;
|
|
2171
|
+
|
|
2162
2172
|
/**
|
|
2163
2173
|
* Changes to the subscription items during the amendment time span.
|
|
2164
2174
|
*/
|
|
@@ -2188,16 +2198,6 @@ declare module 'stripe' {
|
|
|
2188
2198
|
* Settings related to subscription trials.
|
|
2189
2199
|
*/
|
|
2190
2200
|
trial_settings?: Amendment.TrialSettings;
|
|
2191
|
-
|
|
2192
|
-
/**
|
|
2193
|
-
* Actions to apply to the billing schedules.
|
|
2194
|
-
*/
|
|
2195
|
-
billing_schedules_actions?: Array<Amendment.BillingSchedulesAction>;
|
|
2196
|
-
|
|
2197
|
-
/**
|
|
2198
|
-
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
2199
|
-
*/
|
|
2200
|
-
effective_at?: Amendment.EffectiveAt;
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
2203
2203
|
namespace Amendment {
|
|
@@ -2463,7 +2463,7 @@ declare module 'stripe' {
|
|
|
2463
2463
|
discounts?: Array<Add.Discount>;
|
|
2464
2464
|
|
|
2465
2465
|
/**
|
|
2466
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
2466
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
2467
2467
|
*/
|
|
2468
2468
|
metadata?: Stripe.MetadataParam;
|
|
2469
2469
|
|
package/types/Subscriptions.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare module 'stripe' {
|
|
|
5
5
|
/**
|
|
6
6
|
* Subscriptions allow you to charge a customer on a recurring basis.
|
|
7
7
|
*
|
|
8
|
-
* Related guide: [Creating subscriptions](https://stripe.com/
|
|
8
|
+
* Related guide: [Creating subscriptions](https://docs.stripe.com/billing/subscriptions/creating)
|
|
9
9
|
*/
|
|
10
10
|
interface Subscription {
|
|
11
11
|
/**
|
|
@@ -40,7 +40,7 @@ declare module 'stripe' {
|
|
|
40
40
|
billing_cadence?: string;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* The reference point that aligns future [billing cycle](https://stripe.com/
|
|
43
|
+
* The reference point that aligns future [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
|
|
44
44
|
*/
|
|
45
45
|
billing_cycle_anchor: number;
|
|
46
46
|
|
|
@@ -105,9 +105,9 @@ declare module 'stripe' {
|
|
|
105
105
|
customer: string | Stripe.Customer | Stripe.DeletedCustomer;
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
|
-
* ID of the account who owns the subscription.
|
|
108
|
+
* ID of the account representing the customer who owns the subscription.
|
|
109
109
|
*/
|
|
110
|
-
customer_account
|
|
110
|
+
customer_account: string | null;
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
113
|
* Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
|
|
@@ -115,12 +115,12 @@ declare module 'stripe' {
|
|
|
115
115
|
days_until_due: number | null;
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/
|
|
118
|
+
* ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).
|
|
119
119
|
*/
|
|
120
120
|
default_payment_method: string | Stripe.PaymentMethod | null;
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/
|
|
123
|
+
* ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).
|
|
124
124
|
*/
|
|
125
125
|
default_source: string | Stripe.CustomerSource | null;
|
|
126
126
|
|
|
@@ -167,7 +167,7 @@ declare module 'stripe' {
|
|
|
167
167
|
livemode: boolean;
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
|
-
* Set of [key-value pairs](https://stripe.com/
|
|
170
|
+
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
171
171
|
*/
|
|
172
172
|
metadata: Stripe.Metadata;
|
|
173
173
|
|
|
@@ -177,12 +177,12 @@ declare module 'stripe' {
|
|
|
177
177
|
next_pending_invoice_item_invoice: number | null;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
* The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/
|
|
180
|
+
* The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://docs.stripe.com/connect/subscriptions#on-behalf-of) for details.
|
|
181
181
|
*/
|
|
182
182
|
on_behalf_of: string | Stripe.Account | null;
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
* 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/
|
|
185
|
+
* 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
186
186
|
*/
|
|
187
187
|
pause_collection: Subscription.PauseCollection | null;
|
|
188
188
|
|
|
@@ -192,17 +192,17 @@ declare module 'stripe' {
|
|
|
192
192
|
payment_settings: Subscription.PaymentSettings | null;
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/
|
|
195
|
+
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://docs.stripe.com/api#create_invoice) for the given subscription at the specified interval.
|
|
196
196
|
*/
|
|
197
197
|
pending_invoice_item_interval: Subscription.PendingInvoiceItemInterval | null;
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
|
-
* You can use this [SetupIntent](https://stripe.com/
|
|
200
|
+
* You can use this [SetupIntent](https://docs.stripe.com/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2).
|
|
201
201
|
*/
|
|
202
202
|
pending_setup_intent: string | Stripe.SetupIntent | null;
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
* If specified, [pending updates](https://stripe.com/
|
|
205
|
+
* If specified, [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
|
|
206
206
|
*/
|
|
207
207
|
pending_update: Subscription.PendingUpdate | null;
|
|
208
208
|
|
|
@@ -228,7 +228,7 @@ declare module 'stripe' {
|
|
|
228
228
|
*
|
|
229
229
|
* A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
|
|
230
230
|
*
|
|
231
|
-
* A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/
|
|
231
|
+
* A subscription can only enter a `paused` status [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
|
|
232
232
|
*
|
|
233
233
|
* If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
|
|
234
234
|
*
|
|
@@ -625,6 +625,11 @@ declare module 'stripe' {
|
|
|
625
625
|
*/
|
|
626
626
|
konbini: PaymentMethodOptions.Konbini | null;
|
|
627
627
|
|
|
628
|
+
/**
|
|
629
|
+
* This sub-hash contains details about the PayTo payment method options to pass to invoices created by the subscription.
|
|
630
|
+
*/
|
|
631
|
+
payto?: PaymentMethodOptions.Payto | null;
|
|
632
|
+
|
|
628
633
|
/**
|
|
629
634
|
* This sub-hash contains details about the Pix payment method options to pass to invoices created by the subscription.
|
|
630
635
|
*/
|
|
@@ -691,7 +696,7 @@ declare module 'stripe' {
|
|
|
691
696
|
network: Card.Network | null;
|
|
692
697
|
|
|
693
698
|
/**
|
|
694
|
-
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/
|
|
699
|
+
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
|
|
695
700
|
*/
|
|
696
701
|
request_three_d_secure: Card.RequestThreeDSecure | null;
|
|
697
702
|
}
|
|
@@ -773,6 +778,46 @@ declare module 'stripe' {
|
|
|
773
778
|
|
|
774
779
|
interface Konbini {}
|
|
775
780
|
|
|
781
|
+
interface Payto {
|
|
782
|
+
mandate_options?: Payto.MandateOptions;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
namespace Payto {
|
|
786
|
+
interface MandateOptions {
|
|
787
|
+
/**
|
|
788
|
+
* The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit.
|
|
789
|
+
*/
|
|
790
|
+
amount: number | null;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Only `maximum` is supported.
|
|
794
|
+
*/
|
|
795
|
+
amount_type: MandateOptions.AmountType | null;
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* The purpose for which payments are made. Has a default value based on your merchant category code.
|
|
799
|
+
*/
|
|
800
|
+
purpose: MandateOptions.Purpose | null;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
namespace MandateOptions {
|
|
804
|
+
type AmountType = 'fixed' | 'maximum';
|
|
805
|
+
|
|
806
|
+
type Purpose =
|
|
807
|
+
| 'dependant_support'
|
|
808
|
+
| 'government'
|
|
809
|
+
| 'loan'
|
|
810
|
+
| 'mortgage'
|
|
811
|
+
| 'other'
|
|
812
|
+
| 'pension'
|
|
813
|
+
| 'personal'
|
|
814
|
+
| 'retail'
|
|
815
|
+
| 'salary'
|
|
816
|
+
| 'tax'
|
|
817
|
+
| 'utility';
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
776
821
|
interface Pix {
|
|
777
822
|
mandate_options?: Pix.MandateOptions;
|
|
778
823
|
}
|
|
@@ -938,6 +983,7 @@ declare module 'stripe' {
|
|
|
938
983
|
| 'payco'
|
|
939
984
|
| 'paynow'
|
|
940
985
|
| 'paypal'
|
|
986
|
+
| 'payto'
|
|
941
987
|
| 'pix'
|
|
942
988
|
| 'promptpay'
|
|
943
989
|
| 'revolut_pay'
|
|
@@ -996,7 +1042,7 @@ declare module 'stripe' {
|
|
|
996
1042
|
trial_end: number | null;
|
|
997
1043
|
|
|
998
1044
|
/**
|
|
999
|
-
* Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/
|
|
1045
|
+
* Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials) to learn more.
|
|
1000
1046
|
*/
|
|
1001
1047
|
trial_from_plan: boolean | null;
|
|
1002
1048
|
}
|