@moovio/sdk 0.21.0 → 0.21.2
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/bin/mcp-server.js +79 -61
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/hooks/hooks.d.ts +3 -2
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js.map +1 -1
- package/hooks/moov-version-hook.d.ts +6 -0
- package/hooks/moov-version-hook.d.ts.map +1 -0
- package/hooks/moov-version-hook.js +12 -0
- package/hooks/moov-version-hook.js.map +1 -0
- package/hooks/registration.d.ts.map +1 -1
- package/hooks/registration.js +3 -1
- package/hooks/registration.js.map +1 -1
- package/hooks/types.d.ts +2 -6
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +5 -6
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +1 -1
- package/src/hooks/hooks.ts +2 -2
- package/src/hooks/moov-version-hook.ts +9 -0
- package/src/hooks/registration.ts +4 -1
- package/src/hooks/types.ts +2 -7
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +6 -7
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/docs/sdks/accounts/README.md +0 -1038
- package/docs/sdks/accountterminalapplications/README.md +0 -371
- package/docs/sdks/adjustments/README.md +0 -185
- package/docs/sdks/applepay/README.md +0 -572
- package/docs/sdks/authentication/README.md +0 -191
- package/docs/sdks/avatars/README.md +0 -95
- package/docs/sdks/bankaccounts/README.md +0 -951
- package/docs/sdks/branding/README.md +0 -407
- package/docs/sdks/capabilities/README.md +0 -380
- package/docs/sdks/cardissuing/README.md +0 -533
- package/docs/sdks/cards/README.md +0 -544
- package/docs/sdks/disputes/README.md +0 -1085
- package/docs/sdks/endtoendencryption/README.md +0 -174
- package/docs/sdks/enrichedaddress/README.md +0 -95
- package/docs/sdks/enrichedprofile/README.md +0 -95
- package/docs/sdks/feeplans/README.md +0 -921
- package/docs/sdks/files/README.md +0 -293
- package/docs/sdks/images/README.md +0 -616
- package/docs/sdks/industries/README.md +0 -91
- package/docs/sdks/institutions/README.md +0 -184
- package/docs/sdks/issuingtransactions/README.md +0 -465
- package/docs/sdks/onboarding/README.md +0 -389
- package/docs/sdks/paymentlinks/README.md +0 -615
- package/docs/sdks/paymentmethods/README.md +0 -187
- package/docs/sdks/ping/README.md +0 -91
- package/docs/sdks/products/README.md +0 -616
- package/docs/sdks/receipts/README.md +0 -180
- package/docs/sdks/representatives/README.md +0 -603
- package/docs/sdks/scheduling/README.md +0 -1018
- package/docs/sdks/statements/README.md +0 -194
- package/docs/sdks/support/README.md +0 -505
- package/docs/sdks/sweeps/README.md +0 -571
- package/docs/sdks/terminalapplications/README.md +0 -460
- package/docs/sdks/transfers/README.md +0 -1136
- package/docs/sdks/underwriting/README.md +0 -331
- package/docs/sdks/wallets/README.md +0 -416
- package/docs/sdks/wallettransactions/README.md +0 -202
- package/examples/README.md +0 -31
- package/test/README.md +0 -14
|
@@ -1,951 +0,0 @@
|
|
|
1
|
-
# BankAccounts
|
|
2
|
-
(*bankAccounts*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [link](#link) - Link a bank account to an existing Moov account. Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
9
|
-
|
|
10
|
-
It is strongly recommended that callers include the `X-Wait-For` header, set to `payment-method`, if the newly linked
|
|
11
|
-
bank-account is intended to be used right away. If this header is not included, the caller will need to poll the [List Payment
|
|
12
|
-
Methods](https://docs.moov.io/api/sources/payment-methods/list/)
|
|
13
|
-
endpoint to wait for the new payment methods to be available for use.
|
|
14
|
-
|
|
15
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
16
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
17
|
-
* [list](#list) - List all the bank accounts associated with a particular Moov account.
|
|
18
|
-
|
|
19
|
-
Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
20
|
-
|
|
21
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
22
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.read` scope.
|
|
23
|
-
* [get](#get) - Retrieve bank account details (i.e. routing number or account type) associated with a specific Moov account.
|
|
24
|
-
|
|
25
|
-
Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
26
|
-
|
|
27
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
28
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.read` scope.
|
|
29
|
-
* [disable](#disable) - Discontinue using a specified bank account linked to a Moov account.
|
|
30
|
-
|
|
31
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
32
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
33
|
-
* [initiateMicroDeposits](#initiatemicrodeposits) - Micro-deposits help confirm bank account ownership, helping reduce fraud and the risk of unauthorized activity.
|
|
34
|
-
Use this method to initiate the micro-deposit verification, sending two small credit transfers to the bank account
|
|
35
|
-
you want to confirm.
|
|
36
|
-
|
|
37
|
-
If you request micro-deposits before 4:15PM ET, they will appear that same day. If you request micro-deposits any
|
|
38
|
-
time after 4:15PM ET, they will appear the next banking day. When the two credits are initiated, Moov simultaneously
|
|
39
|
-
initiates a debit to recoup the micro-deposits.
|
|
40
|
-
|
|
41
|
-
Micro-deposits initiated for a `sandbox` bank account will always be `$0.00` / `$0.00` and instantly verifiable once initiated.
|
|
42
|
-
|
|
43
|
-
You can simulate micro-deposit verification in test mode. See our [test mode](https://docs.moov.io/guides/get-started/test-mode/#micro-deposits)
|
|
44
|
-
guide for more information.
|
|
45
|
-
|
|
46
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
47
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
48
|
-
* [completeMicroDeposits](#completemicrodeposits) - Complete the micro-deposit validation process by passing the amounts of the two transfers within three tries.
|
|
49
|
-
|
|
50
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
51
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
52
|
-
* [getVerification](#getverification) - Retrieve the current status and details of an instant verification, including whether the verification method was instant or same-day
|
|
53
|
-
ACH. This helps track the verification process in real-time and provides details in case of exceptions.
|
|
54
|
-
|
|
55
|
-
The status will indicate the following:
|
|
56
|
-
|
|
57
|
-
- `new`: Verification initiated, credit pending to the payment network
|
|
58
|
-
- `sent-credit`: Credit sent, available for verification
|
|
59
|
-
- `failed`: Verification failed, description provided, user needs to add a new bank account
|
|
60
|
-
- `expired`: Verification expired after 14 days, initiate another verification
|
|
61
|
-
- `max-attempts-exceeded`: Five incorrect code attempts exhausted, initiate another verification
|
|
62
|
-
|
|
63
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
64
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.read` scope.
|
|
65
|
-
* [initiateVerification](#initiateverification) - Instant micro-deposit verification offers a quick and efficient way to verify bank account ownership.
|
|
66
|
-
|
|
67
|
-
Send a $0.01 credit with a unique verification code via RTP or same-day ACH, depending on the receiving bank's capabilities. This
|
|
68
|
-
feature provides a faster alternative to traditional methods, allowing verification in a single session.
|
|
69
|
-
|
|
70
|
-
It is recommended to use the `X-Wait-For: rail-response` header to synchronously receive the outcome of the instant credit in the
|
|
71
|
-
response payload.
|
|
72
|
-
|
|
73
|
-
Possible verification methods:
|
|
74
|
-
- `instant`: Real-time verification credit sent via RTP
|
|
75
|
-
- `ach`: Verification credit sent via same-day ACH
|
|
76
|
-
|
|
77
|
-
Possible statuses:
|
|
78
|
-
- `new`: Verification initiated, credit pending
|
|
79
|
-
- `sent-credit`: Credit sent, available for verification in the external bank account
|
|
80
|
-
- `failed`: Verification failed due to credit rejection/return, details in `exceptionDetails`
|
|
81
|
-
|
|
82
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
83
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
84
|
-
* [completeVerification](#completeverification) - Finalize the instant micro-deposit verification by submitting the verification code displayed in the user's bank account.
|
|
85
|
-
|
|
86
|
-
Upon successful verification, the bank account status will be updated to `verified` and eligible for ACH debit transactions.
|
|
87
|
-
|
|
88
|
-
The following formats are accepted:
|
|
89
|
-
- `MV0000`
|
|
90
|
-
- `mv0000`
|
|
91
|
-
- `0000`
|
|
92
|
-
|
|
93
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
94
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
95
|
-
|
|
96
|
-
## link
|
|
97
|
-
|
|
98
|
-
Link a bank account to an existing Moov account. Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
99
|
-
|
|
100
|
-
It is strongly recommended that callers include the `X-Wait-For` header, set to `payment-method`, if the newly linked
|
|
101
|
-
bank-account is intended to be used right away. If this header is not included, the caller will need to poll the [List Payment
|
|
102
|
-
Methods](https://docs.moov.io/api/sources/payment-methods/list/)
|
|
103
|
-
endpoint to wait for the new payment methods to be available for use.
|
|
104
|
-
|
|
105
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
106
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
107
|
-
|
|
108
|
-
### Example Usage
|
|
109
|
-
|
|
110
|
-
<!-- UsageSnippet language="typescript" operationID="linkBankAccount" method="post" path="/accounts/{accountID}/bank-accounts" -->
|
|
111
|
-
```typescript
|
|
112
|
-
import { Moov } from "@moovio/sdk";
|
|
113
|
-
|
|
114
|
-
const moov = new Moov({
|
|
115
|
-
xMoovVersion: "v2024.01.00",
|
|
116
|
-
security: {
|
|
117
|
-
username: "",
|
|
118
|
-
password: "",
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
async function run() {
|
|
123
|
-
const result = await moov.bankAccounts.link({
|
|
124
|
-
accountID: "b326319d-6118-4921-8d82-d5810d562eef",
|
|
125
|
-
linkBankAccount: {
|
|
126
|
-
plaidLink: {
|
|
127
|
-
publicToken: "<value>",
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
console.log(result);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
run();
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Standalone function
|
|
139
|
-
|
|
140
|
-
The standalone function version of this method:
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
144
|
-
import { bankAccountsLink } from "@moovio/sdk/funcs/bankAccountsLink.js";
|
|
145
|
-
|
|
146
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
147
|
-
// You can create one instance of it to use across an application.
|
|
148
|
-
const moov = new MoovCore({
|
|
149
|
-
xMoovVersion: "v2024.01.00",
|
|
150
|
-
security: {
|
|
151
|
-
username: "",
|
|
152
|
-
password: "",
|
|
153
|
-
},
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
async function run() {
|
|
157
|
-
const res = await bankAccountsLink(moov, {
|
|
158
|
-
accountID: "b326319d-6118-4921-8d82-d5810d562eef",
|
|
159
|
-
linkBankAccount: {
|
|
160
|
-
plaidLink: {
|
|
161
|
-
publicToken: "<value>",
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
});
|
|
165
|
-
if (res.ok) {
|
|
166
|
-
const { value: result } = res;
|
|
167
|
-
console.log(result);
|
|
168
|
-
} else {
|
|
169
|
-
console.log("bankAccountsLink failed:", res.error);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
run();
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Parameters
|
|
177
|
-
|
|
178
|
-
| Parameter | Type | Required | Description |
|
|
179
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
180
|
-
| `request` | [operations.LinkBankAccountRequest](../../models/operations/linkbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
181
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
182
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
183
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
184
|
-
|
|
185
|
-
### Response
|
|
186
|
-
|
|
187
|
-
**Promise\<[operations.LinkBankAccountResponse](../../models/operations/linkbankaccountresponse.md)\>**
|
|
188
|
-
|
|
189
|
-
### Errors
|
|
190
|
-
|
|
191
|
-
| Error Type | Status Code | Content Type |
|
|
192
|
-
| --------------------------------- | --------------------------------- | --------------------------------- |
|
|
193
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
194
|
-
| errors.BankAccountValidationError | 422 | application/json |
|
|
195
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
196
|
-
|
|
197
|
-
## list
|
|
198
|
-
|
|
199
|
-
List all the bank accounts associated with a particular Moov account.
|
|
200
|
-
|
|
201
|
-
Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
202
|
-
|
|
203
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
204
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.read` scope.
|
|
205
|
-
|
|
206
|
-
### Example Usage
|
|
207
|
-
|
|
208
|
-
<!-- UsageSnippet language="typescript" operationID="listBankAccounts" method="get" path="/accounts/{accountID}/bank-accounts" -->
|
|
209
|
-
```typescript
|
|
210
|
-
import { Moov } from "@moovio/sdk";
|
|
211
|
-
|
|
212
|
-
const moov = new Moov({
|
|
213
|
-
xMoovVersion: "v2024.01.00",
|
|
214
|
-
security: {
|
|
215
|
-
username: "",
|
|
216
|
-
password: "",
|
|
217
|
-
},
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
async function run() {
|
|
221
|
-
const result = await moov.bankAccounts.list({
|
|
222
|
-
accountID: "85539920-22dd-4900-a07e-7a88268456d9",
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
console.log(result);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
run();
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### Standalone function
|
|
232
|
-
|
|
233
|
-
The standalone function version of this method:
|
|
234
|
-
|
|
235
|
-
```typescript
|
|
236
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
237
|
-
import { bankAccountsList } from "@moovio/sdk/funcs/bankAccountsList.js";
|
|
238
|
-
|
|
239
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
240
|
-
// You can create one instance of it to use across an application.
|
|
241
|
-
const moov = new MoovCore({
|
|
242
|
-
xMoovVersion: "v2024.01.00",
|
|
243
|
-
security: {
|
|
244
|
-
username: "",
|
|
245
|
-
password: "",
|
|
246
|
-
},
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
async function run() {
|
|
250
|
-
const res = await bankAccountsList(moov, {
|
|
251
|
-
accountID: "85539920-22dd-4900-a07e-7a88268456d9",
|
|
252
|
-
});
|
|
253
|
-
if (res.ok) {
|
|
254
|
-
const { value: result } = res;
|
|
255
|
-
console.log(result);
|
|
256
|
-
} else {
|
|
257
|
-
console.log("bankAccountsList failed:", res.error);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
run();
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### Parameters
|
|
265
|
-
|
|
266
|
-
| Parameter | Type | Required | Description |
|
|
267
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
268
|
-
| `request` | [operations.ListBankAccountsRequest](../../models/operations/listbankaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
269
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
270
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
271
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
272
|
-
|
|
273
|
-
### Response
|
|
274
|
-
|
|
275
|
-
**Promise\<[operations.ListBankAccountsResponse](../../models/operations/listbankaccountsresponse.md)\>**
|
|
276
|
-
|
|
277
|
-
### Errors
|
|
278
|
-
|
|
279
|
-
| Error Type | Status Code | Content Type |
|
|
280
|
-
| --------------- | --------------- | --------------- |
|
|
281
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
282
|
-
|
|
283
|
-
## get
|
|
284
|
-
|
|
285
|
-
Retrieve bank account details (i.e. routing number or account type) associated with a specific Moov account.
|
|
286
|
-
|
|
287
|
-
Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
288
|
-
|
|
289
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
290
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.read` scope.
|
|
291
|
-
|
|
292
|
-
### Example Usage
|
|
293
|
-
|
|
294
|
-
<!-- UsageSnippet language="typescript" operationID="getBankAccount" method="get" path="/accounts/{accountID}/bank-accounts/{bankAccountID}" -->
|
|
295
|
-
```typescript
|
|
296
|
-
import { Moov } from "@moovio/sdk";
|
|
297
|
-
|
|
298
|
-
const moov = new Moov({
|
|
299
|
-
xMoovVersion: "v2024.01.00",
|
|
300
|
-
security: {
|
|
301
|
-
username: "",
|
|
302
|
-
password: "",
|
|
303
|
-
},
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
async function run() {
|
|
307
|
-
const result = await moov.bankAccounts.get({
|
|
308
|
-
accountID: "32ac681d-3244-4673-8541-362e40b7677a",
|
|
309
|
-
bankAccountID: "dd241177-be83-4aad-80f8-31aded5f3616",
|
|
310
|
-
});
|
|
311
|
-
|
|
312
|
-
console.log(result);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
run();
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
### Standalone function
|
|
319
|
-
|
|
320
|
-
The standalone function version of this method:
|
|
321
|
-
|
|
322
|
-
```typescript
|
|
323
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
324
|
-
import { bankAccountsGet } from "@moovio/sdk/funcs/bankAccountsGet.js";
|
|
325
|
-
|
|
326
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
327
|
-
// You can create one instance of it to use across an application.
|
|
328
|
-
const moov = new MoovCore({
|
|
329
|
-
xMoovVersion: "v2024.01.00",
|
|
330
|
-
security: {
|
|
331
|
-
username: "",
|
|
332
|
-
password: "",
|
|
333
|
-
},
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
async function run() {
|
|
337
|
-
const res = await bankAccountsGet(moov, {
|
|
338
|
-
accountID: "32ac681d-3244-4673-8541-362e40b7677a",
|
|
339
|
-
bankAccountID: "dd241177-be83-4aad-80f8-31aded5f3616",
|
|
340
|
-
});
|
|
341
|
-
if (res.ok) {
|
|
342
|
-
const { value: result } = res;
|
|
343
|
-
console.log(result);
|
|
344
|
-
} else {
|
|
345
|
-
console.log("bankAccountsGet failed:", res.error);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
run();
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
### Parameters
|
|
353
|
-
|
|
354
|
-
| Parameter | Type | Required | Description |
|
|
355
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
356
|
-
| `request` | [operations.GetBankAccountRequest](../../models/operations/getbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
357
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
358
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
359
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
360
|
-
|
|
361
|
-
### Response
|
|
362
|
-
|
|
363
|
-
**Promise\<[operations.GetBankAccountResponse](../../models/operations/getbankaccountresponse.md)\>**
|
|
364
|
-
|
|
365
|
-
### Errors
|
|
366
|
-
|
|
367
|
-
| Error Type | Status Code | Content Type |
|
|
368
|
-
| --------------- | --------------- | --------------- |
|
|
369
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
370
|
-
|
|
371
|
-
## disable
|
|
372
|
-
|
|
373
|
-
Discontinue using a specified bank account linked to a Moov account.
|
|
374
|
-
|
|
375
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
376
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
377
|
-
|
|
378
|
-
### Example Usage
|
|
379
|
-
|
|
380
|
-
<!-- UsageSnippet language="typescript" operationID="disableBankAccount" method="delete" path="/accounts/{accountID}/bank-accounts/{bankAccountID}" -->
|
|
381
|
-
```typescript
|
|
382
|
-
import { Moov } from "@moovio/sdk";
|
|
383
|
-
|
|
384
|
-
const moov = new Moov({
|
|
385
|
-
xMoovVersion: "v2024.01.00",
|
|
386
|
-
security: {
|
|
387
|
-
username: "",
|
|
388
|
-
password: "",
|
|
389
|
-
},
|
|
390
|
-
});
|
|
391
|
-
|
|
392
|
-
async function run() {
|
|
393
|
-
const result = await moov.bankAccounts.disable({
|
|
394
|
-
accountID: "6b6ade5f-0b20-493c-b483-cf1f670a1055",
|
|
395
|
-
bankAccountID: "b9295fc2-f5fd-4767-894f-5ca45abfd3fc",
|
|
396
|
-
});
|
|
397
|
-
|
|
398
|
-
console.log(result);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
run();
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
### Standalone function
|
|
405
|
-
|
|
406
|
-
The standalone function version of this method:
|
|
407
|
-
|
|
408
|
-
```typescript
|
|
409
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
410
|
-
import { bankAccountsDisable } from "@moovio/sdk/funcs/bankAccountsDisable.js";
|
|
411
|
-
|
|
412
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
413
|
-
// You can create one instance of it to use across an application.
|
|
414
|
-
const moov = new MoovCore({
|
|
415
|
-
xMoovVersion: "v2024.01.00",
|
|
416
|
-
security: {
|
|
417
|
-
username: "",
|
|
418
|
-
password: "",
|
|
419
|
-
},
|
|
420
|
-
});
|
|
421
|
-
|
|
422
|
-
async function run() {
|
|
423
|
-
const res = await bankAccountsDisable(moov, {
|
|
424
|
-
accountID: "6b6ade5f-0b20-493c-b483-cf1f670a1055",
|
|
425
|
-
bankAccountID: "b9295fc2-f5fd-4767-894f-5ca45abfd3fc",
|
|
426
|
-
});
|
|
427
|
-
if (res.ok) {
|
|
428
|
-
const { value: result } = res;
|
|
429
|
-
console.log(result);
|
|
430
|
-
} else {
|
|
431
|
-
console.log("bankAccountsDisable failed:", res.error);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
run();
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
### Parameters
|
|
439
|
-
|
|
440
|
-
| Parameter | Type | Required | Description |
|
|
441
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
442
|
-
| `request` | [operations.DisableBankAccountRequest](../../models/operations/disablebankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
443
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
444
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
445
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
446
|
-
|
|
447
|
-
### Response
|
|
448
|
-
|
|
449
|
-
**Promise\<[operations.DisableBankAccountResponse](../../models/operations/disablebankaccountresponse.md)\>**
|
|
450
|
-
|
|
451
|
-
### Errors
|
|
452
|
-
|
|
453
|
-
| Error Type | Status Code | Content Type |
|
|
454
|
-
| ------------------- | ------------------- | ------------------- |
|
|
455
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
456
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
457
|
-
|
|
458
|
-
## initiateMicroDeposits
|
|
459
|
-
|
|
460
|
-
Micro-deposits help confirm bank account ownership, helping reduce fraud and the risk of unauthorized activity.
|
|
461
|
-
Use this method to initiate the micro-deposit verification, sending two small credit transfers to the bank account
|
|
462
|
-
you want to confirm.
|
|
463
|
-
|
|
464
|
-
If you request micro-deposits before 4:15PM ET, they will appear that same day. If you request micro-deposits any
|
|
465
|
-
time after 4:15PM ET, they will appear the next banking day. When the two credits are initiated, Moov simultaneously
|
|
466
|
-
initiates a debit to recoup the micro-deposits.
|
|
467
|
-
|
|
468
|
-
Micro-deposits initiated for a `sandbox` bank account will always be `$0.00` / `$0.00` and instantly verifiable once initiated.
|
|
469
|
-
|
|
470
|
-
You can simulate micro-deposit verification in test mode. See our [test mode](https://docs.moov.io/guides/get-started/test-mode/#micro-deposits)
|
|
471
|
-
guide for more information.
|
|
472
|
-
|
|
473
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
474
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
475
|
-
|
|
476
|
-
### Example Usage
|
|
477
|
-
|
|
478
|
-
<!-- UsageSnippet language="typescript" operationID="initiateMicroDeposits" method="post" path="/accounts/{accountID}/bank-accounts/{bankAccountID}/micro-deposits" -->
|
|
479
|
-
```typescript
|
|
480
|
-
import { Moov } from "@moovio/sdk";
|
|
481
|
-
|
|
482
|
-
const moov = new Moov({
|
|
483
|
-
xMoovVersion: "v2024.01.00",
|
|
484
|
-
security: {
|
|
485
|
-
username: "",
|
|
486
|
-
password: "",
|
|
487
|
-
},
|
|
488
|
-
});
|
|
489
|
-
|
|
490
|
-
async function run() {
|
|
491
|
-
const result = await moov.bankAccounts.initiateMicroDeposits({
|
|
492
|
-
accountID: "ced90412-ebb4-43d4-a171-0a929ed5fb37",
|
|
493
|
-
bankAccountID: "f2b630cc-a8ae-44be-970b-7bed47b2d952",
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
console.log(result);
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
run();
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
### Standalone function
|
|
503
|
-
|
|
504
|
-
The standalone function version of this method:
|
|
505
|
-
|
|
506
|
-
```typescript
|
|
507
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
508
|
-
import { bankAccountsInitiateMicroDeposits } from "@moovio/sdk/funcs/bankAccountsInitiateMicroDeposits.js";
|
|
509
|
-
|
|
510
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
511
|
-
// You can create one instance of it to use across an application.
|
|
512
|
-
const moov = new MoovCore({
|
|
513
|
-
xMoovVersion: "v2024.01.00",
|
|
514
|
-
security: {
|
|
515
|
-
username: "",
|
|
516
|
-
password: "",
|
|
517
|
-
},
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
async function run() {
|
|
521
|
-
const res = await bankAccountsInitiateMicroDeposits(moov, {
|
|
522
|
-
accountID: "ced90412-ebb4-43d4-a171-0a929ed5fb37",
|
|
523
|
-
bankAccountID: "f2b630cc-a8ae-44be-970b-7bed47b2d952",
|
|
524
|
-
});
|
|
525
|
-
if (res.ok) {
|
|
526
|
-
const { value: result } = res;
|
|
527
|
-
console.log(result);
|
|
528
|
-
} else {
|
|
529
|
-
console.log("bankAccountsInitiateMicroDeposits failed:", res.error);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
run();
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
### Parameters
|
|
537
|
-
|
|
538
|
-
| Parameter | Type | Required | Description |
|
|
539
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
540
|
-
| `request` | [operations.InitiateMicroDepositsRequest](../../models/operations/initiatemicrodepositsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
541
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
542
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
543
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
544
|
-
|
|
545
|
-
### Response
|
|
546
|
-
|
|
547
|
-
**Promise\<[operations.InitiateMicroDepositsResponse](../../models/operations/initiatemicrodepositsresponse.md)\>**
|
|
548
|
-
|
|
549
|
-
### Errors
|
|
550
|
-
|
|
551
|
-
| Error Type | Status Code | Content Type |
|
|
552
|
-
| ------------------- | ------------------- | ------------------- |
|
|
553
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
554
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
555
|
-
|
|
556
|
-
## completeMicroDeposits
|
|
557
|
-
|
|
558
|
-
Complete the micro-deposit validation process by passing the amounts of the two transfers within three tries.
|
|
559
|
-
|
|
560
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
561
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
562
|
-
|
|
563
|
-
### Example Usage
|
|
564
|
-
|
|
565
|
-
<!-- UsageSnippet language="typescript" operationID="completeMicroDeposits" method="put" path="/accounts/{accountID}/bank-accounts/{bankAccountID}/micro-deposits" -->
|
|
566
|
-
```typescript
|
|
567
|
-
import { Moov } from "@moovio/sdk";
|
|
568
|
-
|
|
569
|
-
const moov = new Moov({
|
|
570
|
-
xMoovVersion: "v2024.01.00",
|
|
571
|
-
security: {
|
|
572
|
-
username: "",
|
|
573
|
-
password: "",
|
|
574
|
-
},
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
async function run() {
|
|
578
|
-
const result = await moov.bankAccounts.completeMicroDeposits({
|
|
579
|
-
accountID: "af0efd2b-a1fa-40fd-998b-2007b8df0766",
|
|
580
|
-
bankAccountID: "b468e916-699b-4590-becf-ede76d1413cb",
|
|
581
|
-
completeMicroDeposits: {
|
|
582
|
-
amounts: [
|
|
583
|
-
18,
|
|
584
|
-
21,
|
|
585
|
-
],
|
|
586
|
-
},
|
|
587
|
-
});
|
|
588
|
-
|
|
589
|
-
console.log(result);
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
run();
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
### Standalone function
|
|
596
|
-
|
|
597
|
-
The standalone function version of this method:
|
|
598
|
-
|
|
599
|
-
```typescript
|
|
600
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
601
|
-
import { bankAccountsCompleteMicroDeposits } from "@moovio/sdk/funcs/bankAccountsCompleteMicroDeposits.js";
|
|
602
|
-
|
|
603
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
604
|
-
// You can create one instance of it to use across an application.
|
|
605
|
-
const moov = new MoovCore({
|
|
606
|
-
xMoovVersion: "v2024.01.00",
|
|
607
|
-
security: {
|
|
608
|
-
username: "",
|
|
609
|
-
password: "",
|
|
610
|
-
},
|
|
611
|
-
});
|
|
612
|
-
|
|
613
|
-
async function run() {
|
|
614
|
-
const res = await bankAccountsCompleteMicroDeposits(moov, {
|
|
615
|
-
accountID: "af0efd2b-a1fa-40fd-998b-2007b8df0766",
|
|
616
|
-
bankAccountID: "b468e916-699b-4590-becf-ede76d1413cb",
|
|
617
|
-
completeMicroDeposits: {
|
|
618
|
-
amounts: [
|
|
619
|
-
18,
|
|
620
|
-
21,
|
|
621
|
-
],
|
|
622
|
-
},
|
|
623
|
-
});
|
|
624
|
-
if (res.ok) {
|
|
625
|
-
const { value: result } = res;
|
|
626
|
-
console.log(result);
|
|
627
|
-
} else {
|
|
628
|
-
console.log("bankAccountsCompleteMicroDeposits failed:", res.error);
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
run();
|
|
633
|
-
```
|
|
634
|
-
|
|
635
|
-
### Parameters
|
|
636
|
-
|
|
637
|
-
| Parameter | Type | Required | Description |
|
|
638
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
639
|
-
| `request` | [operations.CompleteMicroDepositsRequest](../../models/operations/completemicrodepositsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
640
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
641
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
642
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
643
|
-
|
|
644
|
-
### Response
|
|
645
|
-
|
|
646
|
-
**Promise\<[operations.CompleteMicroDepositsResponse](../../models/operations/completemicrodepositsresponse.md)\>**
|
|
647
|
-
|
|
648
|
-
### Errors
|
|
649
|
-
|
|
650
|
-
| Error Type | Status Code | Content Type |
|
|
651
|
-
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
|
652
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
653
|
-
| errors.MicroDepositValidationError | 422 | application/json |
|
|
654
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
655
|
-
|
|
656
|
-
## getVerification
|
|
657
|
-
|
|
658
|
-
Retrieve the current status and details of an instant verification, including whether the verification method was instant or same-day
|
|
659
|
-
ACH. This helps track the verification process in real-time and provides details in case of exceptions.
|
|
660
|
-
|
|
661
|
-
The status will indicate the following:
|
|
662
|
-
|
|
663
|
-
- `new`: Verification initiated, credit pending to the payment network
|
|
664
|
-
- `sent-credit`: Credit sent, available for verification
|
|
665
|
-
- `failed`: Verification failed, description provided, user needs to add a new bank account
|
|
666
|
-
- `expired`: Verification expired after 14 days, initiate another verification
|
|
667
|
-
- `max-attempts-exceeded`: Five incorrect code attempts exhausted, initiate another verification
|
|
668
|
-
|
|
669
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
670
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.read` scope.
|
|
671
|
-
|
|
672
|
-
### Example Usage
|
|
673
|
-
|
|
674
|
-
<!-- UsageSnippet language="typescript" operationID="getBankAccountVerification" method="get" path="/accounts/{accountID}/bank-accounts/{bankAccountID}/verify" -->
|
|
675
|
-
```typescript
|
|
676
|
-
import { Moov } from "@moovio/sdk";
|
|
677
|
-
|
|
678
|
-
const moov = new Moov({
|
|
679
|
-
xMoovVersion: "v2024.01.00",
|
|
680
|
-
security: {
|
|
681
|
-
username: "",
|
|
682
|
-
password: "",
|
|
683
|
-
},
|
|
684
|
-
});
|
|
685
|
-
|
|
686
|
-
async function run() {
|
|
687
|
-
const result = await moov.bankAccounts.getVerification({
|
|
688
|
-
accountID: "c87bc077-580a-4c2a-b312-2afbd21fc1cd",
|
|
689
|
-
bankAccountID: "aaceed83-ef83-4d48-8136-096f834280cc",
|
|
690
|
-
});
|
|
691
|
-
|
|
692
|
-
console.log(result);
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
run();
|
|
696
|
-
```
|
|
697
|
-
|
|
698
|
-
### Standalone function
|
|
699
|
-
|
|
700
|
-
The standalone function version of this method:
|
|
701
|
-
|
|
702
|
-
```typescript
|
|
703
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
704
|
-
import { bankAccountsGetVerification } from "@moovio/sdk/funcs/bankAccountsGetVerification.js";
|
|
705
|
-
|
|
706
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
707
|
-
// You can create one instance of it to use across an application.
|
|
708
|
-
const moov = new MoovCore({
|
|
709
|
-
xMoovVersion: "v2024.01.00",
|
|
710
|
-
security: {
|
|
711
|
-
username: "",
|
|
712
|
-
password: "",
|
|
713
|
-
},
|
|
714
|
-
});
|
|
715
|
-
|
|
716
|
-
async function run() {
|
|
717
|
-
const res = await bankAccountsGetVerification(moov, {
|
|
718
|
-
accountID: "c87bc077-580a-4c2a-b312-2afbd21fc1cd",
|
|
719
|
-
bankAccountID: "aaceed83-ef83-4d48-8136-096f834280cc",
|
|
720
|
-
});
|
|
721
|
-
if (res.ok) {
|
|
722
|
-
const { value: result } = res;
|
|
723
|
-
console.log(result);
|
|
724
|
-
} else {
|
|
725
|
-
console.log("bankAccountsGetVerification failed:", res.error);
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
run();
|
|
730
|
-
```
|
|
731
|
-
|
|
732
|
-
### Parameters
|
|
733
|
-
|
|
734
|
-
| Parameter | Type | Required | Description |
|
|
735
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
736
|
-
| `request` | [operations.GetBankAccountVerificationRequest](../../models/operations/getbankaccountverificationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
737
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
738
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
739
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
740
|
-
|
|
741
|
-
### Response
|
|
742
|
-
|
|
743
|
-
**Promise\<[operations.GetBankAccountVerificationResponse](../../models/operations/getbankaccountverificationresponse.md)\>**
|
|
744
|
-
|
|
745
|
-
### Errors
|
|
746
|
-
|
|
747
|
-
| Error Type | Status Code | Content Type |
|
|
748
|
-
| --------------- | --------------- | --------------- |
|
|
749
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
750
|
-
|
|
751
|
-
## initiateVerification
|
|
752
|
-
|
|
753
|
-
Instant micro-deposit verification offers a quick and efficient way to verify bank account ownership.
|
|
754
|
-
|
|
755
|
-
Send a $0.01 credit with a unique verification code via RTP or same-day ACH, depending on the receiving bank's capabilities. This
|
|
756
|
-
feature provides a faster alternative to traditional methods, allowing verification in a single session.
|
|
757
|
-
|
|
758
|
-
It is recommended to use the `X-Wait-For: rail-response` header to synchronously receive the outcome of the instant credit in the
|
|
759
|
-
response payload.
|
|
760
|
-
|
|
761
|
-
Possible verification methods:
|
|
762
|
-
- `instant`: Real-time verification credit sent via RTP
|
|
763
|
-
- `ach`: Verification credit sent via same-day ACH
|
|
764
|
-
|
|
765
|
-
Possible statuses:
|
|
766
|
-
- `new`: Verification initiated, credit pending
|
|
767
|
-
- `sent-credit`: Credit sent, available for verification in the external bank account
|
|
768
|
-
- `failed`: Verification failed due to credit rejection/return, details in `exceptionDetails`
|
|
769
|
-
|
|
770
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
771
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
772
|
-
|
|
773
|
-
### Example Usage
|
|
774
|
-
|
|
775
|
-
<!-- UsageSnippet language="typescript" operationID="initiateBankAccountVerification" method="post" path="/accounts/{accountID}/bank-accounts/{bankAccountID}/verify" -->
|
|
776
|
-
```typescript
|
|
777
|
-
import { Moov } from "@moovio/sdk";
|
|
778
|
-
|
|
779
|
-
const moov = new Moov({
|
|
780
|
-
xMoovVersion: "v2024.01.00",
|
|
781
|
-
security: {
|
|
782
|
-
username: "",
|
|
783
|
-
password: "",
|
|
784
|
-
},
|
|
785
|
-
});
|
|
786
|
-
|
|
787
|
-
async function run() {
|
|
788
|
-
const result = await moov.bankAccounts.initiateVerification({
|
|
789
|
-
accountID: "9d6d433b-c13a-48d7-849a-1897fa71375b",
|
|
790
|
-
bankAccountID: "bd092468-393d-4ee0-85a8-48238fee70d2",
|
|
791
|
-
});
|
|
792
|
-
|
|
793
|
-
console.log(result);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
run();
|
|
797
|
-
```
|
|
798
|
-
|
|
799
|
-
### Standalone function
|
|
800
|
-
|
|
801
|
-
The standalone function version of this method:
|
|
802
|
-
|
|
803
|
-
```typescript
|
|
804
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
805
|
-
import { bankAccountsInitiateVerification } from "@moovio/sdk/funcs/bankAccountsInitiateVerification.js";
|
|
806
|
-
|
|
807
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
808
|
-
// You can create one instance of it to use across an application.
|
|
809
|
-
const moov = new MoovCore({
|
|
810
|
-
xMoovVersion: "v2024.01.00",
|
|
811
|
-
security: {
|
|
812
|
-
username: "",
|
|
813
|
-
password: "",
|
|
814
|
-
},
|
|
815
|
-
});
|
|
816
|
-
|
|
817
|
-
async function run() {
|
|
818
|
-
const res = await bankAccountsInitiateVerification(moov, {
|
|
819
|
-
accountID: "9d6d433b-c13a-48d7-849a-1897fa71375b",
|
|
820
|
-
bankAccountID: "bd092468-393d-4ee0-85a8-48238fee70d2",
|
|
821
|
-
});
|
|
822
|
-
if (res.ok) {
|
|
823
|
-
const { value: result } = res;
|
|
824
|
-
console.log(result);
|
|
825
|
-
} else {
|
|
826
|
-
console.log("bankAccountsInitiateVerification failed:", res.error);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
run();
|
|
831
|
-
```
|
|
832
|
-
|
|
833
|
-
### Parameters
|
|
834
|
-
|
|
835
|
-
| Parameter | Type | Required | Description |
|
|
836
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
837
|
-
| `request` | [operations.InitiateBankAccountVerificationRequest](../../models/operations/initiatebankaccountverificationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
838
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
839
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
840
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
841
|
-
|
|
842
|
-
### Response
|
|
843
|
-
|
|
844
|
-
**Promise\<[operations.InitiateBankAccountVerificationResponse](../../models/operations/initiatebankaccountverificationresponse.md)\>**
|
|
845
|
-
|
|
846
|
-
### Errors
|
|
847
|
-
|
|
848
|
-
| Error Type | Status Code | Content Type |
|
|
849
|
-
| ------------------- | ------------------- | ------------------- |
|
|
850
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
851
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
852
|
-
|
|
853
|
-
## completeVerification
|
|
854
|
-
|
|
855
|
-
Finalize the instant micro-deposit verification by submitting the verification code displayed in the user's bank account.
|
|
856
|
-
|
|
857
|
-
Upon successful verification, the bank account status will be updated to `verified` and eligible for ACH debit transactions.
|
|
858
|
-
|
|
859
|
-
The following formats are accepted:
|
|
860
|
-
- `MV0000`
|
|
861
|
-
- `mv0000`
|
|
862
|
-
- `0000`
|
|
863
|
-
|
|
864
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
865
|
-
you'll need to specify the `/accounts/{accountID}/bank-accounts.write` scope.
|
|
866
|
-
|
|
867
|
-
### Example Usage
|
|
868
|
-
|
|
869
|
-
<!-- UsageSnippet language="typescript" operationID="completeBankAccountVerification" method="put" path="/accounts/{accountID}/bank-accounts/{bankAccountID}/verify" -->
|
|
870
|
-
```typescript
|
|
871
|
-
import { Moov } from "@moovio/sdk";
|
|
872
|
-
|
|
873
|
-
const moov = new Moov({
|
|
874
|
-
xMoovVersion: "v2024.01.00",
|
|
875
|
-
security: {
|
|
876
|
-
username: "",
|
|
877
|
-
password: "",
|
|
878
|
-
},
|
|
879
|
-
});
|
|
880
|
-
|
|
881
|
-
async function run() {
|
|
882
|
-
const result = await moov.bankAccounts.completeVerification({
|
|
883
|
-
accountID: "2116e60b-0ea7-447e-a7af-5d647f92f06a",
|
|
884
|
-
bankAccountID: "96606c15-fd37-49fe-9af2-4e42dcf44fe3",
|
|
885
|
-
completeBankAccountVerification: {
|
|
886
|
-
code: "MV1234",
|
|
887
|
-
},
|
|
888
|
-
});
|
|
889
|
-
|
|
890
|
-
console.log(result);
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
run();
|
|
894
|
-
```
|
|
895
|
-
|
|
896
|
-
### Standalone function
|
|
897
|
-
|
|
898
|
-
The standalone function version of this method:
|
|
899
|
-
|
|
900
|
-
```typescript
|
|
901
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
902
|
-
import { bankAccountsCompleteVerification } from "@moovio/sdk/funcs/bankAccountsCompleteVerification.js";
|
|
903
|
-
|
|
904
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
905
|
-
// You can create one instance of it to use across an application.
|
|
906
|
-
const moov = new MoovCore({
|
|
907
|
-
xMoovVersion: "v2024.01.00",
|
|
908
|
-
security: {
|
|
909
|
-
username: "",
|
|
910
|
-
password: "",
|
|
911
|
-
},
|
|
912
|
-
});
|
|
913
|
-
|
|
914
|
-
async function run() {
|
|
915
|
-
const res = await bankAccountsCompleteVerification(moov, {
|
|
916
|
-
accountID: "2116e60b-0ea7-447e-a7af-5d647f92f06a",
|
|
917
|
-
bankAccountID: "96606c15-fd37-49fe-9af2-4e42dcf44fe3",
|
|
918
|
-
completeBankAccountVerification: {
|
|
919
|
-
code: "MV1234",
|
|
920
|
-
},
|
|
921
|
-
});
|
|
922
|
-
if (res.ok) {
|
|
923
|
-
const { value: result } = res;
|
|
924
|
-
console.log(result);
|
|
925
|
-
} else {
|
|
926
|
-
console.log("bankAccountsCompleteVerification failed:", res.error);
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
run();
|
|
931
|
-
```
|
|
932
|
-
|
|
933
|
-
### Parameters
|
|
934
|
-
|
|
935
|
-
| Parameter | Type | Required | Description |
|
|
936
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
937
|
-
| `request` | [operations.CompleteBankAccountVerificationRequest](../../models/operations/completebankaccountverificationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
938
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
939
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
940
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
941
|
-
|
|
942
|
-
### Response
|
|
943
|
-
|
|
944
|
-
**Promise\<[operations.CompleteBankAccountVerificationResponse](../../models/operations/completebankaccountverificationresponse.md)\>**
|
|
945
|
-
|
|
946
|
-
### Errors
|
|
947
|
-
|
|
948
|
-
| Error Type | Status Code | Content Type |
|
|
949
|
-
| ------------------- | ------------------- | ------------------- |
|
|
950
|
-
| errors.GenericError | 400, 409, 422 | application/json |
|
|
951
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|