@stripe/stripe-js 1.26.0 → 1.29.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/dist/pure.esm.js +1 -1
- package/dist/pure.js +1 -1
- package/dist/stripe.esm.js +1 -1
- package/dist/stripe.js +1 -1
- package/package.json +1 -1
- package/types/api/payment-intents.d.ts +2 -2
- package/types/api/payment-methods.d.ts +2 -0
- package/types/api/setup-intents.d.ts +2 -2
- package/types/stripe-js/elements-group.d.ts +13 -0
- package/types/stripe-js/payment-intents.d.ts +23 -4
- package/types/stripe-js/setup-intents.d.ts +8 -5
- package/types/stripe-js/stripe.d.ts +0 -2
package/dist/pure.esm.js
CHANGED
package/dist/pure.js
CHANGED
package/dist/stripe.esm.js
CHANGED
package/dist/stripe.js
CHANGED
package/package.json
CHANGED
|
@@ -77,9 +77,9 @@ export interface PaymentIntent {
|
|
|
77
77
|
next_action: PaymentIntent.NextAction | null;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* ID of the payment method used in this PaymentIntent.
|
|
80
|
+
* ID of the payment method used in this PaymentIntent, or the PaymentMethod itself if this field is expanded.
|
|
81
81
|
*/
|
|
82
|
-
payment_method: string | null;
|
|
82
|
+
payment_method: string | null | PaymentMethod;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
|
|
@@ -52,9 +52,9 @@ export interface SetupIntent {
|
|
|
52
52
|
next_action: SetupIntent.NextAction | null;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* ID of the payment method used with this SetupIntent.
|
|
55
|
+
* ID of the payment method used with this SetupIntent, or the PaymentMethod itself if this field is expanded.
|
|
56
56
|
*/
|
|
57
|
-
payment_method: string | null;
|
|
57
|
+
payment_method: string | null | PaymentMethod;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
|
|
@@ -40,6 +40,12 @@ export interface StripeElements {
|
|
|
40
40
|
*/
|
|
41
41
|
update(options: StripeElementsUpdateOptions): void;
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Fetches updates from the associated PaymentIntent or SetupIntent on an existing
|
|
45
|
+
* instance of Elements, and reflects these updates in the Payment Element.
|
|
46
|
+
*/
|
|
47
|
+
fetchUpdates(): Promise<{error?: {message: string; status?: string}}>;
|
|
48
|
+
|
|
43
49
|
/////////////////////////////
|
|
44
50
|
/// affirmMessage
|
|
45
51
|
/////////////////////////////
|
|
@@ -458,6 +464,13 @@ export interface StripeElementsOptions {
|
|
|
458
464
|
* @docs https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
|
|
459
465
|
*/
|
|
460
466
|
clientSecret?: string;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Display skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.
|
|
470
|
+
* Supported for the `payment`, `shippingAddress`, and `linkAuthentication` Elements.
|
|
471
|
+
* Default is `'auto'` (Stripe determines if a loader UI should be shown).
|
|
472
|
+
*/
|
|
473
|
+
loader?: 'auto' | 'always' | 'never';
|
|
461
474
|
}
|
|
462
475
|
|
|
463
476
|
/*
|
|
@@ -483,6 +483,17 @@ export interface CreatePaymentMethodUsBankAccountData
|
|
|
483
483
|
billing_details: PaymentMethodCreateParams.BillingDetails;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
+
export interface CollectBankAccountParams {
|
|
487
|
+
/**
|
|
488
|
+
* The payment method type for the bank account details (e.g. `us_bank_account`)
|
|
489
|
+
*/
|
|
490
|
+
payment_method_type: string;
|
|
491
|
+
/**
|
|
492
|
+
* Payment method specific data to be sent with the request (billing details)
|
|
493
|
+
*/
|
|
494
|
+
payment_method_data: CollectBankAccountPaymentMethodData;
|
|
495
|
+
}
|
|
496
|
+
|
|
486
497
|
export interface CollectBankAccountPaymentMethodData {
|
|
487
498
|
/**
|
|
488
499
|
* The customer's billing details.
|
|
@@ -1292,6 +1303,11 @@ export interface ConfirmPaymentData extends PaymentIntentConfirmParams {
|
|
|
1292
1303
|
*/
|
|
1293
1304
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
1294
1305
|
};
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Specifies which fields in the response should be expanded.
|
|
1309
|
+
*/
|
|
1310
|
+
expand?: Array<string>;
|
|
1295
1311
|
}
|
|
1296
1312
|
|
|
1297
1313
|
/**
|
|
@@ -1309,11 +1325,14 @@ export interface VerifyMicrodepositsForPaymentData {
|
|
|
1309
1325
|
*/
|
|
1310
1326
|
export interface CollectBankAccountForPaymentOptions {
|
|
1311
1327
|
/**
|
|
1312
|
-
* The
|
|
1328
|
+
* The client secret of the PaymentIntent.
|
|
1313
1329
|
*/
|
|
1314
|
-
|
|
1330
|
+
clientSecret: string;
|
|
1331
|
+
|
|
1332
|
+
params: CollectBankAccountParams;
|
|
1333
|
+
|
|
1315
1334
|
/**
|
|
1316
|
-
*
|
|
1335
|
+
* Specifies which fields in the response should be expanded.
|
|
1317
1336
|
*/
|
|
1318
|
-
|
|
1337
|
+
expand?: Array<string>;
|
|
1319
1338
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
CreatePaymentMethodPayPalData,
|
|
12
12
|
CreatePaymentMethodBacsDebitData,
|
|
13
13
|
CreatePaymentMethodUsBankAccountData,
|
|
14
|
-
|
|
14
|
+
CollectBankAccountParams,
|
|
15
15
|
} from './payment-intents';
|
|
16
16
|
|
|
17
17
|
import {Omit} from '../utils';
|
|
@@ -205,11 +205,14 @@ export interface ConfirmUsBankAccountSetupData
|
|
|
205
205
|
*/
|
|
206
206
|
export interface CollectBankAccountForSetupOptions {
|
|
207
207
|
/**
|
|
208
|
-
* The
|
|
208
|
+
* The client secret of the SetupIntent.
|
|
209
209
|
*/
|
|
210
|
-
|
|
210
|
+
clientSecret: string;
|
|
211
|
+
|
|
212
|
+
params: CollectBankAccountParams;
|
|
213
|
+
|
|
211
214
|
/**
|
|
212
|
-
*
|
|
215
|
+
* Specifies which fields in the response should be expanded.
|
|
213
216
|
*/
|
|
214
|
-
|
|
217
|
+
expand?: Array<string>;
|
|
215
218
|
}
|
|
@@ -513,7 +513,6 @@ export interface Stripe {
|
|
|
513
513
|
* @docs https://stripe.com/docs/js/payment_intents/collect_bank_account_for_payment
|
|
514
514
|
*/
|
|
515
515
|
collectBankAccountForPayment(
|
|
516
|
-
clientSecret: string,
|
|
517
516
|
options: paymentIntents.CollectBankAccountForPaymentOptions
|
|
518
517
|
): Promise<PaymentIntentResult>;
|
|
519
518
|
|
|
@@ -786,7 +785,6 @@ export interface Stripe {
|
|
|
786
785
|
* @docs https://stripe.com/docs/js/setup_intents/collect_bank_account_for_setup
|
|
787
786
|
*/
|
|
788
787
|
collectBankAccountForSetup(
|
|
789
|
-
clientSecret: string,
|
|
790
788
|
options: setupIntents.CollectBankAccountForSetupOptions
|
|
791
789
|
): Promise<SetupIntentResult>;
|
|
792
790
|
|