stripe 17.2.0 → 17.3.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 +926 -109
- package/README.md +4 -4
- package/VERSION +1 -1
- package/cjs/Webhooks.js +1 -1
- package/cjs/resources/AccountNotices.js +21 -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/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +17 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +4 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources/TestHelpers/Issuing/Cards.js +4 -0
- package/cjs/resources.js +42 -10
- package/cjs/stripe.core.js +1 -1
- package/esm/Webhooks.js +1 -1
- package/esm/resources/AccountNotices.js +18 -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/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +17 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +4 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources/TestHelpers/Issuing/Cards.js +4 -0
- package/esm/resources.js +29 -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 +75 -5
- package/types/AccountSessionsResource.d.ts +354 -5
- package/types/Accounts.d.ts +211 -3
- package/types/AccountsResource.d.ts +584 -2
- package/types/Billing/CreditBalanceSummary.d.ts +4 -4
- package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -2
- package/types/Billing/CreditBalanceTransactions.d.ts +10 -10
- package/types/Billing/CreditGrants.d.ts +11 -8
- package/types/Billing/CreditGrantsResource.d.ts +6 -6
- package/types/Billing/MeterErrorReports.d.ts +106 -0
- package/types/Billing/Meters.d.ts +2 -0
- package/types/BillingPortal/Configurations.d.ts +22 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +56 -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/Charges.d.ts +168 -0
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +309 -5
- package/types/Checkout/SessionsResource.d.ts +360 -5
- package/types/ConfirmationTokens.d.ts +157 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNoteLineItems.d.ts +3 -0
- package/types/CreditNotes.d.ts +24 -0
- package/types/CreditNotesResource.d.ts +54 -3
- package/types/CustomersResource.d.ts +27 -3
- package/types/Disputes.d.ts +152 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +564 -2
- package/types/Events.d.ts +91 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +29 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Institutions.d.ts +93 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +49 -1
- package/types/FinancialConnections/SessionsResource.d.ts +38 -1
- package/types/Forwarding/Requests.d.ts +5 -0
- package/types/Forwarding/RequestsResource.d.ts +5 -0
- package/types/GiftCards/Cards.d.ts +118 -0
- package/types/GiftCards/CardsResource.d.ts +159 -0
- package/types/GiftCards/Transactions.d.ts +129 -0
- package/types/GiftCards/TransactionsResource.d.ts +201 -0
- package/types/InvoiceItems.d.ts +5 -0
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +31 -1
- package/types/InvoicePayments.d.ts +138 -0
- package/types/Invoices.d.ts +139 -3
- package/types/InvoicesResource.d.ts +5488 -1799
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CardsResource.d.ts +1 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +73 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/Settlements.d.ts +103 -0
- package/types/Issuing/Transactions.d.ts +2 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +7 -0
- package/types/Mandates.d.ts +85 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1154 -0
- package/types/OrdersResource.d.ts +2911 -0
- package/types/PaymentIntents.d.ts +697 -1
- package/types/PaymentIntentsResource.d.ts +7977 -3377
- package/types/PaymentLinks.d.ts +7 -0
- package/types/PaymentLinksResource.d.ts +14 -0
- package/types/PaymentMethodConfigurations.d.ts +72 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +102 -2
- package/types/PaymentMethodDomains.d.ts +28 -0
- package/types/PaymentMethods.d.ts +157 -0
- package/types/PaymentMethodsResource.d.ts +195 -1
- package/types/Persons.d.ts +1 -1
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Products.d.ts +39 -0
- package/types/ProductsResource.d.ts +36 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1601 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +814 -0
- package/types/Quotes.d.ts +591 -1
- package/types/QuotesResource.d.ts +2526 -194
- package/types/Refunds.d.ts +4 -0
- package/types/SetupAttempts.d.ts +19 -0
- package/types/SetupIntents.d.ts +112 -1
- package/types/SetupIntentsResource.d.ts +768 -6
- package/types/Sources.d.ts +23 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +200 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +87 -1
- package/types/SubscriptionsResource.d.ts +359 -4
- package/types/Tax/Associations.d.ts +126 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/CalculationLineItems.d.ts +1 -0
- package/types/Tax/Calculations.d.ts +33 -1
- package/types/Tax/CalculationsResource.d.ts +7 -1
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/Tax/Registrations.d.ts +82 -0
- package/types/Tax/RegistrationsResource.d.ts +109 -0
- package/types/Tax/Transactions.d.ts +8 -1
- package/types/TaxIds.d.ts +7 -1
- package/types/TaxIdsResource.d.ts +7 -1
- package/types/TaxRates.d.ts +25 -0
- package/types/TaxRatesResource.d.ts +2 -0
- package/types/Terminal/Configurations.d.ts +19 -0
- package/types/Terminal/ConfigurationsResource.d.ts +44 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +278 -0
- package/types/Terminal/ReadersResource.d.ts +215 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +145 -1
- package/types/TestHelpers/Issuing/CardsResource.d.ts +22 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/TokensResource.d.ts +2 -2
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +6 -1
- 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/UsageRecordSummaries.d.ts +1 -1
- package/types/V2/Billing/MeterEventAdjustments.d.ts +1 -1
- package/types/V2/Billing/MeterEventSessions.d.ts +1 -1
- package/types/V2/Billing/MeterEvents.d.ts +1 -1
- package/types/WebhookEndpointsResource.d.ts +66 -0
- package/types/index.d.ts +53 -0
package/types/Subscriptions.d.ts
CHANGED
|
@@ -146,6 +146,11 @@ 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
|
+
|
|
149
154
|
/**
|
|
150
155
|
* The most recent invoice this subscription has generated.
|
|
151
156
|
*/
|
|
@@ -196,6 +201,11 @@ declare module 'stripe' {
|
|
|
196
201
|
*/
|
|
197
202
|
pending_update: Subscription.PendingUpdate | null;
|
|
198
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Time period and invoice for a Subscription billed in advance.
|
|
206
|
+
*/
|
|
207
|
+
prebilling?: Subscription.Prebilling | null;
|
|
208
|
+
|
|
199
209
|
/**
|
|
200
210
|
* The schedule attached to the subscription
|
|
201
211
|
*/
|
|
@@ -382,6 +392,37 @@ declare module 'stripe' {
|
|
|
382
392
|
}
|
|
383
393
|
}
|
|
384
394
|
|
|
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
|
+
|
|
385
426
|
interface PauseCollection {
|
|
386
427
|
/**
|
|
387
428
|
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
@@ -609,6 +650,11 @@ declare module 'stripe' {
|
|
|
609
650
|
* The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
|
610
651
|
*/
|
|
611
652
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* The institution to use to filter for possible accounts to link.
|
|
656
|
+
*/
|
|
657
|
+
institution?: string;
|
|
612
658
|
}
|
|
613
659
|
|
|
614
660
|
namespace Filters {
|
|
@@ -621,7 +667,11 @@ declare module 'stripe' {
|
|
|
621
667
|
| 'payment_method'
|
|
622
668
|
| 'transactions';
|
|
623
669
|
|
|
624
|
-
type Prefetch =
|
|
670
|
+
type Prefetch =
|
|
671
|
+
| 'balances'
|
|
672
|
+
| 'inferred_balances'
|
|
673
|
+
| 'ownership'
|
|
674
|
+
| 'transactions';
|
|
625
675
|
}
|
|
626
676
|
|
|
627
677
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -645,10 +695,15 @@ declare module 'stripe' {
|
|
|
645
695
|
| 'giropay'
|
|
646
696
|
| 'grabpay'
|
|
647
697
|
| 'ideal'
|
|
698
|
+
| 'jp_credit_transfer'
|
|
699
|
+
| 'kakao_pay'
|
|
648
700
|
| 'konbini'
|
|
701
|
+
| 'kr_card'
|
|
649
702
|
| 'link'
|
|
650
703
|
| 'multibanco'
|
|
704
|
+
| 'naver_pay'
|
|
651
705
|
| 'p24'
|
|
706
|
+
| 'payco'
|
|
652
707
|
| 'paynow'
|
|
653
708
|
| 'paypal'
|
|
654
709
|
| 'promptpay'
|
|
@@ -690,6 +745,11 @@ declare module 'stripe' {
|
|
|
690
745
|
*/
|
|
691
746
|
expires_at: number;
|
|
692
747
|
|
|
748
|
+
/**
|
|
749
|
+
* The number of iterations of prebilling to apply.
|
|
750
|
+
*/
|
|
751
|
+
prebilling_iterations?: number | null;
|
|
752
|
+
|
|
693
753
|
/**
|
|
694
754
|
* List of subscription items, each with an attached plan, that will be set if the update is applied.
|
|
695
755
|
*/
|
|
@@ -706,6 +766,32 @@ declare module 'stripe' {
|
|
|
706
766
|
trial_from_plan: boolean | null;
|
|
707
767
|
}
|
|
708
768
|
|
|
769
|
+
interface Prebilling {
|
|
770
|
+
/**
|
|
771
|
+
* ID of the prebilling invoice.
|
|
772
|
+
*/
|
|
773
|
+
invoice: string | Stripe.Invoice;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* The end of the last period for which the invoice pre-bills.
|
|
777
|
+
*/
|
|
778
|
+
period_end: number;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* The start of the first period for which the invoice pre-bills.
|
|
782
|
+
*/
|
|
783
|
+
period_start: number;
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
|
787
|
+
*/
|
|
788
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
namespace Prebilling {
|
|
792
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
793
|
+
}
|
|
794
|
+
|
|
709
795
|
type Status =
|
|
710
796
|
| 'active'
|
|
711
797
|
| 'canceled'
|
|
@@ -157,6 +157,11 @@ 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
|
+
|
|
160
165
|
/**
|
|
161
166
|
* 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.
|
|
162
167
|
*/
|
|
@@ -233,12 +238,56 @@ declare module 'stripe' {
|
|
|
233
238
|
*/
|
|
234
239
|
discount?: string;
|
|
235
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Details to determine how long the discount should be applied for.
|
|
243
|
+
*/
|
|
244
|
+
discount_end?: Discount.DiscountEnd;
|
|
245
|
+
|
|
236
246
|
/**
|
|
237
247
|
* ID of the promotion code to create a new discount for.
|
|
238
248
|
*/
|
|
239
249
|
promotion_code?: string;
|
|
240
250
|
}
|
|
241
251
|
|
|
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
|
+
|
|
242
291
|
interface PriceData {
|
|
243
292
|
/**
|
|
244
293
|
* 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).
|
|
@@ -353,12 +402,56 @@ declare module 'stripe' {
|
|
|
353
402
|
*/
|
|
354
403
|
discount?: string;
|
|
355
404
|
|
|
405
|
+
/**
|
|
406
|
+
* Details to determine how long the discount should be applied for.
|
|
407
|
+
*/
|
|
408
|
+
discount_end?: Discount.DiscountEnd;
|
|
409
|
+
|
|
356
410
|
/**
|
|
357
411
|
* ID of the promotion code to create a new discount for.
|
|
358
412
|
*/
|
|
359
413
|
promotion_code?: string;
|
|
360
414
|
}
|
|
361
415
|
|
|
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
|
+
|
|
362
455
|
interface InvoiceSettings {
|
|
363
456
|
/**
|
|
364
457
|
* The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
|
@@ -429,6 +522,11 @@ declare module 'stripe' {
|
|
|
429
522
|
* 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.
|
|
430
523
|
*/
|
|
431
524
|
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Define options to configure the trial on the subscription item.
|
|
528
|
+
*/
|
|
529
|
+
trial?: Item.Trial;
|
|
432
530
|
}
|
|
433
531
|
|
|
434
532
|
namespace Item {
|
|
@@ -450,12 +548,56 @@ declare module 'stripe' {
|
|
|
450
548
|
*/
|
|
451
549
|
discount?: string;
|
|
452
550
|
|
|
551
|
+
/**
|
|
552
|
+
* Details to determine how long the discount should be applied for.
|
|
553
|
+
*/
|
|
554
|
+
discount_end?: Discount.DiscountEnd;
|
|
555
|
+
|
|
453
556
|
/**
|
|
454
557
|
* ID of the promotion code to create a new discount for.
|
|
455
558
|
*/
|
|
456
559
|
promotion_code?: string;
|
|
457
560
|
}
|
|
458
561
|
|
|
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
|
+
|
|
459
601
|
interface PriceData {
|
|
460
602
|
/**
|
|
461
603
|
* 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).
|
|
@@ -507,6 +649,22 @@ declare module 'stripe' {
|
|
|
507
649
|
|
|
508
650
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
509
651
|
}
|
|
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
|
+
}
|
|
510
668
|
}
|
|
511
669
|
|
|
512
670
|
type PaymentBehavior =
|
|
@@ -746,6 +904,11 @@ declare module 'stripe' {
|
|
|
746
904
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
747
905
|
*/
|
|
748
906
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
910
|
+
*/
|
|
911
|
+
institution?: string;
|
|
749
912
|
}
|
|
750
913
|
|
|
751
914
|
namespace Filters {
|
|
@@ -758,7 +921,11 @@ declare module 'stripe' {
|
|
|
758
921
|
| 'payment_method'
|
|
759
922
|
| 'transactions';
|
|
760
923
|
|
|
761
|
-
type Prefetch =
|
|
924
|
+
type Prefetch =
|
|
925
|
+
| 'balances'
|
|
926
|
+
| 'inferred_balances'
|
|
927
|
+
| 'ownership'
|
|
928
|
+
| 'transactions';
|
|
762
929
|
}
|
|
763
930
|
|
|
764
931
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -782,10 +949,15 @@ declare module 'stripe' {
|
|
|
782
949
|
| 'giropay'
|
|
783
950
|
| 'grabpay'
|
|
784
951
|
| 'ideal'
|
|
952
|
+
| 'jp_credit_transfer'
|
|
953
|
+
| 'kakao_pay'
|
|
785
954
|
| 'konbini'
|
|
955
|
+
| 'kr_card'
|
|
786
956
|
| 'link'
|
|
787
957
|
| 'multibanco'
|
|
958
|
+
| 'naver_pay'
|
|
788
959
|
| 'p24'
|
|
960
|
+
| 'payco'
|
|
789
961
|
| 'paynow'
|
|
790
962
|
| 'paypal'
|
|
791
963
|
| 'promptpay'
|
|
@@ -816,6 +988,22 @@ declare module 'stripe' {
|
|
|
816
988
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
817
989
|
}
|
|
818
990
|
|
|
991
|
+
interface Prebilling {
|
|
992
|
+
/**
|
|
993
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
994
|
+
*/
|
|
995
|
+
iterations: number;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
999
|
+
*/
|
|
1000
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
namespace Prebilling {
|
|
1004
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
1005
|
+
}
|
|
1006
|
+
|
|
819
1007
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
820
1008
|
|
|
821
1009
|
interface TransferData {
|
|
@@ -1001,6 +1189,11 @@ declare module 'stripe' {
|
|
|
1001
1189
|
SubscriptionUpdateParams.PendingInvoiceItemInterval
|
|
1002
1190
|
>;
|
|
1003
1191
|
|
|
1192
|
+
/**
|
|
1193
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
1194
|
+
*/
|
|
1195
|
+
prebilling?: SubscriptionUpdateParams.Prebilling;
|
|
1196
|
+
|
|
1004
1197
|
/**
|
|
1005
1198
|
* 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.
|
|
1006
1199
|
*/
|
|
@@ -1077,12 +1270,56 @@ declare module 'stripe' {
|
|
|
1077
1270
|
*/
|
|
1078
1271
|
discount?: string;
|
|
1079
1272
|
|
|
1273
|
+
/**
|
|
1274
|
+
* Details to determine how long the discount should be applied for.
|
|
1275
|
+
*/
|
|
1276
|
+
discount_end?: Discount.DiscountEnd;
|
|
1277
|
+
|
|
1080
1278
|
/**
|
|
1081
1279
|
* ID of the promotion code to create a new discount for.
|
|
1082
1280
|
*/
|
|
1083
1281
|
promotion_code?: string;
|
|
1084
1282
|
}
|
|
1085
1283
|
|
|
1284
|
+
namespace Discount {
|
|
1285
|
+
interface DiscountEnd {
|
|
1286
|
+
/**
|
|
1287
|
+
* Time span for the redeemed discount.
|
|
1288
|
+
*/
|
|
1289
|
+
duration?: DiscountEnd.Duration;
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1293
|
+
*/
|
|
1294
|
+
timestamp?: number;
|
|
1295
|
+
|
|
1296
|
+
/**
|
|
1297
|
+
* The type of calculation made to determine when the discount ends.
|
|
1298
|
+
*/
|
|
1299
|
+
type: DiscountEnd.Type;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
namespace DiscountEnd {
|
|
1303
|
+
interface Duration {
|
|
1304
|
+
/**
|
|
1305
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1306
|
+
*/
|
|
1307
|
+
interval: Duration.Interval;
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1311
|
+
*/
|
|
1312
|
+
interval_count: number;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
namespace Duration {
|
|
1316
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
type Type = 'duration' | 'timestamp';
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1086
1323
|
interface PriceData {
|
|
1087
1324
|
/**
|
|
1088
1325
|
* 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).
|
|
@@ -1196,12 +1433,56 @@ declare module 'stripe' {
|
|
|
1196
1433
|
*/
|
|
1197
1434
|
discount?: string;
|
|
1198
1435
|
|
|
1436
|
+
/**
|
|
1437
|
+
* Details to determine how long the discount should be applied for.
|
|
1438
|
+
*/
|
|
1439
|
+
discount_end?: Discount.DiscountEnd;
|
|
1440
|
+
|
|
1199
1441
|
/**
|
|
1200
1442
|
* ID of the promotion code to create a new discount for.
|
|
1201
1443
|
*/
|
|
1202
1444
|
promotion_code?: string;
|
|
1203
1445
|
}
|
|
1204
1446
|
|
|
1447
|
+
namespace Discount {
|
|
1448
|
+
interface DiscountEnd {
|
|
1449
|
+
/**
|
|
1450
|
+
* Time span for the redeemed discount.
|
|
1451
|
+
*/
|
|
1452
|
+
duration?: DiscountEnd.Duration;
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1456
|
+
*/
|
|
1457
|
+
timestamp?: number;
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* The type of calculation made to determine when the discount ends.
|
|
1461
|
+
*/
|
|
1462
|
+
type: DiscountEnd.Type;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
namespace DiscountEnd {
|
|
1466
|
+
interface Duration {
|
|
1467
|
+
/**
|
|
1468
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1469
|
+
*/
|
|
1470
|
+
interval: Duration.Interval;
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1474
|
+
*/
|
|
1475
|
+
interval_count: number;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
namespace Duration {
|
|
1479
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
type Type = 'duration' | 'timestamp';
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1205
1486
|
interface InvoiceSettings {
|
|
1206
1487
|
/**
|
|
1207
1488
|
* The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
|
@@ -1308,12 +1589,56 @@ declare module 'stripe' {
|
|
|
1308
1589
|
*/
|
|
1309
1590
|
discount?: string;
|
|
1310
1591
|
|
|
1592
|
+
/**
|
|
1593
|
+
* Details to determine how long the discount should be applied for.
|
|
1594
|
+
*/
|
|
1595
|
+
discount_end?: Discount.DiscountEnd;
|
|
1596
|
+
|
|
1311
1597
|
/**
|
|
1312
1598
|
* ID of the promotion code to create a new discount for.
|
|
1313
1599
|
*/
|
|
1314
1600
|
promotion_code?: string;
|
|
1315
1601
|
}
|
|
1316
1602
|
|
|
1603
|
+
namespace Discount {
|
|
1604
|
+
interface DiscountEnd {
|
|
1605
|
+
/**
|
|
1606
|
+
* Time span for the redeemed discount.
|
|
1607
|
+
*/
|
|
1608
|
+
duration?: DiscountEnd.Duration;
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1612
|
+
*/
|
|
1613
|
+
timestamp?: number;
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* The type of calculation made to determine when the discount ends.
|
|
1617
|
+
*/
|
|
1618
|
+
type: DiscountEnd.Type;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
namespace DiscountEnd {
|
|
1622
|
+
interface Duration {
|
|
1623
|
+
/**
|
|
1624
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1625
|
+
*/
|
|
1626
|
+
interval: Duration.Interval;
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1630
|
+
*/
|
|
1631
|
+
interval_count: number;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
namespace Duration {
|
|
1635
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
type Type = 'duration' | 'timestamp';
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1317
1642
|
interface PriceData {
|
|
1318
1643
|
/**
|
|
1319
1644
|
* 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).
|
|
@@ -1620,6 +1945,11 @@ declare module 'stripe' {
|
|
|
1620
1945
|
* The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
1621
1946
|
*/
|
|
1622
1947
|
account_subcategories?: Array<Filters.AccountSubcategory>;
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* ID of the institution to use to filter for selectable accounts.
|
|
1951
|
+
*/
|
|
1952
|
+
institution?: string;
|
|
1623
1953
|
}
|
|
1624
1954
|
|
|
1625
1955
|
namespace Filters {
|
|
@@ -1632,7 +1962,11 @@ declare module 'stripe' {
|
|
|
1632
1962
|
| 'payment_method'
|
|
1633
1963
|
| 'transactions';
|
|
1634
1964
|
|
|
1635
|
-
type Prefetch =
|
|
1965
|
+
type Prefetch =
|
|
1966
|
+
| 'balances'
|
|
1967
|
+
| 'inferred_balances'
|
|
1968
|
+
| 'ownership'
|
|
1969
|
+
| 'transactions';
|
|
1636
1970
|
}
|
|
1637
1971
|
|
|
1638
1972
|
type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
|
|
@@ -1656,10 +1990,15 @@ declare module 'stripe' {
|
|
|
1656
1990
|
| 'giropay'
|
|
1657
1991
|
| 'grabpay'
|
|
1658
1992
|
| 'ideal'
|
|
1993
|
+
| 'jp_credit_transfer'
|
|
1994
|
+
| 'kakao_pay'
|
|
1659
1995
|
| 'konbini'
|
|
1996
|
+
| 'kr_card'
|
|
1660
1997
|
| 'link'
|
|
1661
1998
|
| 'multibanco'
|
|
1999
|
+
| 'naver_pay'
|
|
1662
2000
|
| 'p24'
|
|
2001
|
+
| 'payco'
|
|
1663
2002
|
| 'paynow'
|
|
1664
2003
|
| 'paypal'
|
|
1665
2004
|
| 'promptpay'
|
|
@@ -1690,6 +2029,22 @@ declare module 'stripe' {
|
|
|
1690
2029
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1691
2030
|
}
|
|
1692
2031
|
|
|
2032
|
+
interface Prebilling {
|
|
2033
|
+
/**
|
|
2034
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
2035
|
+
*/
|
|
2036
|
+
iterations: number;
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
2040
|
+
*/
|
|
2041
|
+
update_behavior?: Prebilling.UpdateBehavior;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
namespace Prebilling {
|
|
2045
|
+
type UpdateBehavior = 'prebill' | 'reset';
|
|
2046
|
+
}
|
|
2047
|
+
|
|
1693
2048
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
1694
2049
|
|
|
1695
2050
|
interface TransferData {
|
|
@@ -1817,7 +2172,7 @@ declare module 'stripe' {
|
|
|
1817
2172
|
expand?: Array<string>;
|
|
1818
2173
|
|
|
1819
2174
|
/**
|
|
1820
|
-
* Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `
|
|
2175
|
+
* Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
|
|
1821
2176
|
*/
|
|
1822
2177
|
invoice_now?: boolean;
|
|
1823
2178
|
|
|
@@ -1857,7 +2212,7 @@ declare module 'stripe' {
|
|
|
1857
2212
|
|
|
1858
2213
|
interface SubscriptionResumeParams {
|
|
1859
2214
|
/**
|
|
1860
|
-
*
|
|
2215
|
+
* The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
|
1861
2216
|
*/
|
|
1862
2217
|
billing_cycle_anchor?: SubscriptionResumeParams.BillingCycleAnchor;
|
|
1863
2218
|
|