@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 +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/financial-connections.d.ts +86 -0
- package/types/api/index.d.ts +1 -0
- package/types/stripe-js/financial-connections.d.ts +19 -0
- package/types/stripe-js/stripe.d.ts +43 -0
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
|
@@ -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
|
+
}
|
package/types/api/index.d.ts
CHANGED
|
@@ -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
|