@stripe/stripe-js 1.35.0 → 1.36.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/tokens.d.ts +5 -0
- package/types/stripe-js/elements/card-number.d.ts +16 -0
- package/types/stripe-js/elements/card.d.ts +16 -0
- package/types/stripe-js/elements/shipping-address.d.ts +0 -5
- package/types/stripe-js/stripe.d.ts +18 -3
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
package/types/api/tokens.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {Omit} from '../utils';
|
|
1
2
|
import {Card} from './cards';
|
|
2
3
|
import {BankAccount} from './bank-accounts';
|
|
3
4
|
import {JapanAddressParam, MetadataParam} from './shared';
|
|
@@ -46,6 +47,10 @@ export interface Token {
|
|
|
46
47
|
used: boolean;
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
export type BankAccountToken = Omit<Token, 'card'> & {
|
|
51
|
+
bank_account: BankAccount;
|
|
52
|
+
};
|
|
53
|
+
|
|
49
54
|
export namespace TokenCreateParams {
|
|
50
55
|
export interface Account {
|
|
51
56
|
/**
|
|
@@ -86,6 +86,22 @@ export type StripeCardNumberElement = StripeElementBase & {
|
|
|
86
86
|
handler?: (event: {elementType: 'cardNumber'}) => any
|
|
87
87
|
): StripeCardNumberElement;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Triggered when there is a change to the available networks the provided card can run on.
|
|
91
|
+
*/
|
|
92
|
+
on(
|
|
93
|
+
eventType: 'networkschange',
|
|
94
|
+
handler: (event: {elementType: 'cardNumber'}) => any
|
|
95
|
+
): StripeCardNumberElement;
|
|
96
|
+
once(
|
|
97
|
+
eventType: 'networkschange',
|
|
98
|
+
handler: (event: {elementType: 'cardNumber'}) => any
|
|
99
|
+
): StripeCardNumberElement;
|
|
100
|
+
off(
|
|
101
|
+
eventType: 'networkschange',
|
|
102
|
+
handler?: (event: {elementType: 'cardNumber'}) => any
|
|
103
|
+
): StripeCardNumberElement;
|
|
104
|
+
|
|
89
105
|
/**
|
|
90
106
|
* Updates the options the `CardNumberElement` was initialized with.
|
|
91
107
|
* Updates are merged into the existing configuration.
|
|
@@ -86,6 +86,22 @@ export type StripeCardElement = StripeElementBase & {
|
|
|
86
86
|
handler?: (event: {elementType: 'card'}) => any
|
|
87
87
|
): StripeCardElement;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Triggered when there is a change to the available networks the provided card can run on.
|
|
91
|
+
*/
|
|
92
|
+
on(
|
|
93
|
+
eventType: 'networkschange',
|
|
94
|
+
handler: (event: {elementType: 'card'}) => any
|
|
95
|
+
): StripeCardElement;
|
|
96
|
+
once(
|
|
97
|
+
eventType: 'networkschange',
|
|
98
|
+
handler: (event: {elementType: 'card'}) => any
|
|
99
|
+
): StripeCardElement;
|
|
100
|
+
off(
|
|
101
|
+
eventType: 'networkschange',
|
|
102
|
+
handler?: (event: {elementType: 'card'}) => any
|
|
103
|
+
): StripeCardElement;
|
|
104
|
+
|
|
89
105
|
/**
|
|
90
106
|
* Updates the options the `CardElement` was initialized with.
|
|
91
107
|
* Updates are merged into the existing configuration.
|
|
@@ -159,11 +159,6 @@ export interface StripeShippingAddressElementOptions {
|
|
|
159
159
|
phone?: string | null;
|
|
160
160
|
};
|
|
161
161
|
|
|
162
|
-
/**
|
|
163
|
-
* Whether or not ShippingAddressElement provides autocomplete suggestions
|
|
164
|
-
*/
|
|
165
|
-
disableAutocomplete?: boolean;
|
|
166
|
-
|
|
167
162
|
/**
|
|
168
163
|
* Control which additional fields to display in the shippingAddress Element.
|
|
169
164
|
*/
|
|
@@ -7,10 +7,9 @@ import * as elements from './elements';
|
|
|
7
7
|
import * as financialConnections from './financial-connections';
|
|
8
8
|
|
|
9
9
|
import {StripeElements, StripeElementsOptions} from './elements-group';
|
|
10
|
-
import {RedirectToCheckoutOptions} from './checkout';
|
|
10
|
+
import {CheckoutLocale, RedirectToCheckoutOptions} from './checkout';
|
|
11
11
|
import {PaymentRequestOptions, PaymentRequest} from './payment-request';
|
|
12
12
|
import {StripeElement, StripeElementLocale} from './elements-group';
|
|
13
|
-
import {CheckoutLocale} from './checkout';
|
|
14
13
|
|
|
15
14
|
export interface Stripe {
|
|
16
15
|
/////////////////////////////
|
|
@@ -508,6 +507,14 @@ export interface Stripe {
|
|
|
508
507
|
data?: paymentIntents.VerifyMicrodepositsForPaymentData
|
|
509
508
|
): Promise<PaymentIntentResult>;
|
|
510
509
|
|
|
510
|
+
/**
|
|
511
|
+
* Use stripe.createRadarSession to create a [Radar Session](https://stripe.com/docs/radar/radar-session) in your checkout flow or when saving card details.
|
|
512
|
+
* A Radar Session is a snapshot of the browser metadata and device details that helps Radar make more accurate predictions on your payments.
|
|
513
|
+
* This metadata includes information like IP address, browser, screen or device information, and other device characteristics.
|
|
514
|
+
* By using Radar Sessions, you can capture critical fraud information without tokenizing on Stripe.
|
|
515
|
+
*/
|
|
516
|
+
createRadarSession(): Promise<RadarSessionPayload>;
|
|
517
|
+
|
|
511
518
|
/**
|
|
512
519
|
* Use `stripe.collectBankAccountForPayment` in the [Accept a payment flow](https://stripe.com/docs/payments/ach-debit/accept-a-payment) for the [ACH Direct Debit](https://stripe.com/docs/payments/ach-debit)
|
|
513
520
|
* payment method to collect the customer’s bank account in your payment form.
|
|
@@ -1044,7 +1051,7 @@ export type FinancialConnectionsSessionResult =
|
|
|
1044
1051
|
export type CollectBankAccountTokenResult =
|
|
1045
1052
|
| {
|
|
1046
1053
|
financialConnectionsSession: api.FinancialConnectionsSession;
|
|
1047
|
-
token:
|
|
1054
|
+
token: api.BankAccountToken;
|
|
1048
1055
|
error?: undefined;
|
|
1049
1056
|
}
|
|
1050
1057
|
| {
|
|
@@ -1053,6 +1060,14 @@ export type CollectBankAccountTokenResult =
|
|
|
1053
1060
|
error: StripeError;
|
|
1054
1061
|
};
|
|
1055
1062
|
|
|
1063
|
+
/* A Radar Session is a snapshot of the browser metadata and device details that helps Radar make more accurate predictions on your payments.
|
|
1064
|
+
This metadata includes information like IP address, browser, screen or device information, and other device characteristics.
|
|
1065
|
+
You can find more details about how Radar uses this data by reading about how Radar performs [advanced fraud detection](https://stripe.com/docs/disputes/prevention/advanced-fraud-detection).
|
|
1066
|
+
*/
|
|
1067
|
+
export type RadarSessionPayload =
|
|
1068
|
+
| {radarSession: Record<any, any>; error?: undefined}
|
|
1069
|
+
| {radarSession?: undefined; error: StripeError};
|
|
1070
|
+
|
|
1056
1071
|
export interface WrapperLibrary {
|
|
1057
1072
|
/**
|
|
1058
1073
|
* Your library’s name, maximum length is 30
|