stripe 18.2.0-beta.1 → 18.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 +229 -31
- package/OPENAPI_VERSION +1 -1
- package/README.md +11 -11
- package/VERSION +1 -1
- package/cjs/RequestSender.js +2 -2
- package/cjs/StripeResource.js +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/Subscriptions.js +4 -0
- package/cjs/resources/V2/Payments/OffSessionPayments.js +25 -0
- package/cjs/resources.js +15 -17
- package/cjs/stripe.core.js +1 -1
- package/cjs/utils.js +5 -0
- package/esm/RequestSender.js +2 -2
- package/esm/StripeResource.js +1 -1
- package/esm/apiVersion.js +1 -1
- package/esm/resources/Subscriptions.js +4 -0
- package/esm/resources/V2/Payments/OffSessionPayments.js +22 -0
- package/esm/resources.js +4 -6
- package/esm/stripe.core.js +1 -1
- package/esm/utils.js +5 -0
- package/package.json +1 -1
- package/types/AccountSessions.d.ts +65 -0
- package/types/AccountSessionsResource.d.ts +41 -0
- package/types/Accounts.d.ts +22 -15
- package/types/AccountsResource.d.ts +81 -57
- package/types/Balance.d.ts +83 -1
- package/types/BalanceResource.d.ts +1 -1
- package/types/BalanceSettings.d.ts +1 -1
- package/types/BalanceSettingsResource.d.ts +5 -5
- package/types/BalanceTransactions.d.ts +10 -0
- package/types/BankAccounts.d.ts +3 -3
- package/types/Billing/Alerts.d.ts +1 -1
- package/types/Billing/AlertsResource.d.ts +2 -2
- package/types/BillingPortal/Sessions.d.ts +1 -1
- package/types/Capabilities.d.ts +1 -1
- package/types/Cards.d.ts +2 -2
- package/types/Charges.d.ts +20 -0
- package/types/ChargesResource.d.ts +96 -4
- package/types/Checkout/Sessions.d.ts +123 -108
- package/types/Checkout/SessionsResource.d.ts +125 -116
- package/types/ConfirmationTokens.d.ts +4 -4
- package/types/CountrySpecs.d.ts +1 -1
- package/types/CreditNotes.d.ts +11 -5
- package/types/CreditNotesResource.d.ts +7 -8
- package/types/CustomerSessions.d.ts +3 -3
- package/types/CustomersResource.d.ts +7 -7
- package/types/Disputes.d.ts +1 -1
- package/types/DisputesResource.d.ts +1 -1
- package/types/EventTypes.d.ts +17 -17
- package/types/Events.d.ts +4 -1
- package/types/ExternalAccountsResource.d.ts +1 -1
- package/types/Files.d.ts +1 -1
- package/types/FilesResource.d.ts +1 -1
- package/types/FinancialConnections/Accounts.d.ts +5 -0
- package/types/FinancialConnections/Institutions.d.ts +5 -0
- package/types/Identity/VerificationReports.d.ts +17 -0
- package/types/Identity/VerificationSessions.d.ts +19 -2
- package/types/Identity/VerificationSessionsResource.d.ts +5 -5
- package/types/InvoiceItems.d.ts +1 -1
- package/types/InvoiceLineItems.d.ts +1 -1
- package/types/InvoicePayments.d.ts +9 -2
- package/types/Invoices.d.ts +7 -9
- package/types/InvoicesResource.d.ts +60 -18
- package/types/Issuing/AuthorizationsResource.d.ts +4 -4
- package/types/Issuing/CardsResource.d.ts +3 -0
- package/types/Issuing/DisputesResource.d.ts +2 -2
- package/types/LineItems.d.ts +2 -2
- package/types/Orders.d.ts +43 -83
- package/types/OrdersResource.d.ts +85 -119
- package/types/PaymentAttemptRecords.d.ts +21 -1
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +6 -0
- package/types/PaymentIntents.d.ts +224 -173
- package/types/PaymentIntentsResource.d.ts +819 -584
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +254 -4
- package/types/PaymentMethodDomainsResource.d.ts +1 -1
- package/types/PaymentMethods.d.ts +4 -4
- package/types/PaymentMethodsResource.d.ts +8 -8
- package/types/PaymentRecords.d.ts +21 -1
- package/types/PaymentRecordsResource.d.ts +5 -5
- package/types/Payouts.d.ts +2 -2
- package/types/PayoutsResource.d.ts +2 -2
- package/types/Persons.d.ts +10 -10
- package/types/PlansResource.d.ts +1 -1
- package/types/PricesResource.d.ts +2 -2
- package/types/Privacy/RedactionJobValidationErrors.d.ts +35 -5
- package/types/Privacy/RedactionJobs.d.ts +53 -7
- package/types/Privacy/RedactionJobsResource.d.ts +25 -13
- package/types/Products.d.ts +0 -39
- package/types/ProductsResource.d.ts +1 -37
- package/types/PromotionCodesResource.d.ts +1 -1
- package/types/QuotePreviewInvoices.d.ts +7 -9
- package/types/QuotePreviewSubscriptionSchedules.d.ts +48 -2
- package/types/Quotes.d.ts +7 -7
- package/types/QuotesResource.d.ts +1 -1
- package/types/Radar/EarlyFraudWarningsResource.d.ts +1 -1
- package/types/Refunds.d.ts +6 -1
- package/types/Reviews.d.ts +1 -1
- package/types/SetupAttempts.d.ts +1 -3
- package/types/SetupIntents.d.ts +2 -4
- package/types/SetupIntentsResource.d.ts +3 -3
- package/types/SourcesResource.d.ts +1 -1
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +28 -0
- package/types/SubscriptionSchedules.d.ts +48 -2
- package/types/SubscriptionSchedulesResource.d.ts +100 -4
- package/types/Subscriptions.d.ts +32 -3
- package/types/SubscriptionsResource.d.ts +104 -17
- package/types/Tax/Associations.d.ts +19 -63
- package/types/Tax/CalculationLineItems.d.ts +5 -0
- package/types/Tax/CalculationsResource.d.ts +5 -0
- package/types/Tax/RegistrationsResource.d.ts +1 -1
- package/types/TaxRates.d.ts +2 -2
- package/types/Terminal/LocationsResource.d.ts +1 -1
- package/types/Terminal/Readers.d.ts +21 -1
- package/types/Terminal/ReadersResource.d.ts +20 -0
- package/types/Tokens.d.ts +3 -3
- package/types/TokensResource.d.ts +8 -8
- package/types/TransferReversals.d.ts +1 -1
- package/types/TransfersResource.d.ts +2 -2
- package/types/Treasury/ReceivedCredits.d.ts +2 -2
- package/types/V2/Core/Accounts.d.ts +5 -5
- package/types/V2/EventTypes.d.ts +102 -11
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +1 -1
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +1 -43
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +1 -49
- package/types/V2/Payments/OffSessionPayments.d.ts +167 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +159 -0
- package/types/WebhookEndpointsResource.d.ts +4 -3
- package/types/index.d.ts +5 -9
- package/types/lib.d.ts +1 -1
- package/types/test/typescriptTest.ts +3 -3
- package/cjs/resources/GiftCards/Cards.js +0 -23
- package/cjs/resources/GiftCards/Transactions.js +0 -33
- package/esm/resources/GiftCards/Cards.js +0 -20
- package/esm/resources/GiftCards/Transactions.js +0 -30
- package/types/Billing/MeterErrorReports.d.ts +0 -106
- 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
|
@@ -187,7 +187,7 @@ declare module 'stripe' {
|
|
|
187
187
|
): Promise<Stripe.Response<Stripe.PromotionCode>>;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
|
|
190
|
+
* Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://docs.stripe.com/docs/api/promotion_codes/list) with the desired code.
|
|
191
191
|
*/
|
|
192
192
|
retrieve(
|
|
193
193
|
id: string,
|
|
@@ -27,7 +27,7 @@ declare module 'stripe' {
|
|
|
27
27
|
* Stripe applies any customer credit on the account before determining the
|
|
28
28
|
* amount due for the invoice (i.e., the amount that will be actually
|
|
29
29
|
* charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
|
|
30
|
-
* per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
|
|
30
|
+
* per currency](https://docs.stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
|
|
31
31
|
* invoice is automatically marked paid, and we add the amount due to the
|
|
32
32
|
* customer's credit balance which is applied to the next invoice.
|
|
33
33
|
*
|
|
@@ -38,7 +38,7 @@ declare module 'stripe' {
|
|
|
38
38
|
*/
|
|
39
39
|
interface QuotePreviewInvoice {
|
|
40
40
|
/**
|
|
41
|
-
* Unique identifier for the object.
|
|
41
|
+
* Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.
|
|
42
42
|
*/
|
|
43
43
|
id: string;
|
|
44
44
|
|
|
@@ -310,12 +310,12 @@ declare module 'stripe' {
|
|
|
310
310
|
payments?: ApiList<Stripe.InvoicePayment>;
|
|
311
311
|
|
|
312
312
|
/**
|
|
313
|
-
* End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
|
|
313
|
+
* End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
|
|
314
314
|
*/
|
|
315
315
|
period_end: number;
|
|
316
316
|
|
|
317
317
|
/**
|
|
318
|
-
* Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
|
|
318
|
+
* Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
|
|
319
319
|
*/
|
|
320
320
|
period_start: number;
|
|
321
321
|
|
|
@@ -934,9 +934,7 @@ declare module 'stripe' {
|
|
|
934
934
|
| 'forwarding_api_retryable_upstream_error'
|
|
935
935
|
| 'forwarding_api_upstream_connection_error'
|
|
936
936
|
| 'forwarding_api_upstream_connection_timeout'
|
|
937
|
-
| '
|
|
938
|
-
| 'gift_card_code_exists'
|
|
939
|
-
| 'gift_card_inactive'
|
|
937
|
+
| 'forwarding_api_upstream_error'
|
|
940
938
|
| 'idempotency_key_in_use'
|
|
941
939
|
| 'incorrect_address'
|
|
942
940
|
| 'incorrect_cvc'
|
|
@@ -1466,9 +1464,9 @@ declare module 'stripe' {
|
|
|
1466
1464
|
amount: number;
|
|
1467
1465
|
|
|
1468
1466
|
/**
|
|
1469
|
-
* Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
1467
|
+
* Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
1470
1468
|
*
|
|
1471
|
-
* Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
|
1469
|
+
* Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
|
1472
1470
|
*/
|
|
1473
1471
|
rate: Stripe.TaxRate;
|
|
1474
1472
|
|
|
@@ -33,7 +33,7 @@ declare module 'stripe' {
|
|
|
33
33
|
billing_behavior?: QuotePreviewSubscriptionSchedule.BillingBehavior;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* The [billing mode](https://stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule.
|
|
36
|
+
* The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule.
|
|
37
37
|
*/
|
|
38
38
|
billing_mode?: QuotePreviewSubscriptionSchedule.BillingMode;
|
|
39
39
|
|
|
@@ -176,6 +176,11 @@ declare module 'stripe' {
|
|
|
176
176
|
*/
|
|
177
177
|
billing_cycle_anchor: DefaultSettings.BillingCycleAnchor;
|
|
178
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
181
|
+
*/
|
|
182
|
+
billing_thresholds: DefaultSettings.BillingThresholds | null;
|
|
183
|
+
|
|
179
184
|
/**
|
|
180
185
|
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
|
181
186
|
*/
|
|
@@ -242,6 +247,18 @@ declare module 'stripe' {
|
|
|
242
247
|
|
|
243
248
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
244
249
|
|
|
250
|
+
interface BillingThresholds {
|
|
251
|
+
/**
|
|
252
|
+
* Monetary threshold that triggers the subscription to create an invoice
|
|
253
|
+
*/
|
|
254
|
+
amount_gte: number | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
|
258
|
+
*/
|
|
259
|
+
reset_billing_cycle_anchor: boolean | null;
|
|
260
|
+
}
|
|
261
|
+
|
|
245
262
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
246
263
|
|
|
247
264
|
interface InvoiceSettings {
|
|
@@ -342,6 +359,11 @@ declare module 'stripe' {
|
|
|
342
359
|
*/
|
|
343
360
|
billing_cycle_anchor: Phase.BillingCycleAnchor | null;
|
|
344
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
364
|
+
*/
|
|
365
|
+
billing_thresholds: Phase.BillingThresholds | null;
|
|
366
|
+
|
|
345
367
|
/**
|
|
346
368
|
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
|
347
369
|
*/
|
|
@@ -403,7 +425,7 @@ declare module 'stripe' {
|
|
|
403
425
|
pause_collection?: Phase.PauseCollection | null;
|
|
404
426
|
|
|
405
427
|
/**
|
|
406
|
-
*
|
|
428
|
+
* When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
|
407
429
|
*/
|
|
408
430
|
proration_behavior: Phase.ProrationBehavior;
|
|
409
431
|
|
|
@@ -531,6 +553,18 @@ declare module 'stripe' {
|
|
|
531
553
|
|
|
532
554
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
533
555
|
|
|
556
|
+
interface BillingThresholds {
|
|
557
|
+
/**
|
|
558
|
+
* Monetary threshold that triggers the subscription to create an invoice
|
|
559
|
+
*/
|
|
560
|
+
amount_gte: number | null;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
|
564
|
+
*/
|
|
565
|
+
reset_billing_cycle_anchor: boolean | null;
|
|
566
|
+
}
|
|
567
|
+
|
|
534
568
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
535
569
|
|
|
536
570
|
interface Discount {
|
|
@@ -607,6 +641,11 @@ declare module 'stripe' {
|
|
|
607
641
|
}
|
|
608
642
|
|
|
609
643
|
interface Item {
|
|
644
|
+
/**
|
|
645
|
+
* Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
|
646
|
+
*/
|
|
647
|
+
billing_thresholds: Item.BillingThresholds | null;
|
|
648
|
+
|
|
610
649
|
/**
|
|
611
650
|
* The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
|
612
651
|
*/
|
|
@@ -644,6 +683,13 @@ declare module 'stripe' {
|
|
|
644
683
|
}
|
|
645
684
|
|
|
646
685
|
namespace Item {
|
|
686
|
+
interface BillingThresholds {
|
|
687
|
+
/**
|
|
688
|
+
* Usage threshold that triggers the subscription to create an invoice
|
|
689
|
+
*/
|
|
690
|
+
usage_gte: number | null;
|
|
691
|
+
}
|
|
692
|
+
|
|
647
693
|
interface Discount {
|
|
648
694
|
/**
|
|
649
695
|
* ID of the coupon to create a new discount for.
|
package/types/Quotes.d.ts
CHANGED
|
@@ -385,9 +385,9 @@ declare module 'stripe' {
|
|
|
385
385
|
amount: number;
|
|
386
386
|
|
|
387
387
|
/**
|
|
388
|
-
* Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
388
|
+
* Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
389
389
|
*
|
|
390
|
-
* Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
|
390
|
+
* Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
|
391
391
|
*/
|
|
392
392
|
rate: Stripe.TaxRate;
|
|
393
393
|
|
|
@@ -499,9 +499,9 @@ declare module 'stripe' {
|
|
|
499
499
|
amount: number;
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
|
-
* Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
502
|
+
* Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
503
503
|
*
|
|
504
|
-
* Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
|
504
|
+
* Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
|
505
505
|
*/
|
|
506
506
|
rate: Stripe.TaxRate;
|
|
507
507
|
|
|
@@ -760,7 +760,7 @@ declare module 'stripe' {
|
|
|
760
760
|
billing_cycle_anchor?: 'reset' | null;
|
|
761
761
|
|
|
762
762
|
/**
|
|
763
|
-
* The [billing mode](https://stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted.
|
|
763
|
+
* The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted.
|
|
764
764
|
*/
|
|
765
765
|
billing_mode?: SubscriptionData.BillingMode;
|
|
766
766
|
|
|
@@ -1197,9 +1197,9 @@ declare module 'stripe' {
|
|
|
1197
1197
|
amount: number;
|
|
1198
1198
|
|
|
1199
1199
|
/**
|
|
1200
|
-
* Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
1200
|
+
* Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
|
1201
1201
|
*
|
|
1202
|
-
* Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
|
1202
|
+
* Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
|
1203
1203
|
*/
|
|
1204
1204
|
rate: Stripe.TaxRate;
|
|
1205
1205
|
|
|
@@ -1042,7 +1042,7 @@ declare module 'stripe' {
|
|
|
1042
1042
|
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
1043
1043
|
|
|
1044
1044
|
/**
|
|
1045
|
-
*
|
|
1045
|
+
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
1046
1046
|
*/
|
|
1047
1047
|
billing_mode?: SubscriptionData.BillingMode;
|
|
1048
1048
|
|
|
@@ -36,7 +36,7 @@ declare module 'stripe' {
|
|
|
36
36
|
/**
|
|
37
37
|
* Retrieves the details of an early fraud warning that has previously been created.
|
|
38
38
|
*
|
|
39
|
-
* Please refer to the [early fraud warning](https://stripe.com/
|
|
39
|
+
* Please refer to the [early fraud warning](https://docs.stripe.com/api#early_fraud_warning_object) object reference for more details.
|
|
40
40
|
*/
|
|
41
41
|
retrieve(
|
|
42
42
|
id: string,
|
package/types/Refunds.d.ts
CHANGED
|
@@ -354,7 +354,12 @@ declare module 'stripe' {
|
|
|
354
354
|
|
|
355
355
|
interface Paynow {}
|
|
356
356
|
|
|
357
|
-
interface Paypal {
|
|
357
|
+
interface Paypal {
|
|
358
|
+
/**
|
|
359
|
+
* For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
|
|
360
|
+
*/
|
|
361
|
+
network_decline_code: string | null;
|
|
362
|
+
}
|
|
358
363
|
|
|
359
364
|
interface Pix {}
|
|
360
365
|
|
package/types/Reviews.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare module 'stripe' {
|
|
|
5
5
|
/**
|
|
6
6
|
* Reviews can be used to supplement automated fraud detection with human expertise.
|
|
7
7
|
*
|
|
8
|
-
* Learn more about [Radar](https://stripe.com/radar) and reviewing payments
|
|
8
|
+
* Learn more about [Radar](https://docs.stripe.com/radar) and reviewing payments
|
|
9
9
|
* [here](https://stripe.com/docs/radar/reviews).
|
|
10
10
|
*/
|
|
11
11
|
interface Review {
|
package/types/SetupAttempts.d.ts
CHANGED
|
@@ -755,9 +755,7 @@ declare module 'stripe' {
|
|
|
755
755
|
| 'forwarding_api_retryable_upstream_error'
|
|
756
756
|
| 'forwarding_api_upstream_connection_error'
|
|
757
757
|
| 'forwarding_api_upstream_connection_timeout'
|
|
758
|
-
| '
|
|
759
|
-
| 'gift_card_code_exists'
|
|
760
|
-
| 'gift_card_inactive'
|
|
758
|
+
| 'forwarding_api_upstream_error'
|
|
761
759
|
| 'idempotency_key_in_use'
|
|
762
760
|
| 'incorrect_address'
|
|
763
761
|
| 'incorrect_cvc'
|
package/types/SetupIntents.d.ts
CHANGED
|
@@ -365,9 +365,7 @@ declare module 'stripe' {
|
|
|
365
365
|
| 'forwarding_api_retryable_upstream_error'
|
|
366
366
|
| 'forwarding_api_upstream_connection_error'
|
|
367
367
|
| 'forwarding_api_upstream_connection_timeout'
|
|
368
|
-
| '
|
|
369
|
-
| 'gift_card_code_exists'
|
|
370
|
-
| 'gift_card_inactive'
|
|
368
|
+
| 'forwarding_api_upstream_error'
|
|
371
369
|
| 'idempotency_key_in_use'
|
|
372
370
|
| 'incorrect_address'
|
|
373
371
|
| 'incorrect_cvc'
|
|
@@ -507,7 +505,7 @@ declare module 'stripe' {
|
|
|
507
505
|
redirect_to_url?: NextAction.RedirectToUrl;
|
|
508
506
|
|
|
509
507
|
/**
|
|
510
|
-
* Type of the next action to perform
|
|
508
|
+
* Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
|
|
511
509
|
*/
|
|
512
510
|
type: string;
|
|
513
511
|
|
|
@@ -4666,7 +4666,7 @@ declare module 'stripe' {
|
|
|
4666
4666
|
/**
|
|
4667
4667
|
* Creates a SetupIntent object.
|
|
4668
4668
|
*
|
|
4669
|
-
* After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm)
|
|
4669
|
+
* After you create the SetupIntent, attach a payment method and [confirm](https://docs.stripe.com/docs/api/setup_intents/confirm)
|
|
4670
4670
|
* it to collect any required permissions to charge the payment method later.
|
|
4671
4671
|
*/
|
|
4672
4672
|
create(
|
|
@@ -4682,7 +4682,7 @@ declare module 'stripe' {
|
|
|
4682
4682
|
*
|
|
4683
4683
|
* Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.
|
|
4684
4684
|
*
|
|
4685
|
-
* When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://stripe.com/
|
|
4685
|
+
* When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://docs.stripe.com/api#setup_intent_object) object reference for more details.
|
|
4686
4686
|
*/
|
|
4687
4687
|
retrieve(
|
|
4688
4688
|
id: string,
|
|
@@ -4715,7 +4715,7 @@ declare module 'stripe' {
|
|
|
4715
4715
|
/**
|
|
4716
4716
|
* You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
|
|
4717
4717
|
*
|
|
4718
|
-
* After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
|
|
4718
|
+
* After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://docs.stripe.com/docs/api/checkout/sessions/expire) instead.
|
|
4719
4719
|
*/
|
|
4720
4720
|
cancel(
|
|
4721
4721
|
id: string,
|
|
@@ -577,7 +577,7 @@ declare module 'stripe' {
|
|
|
577
577
|
/**
|
|
578
578
|
* Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
579
579
|
*
|
|
580
|
-
* This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail.
|
|
580
|
+
* This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://docs.stripe.com/docs/sources) for more detail.
|
|
581
581
|
*/
|
|
582
582
|
update(
|
|
583
583
|
id: string,
|
|
@@ -37,6 +37,11 @@ declare module 'stripe' {
|
|
|
37
37
|
*/
|
|
38
38
|
object: 'subscription_item';
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
|
42
|
+
*/
|
|
43
|
+
billing_thresholds: SubscriptionItem.BillingThresholds | null;
|
|
44
|
+
|
|
40
45
|
/**
|
|
41
46
|
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
42
47
|
*/
|
|
@@ -111,6 +116,13 @@ declare module 'stripe' {
|
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
namespace SubscriptionItem {
|
|
119
|
+
interface BillingThresholds {
|
|
120
|
+
/**
|
|
121
|
+
* Usage threshold that triggers the subscription to create an invoice
|
|
122
|
+
*/
|
|
123
|
+
usage_gte: number | null;
|
|
124
|
+
}
|
|
125
|
+
|
|
114
126
|
interface Trial {
|
|
115
127
|
/**
|
|
116
128
|
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
|
@@ -127,5 +139,14 @@ declare module 'stripe' {
|
|
|
127
139
|
type Type = 'free' | 'paid';
|
|
128
140
|
}
|
|
129
141
|
}
|
|
142
|
+
|
|
143
|
+
namespace SubscriptionItem {
|
|
144
|
+
interface BillingThresholds {
|
|
145
|
+
/**
|
|
146
|
+
* Usage threshold that triggers the subscription to create an invoice
|
|
147
|
+
*/
|
|
148
|
+
usage_gte: number | null;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
130
151
|
}
|
|
131
152
|
}
|
|
@@ -8,6 +8,13 @@ declare module 'stripe' {
|
|
|
8
8
|
*/
|
|
9
9
|
subscription: string;
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
|
13
|
+
*/
|
|
14
|
+
billing_thresholds?: Stripe.Emptyable<
|
|
15
|
+
SubscriptionItemCreateParams.BillingThresholds
|
|
16
|
+
>;
|
|
17
|
+
|
|
11
18
|
/**
|
|
12
19
|
* The coupons to redeem into discounts for the subscription item.
|
|
13
20
|
*/
|
|
@@ -78,6 +85,13 @@ declare module 'stripe' {
|
|
|
78
85
|
}
|
|
79
86
|
|
|
80
87
|
namespace SubscriptionItemCreateParams {
|
|
88
|
+
interface BillingThresholds {
|
|
89
|
+
/**
|
|
90
|
+
* 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/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
|
91
|
+
*/
|
|
92
|
+
usage_gte: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
81
95
|
interface Discount {
|
|
82
96
|
/**
|
|
83
97
|
* ID of the coupon to create a new discount for.
|
|
@@ -224,6 +238,13 @@ declare module 'stripe' {
|
|
|
224
238
|
}
|
|
225
239
|
|
|
226
240
|
interface SubscriptionItemUpdateParams {
|
|
241
|
+
/**
|
|
242
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
|
243
|
+
*/
|
|
244
|
+
billing_thresholds?: Stripe.Emptyable<
|
|
245
|
+
SubscriptionItemUpdateParams.BillingThresholds
|
|
246
|
+
>;
|
|
247
|
+
|
|
227
248
|
/**
|
|
228
249
|
* The coupons to redeem into discounts for the subscription item.
|
|
229
250
|
*/
|
|
@@ -294,6 +315,13 @@ declare module 'stripe' {
|
|
|
294
315
|
}
|
|
295
316
|
|
|
296
317
|
namespace SubscriptionItemUpdateParams {
|
|
318
|
+
interface BillingThresholds {
|
|
319
|
+
/**
|
|
320
|
+
* 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/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
|
321
|
+
*/
|
|
322
|
+
usage_gte: number;
|
|
323
|
+
}
|
|
324
|
+
|
|
297
325
|
interface Discount {
|
|
298
326
|
/**
|
|
299
327
|
* ID of the coupon to create a new discount for.
|
|
@@ -33,7 +33,7 @@ declare module 'stripe' {
|
|
|
33
33
|
billing_behavior?: SubscriptionSchedule.BillingBehavior;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* The [billing mode](https://stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule.
|
|
36
|
+
* The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule.
|
|
37
37
|
*/
|
|
38
38
|
billing_mode?: SubscriptionSchedule.BillingMode;
|
|
39
39
|
|
|
@@ -155,6 +155,11 @@ declare module 'stripe' {
|
|
|
155
155
|
*/
|
|
156
156
|
billing_cycle_anchor: DefaultSettings.BillingCycleAnchor;
|
|
157
157
|
|
|
158
|
+
/**
|
|
159
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
160
|
+
*/
|
|
161
|
+
billing_thresholds: DefaultSettings.BillingThresholds | null;
|
|
162
|
+
|
|
158
163
|
/**
|
|
159
164
|
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
|
160
165
|
*/
|
|
@@ -221,6 +226,18 @@ declare module 'stripe' {
|
|
|
221
226
|
|
|
222
227
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
223
228
|
|
|
229
|
+
interface BillingThresholds {
|
|
230
|
+
/**
|
|
231
|
+
* Monetary threshold that triggers the subscription to create an invoice
|
|
232
|
+
*/
|
|
233
|
+
amount_gte: number | null;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
|
237
|
+
*/
|
|
238
|
+
reset_billing_cycle_anchor: boolean | null;
|
|
239
|
+
}
|
|
240
|
+
|
|
224
241
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
225
242
|
|
|
226
243
|
interface InvoiceSettings {
|
|
@@ -321,6 +338,11 @@ declare module 'stripe' {
|
|
|
321
338
|
*/
|
|
322
339
|
billing_cycle_anchor: Phase.BillingCycleAnchor | null;
|
|
323
340
|
|
|
341
|
+
/**
|
|
342
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
343
|
+
*/
|
|
344
|
+
billing_thresholds: Phase.BillingThresholds | null;
|
|
345
|
+
|
|
324
346
|
/**
|
|
325
347
|
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
|
326
348
|
*/
|
|
@@ -382,7 +404,7 @@ declare module 'stripe' {
|
|
|
382
404
|
pause_collection?: Phase.PauseCollection | null;
|
|
383
405
|
|
|
384
406
|
/**
|
|
385
|
-
*
|
|
407
|
+
* When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
|
386
408
|
*/
|
|
387
409
|
proration_behavior: Phase.ProrationBehavior;
|
|
388
410
|
|
|
@@ -510,6 +532,18 @@ declare module 'stripe' {
|
|
|
510
532
|
|
|
511
533
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
512
534
|
|
|
535
|
+
interface BillingThresholds {
|
|
536
|
+
/**
|
|
537
|
+
* Monetary threshold that triggers the subscription to create an invoice
|
|
538
|
+
*/
|
|
539
|
+
amount_gte: number | null;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
|
543
|
+
*/
|
|
544
|
+
reset_billing_cycle_anchor: boolean | null;
|
|
545
|
+
}
|
|
546
|
+
|
|
513
547
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
514
548
|
|
|
515
549
|
interface Discount {
|
|
@@ -586,6 +620,11 @@ declare module 'stripe' {
|
|
|
586
620
|
}
|
|
587
621
|
|
|
588
622
|
interface Item {
|
|
623
|
+
/**
|
|
624
|
+
* Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
|
625
|
+
*/
|
|
626
|
+
billing_thresholds: Item.BillingThresholds | null;
|
|
627
|
+
|
|
589
628
|
/**
|
|
590
629
|
* The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
|
591
630
|
*/
|
|
@@ -623,6 +662,13 @@ declare module 'stripe' {
|
|
|
623
662
|
}
|
|
624
663
|
|
|
625
664
|
namespace Item {
|
|
665
|
+
interface BillingThresholds {
|
|
666
|
+
/**
|
|
667
|
+
* Usage threshold that triggers the subscription to create an invoice
|
|
668
|
+
*/
|
|
669
|
+
usage_gte: number | null;
|
|
670
|
+
}
|
|
671
|
+
|
|
626
672
|
interface Discount {
|
|
627
673
|
/**
|
|
628
674
|
* ID of the coupon to create a new discount for.
|