@stripe/stripe-js 3.0.10 → 3.1.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/api/bank-accounts.d.mts +61 -0
- package/dist/api/bank-accounts.d.ts +61 -0
- package/dist/api/cards.d.mts +130 -0
- package/dist/api/cards.d.ts +130 -0
- package/dist/api/confirmation-tokens.d.mts +183 -0
- package/dist/api/confirmation-tokens.d.ts +183 -0
- package/dist/api/financial-connections.d.mts +232 -0
- package/dist/api/financial-connections.d.ts +232 -0
- package/dist/api/index.d.mts +12 -0
- package/dist/api/index.d.ts +12 -0
- package/dist/api/orders.d.mts +122 -0
- package/dist/api/orders.d.ts +122 -0
- package/dist/api/payment-intents.d.mts +330 -0
- package/dist/api/payment-intents.d.ts +330 -0
- package/dist/api/payment-methods.d.mts +452 -0
- package/dist/api/payment-methods.d.ts +452 -0
- package/dist/api/setup-intents.d.mts +184 -0
- package/dist/api/setup-intents.d.ts +184 -0
- package/dist/api/shared.d.mts +125 -0
- package/dist/api/shared.d.ts +125 -0
- package/dist/api/sources.d.mts +1045 -0
- package/dist/api/sources.d.ts +1045 -0
- package/dist/api/tokens.d.mts +639 -0
- package/dist/api/tokens.d.ts +639 -0
- package/dist/api/verification-sessions.d.mts +9 -0
- package/dist/api/verification-sessions.d.ts +9 -0
- package/dist/index.d.mts +4 -12792
- package/dist/index.d.ts +4 -12792
- package/dist/{stripe.js → index.js} +1 -1
- package/dist/{stripe.mjs → index.mjs} +1 -1
- package/dist/pure.d.mts +5 -0
- package/dist/pure.d.ts +5 -0
- package/dist/pure.js +204 -0
- package/dist/pure.mjs +200 -0
- package/dist/shared.d.mts +6 -0
- package/dist/shared.d.ts +6 -0
- package/dist/stripe-js/checkout.d.mts +153 -0
- package/dist/stripe-js/checkout.d.ts +153 -0
- package/dist/stripe-js/confirmation-tokens.d.mts +1 -0
- package/dist/stripe-js/confirmation-tokens.d.ts +1 -0
- package/dist/stripe-js/custom-checkout.d.mts +402 -0
- package/dist/stripe-js/custom-checkout.d.ts +402 -0
- package/dist/stripe-js/elements/address.d.mts +261 -0
- package/dist/stripe-js/elements/address.d.ts +261 -0
- package/dist/stripe-js/elements/affirm-message.d.mts +65 -0
- package/dist/stripe-js/elements/affirm-message.d.ts +65 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.mts +119 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.ts +119 -0
- package/dist/stripe-js/elements/apple-pay.d.mts +156 -0
- package/dist/stripe-js/elements/apple-pay.d.ts +156 -0
- package/dist/stripe-js/elements/au-bank-account.d.mts +138 -0
- package/dist/stripe-js/elements/au-bank-account.d.ts +138 -0
- package/dist/stripe-js/elements/base.d.mts +264 -0
- package/dist/stripe-js/elements/base.d.ts +264 -0
- package/dist/stripe-js/elements/card-cvc.d.mts +119 -0
- package/dist/stripe-js/elements/card-cvc.d.ts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.mts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.ts +119 -0
- package/dist/stripe-js/elements/card-number.d.mts +200 -0
- package/dist/stripe-js/elements/card-number.d.ts +200 -0
- package/dist/stripe-js/elements/card.d.mts +226 -0
- package/dist/stripe-js/elements/card.d.ts +226 -0
- package/dist/stripe-js/elements/cart.d.mts +224 -0
- package/dist/stripe-js/elements/cart.d.ts +224 -0
- package/dist/stripe-js/elements/eps-bank.d.mts +140 -0
- package/dist/stripe-js/elements/eps-bank.d.ts +140 -0
- package/dist/stripe-js/elements/express-checkout.d.mts +446 -0
- package/dist/stripe-js/elements/express-checkout.d.ts +446 -0
- package/dist/stripe-js/elements/fpx-bank.d.mts +134 -0
- package/dist/stripe-js/elements/fpx-bank.d.ts +134 -0
- package/dist/stripe-js/elements/iban.d.mts +135 -0
- package/dist/stripe-js/elements/iban.d.ts +135 -0
- package/dist/stripe-js/elements/ideal-bank.d.mts +140 -0
- package/dist/stripe-js/elements/ideal-bank.d.ts +140 -0
- package/dist/stripe-js/elements/index.d.mts +22 -0
- package/dist/stripe-js/elements/index.d.ts +22 -0
- package/dist/stripe-js/elements/issuing/index.d.mts +5 -0
- package/dist/stripe-js/elements/issuing/index.d.ts +5 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.mts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.mts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.ts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +32 -0
- package/dist/stripe-js/elements/link-authentication.d.mts +158 -0
- package/dist/stripe-js/elements/link-authentication.d.ts +158 -0
- package/dist/stripe-js/elements/p24-bank.d.mts +140 -0
- package/dist/stripe-js/elements/p24-bank.d.ts +140 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.mts +98 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.ts +98 -0
- package/dist/stripe-js/elements/payment-request-button.d.mts +151 -0
- package/dist/stripe-js/elements/payment-request-button.d.ts +151 -0
- package/dist/stripe-js/elements/payment.d.mts +275 -0
- package/dist/stripe-js/elements/payment.d.ts +275 -0
- package/dist/stripe-js/elements/shipping-address.d.mts +215 -0
- package/dist/stripe-js/elements/shipping-address.d.ts +215 -0
- package/dist/stripe-js/elements-group.d.mts +1129 -0
- package/dist/stripe-js/elements-group.d.ts +1129 -0
- package/dist/stripe-js/embedded-checkout.d.mts +35 -0
- package/dist/stripe-js/embedded-checkout.d.ts +35 -0
- package/dist/stripe-js/ephemeral-keys.d.mts +3 -0
- package/dist/stripe-js/ephemeral-keys.d.ts +3 -0
- package/dist/stripe-js/financial-connections.d.mts +19 -0
- package/dist/stripe-js/financial-connections.d.ts +19 -0
- package/dist/stripe-js/index.d.mts +13 -0
- package/dist/stripe-js/index.d.ts +13 -0
- package/dist/stripe-js/orders.d.mts +9 -0
- package/dist/stripe-js/orders.d.ts +9 -0
- package/dist/stripe-js/payment-intents.d.mts +1470 -0
- package/dist/stripe-js/payment-intents.d.ts +1470 -0
- package/dist/stripe-js/payment-request.d.mts +529 -0
- package/dist/stripe-js/payment-request.d.ts +529 -0
- package/dist/stripe-js/setup-intents.d.mts +250 -0
- package/dist/stripe-js/setup-intents.d.ts +250 -0
- package/dist/stripe-js/stripe.d.mts +1486 -0
- package/dist/stripe-js/stripe.d.ts +1486 -0
- package/dist/stripe-js/token-and-sources.d.mts +110 -0
- package/dist/stripe-js/token-and-sources.d.ts +110 -0
- package/dist/utils.d.mts +2 -0
- package/dist/utils.d.ts +2 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.mjs +1 -0
- package/package.json +11 -10
- package/pure/index.d.mts +1 -12771
- package/pure/index.d.ts +1 -12771
- package/pure/index.js +1 -204
- package/pure/index.mjs +1 -200
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import {StripeElements} from '../stripe-js';
|
|
2
|
+
import {Address} from './shared';
|
|
3
|
+
import {PaymentMethod, PaymentMethodCreateParams} from './payment-methods';
|
|
4
|
+
import {PaymentIntent} from './payment-intents';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The ConfirmationToken object.
|
|
8
|
+
*/
|
|
9
|
+
export interface ConfirmationToken {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the object.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
17
|
+
*/
|
|
18
|
+
object: 'confirmation_token';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
22
|
+
*/
|
|
23
|
+
created: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used. Measured in seconds since the Unix epoch.
|
|
27
|
+
*/
|
|
28
|
+
expires_at: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
32
|
+
*/
|
|
33
|
+
livemode: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
|
|
37
|
+
*/
|
|
38
|
+
payment_intent: null | string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
|
|
42
|
+
*/
|
|
43
|
+
payment_method_preview: ConfirmationToken.PaymentMethodPreview;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The URL your customer is redirected to after they complete the payment.
|
|
47
|
+
*/
|
|
48
|
+
return_url: string | null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Indicates that you intend to make future payments with this ConfirmationToken’s payment method.
|
|
52
|
+
*
|
|
53
|
+
* The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent’s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
|
|
54
|
+
*
|
|
55
|
+
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
|
|
56
|
+
*/
|
|
57
|
+
setup_future_usage: PaymentIntent.SetupFutureUsage | null;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
|
|
61
|
+
*/
|
|
62
|
+
setup_intent: null | string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Shipping information for this ConfirmationToken.
|
|
66
|
+
*/
|
|
67
|
+
shipping: PaymentIntent.Shipping | null;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Set to true when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
|
|
71
|
+
*/
|
|
72
|
+
use_stripe_sdk: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ConfirmationTokenCreateParams {
|
|
76
|
+
/**
|
|
77
|
+
* Data used to create a new payment method.
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
payment_method_data?: {
|
|
81
|
+
/**
|
|
82
|
+
* The customer's billing details.
|
|
83
|
+
*/
|
|
84
|
+
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Shipping information.
|
|
89
|
+
*/
|
|
90
|
+
shipping?: ConfirmationToken.Shipping;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The url your customer will be directed to after they complete authentication.
|
|
94
|
+
*/
|
|
95
|
+
return_url?: string | null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CreateConfirmationToken {
|
|
99
|
+
/**
|
|
100
|
+
* The Elements instance.
|
|
101
|
+
*
|
|
102
|
+
* @docs https://stripe.com/docs/js/elements_object
|
|
103
|
+
*/
|
|
104
|
+
elements: StripeElements;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Parameters for creating the ConfirmationToken.
|
|
108
|
+
* Details collected by Elements will be overriden by values passed here.
|
|
109
|
+
*/
|
|
110
|
+
params?: ConfirmationTokenCreateParams;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export namespace ConfirmationToken {
|
|
114
|
+
export interface Shipping {
|
|
115
|
+
/**
|
|
116
|
+
* Recipient address.
|
|
117
|
+
*/
|
|
118
|
+
address: Address;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Recipient name.
|
|
122
|
+
*/
|
|
123
|
+
name: string | null;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Recipient phone (including extension).
|
|
127
|
+
*/
|
|
128
|
+
phone?: string | null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface PaymentMethodPreview {
|
|
132
|
+
/**
|
|
133
|
+
* The type of the PaymentMethod. An additional hash is included on payment_method_preview with a name matching this value. It contains additional information specific to the PaymentMethod type.
|
|
134
|
+
*/
|
|
135
|
+
type: string;
|
|
136
|
+
|
|
137
|
+
billing_details: PaymentMethod.BillingDetails;
|
|
138
|
+
|
|
139
|
+
acss_debit?: PaymentMethod.AcssDebit;
|
|
140
|
+
|
|
141
|
+
affirm?: PaymentMethod.Affirm;
|
|
142
|
+
|
|
143
|
+
afterpay_clearpay?: PaymentMethod.AfterpayClearpay;
|
|
144
|
+
|
|
145
|
+
au_becs_debit?: PaymentMethod.AuBecsDebit;
|
|
146
|
+
|
|
147
|
+
card?: PaymentMethod.Card;
|
|
148
|
+
|
|
149
|
+
card_present?: PaymentMethod.CardPresent;
|
|
150
|
+
|
|
151
|
+
eps?: PaymentMethod.Eps;
|
|
152
|
+
|
|
153
|
+
fpx?: PaymentMethod.Fpx;
|
|
154
|
+
|
|
155
|
+
grabpay?: PaymentMethod.GrabPay;
|
|
156
|
+
|
|
157
|
+
ideal?: PaymentMethod.Ideal;
|
|
158
|
+
|
|
159
|
+
p24?: PaymentMethod.P24;
|
|
160
|
+
|
|
161
|
+
sepa_debit?: PaymentMethod.SepaDebit;
|
|
162
|
+
|
|
163
|
+
us_bank_account?: PaymentMethod.UsBankAccount;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface MandateData {
|
|
167
|
+
customer_acceptance: {
|
|
168
|
+
type: 'online';
|
|
169
|
+
|
|
170
|
+
online?: {
|
|
171
|
+
/**
|
|
172
|
+
* The IP address from which the Mandate was accepted by the customer.
|
|
173
|
+
*/
|
|
174
|
+
ip_address: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The user agent of the browser from which the Mandate was accepted by the customer.
|
|
178
|
+
*/
|
|
179
|
+
user_agent: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
type SupportedPaymentMethodType = 'us_bank_account' | 'link';
|
|
2
|
+
|
|
3
|
+
interface CommonBalance {
|
|
4
|
+
/**
|
|
5
|
+
* The time that the external institution calculated this balance. Measured
|
|
6
|
+
* in seconds since the Unix epoch.
|
|
7
|
+
*/
|
|
8
|
+
as_of: number;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The balances owed to (or by) the account holder.
|
|
12
|
+
*
|
|
13
|
+
* Each key is a three-letter ISO currency code, in lowercase.
|
|
14
|
+
*
|
|
15
|
+
* Each value is a integer amount. A positive amount indicates money owed to
|
|
16
|
+
* the account holder. A negative amount indicates money owed by the account
|
|
17
|
+
* holder.
|
|
18
|
+
*/
|
|
19
|
+
current: {
|
|
20
|
+
[key: string]: number | undefined;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface CashBalance {
|
|
25
|
+
/**
|
|
26
|
+
* Information on a `cash` balance. Only set if `balance.type` is `cash`.
|
|
27
|
+
*/
|
|
28
|
+
cash: {
|
|
29
|
+
/**
|
|
30
|
+
* The funds available to the account holder. Typically this is the
|
|
31
|
+
* current balance less any holds.
|
|
32
|
+
*
|
|
33
|
+
* Each key is a three-letter ISO currency code, in lowercase.
|
|
34
|
+
*
|
|
35
|
+
* Each value is a integer amount. A positive amount indicates money owed
|
|
36
|
+
* to the account holder. A negative amount indicates money owed by the
|
|
37
|
+
* account holder.
|
|
38
|
+
*/
|
|
39
|
+
available: {[key: string]: number | undefined};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type: 'cash';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface CreditBalance {
|
|
46
|
+
/**
|
|
47
|
+
* Information on a `credit` balance. Only set if `balance.type` is `credit`.
|
|
48
|
+
*/
|
|
49
|
+
credit: {
|
|
50
|
+
/**
|
|
51
|
+
* The credit that has been used by the account holder.
|
|
52
|
+
*
|
|
53
|
+
* Each key is a three-letter ISO currency code, in lowercase
|
|
54
|
+
*
|
|
55
|
+
* Each value is a integer amount. A positive amount indicates money owed
|
|
56
|
+
* to the account holder. A negative amount indicates money owed by the
|
|
57
|
+
* account holder.
|
|
58
|
+
*/
|
|
59
|
+
used: {[key: string]: number | undefined};
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
type: 'credit';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type Balance = (CommonBalance & CashBalance) | (CommonBalance & CreditBalance);
|
|
66
|
+
|
|
67
|
+
interface BalanceRefresh {
|
|
68
|
+
/**
|
|
69
|
+
* The status of the Balance Refresh
|
|
70
|
+
*/
|
|
71
|
+
status: 'pending' | 'succeeded' | 'failed';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Time at which the Balance Refresh was attempted. Measured in seconds since the Unix epoch.
|
|
75
|
+
*/
|
|
76
|
+
last_attempted_at: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface OwnershipRefresh {
|
|
80
|
+
/**
|
|
81
|
+
* The status of the Ownership Refresh
|
|
82
|
+
*/
|
|
83
|
+
status: 'pending' | 'succeeded' | 'failed';
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Time at which the Ownersip Refresh was attempted. Measured in seconds since the Unix epoch.
|
|
87
|
+
*/
|
|
88
|
+
last_attempted_at: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The Financial Connections Session object
|
|
93
|
+
*/
|
|
94
|
+
export interface FinancialConnectionsSession {
|
|
95
|
+
/**
|
|
96
|
+
* Unique identifier for the object.
|
|
97
|
+
*/
|
|
98
|
+
id: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* List of accounts collected by the Session
|
|
102
|
+
*/
|
|
103
|
+
accounts: FinancialConnectionsSession.Account[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Filters applied to the Session
|
|
107
|
+
*/
|
|
108
|
+
filters?: FinancialConnectionsSession.Filters;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* List of data permissions requested in the Session
|
|
112
|
+
*/
|
|
113
|
+
permissions?: FinancialConnectionsSession.Permission[];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* For webview integrations only. The user will be redirected to this URL to return to your app.
|
|
117
|
+
*/
|
|
118
|
+
return_url?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export namespace FinancialConnectionsSession {
|
|
122
|
+
/**
|
|
123
|
+
* The Financial Connections Account object
|
|
124
|
+
*/
|
|
125
|
+
export interface Account {
|
|
126
|
+
/**
|
|
127
|
+
* Unique identifier for the object.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* String representing the object's type. `'linked_account'` is present for backwards-compatibility.
|
|
133
|
+
*/
|
|
134
|
+
object: 'linked_account' | 'financial_connections.account';
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The balance for this Account
|
|
138
|
+
*/
|
|
139
|
+
balance: null | Balance;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The most recent Balance Refresh for this Account
|
|
143
|
+
*/
|
|
144
|
+
balance_refresh: null | BalanceRefresh;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The type of the account.
|
|
148
|
+
*/
|
|
149
|
+
category: 'cash' | 'credit' | 'investment' | 'other';
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
153
|
+
*/
|
|
154
|
+
created: number;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* A human-readable name that has been assigned to this account, either by the account holder or by the institution.
|
|
158
|
+
*/
|
|
159
|
+
display_name: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The name of the institution that holds this account.
|
|
163
|
+
*/
|
|
164
|
+
institution_name: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The last 4 digits of the account number. If present, this will be 4 numeric characters.
|
|
168
|
+
*/
|
|
169
|
+
last4: string | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
173
|
+
*/
|
|
174
|
+
livemode: boolean;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The ID of this account's Ownership resource.
|
|
178
|
+
*/
|
|
179
|
+
ownership: string | null;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The most recent Ownership Refresh for this Account
|
|
183
|
+
*/
|
|
184
|
+
ownership_refresh: null | OwnershipRefresh;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Permissions granted on this Account
|
|
188
|
+
*/
|
|
189
|
+
permissions: Permission[];
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The status of the Account
|
|
193
|
+
*/
|
|
194
|
+
status: 'active' | 'inactive' | 'disconnected';
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The sub-category of the Account
|
|
198
|
+
*/
|
|
199
|
+
subcategory:
|
|
200
|
+
| 'checking'
|
|
201
|
+
| 'savings'
|
|
202
|
+
| 'mortgage'
|
|
203
|
+
| 'line_of_credit'
|
|
204
|
+
| 'credit_card'
|
|
205
|
+
| 'other';
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The types of Payment Methods which can be set up by this Account
|
|
209
|
+
*/
|
|
210
|
+
supported_payment_method_types: SupportedPaymentMethodType[];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Filters to restrict the kinds of accounts to collect.
|
|
215
|
+
*/
|
|
216
|
+
export interface Filters {
|
|
217
|
+
/**
|
|
218
|
+
* List of countries from which to collect accounts.
|
|
219
|
+
*/
|
|
220
|
+
countries?: string[];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Data features to which access can be requested
|
|
225
|
+
*/
|
|
226
|
+
export type Permission =
|
|
227
|
+
| 'payment_method'
|
|
228
|
+
| 'balances'
|
|
229
|
+
| 'transactions'
|
|
230
|
+
| 'ownership'
|
|
231
|
+
| 'account_numbers';
|
|
232
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
type SupportedPaymentMethodType = 'us_bank_account' | 'link';
|
|
2
|
+
|
|
3
|
+
interface CommonBalance {
|
|
4
|
+
/**
|
|
5
|
+
* The time that the external institution calculated this balance. Measured
|
|
6
|
+
* in seconds since the Unix epoch.
|
|
7
|
+
*/
|
|
8
|
+
as_of: number;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The balances owed to (or by) the account holder.
|
|
12
|
+
*
|
|
13
|
+
* Each key is a three-letter ISO currency code, in lowercase.
|
|
14
|
+
*
|
|
15
|
+
* Each value is a integer amount. A positive amount indicates money owed to
|
|
16
|
+
* the account holder. A negative amount indicates money owed by the account
|
|
17
|
+
* holder.
|
|
18
|
+
*/
|
|
19
|
+
current: {
|
|
20
|
+
[key: string]: number | undefined;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface CashBalance {
|
|
25
|
+
/**
|
|
26
|
+
* Information on a `cash` balance. Only set if `balance.type` is `cash`.
|
|
27
|
+
*/
|
|
28
|
+
cash: {
|
|
29
|
+
/**
|
|
30
|
+
* The funds available to the account holder. Typically this is the
|
|
31
|
+
* current balance less any holds.
|
|
32
|
+
*
|
|
33
|
+
* Each key is a three-letter ISO currency code, in lowercase.
|
|
34
|
+
*
|
|
35
|
+
* Each value is a integer amount. A positive amount indicates money owed
|
|
36
|
+
* to the account holder. A negative amount indicates money owed by the
|
|
37
|
+
* account holder.
|
|
38
|
+
*/
|
|
39
|
+
available: {[key: string]: number | undefined};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type: 'cash';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface CreditBalance {
|
|
46
|
+
/**
|
|
47
|
+
* Information on a `credit` balance. Only set if `balance.type` is `credit`.
|
|
48
|
+
*/
|
|
49
|
+
credit: {
|
|
50
|
+
/**
|
|
51
|
+
* The credit that has been used by the account holder.
|
|
52
|
+
*
|
|
53
|
+
* Each key is a three-letter ISO currency code, in lowercase
|
|
54
|
+
*
|
|
55
|
+
* Each value is a integer amount. A positive amount indicates money owed
|
|
56
|
+
* to the account holder. A negative amount indicates money owed by the
|
|
57
|
+
* account holder.
|
|
58
|
+
*/
|
|
59
|
+
used: {[key: string]: number | undefined};
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
type: 'credit';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type Balance = (CommonBalance & CashBalance) | (CommonBalance & CreditBalance);
|
|
66
|
+
|
|
67
|
+
interface BalanceRefresh {
|
|
68
|
+
/**
|
|
69
|
+
* The status of the Balance Refresh
|
|
70
|
+
*/
|
|
71
|
+
status: 'pending' | 'succeeded' | 'failed';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Time at which the Balance Refresh was attempted. Measured in seconds since the Unix epoch.
|
|
75
|
+
*/
|
|
76
|
+
last_attempted_at: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface OwnershipRefresh {
|
|
80
|
+
/**
|
|
81
|
+
* The status of the Ownership Refresh
|
|
82
|
+
*/
|
|
83
|
+
status: 'pending' | 'succeeded' | 'failed';
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Time at which the Ownersip Refresh was attempted. Measured in seconds since the Unix epoch.
|
|
87
|
+
*/
|
|
88
|
+
last_attempted_at: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The Financial Connections Session object
|
|
93
|
+
*/
|
|
94
|
+
export interface FinancialConnectionsSession {
|
|
95
|
+
/**
|
|
96
|
+
* Unique identifier for the object.
|
|
97
|
+
*/
|
|
98
|
+
id: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* List of accounts collected by the Session
|
|
102
|
+
*/
|
|
103
|
+
accounts: FinancialConnectionsSession.Account[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Filters applied to the Session
|
|
107
|
+
*/
|
|
108
|
+
filters?: FinancialConnectionsSession.Filters;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* List of data permissions requested in the Session
|
|
112
|
+
*/
|
|
113
|
+
permissions?: FinancialConnectionsSession.Permission[];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* For webview integrations only. The user will be redirected to this URL to return to your app.
|
|
117
|
+
*/
|
|
118
|
+
return_url?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export namespace FinancialConnectionsSession {
|
|
122
|
+
/**
|
|
123
|
+
* The Financial Connections Account object
|
|
124
|
+
*/
|
|
125
|
+
export interface Account {
|
|
126
|
+
/**
|
|
127
|
+
* Unique identifier for the object.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* String representing the object's type. `'linked_account'` is present for backwards-compatibility.
|
|
133
|
+
*/
|
|
134
|
+
object: 'linked_account' | 'financial_connections.account';
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The balance for this Account
|
|
138
|
+
*/
|
|
139
|
+
balance: null | Balance;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The most recent Balance Refresh for this Account
|
|
143
|
+
*/
|
|
144
|
+
balance_refresh: null | BalanceRefresh;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The type of the account.
|
|
148
|
+
*/
|
|
149
|
+
category: 'cash' | 'credit' | 'investment' | 'other';
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
153
|
+
*/
|
|
154
|
+
created: number;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* A human-readable name that has been assigned to this account, either by the account holder or by the institution.
|
|
158
|
+
*/
|
|
159
|
+
display_name: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The name of the institution that holds this account.
|
|
163
|
+
*/
|
|
164
|
+
institution_name: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The last 4 digits of the account number. If present, this will be 4 numeric characters.
|
|
168
|
+
*/
|
|
169
|
+
last4: string | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
173
|
+
*/
|
|
174
|
+
livemode: boolean;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The ID of this account's Ownership resource.
|
|
178
|
+
*/
|
|
179
|
+
ownership: string | null;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The most recent Ownership Refresh for this Account
|
|
183
|
+
*/
|
|
184
|
+
ownership_refresh: null | OwnershipRefresh;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Permissions granted on this Account
|
|
188
|
+
*/
|
|
189
|
+
permissions: Permission[];
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The status of the Account
|
|
193
|
+
*/
|
|
194
|
+
status: 'active' | 'inactive' | 'disconnected';
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The sub-category of the Account
|
|
198
|
+
*/
|
|
199
|
+
subcategory:
|
|
200
|
+
| 'checking'
|
|
201
|
+
| 'savings'
|
|
202
|
+
| 'mortgage'
|
|
203
|
+
| 'line_of_credit'
|
|
204
|
+
| 'credit_card'
|
|
205
|
+
| 'other';
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The types of Payment Methods which can be set up by this Account
|
|
209
|
+
*/
|
|
210
|
+
supported_payment_method_types: SupportedPaymentMethodType[];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Filters to restrict the kinds of accounts to collect.
|
|
215
|
+
*/
|
|
216
|
+
export interface Filters {
|
|
217
|
+
/**
|
|
218
|
+
* List of countries from which to collect accounts.
|
|
219
|
+
*/
|
|
220
|
+
countries?: string[];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Data features to which access can be requested
|
|
225
|
+
*/
|
|
226
|
+
export type Permission =
|
|
227
|
+
| 'payment_method'
|
|
228
|
+
| 'balances'
|
|
229
|
+
| 'transactions'
|
|
230
|
+
| 'ownership'
|
|
231
|
+
| 'account_numbers';
|
|
232
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './shared';
|
|
2
|
+
export * from './payment-methods';
|
|
3
|
+
export * from './confirmation-tokens';
|
|
4
|
+
export * from './payment-intents';
|
|
5
|
+
export * from './orders';
|
|
6
|
+
export * from './setup-intents';
|
|
7
|
+
export * from './sources';
|
|
8
|
+
export * from './tokens';
|
|
9
|
+
export * from './bank-accounts';
|
|
10
|
+
export * from './cards';
|
|
11
|
+
export * from './verification-sessions';
|
|
12
|
+
export * from './financial-connections';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './shared';
|
|
2
|
+
export * from './payment-methods';
|
|
3
|
+
export * from './confirmation-tokens';
|
|
4
|
+
export * from './payment-intents';
|
|
5
|
+
export * from './orders';
|
|
6
|
+
export * from './setup-intents';
|
|
7
|
+
export * from './sources';
|
|
8
|
+
export * from './tokens';
|
|
9
|
+
export * from './bank-accounts';
|
|
10
|
+
export * from './cards';
|
|
11
|
+
export * from './verification-sessions';
|
|
12
|
+
export * from './financial-connections';
|