@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,544 +0,0 @@
|
|
|
1
|
-
# Cards
|
|
2
|
-
(*cards*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [link](#link) - Link a card to an existing Moov account.
|
|
9
|
-
|
|
10
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/#link-a-card) to learn more.
|
|
11
|
-
|
|
12
|
-
Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
|
13
|
-
|
|
14
|
-
During card linking, the provided data will be verified by submitting a $0 authorization (account verification) request.
|
|
15
|
-
If `merchantAccountID` is provided, the authorization request will contain that account's statement descriptor and address.
|
|
16
|
-
Otherwise, the platform account's profile will be used. If no statement descriptor has been set, the authorization will
|
|
17
|
-
use the account's name instead.
|
|
18
|
-
|
|
19
|
-
It is strongly recommended that callers include the `X-Wait-For` header, set to `payment-method`, if the newly linked
|
|
20
|
-
card is intended to be used right away. If this header is not included, the caller will need to poll the [List Payment
|
|
21
|
-
Methods](https://docs.moov.io/api/sources/payment-methods/list/)
|
|
22
|
-
endpoint to wait for the new payment methods to be available for use.
|
|
23
|
-
|
|
24
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
25
|
-
you'll need to specify the `/accounts/{accountID}/cards.write` scope.
|
|
26
|
-
* [list](#list) - List all the active cards associated with a Moov account.
|
|
27
|
-
|
|
28
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/) to learn more.
|
|
29
|
-
|
|
30
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
31
|
-
you'll need to specify the `/accounts/{accountID}/cards.read` scope.
|
|
32
|
-
* [get](#get) - Fetch a specific card associated with a Moov account.
|
|
33
|
-
|
|
34
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/) to learn more.
|
|
35
|
-
|
|
36
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
37
|
-
you'll need to specify the `/accounts/{accountID}/cards.read` scope.
|
|
38
|
-
* [update](#update) - Update a linked card and/or resubmit it for verification.
|
|
39
|
-
|
|
40
|
-
If a value is provided for CVV, a new verification ($0 authorization) will be submitted for the card. Updating the expiration
|
|
41
|
-
date or
|
|
42
|
-
address will update the information stored on file for the card but will not be verified.
|
|
43
|
-
|
|
44
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/#reverify-a-card) to learn
|
|
45
|
-
more.
|
|
46
|
-
|
|
47
|
-
Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
|
48
|
-
|
|
49
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
50
|
-
you'll need to specify the `/accounts/{accountID}/cards.write` scope.
|
|
51
|
-
* [disable](#disable) - Disables a card associated with a Moov account.
|
|
52
|
-
|
|
53
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
54
|
-
you'll need to specify the `/accounts/{accountID}/cards.write` scope.
|
|
55
|
-
|
|
56
|
-
## link
|
|
57
|
-
|
|
58
|
-
Link a card to an existing Moov account.
|
|
59
|
-
|
|
60
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/#link-a-card) to learn more.
|
|
61
|
-
|
|
62
|
-
Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
|
63
|
-
|
|
64
|
-
During card linking, the provided data will be verified by submitting a $0 authorization (account verification) request.
|
|
65
|
-
If `merchantAccountID` is provided, the authorization request will contain that account's statement descriptor and address.
|
|
66
|
-
Otherwise, the platform account's profile will be used. If no statement descriptor has been set, the authorization will
|
|
67
|
-
use the account's name instead.
|
|
68
|
-
|
|
69
|
-
It is strongly recommended that callers include the `X-Wait-For` header, set to `payment-method`, if the newly linked
|
|
70
|
-
card is intended to be used right away. If this header is not included, the caller will need to poll the [List Payment
|
|
71
|
-
Methods](https://docs.moov.io/api/sources/payment-methods/list/)
|
|
72
|
-
endpoint to wait for the new payment methods to be available for use.
|
|
73
|
-
|
|
74
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
75
|
-
you'll need to specify the `/accounts/{accountID}/cards.write` scope.
|
|
76
|
-
|
|
77
|
-
### Example Usage
|
|
78
|
-
|
|
79
|
-
<!-- UsageSnippet language="typescript" operationID="linkCard" method="post" path="/accounts/{accountID}/cards" -->
|
|
80
|
-
```typescript
|
|
81
|
-
import { Moov } from "@moovio/sdk";
|
|
82
|
-
|
|
83
|
-
const moov = new Moov({
|
|
84
|
-
xMoovVersion: "v2024.01.00",
|
|
85
|
-
security: {
|
|
86
|
-
username: "",
|
|
87
|
-
password: "",
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
async function run() {
|
|
92
|
-
const result = await moov.cards.link({
|
|
93
|
-
xWaitFor: "payment-method",
|
|
94
|
-
accountID: "5593e46f-7936-474b-a52b-96f1da46867b",
|
|
95
|
-
linkCard: {
|
|
96
|
-
cardNumber: "4111111111111111",
|
|
97
|
-
cardCvv: "123",
|
|
98
|
-
expiration: {
|
|
99
|
-
month: "01",
|
|
100
|
-
year: "21",
|
|
101
|
-
},
|
|
102
|
-
holderName: "Jules Jackson",
|
|
103
|
-
billingAddress: {
|
|
104
|
-
postalCode: "80301",
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
console.log(result);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
run();
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Standalone function
|
|
116
|
-
|
|
117
|
-
The standalone function version of this method:
|
|
118
|
-
|
|
119
|
-
```typescript
|
|
120
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
121
|
-
import { cardsLink } from "@moovio/sdk/funcs/cardsLink.js";
|
|
122
|
-
|
|
123
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
124
|
-
// You can create one instance of it to use across an application.
|
|
125
|
-
const moov = new MoovCore({
|
|
126
|
-
xMoovVersion: "v2024.01.00",
|
|
127
|
-
security: {
|
|
128
|
-
username: "",
|
|
129
|
-
password: "",
|
|
130
|
-
},
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
async function run() {
|
|
134
|
-
const res = await cardsLink(moov, {
|
|
135
|
-
xWaitFor: "payment-method",
|
|
136
|
-
accountID: "5593e46f-7936-474b-a52b-96f1da46867b",
|
|
137
|
-
linkCard: {
|
|
138
|
-
cardNumber: "4111111111111111",
|
|
139
|
-
cardCvv: "123",
|
|
140
|
-
expiration: {
|
|
141
|
-
month: "01",
|
|
142
|
-
year: "21",
|
|
143
|
-
},
|
|
144
|
-
holderName: "Jules Jackson",
|
|
145
|
-
billingAddress: {
|
|
146
|
-
postalCode: "80301",
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
});
|
|
150
|
-
if (res.ok) {
|
|
151
|
-
const { value: result } = res;
|
|
152
|
-
console.log(result);
|
|
153
|
-
} else {
|
|
154
|
-
console.log("cardsLink failed:", res.error);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
run();
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Parameters
|
|
162
|
-
|
|
163
|
-
| Parameter | Type | Required | Description |
|
|
164
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
165
|
-
| `request` | [operations.LinkCardRequest](../../models/operations/linkcardrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
166
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
167
|
-
| `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. |
|
|
168
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
169
|
-
|
|
170
|
-
### Response
|
|
171
|
-
|
|
172
|
-
**Promise\<[operations.LinkCardResponse](../../models/operations/linkcardresponse.md)\>**
|
|
173
|
-
|
|
174
|
-
### Errors
|
|
175
|
-
|
|
176
|
-
| Error Type | Status Code | Content Type |
|
|
177
|
-
| -------------------- | -------------------- | -------------------- |
|
|
178
|
-
| errors.GenericError | 400 | application/json |
|
|
179
|
-
| errors.LinkCardError | 422 | application/json |
|
|
180
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
181
|
-
|
|
182
|
-
## list
|
|
183
|
-
|
|
184
|
-
List all the active cards associated with a Moov account.
|
|
185
|
-
|
|
186
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/) to learn more.
|
|
187
|
-
|
|
188
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
189
|
-
you'll need to specify the `/accounts/{accountID}/cards.read` scope.
|
|
190
|
-
|
|
191
|
-
### Example Usage
|
|
192
|
-
|
|
193
|
-
<!-- UsageSnippet language="typescript" operationID="listCards" method="get" path="/accounts/{accountID}/cards" -->
|
|
194
|
-
```typescript
|
|
195
|
-
import { Moov } from "@moovio/sdk";
|
|
196
|
-
|
|
197
|
-
const moov = new Moov({
|
|
198
|
-
xMoovVersion: "v2024.01.00",
|
|
199
|
-
security: {
|
|
200
|
-
username: "",
|
|
201
|
-
password: "",
|
|
202
|
-
},
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
async function run() {
|
|
206
|
-
const result = await moov.cards.list({
|
|
207
|
-
accountID: "b902712f-8ab9-47ba-b39f-5ccfbcac528c",
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
console.log(result);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
run();
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### Standalone function
|
|
217
|
-
|
|
218
|
-
The standalone function version of this method:
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
222
|
-
import { cardsList } from "@moovio/sdk/funcs/cardsList.js";
|
|
223
|
-
|
|
224
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
225
|
-
// You can create one instance of it to use across an application.
|
|
226
|
-
const moov = new MoovCore({
|
|
227
|
-
xMoovVersion: "v2024.01.00",
|
|
228
|
-
security: {
|
|
229
|
-
username: "",
|
|
230
|
-
password: "",
|
|
231
|
-
},
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
async function run() {
|
|
235
|
-
const res = await cardsList(moov, {
|
|
236
|
-
accountID: "b902712f-8ab9-47ba-b39f-5ccfbcac528c",
|
|
237
|
-
});
|
|
238
|
-
if (res.ok) {
|
|
239
|
-
const { value: result } = res;
|
|
240
|
-
console.log(result);
|
|
241
|
-
} else {
|
|
242
|
-
console.log("cardsList failed:", res.error);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
run();
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Parameters
|
|
250
|
-
|
|
251
|
-
| Parameter | Type | Required | Description |
|
|
252
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
253
|
-
| `request` | [operations.ListCardsRequest](../../models/operations/listcardsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
254
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
255
|
-
| `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. |
|
|
256
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
257
|
-
|
|
258
|
-
### Response
|
|
259
|
-
|
|
260
|
-
**Promise\<[operations.ListCardsResponse](../../models/operations/listcardsresponse.md)\>**
|
|
261
|
-
|
|
262
|
-
### Errors
|
|
263
|
-
|
|
264
|
-
| Error Type | Status Code | Content Type |
|
|
265
|
-
| --------------- | --------------- | --------------- |
|
|
266
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
267
|
-
|
|
268
|
-
## get
|
|
269
|
-
|
|
270
|
-
Fetch a specific card associated with a Moov account.
|
|
271
|
-
|
|
272
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/) to learn more.
|
|
273
|
-
|
|
274
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
275
|
-
you'll need to specify the `/accounts/{accountID}/cards.read` scope.
|
|
276
|
-
|
|
277
|
-
### Example Usage
|
|
278
|
-
|
|
279
|
-
<!-- UsageSnippet language="typescript" operationID="getCard" method="get" path="/accounts/{accountID}/cards/{cardID}" -->
|
|
280
|
-
```typescript
|
|
281
|
-
import { Moov } from "@moovio/sdk";
|
|
282
|
-
|
|
283
|
-
const moov = new Moov({
|
|
284
|
-
xMoovVersion: "v2024.01.00",
|
|
285
|
-
security: {
|
|
286
|
-
username: "",
|
|
287
|
-
password: "",
|
|
288
|
-
},
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
async function run() {
|
|
292
|
-
const result = await moov.cards.get({
|
|
293
|
-
accountID: "1f590cf9-4db9-4241-8818-30f9c26362e8",
|
|
294
|
-
cardID: "01234567-89ab-cdef-0123-456789abcdef",
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
console.log(result);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
run();
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### Standalone function
|
|
304
|
-
|
|
305
|
-
The standalone function version of this method:
|
|
306
|
-
|
|
307
|
-
```typescript
|
|
308
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
309
|
-
import { cardsGet } from "@moovio/sdk/funcs/cardsGet.js";
|
|
310
|
-
|
|
311
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
312
|
-
// You can create one instance of it to use across an application.
|
|
313
|
-
const moov = new MoovCore({
|
|
314
|
-
xMoovVersion: "v2024.01.00",
|
|
315
|
-
security: {
|
|
316
|
-
username: "",
|
|
317
|
-
password: "",
|
|
318
|
-
},
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
async function run() {
|
|
322
|
-
const res = await cardsGet(moov, {
|
|
323
|
-
accountID: "1f590cf9-4db9-4241-8818-30f9c26362e8",
|
|
324
|
-
cardID: "01234567-89ab-cdef-0123-456789abcdef",
|
|
325
|
-
});
|
|
326
|
-
if (res.ok) {
|
|
327
|
-
const { value: result } = res;
|
|
328
|
-
console.log(result);
|
|
329
|
-
} else {
|
|
330
|
-
console.log("cardsGet failed:", res.error);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
run();
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### Parameters
|
|
338
|
-
|
|
339
|
-
| Parameter | Type | Required | Description |
|
|
340
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
341
|
-
| `request` | [operations.GetCardRequest](../../models/operations/getcardrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
342
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
343
|
-
| `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. |
|
|
344
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
345
|
-
|
|
346
|
-
### Response
|
|
347
|
-
|
|
348
|
-
**Promise\<[operations.GetCardResponse](../../models/operations/getcardresponse.md)\>**
|
|
349
|
-
|
|
350
|
-
### Errors
|
|
351
|
-
|
|
352
|
-
| Error Type | Status Code | Content Type |
|
|
353
|
-
| --------------- | --------------- | --------------- |
|
|
354
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
355
|
-
|
|
356
|
-
## update
|
|
357
|
-
|
|
358
|
-
Update a linked card and/or resubmit it for verification.
|
|
359
|
-
|
|
360
|
-
If a value is provided for CVV, a new verification ($0 authorization) will be submitted for the card. Updating the expiration
|
|
361
|
-
date or
|
|
362
|
-
address will update the information stored on file for the card but will not be verified.
|
|
363
|
-
|
|
364
|
-
Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/#reverify-a-card) to learn
|
|
365
|
-
more.
|
|
366
|
-
|
|
367
|
-
Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
|
368
|
-
|
|
369
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
370
|
-
you'll need to specify the `/accounts/{accountID}/cards.write` scope.
|
|
371
|
-
|
|
372
|
-
### Example Usage
|
|
373
|
-
|
|
374
|
-
<!-- UsageSnippet language="typescript" operationID="updateCard" method="patch" path="/accounts/{accountID}/cards/{cardID}" -->
|
|
375
|
-
```typescript
|
|
376
|
-
import { Moov } from "@moovio/sdk";
|
|
377
|
-
|
|
378
|
-
const moov = new Moov({
|
|
379
|
-
xMoovVersion: "v2024.01.00",
|
|
380
|
-
security: {
|
|
381
|
-
username: "",
|
|
382
|
-
password: "",
|
|
383
|
-
},
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
async function run() {
|
|
387
|
-
const result = await moov.cards.update({
|
|
388
|
-
accountID: "7104688e-8434-482e-9556-4784be3ad3fe",
|
|
389
|
-
cardID: "01234567-89ab-cdef-0123-456789abcdef",
|
|
390
|
-
updateCard: {
|
|
391
|
-
cardCvv: "456",
|
|
392
|
-
},
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
console.log(result);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
run();
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
### Standalone function
|
|
402
|
-
|
|
403
|
-
The standalone function version of this method:
|
|
404
|
-
|
|
405
|
-
```typescript
|
|
406
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
407
|
-
import { cardsUpdate } from "@moovio/sdk/funcs/cardsUpdate.js";
|
|
408
|
-
|
|
409
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
410
|
-
// You can create one instance of it to use across an application.
|
|
411
|
-
const moov = new MoovCore({
|
|
412
|
-
xMoovVersion: "v2024.01.00",
|
|
413
|
-
security: {
|
|
414
|
-
username: "",
|
|
415
|
-
password: "",
|
|
416
|
-
},
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
async function run() {
|
|
420
|
-
const res = await cardsUpdate(moov, {
|
|
421
|
-
accountID: "7104688e-8434-482e-9556-4784be3ad3fe",
|
|
422
|
-
cardID: "01234567-89ab-cdef-0123-456789abcdef",
|
|
423
|
-
updateCard: {
|
|
424
|
-
cardCvv: "456",
|
|
425
|
-
},
|
|
426
|
-
});
|
|
427
|
-
if (res.ok) {
|
|
428
|
-
const { value: result } = res;
|
|
429
|
-
console.log(result);
|
|
430
|
-
} else {
|
|
431
|
-
console.log("cardsUpdate failed:", res.error);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
run();
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
### Parameters
|
|
439
|
-
|
|
440
|
-
| Parameter | Type | Required | Description |
|
|
441
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
442
|
-
| `request` | [operations.UpdateCardRequest](../../models/operations/updatecardrequest.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.UpdateCardResponse](../../models/operations/updatecardresponse.md)\>**
|
|
450
|
-
|
|
451
|
-
### Errors
|
|
452
|
-
|
|
453
|
-
| Error Type | Status Code | Content Type |
|
|
454
|
-
| ---------------------- | ---------------------- | ---------------------- |
|
|
455
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
456
|
-
| errors.UpdateCardError | 422 | application/json |
|
|
457
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
458
|
-
|
|
459
|
-
## disable
|
|
460
|
-
|
|
461
|
-
Disables a card associated with a Moov account.
|
|
462
|
-
|
|
463
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
464
|
-
you'll need to specify the `/accounts/{accountID}/cards.write` scope.
|
|
465
|
-
|
|
466
|
-
### Example Usage
|
|
467
|
-
|
|
468
|
-
<!-- UsageSnippet language="typescript" operationID="disableCard" method="delete" path="/accounts/{accountID}/cards/{cardID}" -->
|
|
469
|
-
```typescript
|
|
470
|
-
import { Moov } from "@moovio/sdk";
|
|
471
|
-
|
|
472
|
-
const moov = new Moov({
|
|
473
|
-
xMoovVersion: "v2024.01.00",
|
|
474
|
-
security: {
|
|
475
|
-
username: "",
|
|
476
|
-
password: "",
|
|
477
|
-
},
|
|
478
|
-
});
|
|
479
|
-
|
|
480
|
-
async function run() {
|
|
481
|
-
const result = await moov.cards.disable({
|
|
482
|
-
accountID: "bbd12cb2-58f4-46e5-861d-1e6c4617c0c2",
|
|
483
|
-
cardID: "01234567-89ab-cdef-0123-456789abcdef",
|
|
484
|
-
});
|
|
485
|
-
|
|
486
|
-
console.log(result);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
run();
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
### Standalone function
|
|
493
|
-
|
|
494
|
-
The standalone function version of this method:
|
|
495
|
-
|
|
496
|
-
```typescript
|
|
497
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
498
|
-
import { cardsDisable } from "@moovio/sdk/funcs/cardsDisable.js";
|
|
499
|
-
|
|
500
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
501
|
-
// You can create one instance of it to use across an application.
|
|
502
|
-
const moov = new MoovCore({
|
|
503
|
-
xMoovVersion: "v2024.01.00",
|
|
504
|
-
security: {
|
|
505
|
-
username: "",
|
|
506
|
-
password: "",
|
|
507
|
-
},
|
|
508
|
-
});
|
|
509
|
-
|
|
510
|
-
async function run() {
|
|
511
|
-
const res = await cardsDisable(moov, {
|
|
512
|
-
accountID: "bbd12cb2-58f4-46e5-861d-1e6c4617c0c2",
|
|
513
|
-
cardID: "01234567-89ab-cdef-0123-456789abcdef",
|
|
514
|
-
});
|
|
515
|
-
if (res.ok) {
|
|
516
|
-
const { value: result } = res;
|
|
517
|
-
console.log(result);
|
|
518
|
-
} else {
|
|
519
|
-
console.log("cardsDisable failed:", res.error);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
run();
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
### Parameters
|
|
527
|
-
|
|
528
|
-
| Parameter | Type | Required | Description |
|
|
529
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
530
|
-
| `request` | [operations.DisableCardRequest](../../models/operations/disablecardrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
531
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
532
|
-
| `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. |
|
|
533
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
534
|
-
|
|
535
|
-
### Response
|
|
536
|
-
|
|
537
|
-
**Promise\<[operations.DisableCardResponse](../../models/operations/disablecardresponse.md)\>**
|
|
538
|
-
|
|
539
|
-
### Errors
|
|
540
|
-
|
|
541
|
-
| Error Type | Status Code | Content Type |
|
|
542
|
-
| ------------------- | ------------------- | ------------------- |
|
|
543
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
544
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|