stripe 16.13.0-beta.1 → 17.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +139 -849
- package/README.md +4 -3
- package/VERSION +1 -1
- package/cjs/Error.js +31 -4
- package/cjs/RequestSender.js +114 -74
- package/cjs/StripeResource.js +8 -3
- package/cjs/apiVersion.js +2 -3
- package/cjs/autoPagination.js +51 -7
- package/cjs/crypto/CryptoProvider.js +6 -0
- package/cjs/crypto/NodeCryptoProvider.js +7 -0
- package/cjs/crypto/SubtleCryptoProvider.js +4 -0
- package/cjs/resources/{Capital/FinancingSummary.js → Billing/CreditBalanceSummary.js} +3 -3
- package/cjs/resources/{FinancialConnections/Institutions.js → Billing/CreditBalanceTransactions.js} +4 -4
- package/cjs/resources/Billing/CreditGrants.js +30 -0
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/Invoices.js +0 -17
- package/cjs/resources/PaymentIntents.js +0 -4
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources/Terminal/Readers.js +0 -12
- package/cjs/resources/V2/Billing/MeterEventAdjustments.js +12 -0
- package/cjs/resources/V2/Billing/MeterEventSession.js +12 -0
- package/cjs/resources/V2/Billing/MeterEventStream.js +13 -0
- package/cjs/resources/V2/Billing/MeterEvents.js +9 -0
- package/cjs/resources/V2/Billing.js +18 -0
- package/cjs/resources/V2/Core/Events.js +14 -0
- package/cjs/resources/V2/Core.js +12 -0
- package/cjs/resources/V2.js +14 -0
- package/cjs/resources.js +18 -42
- package/cjs/stripe.core.js +20 -8
- package/cjs/utils.js +41 -10
- package/esm/Error.js +27 -2
- package/esm/RequestSender.js +115 -75
- package/esm/StripeResource.js +9 -4
- package/esm/apiVersion.js +1 -2
- package/esm/autoPagination.js +52 -8
- package/esm/crypto/CryptoProvider.js +6 -0
- package/esm/crypto/NodeCryptoProvider.js +7 -0
- package/esm/crypto/SubtleCryptoProvider.js +4 -0
- package/esm/resources/{Capital/FinancingSummary.js → Billing/CreditBalanceSummary.js} +2 -2
- package/esm/resources/{FinancialConnections/Institutions.js → Billing/CreditBalanceTransactions.js} +3 -3
- package/esm/resources/Billing/CreditGrants.js +27 -0
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/Invoices.js +0 -17
- package/esm/resources/PaymentIntents.js +0 -4
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/Terminal/Readers.js +0 -12
- package/esm/resources/V2/Billing/MeterEventAdjustments.js +9 -0
- package/esm/resources/V2/Billing/MeterEventSession.js +9 -0
- package/esm/resources/V2/Billing/MeterEventStream.js +10 -0
- package/esm/resources/V2/Billing/MeterEvents.js +6 -0
- package/esm/resources/V2/Billing.js +15 -0
- package/esm/resources/V2/Core/Events.js +11 -0
- package/esm/resources/V2/Core.js +9 -0
- package/esm/resources/V2.js +11 -0
- package/esm/resources.js +7 -29
- package/esm/stripe.core.js +21 -9
- package/esm/utils.js +38 -9
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +0 -45
- package/types/AccountSessionsResource.d.ts +0 -288
- package/types/Accounts.d.ts +1 -113
- package/types/AccountsResource.d.ts +0 -270
- package/types/Billing/Alerts.d.ts +17 -13
- package/types/Billing/AlertsResource.d.ts +18 -21
- package/types/Billing/CreditBalanceSummary.d.ts +94 -0
- package/types/Billing/CreditBalanceSummaryResource.d.ts +64 -0
- package/types/Billing/CreditBalanceTransactions.d.ts +159 -0
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +54 -0
- package/types/Billing/CreditGrants.d.ts +124 -0
- package/types/Billing/CreditGrantsResource.d.ts +219 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +2 -2
- package/types/Capabilities.d.ts +1 -1
- package/types/Charges.d.ts +0 -71
- package/types/ChargesResource.d.ts +0 -1294
- package/types/Checkout/Sessions.d.ts +4 -296
- package/types/Checkout/SessionsResource.d.ts +6 -352
- package/types/ConfirmationTokens.d.ts +0 -67
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNoteLineItems.d.ts +30 -0
- package/types/CreditNotes.d.ts +27 -18
- package/types/CreditNotesResource.d.ts +0 -51
- package/types/Customers.d.ts +2 -3
- package/types/CustomersResource.d.ts +0 -3
- package/types/Disputes.d.ts +0 -152
- package/types/DisputesResource.d.ts +0 -120
- package/types/Errors.d.ts +32 -2
- package/types/EventTypes.d.ts +2 -545
- package/types/Events.d.ts +0 -90
- package/types/FinancialConnections/Accounts.d.ts +1 -29
- package/types/FinancialConnections/AccountsResource.d.ts +3 -35
- package/types/FinancialConnections/Sessions.d.ts +1 -49
- package/types/FinancialConnections/SessionsResource.d.ts +1 -38
- package/types/InvoiceItems.d.ts +0 -5
- package/types/InvoiceItemsResource.d.ts +0 -98
- package/types/InvoiceLineItems.d.ts +29 -20
- package/types/Invoices.d.ts +25 -108
- package/types/InvoicesResource.d.ts +1835 -5493
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/Transactions.d.ts +0 -2
- package/types/Issuing/TransactionsResource.d.ts +0 -5
- package/types/LineItems.d.ts +0 -7
- package/types/Mandates.d.ts +0 -77
- package/types/PaymentIntents.d.ts +1 -503
- package/types/PaymentIntentsResource.d.ts +3464 -7064
- package/types/PaymentLinks.d.ts +0 -3
- package/types/PaymentLinksResource.d.ts +0 -6
- package/types/PaymentMethodConfigurations.d.ts +0 -36
- package/types/PaymentMethodConfigurationsResource.d.ts +0 -50
- package/types/PaymentMethods.d.ts +0 -67
- package/types/PaymentMethodsResource.d.ts +0 -88
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/Products.d.ts +0 -39
- package/types/ProductsResource.d.ts +28 -37
- package/types/PromotionCodes.d.ts +1 -1
- package/types/PromotionCodesResource.d.ts +3 -1
- package/types/Quotes.d.ts +1 -596
- package/types/QuotesResource.d.ts +199 -2531
- package/types/SetupAttempts.d.ts +0 -10
- package/types/SetupIntents.d.ts +1 -111
- package/types/SetupIntentsResource.d.ts +3 -522
- package/types/Sources.d.ts +0 -23
- package/types/SubscriptionItems.d.ts +0 -21
- package/types/SubscriptionItemsResource.d.ts +0 -109
- package/types/SubscriptionSchedules.d.ts +0 -200
- package/types/SubscriptionSchedulesResource.d.ts +13 -1231
- package/types/Subscriptions.d.ts +1 -82
- package/types/SubscriptionsResource.d.ts +5 -350
- package/types/Tax/Settings.d.ts +1 -1
- package/types/Terminal/Readers.d.ts +0 -278
- package/types/Terminal/ReadersResource.d.ts +13 -212
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -63
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/ThinEvent.d.ts +36 -0
- package/types/Treasury/FinancialAccounts.d.ts +0 -5
- package/types/Treasury/FinancialAccountsResource.d.ts +0 -10
- package/types/Treasury/OutboundTransfers.d.ts +0 -26
- package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
- package/types/Treasury/ReceivedCredits.d.ts +5 -27
- package/types/Treasury/ReceivedDebits.d.ts +0 -31
- package/types/V2/Billing/MeterEventAdjustments.d.ts +65 -0
- package/types/V2/Billing/MeterEventAdjustmentsResource.d.ts +47 -0
- package/types/V2/Billing/MeterEventSessionResource.d.ts +26 -0
- package/types/V2/Billing/MeterEventSessions.d.ts +45 -0
- package/types/V2/Billing/MeterEventStreamResource.d.ts +62 -0
- package/types/V2/Billing/MeterEvents.d.ts +54 -0
- package/types/V2/Billing/MeterEventsResource.d.ts +52 -0
- package/types/V2/BillingResource.d.ts +14 -0
- package/types/V2/Core/EventsResource.d.ts +57 -0
- package/types/V2/CoreResource.d.ts +11 -0
- package/types/V2/EventTypes.d.ts +214 -0
- package/types/V2/Events.d.ts +75 -0
- package/types/V2Resource.d.ts +10 -0
- package/types/WebhookEndpointsResource.d.ts +2 -65
- package/types/index.d.ts +67 -53
- package/types/lib.d.ts +1 -6
- package/types/test/typescriptTest.ts +3 -3
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/Capital/FinancingOffers.js +0 -21
- package/cjs/resources/Capital/FinancingTransactions.js +0 -17
- package/cjs/resources/GiftCards/Cards.js +0 -23
- package/cjs/resources/GiftCards/Transactions.js +0 -33
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/Tax/Associations.js +0 -9
- package/cjs/resources/Tax/Forms.js +0 -20
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/Capital/FinancingOffers.js +0 -18
- package/esm/resources/Capital/FinancingTransactions.js +0 -14
- package/esm/resources/GiftCards/Cards.js +0 -20
- package/esm/resources/GiftCards/Transactions.js +0 -30
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/Tax/Associations.js +0 -6
- package/esm/resources/Tax/Forms.js +0 -17
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/Billing/MeterErrorReports.d.ts +0 -106
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -93
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/GiftCards/Cards.d.ts +0 -118
- package/types/GiftCards/CardsResource.d.ts +0 -159
- package/types/GiftCards/Transactions.d.ts +0 -129
- package/types/GiftCards/TransactionsResource.d.ts +0 -201
- package/types/InvoicePayments.d.ts +0 -138
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/Settlements.d.ts +0 -103
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1084
- package/types/OrdersResource.d.ts +0 -2765
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1548
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -814
- package/types/Tax/Associations.d.ts +0 -126
- package/types/Tax/AssociationsResource.d.ts +0 -29
- package/types/Tax/Forms.d.ts +0 -133
- package/types/Tax/FormsResource.d.ts +0 -90
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
package/types/Subscriptions.d.ts
CHANGED
|
@@ -146,11 +146,6 @@ declare module 'stripe' {
|
|
|
146
146
|
*/
|
|
147
147
|
items: ApiList<Stripe.SubscriptionItem>;
|
|
148
148
|
|
|
149
|
-
/**
|
|
150
|
-
* Details of the most recent price migration that failed for the subscription.
|
|
151
|
-
*/
|
|
152
|
-
last_price_migration_error?: Subscription.LastPriceMigrationError | null;
|
|
153
|
-
|
|
154
149
|
/**
|
|
155
150
|
* The most recent invoice this subscription has generated.
|
|
156
151
|
*/
|
|
@@ -201,11 +196,6 @@ declare module 'stripe' {
|
|
|
201
196
|
*/
|
|
202
197
|
pending_update: Subscription.PendingUpdate | null;
|
|
203
198
|
|
|
204
|
-
/**
|
|
205
|
-
* Time period and invoice for a Subscription billed in advance.
|
|
206
|
-
*/
|
|
207
|
-
prebilling?: Subscription.Prebilling | null;
|
|
208
|
-
|
|
209
199
|
/**
|
|
210
200
|
* The schedule attached to the subscription
|
|
211
201
|
*/
|
|
@@ -392,37 +382,6 @@ declare module 'stripe' {
|
|
|
392
382
|
}
|
|
393
383
|
}
|
|
394
384
|
|
|
395
|
-
interface LastPriceMigrationError {
|
|
396
|
-
/**
|
|
397
|
-
* The time at which the price migration encountered an error.
|
|
398
|
-
*/
|
|
399
|
-
errored_at: number;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* The involved price pairs in each failed transition.
|
|
403
|
-
*/
|
|
404
|
-
failed_transitions: Array<LastPriceMigrationError.FailedTransition>;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* The type of error encountered by the price migration.
|
|
408
|
-
*/
|
|
409
|
-
type: 'price_uniqueness_violation';
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
namespace LastPriceMigrationError {
|
|
413
|
-
interface FailedTransition {
|
|
414
|
-
/**
|
|
415
|
-
* The original price to be migrated.
|
|
416
|
-
*/
|
|
417
|
-
source_price: string;
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* The intended resulting price of the migration.
|
|
421
|
-
*/
|
|
422
|
-
target_price: string;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
385
|
interface PauseCollection {
|
|
427
386
|
/**
|
|
428
387
|
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
@@ -650,11 +609,6 @@ declare module 'stripe' {
|
|
|
650
609
|
* The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
|
651
610
|
*/
|
|
652
611
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* The institution to use to filter for possible accounts to link.
|
|
656
|
-
*/
|
|
657
|
-
institution?: string;
|
|
658
612
|
}
|
|
659
613
|
|
|
660
614
|
namespace Filters {
|
|
@@ -667,11 +621,7 @@ declare module 'stripe' {
|
|
|
667
621
|
| 'payment_method'
|
|
668
622
|
| 'transactions';
|
|
669
623
|
|
|
670
|
-
type Prefetch =
|
|
671
|
-
| 'balances'
|
|
672
|
-
| 'inferred_balances'
|
|
673
|
-
| 'ownership'
|
|
674
|
-
| 'transactions';
|
|
624
|
+
type Prefetch = 'balances' | 'ownership' | 'transactions';
|
|
675
625
|
}
|
|
676
626
|
|
|
677
627
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -740,11 +690,6 @@ declare module 'stripe' {
|
|
|
740
690
|
*/
|
|
741
691
|
expires_at: number;
|
|
742
692
|
|
|
743
|
-
/**
|
|
744
|
-
* The number of iterations of prebilling to apply.
|
|
745
|
-
*/
|
|
746
|
-
prebilling_iterations?: number | null;
|
|
747
|
-
|
|
748
693
|
/**
|
|
749
694
|
* List of subscription items, each with an attached plan, that will be set if the update is applied.
|
|
750
695
|
*/
|
|
@@ -761,32 +706,6 @@ declare module 'stripe' {
|
|
|
761
706
|
trial_from_plan: boolean | null;
|
|
762
707
|
}
|
|
763
708
|
|
|
764
|
-
interface Prebilling {
|
|
765
|
-
/**
|
|
766
|
-
* ID of the prebilling invoice.
|
|
767
|
-
*/
|
|
768
|
-
invoice: string | Stripe.Invoice;
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* The end of the last period for which the invoice pre-bills.
|
|
772
|
-
*/
|
|
773
|
-
period_end: number;
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* The start of the first period for which the invoice pre-bills.
|
|
777
|
-
*/
|
|
778
|
-
period_start: number;
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
|
782
|
-
*/
|
|
783
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
namespace Prebilling {
|
|
787
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
788
|
-
}
|
|
789
|
-
|
|
790
709
|
type Status =
|
|
791
710
|
| 'active'
|
|
792
711
|
| 'canceled'
|
|
@@ -157,11 +157,6 @@ declare module 'stripe' {
|
|
|
157
157
|
SubscriptionCreateParams.PendingInvoiceItemInterval
|
|
158
158
|
>;
|
|
159
159
|
|
|
160
|
-
/**
|
|
161
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
162
|
-
*/
|
|
163
|
-
prebilling?: SubscriptionCreateParams.Prebilling;
|
|
164
|
-
|
|
165
160
|
/**
|
|
166
161
|
* The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
167
162
|
*/
|
|
@@ -238,56 +233,12 @@ declare module 'stripe' {
|
|
|
238
233
|
*/
|
|
239
234
|
discount?: string;
|
|
240
235
|
|
|
241
|
-
/**
|
|
242
|
-
* Details to determine how long the discount should be applied for.
|
|
243
|
-
*/
|
|
244
|
-
discount_end?: Discount.DiscountEnd;
|
|
245
|
-
|
|
246
236
|
/**
|
|
247
237
|
* ID of the promotion code to create a new discount for.
|
|
248
238
|
*/
|
|
249
239
|
promotion_code?: string;
|
|
250
240
|
}
|
|
251
241
|
|
|
252
|
-
namespace Discount {
|
|
253
|
-
interface DiscountEnd {
|
|
254
|
-
/**
|
|
255
|
-
* Time span for the redeemed discount.
|
|
256
|
-
*/
|
|
257
|
-
duration?: DiscountEnd.Duration;
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
261
|
-
*/
|
|
262
|
-
timestamp?: number;
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* The type of calculation made to determine when the discount ends.
|
|
266
|
-
*/
|
|
267
|
-
type: DiscountEnd.Type;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
namespace DiscountEnd {
|
|
271
|
-
interface Duration {
|
|
272
|
-
/**
|
|
273
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
274
|
-
*/
|
|
275
|
-
interval: Duration.Interval;
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
279
|
-
*/
|
|
280
|
-
interval_count: number;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
namespace Duration {
|
|
284
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
type Type = 'duration' | 'timestamp';
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
242
|
interface PriceData {
|
|
292
243
|
/**
|
|
293
244
|
* 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).
|
|
@@ -402,56 +353,12 @@ declare module 'stripe' {
|
|
|
402
353
|
*/
|
|
403
354
|
discount?: string;
|
|
404
355
|
|
|
405
|
-
/**
|
|
406
|
-
* Details to determine how long the discount should be applied for.
|
|
407
|
-
*/
|
|
408
|
-
discount_end?: Discount.DiscountEnd;
|
|
409
|
-
|
|
410
356
|
/**
|
|
411
357
|
* ID of the promotion code to create a new discount for.
|
|
412
358
|
*/
|
|
413
359
|
promotion_code?: string;
|
|
414
360
|
}
|
|
415
361
|
|
|
416
|
-
namespace Discount {
|
|
417
|
-
interface DiscountEnd {
|
|
418
|
-
/**
|
|
419
|
-
* Time span for the redeemed discount.
|
|
420
|
-
*/
|
|
421
|
-
duration?: DiscountEnd.Duration;
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
425
|
-
*/
|
|
426
|
-
timestamp?: number;
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* The type of calculation made to determine when the discount ends.
|
|
430
|
-
*/
|
|
431
|
-
type: DiscountEnd.Type;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
namespace DiscountEnd {
|
|
435
|
-
interface Duration {
|
|
436
|
-
/**
|
|
437
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
438
|
-
*/
|
|
439
|
-
interval: Duration.Interval;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
443
|
-
*/
|
|
444
|
-
interval_count: number;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
namespace Duration {
|
|
448
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
type Type = 'duration' | 'timestamp';
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
362
|
interface InvoiceSettings {
|
|
456
363
|
/**
|
|
457
364
|
* The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
|
@@ -522,11 +429,6 @@ declare module 'stripe' {
|
|
|
522
429
|
* 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.
|
|
523
430
|
*/
|
|
524
431
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Define options to configure the trial on the subscription item.
|
|
528
|
-
*/
|
|
529
|
-
trial?: Item.Trial;
|
|
530
432
|
}
|
|
531
433
|
|
|
532
434
|
namespace Item {
|
|
@@ -548,56 +450,12 @@ declare module 'stripe' {
|
|
|
548
450
|
*/
|
|
549
451
|
discount?: string;
|
|
550
452
|
|
|
551
|
-
/**
|
|
552
|
-
* Details to determine how long the discount should be applied for.
|
|
553
|
-
*/
|
|
554
|
-
discount_end?: Discount.DiscountEnd;
|
|
555
|
-
|
|
556
453
|
/**
|
|
557
454
|
* ID of the promotion code to create a new discount for.
|
|
558
455
|
*/
|
|
559
456
|
promotion_code?: string;
|
|
560
457
|
}
|
|
561
458
|
|
|
562
|
-
namespace Discount {
|
|
563
|
-
interface DiscountEnd {
|
|
564
|
-
/**
|
|
565
|
-
* Time span for the redeemed discount.
|
|
566
|
-
*/
|
|
567
|
-
duration?: DiscountEnd.Duration;
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
571
|
-
*/
|
|
572
|
-
timestamp?: number;
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* The type of calculation made to determine when the discount ends.
|
|
576
|
-
*/
|
|
577
|
-
type: DiscountEnd.Type;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
namespace DiscountEnd {
|
|
581
|
-
interface Duration {
|
|
582
|
-
/**
|
|
583
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
584
|
-
*/
|
|
585
|
-
interval: Duration.Interval;
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
589
|
-
*/
|
|
590
|
-
interval_count: number;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
namespace Duration {
|
|
594
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
type Type = 'duration' | 'timestamp';
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
459
|
interface PriceData {
|
|
602
460
|
/**
|
|
603
461
|
* 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).
|
|
@@ -649,22 +507,6 @@ declare module 'stripe' {
|
|
|
649
507
|
|
|
650
508
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
651
509
|
}
|
|
652
|
-
|
|
653
|
-
interface Trial {
|
|
654
|
-
/**
|
|
655
|
-
* 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.
|
|
656
|
-
*/
|
|
657
|
-
converts_to?: Array<string>;
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* Determines the type of trial for this item.
|
|
661
|
-
*/
|
|
662
|
-
type: Trial.Type;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
namespace Trial {
|
|
666
|
-
type Type = 'free' | 'paid';
|
|
667
|
-
}
|
|
668
510
|
}
|
|
669
511
|
|
|
670
512
|
type PaymentBehavior =
|
|
@@ -904,11 +746,6 @@ declare module 'stripe' {
|
|
|
904
746
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
905
747
|
*/
|
|
906
748
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* ID of the institution to use to filter for selectable accounts.
|
|
910
|
-
*/
|
|
911
|
-
institution?: string;
|
|
912
749
|
}
|
|
913
750
|
|
|
914
751
|
namespace Filters {
|
|
@@ -921,11 +758,7 @@ declare module 'stripe' {
|
|
|
921
758
|
| 'payment_method'
|
|
922
759
|
| 'transactions';
|
|
923
760
|
|
|
924
|
-
type Prefetch =
|
|
925
|
-
| 'balances'
|
|
926
|
-
| 'inferred_balances'
|
|
927
|
-
| 'ownership'
|
|
928
|
-
| 'transactions';
|
|
761
|
+
type Prefetch = 'balances' | 'ownership' | 'transactions';
|
|
929
762
|
}
|
|
930
763
|
|
|
931
764
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -983,22 +816,6 @@ declare module 'stripe' {
|
|
|
983
816
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
984
817
|
}
|
|
985
818
|
|
|
986
|
-
interface Prebilling {
|
|
987
|
-
/**
|
|
988
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
989
|
-
*/
|
|
990
|
-
iterations: number;
|
|
991
|
-
|
|
992
|
-
/**
|
|
993
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
994
|
-
*/
|
|
995
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
namespace Prebilling {
|
|
999
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
819
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
1003
820
|
|
|
1004
821
|
interface TransferData {
|
|
@@ -1184,11 +1001,6 @@ declare module 'stripe' {
|
|
|
1184
1001
|
SubscriptionUpdateParams.PendingInvoiceItemInterval
|
|
1185
1002
|
>;
|
|
1186
1003
|
|
|
1187
|
-
/**
|
|
1188
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
1189
|
-
*/
|
|
1190
|
-
prebilling?: SubscriptionUpdateParams.Prebilling;
|
|
1191
|
-
|
|
1192
1004
|
/**
|
|
1193
1005
|
* The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
1194
1006
|
*/
|
|
@@ -1265,56 +1077,12 @@ declare module 'stripe' {
|
|
|
1265
1077
|
*/
|
|
1266
1078
|
discount?: string;
|
|
1267
1079
|
|
|
1268
|
-
/**
|
|
1269
|
-
* Details to determine how long the discount should be applied for.
|
|
1270
|
-
*/
|
|
1271
|
-
discount_end?: Discount.DiscountEnd;
|
|
1272
|
-
|
|
1273
1080
|
/**
|
|
1274
1081
|
* ID of the promotion code to create a new discount for.
|
|
1275
1082
|
*/
|
|
1276
1083
|
promotion_code?: string;
|
|
1277
1084
|
}
|
|
1278
1085
|
|
|
1279
|
-
namespace Discount {
|
|
1280
|
-
interface DiscountEnd {
|
|
1281
|
-
/**
|
|
1282
|
-
* Time span for the redeemed discount.
|
|
1283
|
-
*/
|
|
1284
|
-
duration?: DiscountEnd.Duration;
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1288
|
-
*/
|
|
1289
|
-
timestamp?: number;
|
|
1290
|
-
|
|
1291
|
-
/**
|
|
1292
|
-
* The type of calculation made to determine when the discount ends.
|
|
1293
|
-
*/
|
|
1294
|
-
type: DiscountEnd.Type;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
namespace DiscountEnd {
|
|
1298
|
-
interface Duration {
|
|
1299
|
-
/**
|
|
1300
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1301
|
-
*/
|
|
1302
|
-
interval: Duration.Interval;
|
|
1303
|
-
|
|
1304
|
-
/**
|
|
1305
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1306
|
-
*/
|
|
1307
|
-
interval_count: number;
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
namespace Duration {
|
|
1311
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
type Type = 'duration' | 'timestamp';
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
1086
|
interface PriceData {
|
|
1319
1087
|
/**
|
|
1320
1088
|
* 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).
|
|
@@ -1428,56 +1196,12 @@ declare module 'stripe' {
|
|
|
1428
1196
|
*/
|
|
1429
1197
|
discount?: string;
|
|
1430
1198
|
|
|
1431
|
-
/**
|
|
1432
|
-
* Details to determine how long the discount should be applied for.
|
|
1433
|
-
*/
|
|
1434
|
-
discount_end?: Discount.DiscountEnd;
|
|
1435
|
-
|
|
1436
1199
|
/**
|
|
1437
1200
|
* ID of the promotion code to create a new discount for.
|
|
1438
1201
|
*/
|
|
1439
1202
|
promotion_code?: string;
|
|
1440
1203
|
}
|
|
1441
1204
|
|
|
1442
|
-
namespace Discount {
|
|
1443
|
-
interface DiscountEnd {
|
|
1444
|
-
/**
|
|
1445
|
-
* Time span for the redeemed discount.
|
|
1446
|
-
*/
|
|
1447
|
-
duration?: DiscountEnd.Duration;
|
|
1448
|
-
|
|
1449
|
-
/**
|
|
1450
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1451
|
-
*/
|
|
1452
|
-
timestamp?: number;
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* The type of calculation made to determine when the discount ends.
|
|
1456
|
-
*/
|
|
1457
|
-
type: DiscountEnd.Type;
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
namespace DiscountEnd {
|
|
1461
|
-
interface Duration {
|
|
1462
|
-
/**
|
|
1463
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1464
|
-
*/
|
|
1465
|
-
interval: Duration.Interval;
|
|
1466
|
-
|
|
1467
|
-
/**
|
|
1468
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1469
|
-
*/
|
|
1470
|
-
interval_count: number;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
namespace Duration {
|
|
1474
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
type Type = 'duration' | 'timestamp';
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
1205
|
interface InvoiceSettings {
|
|
1482
1206
|
/**
|
|
1483
1207
|
* The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
|
@@ -1584,56 +1308,12 @@ declare module 'stripe' {
|
|
|
1584
1308
|
*/
|
|
1585
1309
|
discount?: string;
|
|
1586
1310
|
|
|
1587
|
-
/**
|
|
1588
|
-
* Details to determine how long the discount should be applied for.
|
|
1589
|
-
*/
|
|
1590
|
-
discount_end?: Discount.DiscountEnd;
|
|
1591
|
-
|
|
1592
1311
|
/**
|
|
1593
1312
|
* ID of the promotion code to create a new discount for.
|
|
1594
1313
|
*/
|
|
1595
1314
|
promotion_code?: string;
|
|
1596
1315
|
}
|
|
1597
1316
|
|
|
1598
|
-
namespace Discount {
|
|
1599
|
-
interface DiscountEnd {
|
|
1600
|
-
/**
|
|
1601
|
-
* Time span for the redeemed discount.
|
|
1602
|
-
*/
|
|
1603
|
-
duration?: DiscountEnd.Duration;
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1607
|
-
*/
|
|
1608
|
-
timestamp?: number;
|
|
1609
|
-
|
|
1610
|
-
/**
|
|
1611
|
-
* The type of calculation made to determine when the discount ends.
|
|
1612
|
-
*/
|
|
1613
|
-
type: DiscountEnd.Type;
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
namespace DiscountEnd {
|
|
1617
|
-
interface Duration {
|
|
1618
|
-
/**
|
|
1619
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1620
|
-
*/
|
|
1621
|
-
interval: Duration.Interval;
|
|
1622
|
-
|
|
1623
|
-
/**
|
|
1624
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1625
|
-
*/
|
|
1626
|
-
interval_count: number;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
namespace Duration {
|
|
1630
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
type Type = 'duration' | 'timestamp';
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
1317
|
interface PriceData {
|
|
1638
1318
|
/**
|
|
1639
1319
|
* 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).
|
|
@@ -1940,11 +1620,6 @@ declare module 'stripe' {
|
|
|
1940
1620
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
1941
1621
|
*/
|
|
1942
1622
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1943
|
-
|
|
1944
|
-
/**
|
|
1945
|
-
* ID of the institution to use to filter for selectable accounts.
|
|
1946
|
-
*/
|
|
1947
|
-
institution?: string;
|
|
1948
1623
|
}
|
|
1949
1624
|
|
|
1950
1625
|
namespace Filters {
|
|
@@ -1957,11 +1632,7 @@ declare module 'stripe' {
|
|
|
1957
1632
|
| 'payment_method'
|
|
1958
1633
|
| 'transactions';
|
|
1959
1634
|
|
|
1960
|
-
type Prefetch =
|
|
1961
|
-
| 'balances'
|
|
1962
|
-
| 'inferred_balances'
|
|
1963
|
-
| 'ownership'
|
|
1964
|
-
| 'transactions';
|
|
1635
|
+
type Prefetch = 'balances' | 'ownership' | 'transactions';
|
|
1965
1636
|
}
|
|
1966
1637
|
|
|
1967
1638
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -2019,22 +1690,6 @@ declare module 'stripe' {
|
|
|
2019
1690
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2020
1691
|
}
|
|
2021
1692
|
|
|
2022
|
-
interface Prebilling {
|
|
2023
|
-
/**
|
|
2024
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
2025
|
-
*/
|
|
2026
|
-
iterations: number;
|
|
2027
|
-
|
|
2028
|
-
/**
|
|
2029
|
-
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2030
|
-
*/
|
|
2031
|
-
update_behavior?: Prebilling.UpdateBehavior;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
namespace Prebilling {
|
|
2035
|
-
type UpdateBehavior = 'prebill' | 'reset';
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
1693
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2039
1694
|
|
|
2040
1695
|
interface TransferData {
|
|
@@ -2317,11 +1972,11 @@ declare module 'stripe' {
|
|
|
2317
1972
|
list(options?: RequestOptions): ApiListPromise<Stripe.Subscription>;
|
|
2318
1973
|
|
|
2319
1974
|
/**
|
|
2320
|
-
* Cancels a customer's subscription immediately. The customer
|
|
1975
|
+
* Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
|
|
2321
1976
|
*
|
|
2322
|
-
*
|
|
1977
|
+
* Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
|
|
2323
1978
|
*
|
|
2324
|
-
* By default, upon subscription cancellation, Stripe
|
|
1979
|
+
* By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
|
|
2325
1980
|
*/
|
|
2326
1981
|
cancel(
|
|
2327
1982
|
id: string,
|
package/types/Tax/Settings.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare module 'stripe' {
|
|
|
27
27
|
livemode: boolean;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* The
|
|
30
|
+
* The status of the Tax `Settings`.
|
|
31
31
|
*/
|
|
32
32
|
status: Settings.Status;
|
|
33
33
|
|