stripe 18.1.1 → 18.2.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 +66 -32
- package/OPENAPI_VERSION +1 -1
- package/VERSION +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/Invoices.js +4 -0
- package/cjs/resources/Terminal/Readers.js +4 -0
- package/cjs/resources/TestHelpers/Terminal/Readers.js +8 -0
- package/cjs/stripe.core.js +1 -1
- package/esm/apiVersion.js +1 -1
- package/esm/resources/Invoices.js +4 -0
- package/esm/resources/Terminal/Readers.js +4 -0
- package/esm/resources/TestHelpers/Terminal/Readers.js +8 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountSessions.d.ts +65 -0
- package/types/AccountSessionsResource.d.ts +77 -0
- package/types/Accounts.d.ts +22 -15
- package/types/AccountsResource.d.ts +79 -55
- package/types/Balance.d.ts +83 -1
- package/types/BalanceResource.d.ts +1 -1
- 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 +4 -4
- package/types/Checkout/Sessions.d.ts +120 -105
- package/types/Checkout/SessionsResource.d.ts +117 -108
- package/types/ConfirmationTokens.d.ts +4 -4
- package/types/CountrySpecs.d.ts +1 -1
- package/types/CreditNotes.d.ts +13 -3
- 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 -0
- package/types/Events.d.ts +4 -0
- package/types/Files.d.ts +1 -1
- package/types/FilesResource.d.ts +1 -1
- 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 -6
- package/types/InvoicesResource.d.ts +88 -11
- 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/PaymentIntents.d.ts +143 -128
- package/types/PaymentIntentsResource.d.ts +492 -441
- 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/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/ProductsResource.d.ts +1 -1
- package/types/PromotionCodesResource.d.ts +1 -1
- package/types/Quotes.d.ts +6 -6
- 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 -0
- package/types/SetupIntents.d.ts +2 -1
- package/types/SetupIntentsResource.d.ts +3 -3
- package/types/SourcesResource.d.ts +1 -1
- package/types/SubscriptionItems.d.ts +14 -0
- package/types/SubscriptionItemsResource.d.ts +28 -0
- package/types/SubscriptionSchedules.d.ts +47 -1
- package/types/SubscriptionSchedulesResource.d.ts +99 -3
- package/types/Subscriptions.d.ts +19 -2
- package/types/SubscriptionsResource.d.ts +76 -14
- 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 +219 -1
- package/types/Terminal/ReadersResource.d.ts +144 -0
- package/types/TestHelpers/Terminal/ReadersResource.d.ts +53 -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/WebhookEndpointsResource.d.ts +4 -1
- package/types/lib.d.ts +1 -1
- package/types/test/typescriptTest.ts +3 -3
|
@@ -1011,9 +1011,9 @@ declare module 'stripe' {
|
|
|
1011
1011
|
|
|
1012
1012
|
class PaymentMethodsResource {
|
|
1013
1013
|
/**
|
|
1014
|
-
* Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
|
|
1014
|
+
* Creates a PaymentMethod object. Read the [Stripe.js reference](https://docs.stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
|
|
1015
1015
|
*
|
|
1016
|
-
* Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
|
|
1016
|
+
* Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://docs.stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
|
|
1017
1017
|
*/
|
|
1018
1018
|
create(
|
|
1019
1019
|
params?: PaymentMethodCreateParams,
|
|
@@ -1024,7 +1024,7 @@ declare module 'stripe' {
|
|
|
1024
1024
|
): Promise<Stripe.Response<Stripe.PaymentMethod>>;
|
|
1025
1025
|
|
|
1026
1026
|
/**
|
|
1027
|
-
* Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer)
|
|
1027
|
+
* Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer)
|
|
1028
1028
|
*/
|
|
1029
1029
|
retrieve(
|
|
1030
1030
|
id: string,
|
|
@@ -1046,7 +1046,7 @@ declare module 'stripe' {
|
|
|
1046
1046
|
): Promise<Stripe.Response<Stripe.PaymentMethod>>;
|
|
1047
1047
|
|
|
1048
1048
|
/**
|
|
1049
|
-
* Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead.
|
|
1049
|
+
* Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer_list) API instead.
|
|
1050
1050
|
*/
|
|
1051
1051
|
list(
|
|
1052
1052
|
params?: PaymentMethodListParams,
|
|
@@ -1057,16 +1057,16 @@ declare module 'stripe' {
|
|
|
1057
1057
|
/**
|
|
1058
1058
|
* Attaches a PaymentMethod object to a Customer.
|
|
1059
1059
|
*
|
|
1060
|
-
* To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
|
|
1061
|
-
* or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
|
|
1060
|
+
* To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://docs.stripe.com/docs/api/setup_intents)
|
|
1061
|
+
* or a PaymentIntent with [setup_future_usage](https://docs.stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
|
|
1062
1062
|
* These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
|
|
1063
1063
|
* endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
|
|
1064
1064
|
* future use, which makes later declines and payment friction more likely.
|
|
1065
|
-
* See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
|
|
1065
|
+
* See [Optimizing cards for future payments](https://docs.stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
|
|
1066
1066
|
* future payments.
|
|
1067
1067
|
*
|
|
1068
1068
|
* To use this PaymentMethod as the default for invoice or subscription payments,
|
|
1069
|
-
* set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
|
|
1069
|
+
* set [invoice_settings.default_payment_method](https://docs.stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
|
|
1070
1070
|
* on the Customer to the PaymentMethod's ID.
|
|
1071
1071
|
*/
|
|
1072
1072
|
attach(
|
package/types/Payouts.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ declare module 'stripe' {
|
|
|
5
5
|
/**
|
|
6
6
|
* A `Payout` object is created when you receive funds from Stripe, or when you
|
|
7
7
|
* initiate a payout to either a bank account or debit card of a [connected
|
|
8
|
-
* Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
|
|
8
|
+
* Stripe account](https://docs.stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
|
|
9
9
|
* and list all payouts. Payouts are made on [varying
|
|
10
|
-
* schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and
|
|
10
|
+
* schedules](https://docs.stripe.com/docs/connect/manage-payout-schedule), depending on your country and
|
|
11
11
|
* industry.
|
|
12
12
|
*
|
|
13
13
|
* Related guide: [Receiving payouts](https://stripe.com/docs/payouts)
|
|
@@ -122,11 +122,11 @@ declare module 'stripe' {
|
|
|
122
122
|
|
|
123
123
|
class PayoutsResource {
|
|
124
124
|
/**
|
|
125
|
-
* To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/
|
|
125
|
+
* To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://docs.stripe.com/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error.
|
|
126
126
|
*
|
|
127
127
|
* If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode.
|
|
128
128
|
*
|
|
129
|
-
* If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/
|
|
129
|
+
* If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://docs.stripe.com/api#balance_object) details available and pending amounts by source type.
|
|
130
130
|
*/
|
|
131
131
|
create(
|
|
132
132
|
params: PayoutCreateParams,
|
package/types/Persons.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ declare module 'stripe' {
|
|
|
25
25
|
/**
|
|
26
26
|
* This is an object representing a person associated with a Stripe account.
|
|
27
27
|
*
|
|
28
|
-
* A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
|
|
28
|
+
* A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
|
|
29
29
|
*
|
|
30
|
-
* See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#person-information).
|
|
30
|
+
* See the [Standard onboarding](https://docs.stripe.com/connect/standard-accounts) or [Express onboarding](https://docs.stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://docs.stripe.com/connect/handling-api-verification#person-information).
|
|
31
31
|
*/
|
|
32
32
|
interface Person {
|
|
33
33
|
/**
|
|
@@ -72,27 +72,27 @@ declare module 'stripe' {
|
|
|
72
72
|
dob?: Person.Dob;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* The person's email address. Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
75
|
+
* The person's email address. Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
76
76
|
*/
|
|
77
77
|
email?: string | null;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* The person's first name. Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
80
|
+
* The person's first name. Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
81
81
|
*/
|
|
82
82
|
first_name?: string | null;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
85
|
+
* The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
86
86
|
*/
|
|
87
87
|
first_name_kana?: string | null;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
90
|
+
* The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
91
91
|
*/
|
|
92
92
|
first_name_kanji?: string | null;
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
95
|
+
* A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
96
96
|
*/
|
|
97
97
|
full_name_aliases?: Array<string>;
|
|
98
98
|
|
|
@@ -117,17 +117,17 @@ declare module 'stripe' {
|
|
|
117
117
|
id_number_secondary_provided?: boolean;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* The person's last name. Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
120
|
+
* The person's last name. Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
121
121
|
*/
|
|
122
122
|
last_name?: string | null;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
125
|
+
* The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
126
126
|
*/
|
|
127
127
|
last_name_kana?: string | null;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
130
|
+
* The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
|
|
131
131
|
*/
|
|
132
132
|
last_name_kanji?: string | null;
|
|
133
133
|
|
package/types/PlansResource.d.ts
CHANGED
|
@@ -248,7 +248,7 @@ declare module 'stripe' {
|
|
|
248
248
|
|
|
249
249
|
class PlansResource {
|
|
250
250
|
/**
|
|
251
|
-
* You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/
|
|
251
|
+
* You can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
|
|
252
252
|
*/
|
|
253
253
|
create(
|
|
254
254
|
params: PlanCreateParams,
|
|
@@ -584,7 +584,7 @@ declare module 'stripe' {
|
|
|
584
584
|
): Promise<Stripe.Response<Stripe.Price>>;
|
|
585
585
|
|
|
586
586
|
/**
|
|
587
|
-
* Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
|
|
587
|
+
* Returns a list of your active prices, excluding [inline prices](https://docs.stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
|
|
588
588
|
*/
|
|
589
589
|
list(
|
|
590
590
|
params?: PriceListParams,
|
|
@@ -593,7 +593,7 @@ declare module 'stripe' {
|
|
|
593
593
|
list(options?: RequestOptions): ApiListPromise<Stripe.Price>;
|
|
594
594
|
|
|
595
595
|
/**
|
|
596
|
-
* Search for prices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
|
|
596
|
+
* Search for prices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
|
|
597
597
|
* Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
|
|
598
598
|
* conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
|
|
599
599
|
* to an hour behind during outages. Search functionality is not available to merchants in India.
|
|
@@ -602,7 +602,7 @@ declare module 'stripe' {
|
|
|
602
602
|
): Promise<Stripe.Response<Stripe.ProductFeature>>;
|
|
603
603
|
|
|
604
604
|
/**
|
|
605
|
-
* Search for products you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
|
|
605
|
+
* Search for products you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
|
|
606
606
|
* Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
|
|
607
607
|
* conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
|
|
608
608
|
* to an hour behind during outages. Search functionality is not available to merchants in India.
|
|
@@ -177,7 +177,7 @@ declare module 'stripe' {
|
|
|
177
177
|
): Promise<Stripe.Response<Stripe.PromotionCode>>;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
* 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.
|
|
180
|
+
* 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.
|
|
181
181
|
*/
|
|
182
182
|
retrieve(
|
|
183
183
|
id: string,
|
package/types/Quotes.d.ts
CHANGED
|
@@ -306,9 +306,9 @@ declare module 'stripe' {
|
|
|
306
306
|
amount: number;
|
|
307
307
|
|
|
308
308
|
/**
|
|
309
|
-
* 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.
|
|
309
|
+
* 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.
|
|
310
310
|
*
|
|
311
|
-
* Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
|
311
|
+
* Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
|
312
312
|
*/
|
|
313
313
|
rate: Stripe.TaxRate;
|
|
314
314
|
|
|
@@ -420,9 +420,9 @@ declare module 'stripe' {
|
|
|
420
420
|
amount: number;
|
|
421
421
|
|
|
422
422
|
/**
|
|
423
|
-
* 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.
|
|
423
|
+
* 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.
|
|
424
424
|
*
|
|
425
|
-
* Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
|
425
|
+
* Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
|
426
426
|
*/
|
|
427
427
|
rate: Stripe.TaxRate;
|
|
428
428
|
|
|
@@ -595,9 +595,9 @@ declare module 'stripe' {
|
|
|
595
595
|
amount: number;
|
|
596
596
|
|
|
597
597
|
/**
|
|
598
|
-
* 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.
|
|
598
|
+
* 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.
|
|
599
599
|
*
|
|
600
|
-
* Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
|
600
|
+
* Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
|
601
601
|
*/
|
|
602
602
|
rate: Stripe.TaxRate;
|
|
603
603
|
|
|
@@ -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
|
@@ -340,7 +340,12 @@ declare module 'stripe' {
|
|
|
340
340
|
|
|
341
341
|
interface Paynow {}
|
|
342
342
|
|
|
343
|
-
interface Paypal {
|
|
343
|
+
interface Paypal {
|
|
344
|
+
/**
|
|
345
|
+
* For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
|
|
346
|
+
*/
|
|
347
|
+
network_decline_code: string | null;
|
|
348
|
+
}
|
|
344
349
|
|
|
345
350
|
interface Pix {}
|
|
346
351
|
|
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
|
@@ -713,6 +713,7 @@ declare module 'stripe' {
|
|
|
713
713
|
| 'forwarding_api_retryable_upstream_error'
|
|
714
714
|
| 'forwarding_api_upstream_connection_error'
|
|
715
715
|
| 'forwarding_api_upstream_connection_timeout'
|
|
716
|
+
| 'forwarding_api_upstream_error'
|
|
716
717
|
| 'idempotency_key_in_use'
|
|
717
718
|
| 'incorrect_address'
|
|
718
719
|
| 'incorrect_cvc'
|
package/types/SetupIntents.d.ts
CHANGED
|
@@ -357,6 +357,7 @@ declare module 'stripe' {
|
|
|
357
357
|
| 'forwarding_api_retryable_upstream_error'
|
|
358
358
|
| 'forwarding_api_upstream_connection_error'
|
|
359
359
|
| 'forwarding_api_upstream_connection_timeout'
|
|
360
|
+
| 'forwarding_api_upstream_error'
|
|
360
361
|
| 'idempotency_key_in_use'
|
|
361
362
|
| 'incorrect_address'
|
|
362
363
|
| 'incorrect_cvc'
|
|
@@ -492,7 +493,7 @@ declare module 'stripe' {
|
|
|
492
493
|
redirect_to_url?: NextAction.RedirectToUrl;
|
|
493
494
|
|
|
494
495
|
/**
|
|
495
|
-
* Type of the next action to perform
|
|
496
|
+
* 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`.
|
|
496
497
|
*/
|
|
497
498
|
type: string;
|
|
498
499
|
|
|
@@ -3939,7 +3939,7 @@ declare module 'stripe' {
|
|
|
3939
3939
|
/**
|
|
3940
3940
|
* Creates a SetupIntent object.
|
|
3941
3941
|
*
|
|
3942
|
-
* After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm)
|
|
3942
|
+
* After you create the SetupIntent, attach a payment method and [confirm](https://docs.stripe.com/docs/api/setup_intents/confirm)
|
|
3943
3943
|
* it to collect any required permissions to charge the payment method later.
|
|
3944
3944
|
*/
|
|
3945
3945
|
create(
|
|
@@ -3955,7 +3955,7 @@ declare module 'stripe' {
|
|
|
3955
3955
|
*
|
|
3956
3956
|
* Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.
|
|
3957
3957
|
*
|
|
3958
|
-
* When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://stripe.com/
|
|
3958
|
+
* 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.
|
|
3959
3959
|
*/
|
|
3960
3960
|
retrieve(
|
|
3961
3961
|
id: string,
|
|
@@ -3988,7 +3988,7 @@ declare module 'stripe' {
|
|
|
3988
3988
|
/**
|
|
3989
3989
|
* You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
|
|
3990
3990
|
*
|
|
3991
|
-
* 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.
|
|
3991
|
+
* 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.
|
|
3992
3992
|
*/
|
|
3993
3993
|
cancel(
|
|
3994
3994
|
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
|
*/
|
|
@@ -104,5 +109,14 @@ declare module 'stripe' {
|
|
|
104
109
|
*/
|
|
105
110
|
tax_rates: Array<Stripe.TaxRate> | null;
|
|
106
111
|
}
|
|
112
|
+
|
|
113
|
+
namespace SubscriptionItem {
|
|
114
|
+
interface BillingThresholds {
|
|
115
|
+
/**
|
|
116
|
+
* Usage threshold that triggers the subscription to create an invoice
|
|
117
|
+
*/
|
|
118
|
+
usage_gte: number | null;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
107
121
|
}
|
|
108
122
|
}
|
|
@@ -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
|
*/
|
|
@@ -73,6 +80,13 @@ declare module 'stripe' {
|
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
namespace SubscriptionItemCreateParams {
|
|
83
|
+
interface BillingThresholds {
|
|
84
|
+
/**
|
|
85
|
+
* 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))
|
|
86
|
+
*/
|
|
87
|
+
usage_gte: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
76
90
|
interface Discount {
|
|
77
91
|
/**
|
|
78
92
|
* ID of the coupon to create a new discount for.
|
|
@@ -159,6 +173,13 @@ declare module 'stripe' {
|
|
|
159
173
|
}
|
|
160
174
|
|
|
161
175
|
interface SubscriptionItemUpdateParams {
|
|
176
|
+
/**
|
|
177
|
+
* 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.
|
|
178
|
+
*/
|
|
179
|
+
billing_thresholds?: Stripe.Emptyable<
|
|
180
|
+
SubscriptionItemUpdateParams.BillingThresholds
|
|
181
|
+
>;
|
|
182
|
+
|
|
162
183
|
/**
|
|
163
184
|
* The coupons to redeem into discounts for the subscription item.
|
|
164
185
|
*/
|
|
@@ -229,6 +250,13 @@ declare module 'stripe' {
|
|
|
229
250
|
}
|
|
230
251
|
|
|
231
252
|
namespace SubscriptionItemUpdateParams {
|
|
253
|
+
interface BillingThresholds {
|
|
254
|
+
/**
|
|
255
|
+
* 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))
|
|
256
|
+
*/
|
|
257
|
+
usage_gte: number;
|
|
258
|
+
}
|
|
259
|
+
|
|
232
260
|
interface Discount {
|
|
233
261
|
/**
|
|
234
262
|
* ID of the coupon to create a new discount for.
|
|
@@ -126,6 +126,11 @@ declare module 'stripe' {
|
|
|
126
126
|
*/
|
|
127
127
|
billing_cycle_anchor: DefaultSettings.BillingCycleAnchor;
|
|
128
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
131
|
+
*/
|
|
132
|
+
billing_thresholds: DefaultSettings.BillingThresholds | null;
|
|
133
|
+
|
|
129
134
|
/**
|
|
130
135
|
* 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`.
|
|
131
136
|
*/
|
|
@@ -192,6 +197,18 @@ declare module 'stripe' {
|
|
|
192
197
|
|
|
193
198
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
194
199
|
|
|
200
|
+
interface BillingThresholds {
|
|
201
|
+
/**
|
|
202
|
+
* Monetary threshold that triggers the subscription to create an invoice
|
|
203
|
+
*/
|
|
204
|
+
amount_gte: number | null;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* 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`.
|
|
208
|
+
*/
|
|
209
|
+
reset_billing_cycle_anchor: boolean | null;
|
|
210
|
+
}
|
|
211
|
+
|
|
195
212
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
196
213
|
|
|
197
214
|
interface InvoiceSettings {
|
|
@@ -261,6 +278,11 @@ declare module 'stripe' {
|
|
|
261
278
|
*/
|
|
262
279
|
billing_cycle_anchor: Phase.BillingCycleAnchor | null;
|
|
263
280
|
|
|
281
|
+
/**
|
|
282
|
+
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
283
|
+
*/
|
|
284
|
+
billing_thresholds: Phase.BillingThresholds | null;
|
|
285
|
+
|
|
264
286
|
/**
|
|
265
287
|
* 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`.
|
|
266
288
|
*/
|
|
@@ -317,7 +339,7 @@ declare module 'stripe' {
|
|
|
317
339
|
on_behalf_of: string | Stripe.Account | null;
|
|
318
340
|
|
|
319
341
|
/**
|
|
320
|
-
*
|
|
342
|
+
* When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
|
321
343
|
*/
|
|
322
344
|
proration_behavior: Phase.ProrationBehavior;
|
|
323
345
|
|
|
@@ -416,6 +438,18 @@ declare module 'stripe' {
|
|
|
416
438
|
|
|
417
439
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
418
440
|
|
|
441
|
+
interface BillingThresholds {
|
|
442
|
+
/**
|
|
443
|
+
* Monetary threshold that triggers the subscription to create an invoice
|
|
444
|
+
*/
|
|
445
|
+
amount_gte: number | null;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* 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`.
|
|
449
|
+
*/
|
|
450
|
+
reset_billing_cycle_anchor: boolean | null;
|
|
451
|
+
}
|
|
452
|
+
|
|
419
453
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
420
454
|
|
|
421
455
|
interface Discount {
|
|
@@ -473,6 +507,11 @@ declare module 'stripe' {
|
|
|
473
507
|
}
|
|
474
508
|
|
|
475
509
|
interface Item {
|
|
510
|
+
/**
|
|
511
|
+
* Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
|
512
|
+
*/
|
|
513
|
+
billing_thresholds: Item.BillingThresholds | null;
|
|
514
|
+
|
|
476
515
|
/**
|
|
477
516
|
* The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
|
478
517
|
*/
|
|
@@ -505,6 +544,13 @@ declare module 'stripe' {
|
|
|
505
544
|
}
|
|
506
545
|
|
|
507
546
|
namespace Item {
|
|
547
|
+
interface BillingThresholds {
|
|
548
|
+
/**
|
|
549
|
+
* Usage threshold that triggers the subscription to create an invoice
|
|
550
|
+
*/
|
|
551
|
+
usage_gte: number | null;
|
|
552
|
+
}
|
|
553
|
+
|
|
508
554
|
interface Discount {
|
|
509
555
|
/**
|
|
510
556
|
* ID of the coupon to create a new discount for.
|