-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmicro-deposits.ts
155 lines (129 loc) · 3.6 KB
/
micro-deposits.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as ExternalBankAccountsAPI from './external-bank-accounts';
export class MicroDeposits extends APIResource {
/**
* Verify the external bank account by providing the micro deposit amounts.
*/
create(
externalBankAccountToken: string,
body: MicroDepositCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<MicroDepositCreateResponse> {
return this._client.post(`/v1/external_bank_accounts/${externalBankAccountToken}/micro_deposits`, {
body,
...options,
});
}
}
export interface MicroDepositCreateResponse {
/**
* A globally unique identifier for this record of an external bank account
* association. If a program links an external bank account to more than one
* end-user or to both the program and the end-user, then Lithic will return each
* record of the association
*/
token: string;
/**
* The country that the bank account is located in using ISO 3166-1. We will only
* accept USA bank accounts e.g., USA
*/
country: string;
/**
* An ISO 8601 string representing when this funding source was added to the Lithic
* account.
*/
created: string;
/**
* currency of the external account 3-digit alphabetic ISO 4217 code
*/
currency: string;
/**
* The last 4 digits of the bank account. Derived by Lithic from the account number
* passed
*/
last_four: string;
/**
* Legal Name of the business or individual who owns the external account. This
* will appear in statements
*/
owner: string;
/**
* Owner Type
*/
owner_type: 'BUSINESS' | 'INDIVIDUAL';
/**
* Routing Number
*/
routing_number: string;
/**
* Account State
*/
state: 'ENABLED' | 'CLOSED' | 'PAUSED';
/**
* Account Type
*/
type: 'CHECKING' | 'SAVINGS';
/**
* The number of attempts at verification
*/
verification_attempts: number;
/**
* Verification Method
*/
verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE';
/**
* Verification State
*/
verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS';
/**
* Indicates which Lithic account the external account is associated with. For
* external accounts that are associated with the program, account_token field
* returned will be null
*/
account_token?: string;
/**
* Address
*/
address?: ExternalBankAccountsAPI.ExternalBankAccountAddress;
/**
* Optional field that helps identify bank accounts in receipts
*/
company_id?: string;
/**
* Date of Birth of the Individual that owns the external bank account
*/
dob?: string;
/**
* Doing Business As
*/
doing_business_as?: string;
/**
* The financial account token of the operating account to fund the micro deposits
*/
financial_account_token?: string;
/**
* The nickname for this External Bank Account
*/
name?: string;
/**
* User Defined ID
*/
user_defined_id?: string;
/**
* Optional free text description of the reason for the failed verification. For
* ACH micro-deposits returned, this field will display the reason return code sent
* by the ACH network
*/
verification_failed_reason?: string;
}
export interface MicroDepositCreateParams {
micro_deposits: Array<number>;
}
export declare namespace MicroDeposits {
export {
type MicroDepositCreateResponse as MicroDepositCreateResponse,
type MicroDepositCreateParams as MicroDepositCreateParams,
};
}