@stripe/stripe-js 1.33.0 → 1.34.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 CHANGED
@@ -54,7 +54,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
54
54
 
55
55
  stripe._registerWrapper({
56
56
  name: 'stripe-js',
57
- version: "1.33.0",
57
+ version: "1.34.0",
58
58
  startTime: startTime
59
59
  });
60
60
  };
package/dist/pure.js CHANGED
@@ -58,7 +58,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
58
58
 
59
59
  stripe._registerWrapper({
60
60
  name: 'stripe-js',
61
- version: "1.33.0",
61
+ version: "1.34.0",
62
62
  startTime: startTime
63
63
  });
64
64
  };
@@ -38,7 +38,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
38
38
 
39
39
  stripe._registerWrapper({
40
40
  name: 'stripe-js',
41
- version: "1.33.0",
41
+ version: "1.34.0",
42
42
  startTime: startTime
43
43
  });
44
44
  };
package/dist/stripe.js CHANGED
@@ -42,7 +42,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
42
42
 
43
43
  stripe._registerWrapper({
44
44
  name: 'stripe-js',
45
- version: "1.33.0",
45
+ version: "1.34.0",
46
46
  startTime: startTime
47
47
  });
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "main": "dist/stripe.js",
6
6
  "module": "dist/stripe.esm.js",
@@ -0,0 +1,86 @@
1
+ /**
2
+ * The Financial Connections Session object
3
+ */
4
+ export interface FinancialConnectionsSession {
5
+ /**
6
+ * Unique identifier for the object.
7
+ */
8
+ id: string;
9
+
10
+ /**
11
+ * List of accounts collected by the Session
12
+ */
13
+ accounts: FinancialConnectionsSession.Account[];
14
+
15
+ /**
16
+ * Filters applied to the Session
17
+ */
18
+ filters?: FinancialConnectionsSession.Filters;
19
+
20
+ /**
21
+ * List of data permissions requested in the Session
22
+ */
23
+ permissions?: FinancialConnectionsSession.Permission[];
24
+
25
+ /**
26
+ * For webview integrations only. The user will be redirected to this URL to return to your app.
27
+ */
28
+ return_url?: string;
29
+ }
30
+
31
+ export namespace FinancialConnectionsSession {
32
+ /**
33
+ * The Financial Connections Account object
34
+ */
35
+ export interface Account {
36
+ /**
37
+ * Unique identifier for the object.
38
+ */
39
+ id: string;
40
+
41
+ /**
42
+ * String representing the object's type. `'linked_account'` is present for backwards-compatibility.
43
+ */
44
+ object: 'linked_account' | 'financial_connections.account';
45
+
46
+ /**
47
+ * The type of the account.
48
+ */
49
+ category: string;
50
+
51
+ /**
52
+ * A human-readable name that has been assigned to this account, either by the account holder or by the institution.
53
+ */
54
+ display_name: string;
55
+
56
+ /**
57
+ * The name of the institution that holds this account.
58
+ */
59
+ institution_name: string;
60
+
61
+ /**
62
+ * The last 4 digits of the account number. If present, this will be 4 numeric characters.
63
+ */
64
+ last4: string | null;
65
+ }
66
+
67
+ /**
68
+ * Filters to restrict the kinds of accounts to collect.
69
+ */
70
+ export interface Filters {
71
+ /**
72
+ * List of countries from which to collect accounts.
73
+ */
74
+ countries?: string[];
75
+ }
76
+
77
+ /**
78
+ * Data features to which access can be requested
79
+ */
80
+ export type Permission =
81
+ | 'payment_method'
82
+ | 'balances'
83
+ | 'transactions'
84
+ | 'ownership'
85
+ | 'account_numbers';
86
+ }
@@ -8,3 +8,4 @@ export * from './tokens';
8
8
  export * from './bank-accounts';
9
9
  export * from './cards';
10
10
  export * from './verification-sessions';
11
+ export * from './financial-connections';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Data to be sent with a `stripe.collectFinancialConnectionsAccounts` request.
3
+ */
4
+ export interface CollectFinancialConnectionsAccountsOptions {
5
+ /**
6
+ * The client secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).
7
+ */
8
+ clientSecret: string;
9
+ }
10
+
11
+ /**
12
+ * Data to be sent with a `stripe.collectBankAccountToken` request.
13
+ */
14
+ export interface CollectBankAccountTokenOptions {
15
+ /**
16
+ * The client secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).
17
+ */
18
+ clientSecret: string;
19
+ }
@@ -4,6 +4,7 @@ import * as setupIntents from './setup-intents';
4
4
  import * as orders from './orders';
5
5
  import * as tokens from './token-and-sources';
6
6
  import * as elements from './elements';
7
+ import * as financialConnections from './financial-connections';
7
8
 
8
9
  import {StripeElements, StripeElementsOptions} from './elements-group';
9
10
  import {RedirectToCheckoutOptions} from './checkout';
@@ -975,6 +976,29 @@ export interface Stripe {
975
976
  * * @docs https://stripe.com/docs/js/identity/modal
976
977
  */
977
978
  verifyIdentity(clientSecret: string): Promise<VerificationSessionResult>;
979
+
980
+ /////////////////////////////
981
+ /// Financial Connections
982
+ ///
983
+ /////////////////////////////
984
+
985
+ /**
986
+ * Use `stripe.collectFinancialConnectionsAccounts` to display a [Financial Connections](https://stripe.com/docs/financial-connections) modal that lets you securely collect financial accounts.
987
+ *
988
+ * * @docs https://stripe.com/docs/js/financial_connections/collect_financial_connections_accounts
989
+ */
990
+ collectFinancialConnectionsAccounts(
991
+ options: financialConnections.CollectFinancialConnectionsAccountsOptions
992
+ ): Promise<FinancialConnectionsSessionResult>;
993
+
994
+ /**
995
+ * Use `stripe.collectBankAccountToken` to display a [Financial Connections](https://stripe.com/docs/financial-connections) modal that lets you securely collect a [Bank Account Token](https://stripe.com/docs/api/tokens/object).
996
+ *
997
+ * * @docs https://stripe.com/docs/js/financial_connections/collect_bank_account_token
998
+ */
999
+ collectBankAccountToken(
1000
+ options: financialConnections.CollectBankAccountTokenOptions
1001
+ ): Promise<CollectBankAccountTokenResult>;
978
1002
  }
979
1003
 
980
1004
  export type PaymentIntentResult =
@@ -1010,6 +1034,25 @@ export type VerificationSessionResult =
1010
1034
  | {verificationSession: api.VerificationSession; error?: undefined}
1011
1035
  | {verificationSession?: undefined; error: StripeError};
1012
1036
 
1037
+ export type FinancialConnectionsSessionResult =
1038
+ | {
1039
+ financialConnectionsSession: api.FinancialConnectionsSession;
1040
+ error?: undefined;
1041
+ }
1042
+ | {financialConnectionsSession: undefined; error: StripeError};
1043
+
1044
+ export type CollectBankAccountTokenResult =
1045
+ | {
1046
+ financialConnectionsSession: api.FinancialConnectionsSession;
1047
+ token: string;
1048
+ error?: undefined;
1049
+ }
1050
+ | {
1051
+ financialConnectionsSession: undefined;
1052
+ token: undefined;
1053
+ error: StripeError;
1054
+ };
1055
+
1013
1056
  export interface WrapperLibrary {
1014
1057
  /**
1015
1058
  * Your library’s name, maximum length is 30