# Wallets

A Moov wallet serves as a funding source as you accumulate funds. You can also use the Moov wallet to:

- Pre-fund transfers for faster payouts
- Transfer funds between Moov wallets for instantly available funds

At this time, wallets can't be manually created, deleted or modified. They are read-only and are automatically created when you sign up for a Moov account and when you request the `wallet` capability for a verified Moov account.

## [Get wallet](#get-wallet)

Get information on a specific Moov wallet (for example, the available balance).

To get a wallet, you'll need to specify the `/accounts/{accountID}/wallets.read` scope when generating a token.

```javascript
wallets.get(accountID, walletID)
```

**Parameters**

| Name      | Type     | Description                                      |
|-----------|----------|--------------------------------------------------|
| accountID | `string` | Account on which to request wallet               |
| walletID  | `string` | The ID for the wallet associated with an account |

**Returns**

`Promise.<Wallet>`

## [List wallets](#list-wallets)

List the wallet associated with a Moov account.

To list wallets, you'll need to specify the `/accounts/{accountID}/wallets.read` scope when generating a token.

```javascript
wallets.list(accountID)
```

**Parameters**

| Name      | Type     | Description                         |
|-----------|----------|-------------------------------------|
| accountID | `string` | Account on which to request wallets |

**Returns**

`Promise.<Array.<Wallet>>`

## [Get wallet transaction](#get-wallet-transaction)

Get the details of a specific wallet transaction.

To get wallet transaction details, you'll need to specify the `/accounts/{accountID}/wallets.read` scope when generating a token.

```javascript
wallets.getTransaction(accountID, walletID, transactionID)
```

**Parameters**

| Name          | Type     | Description |
|---------------|----------|-------------|
| accountID     | `string` | A unique ID |
| walletID      | `string` | A unique ID |
| transactionID | `string` | A unique ID |

**Returns**

`Promise.<WalletTransaction>`

## [List wallet transactions](#list-wallet-transactions)

List the transactions in a wallet.

To list wallet transactions, you'll need to specify the `/accounts/{accountID}/wallets.read` scope when generating a token.

```javascript
wallets.listTransactions(accountID, walletID, criteria)
```

**Parameters**

| Name      | Type                                                            | Description                                      |
|-----------|-----------------------------------------------------------------|--------------------------------------------------|
| accountID | `string`                                                        | A unique ID                                      |
| walletID  | `string`                                                        | A unique ID                                      |
| criteria  | [WalletTransactionListCriteria](#wallettransactionlistcriteria) | Filtering criteria to limit the results returned |

**Returns**

`Promise.<Array.<Wallet>>`

## [Types](#types)

### [Wallet](#wallet)

Describes a Moov Wallet

**Properties**

| Property         | Type      | Description                                                    |
|------------------|-----------|----------------------------------------------------------------|
| walletID         | `string`  | A unique ID                                                    |
| availableBalance | `integer` | Balance based on all completed transactions against the wallet |

```javascript
{
  "walletID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
  "availableBalance": {
    "currency": "USD",
    "value": 1204 // $12.04
  }
}
```

### [WalletTransaction](#wallettransaction)

**Properties**

| Property         | Type                                                                 | Description                                                                                                                                                                                                                  |
|------------------|----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| walletID         | `string`                                                             | A unique ID                                                                                                                                                                                                                  |
| transactionID    | `string`                                                             | A unique ID                                                                                                                                                                                                                  |
| transactionType  | [WALLET\_TRANSACTION\_TYPE](#wallet_transaction_type)                | wallet transaction type.                                                                                                                                                                                                     |
| sourceType       | [WALLET\_TRANSACTION\_SOURCE\_TYPE](#wallet_transaction_source_type) | where the transaction originated                                                                                                                                                                                             |
| sourceID         | `string`                                                             | ID of the source Moov object to which this transaction is related. Can be one of [walletID](/api/sources/wallets/get/), [cardID](/api/sources/cards/get/), or [bankAccountID](/api/sources/bank-accounts/get/).              |
| status           | [WALLET\_TRANSACTION\_STATUS](#wallet_transaction_status)            | wallet transaction status                                                                                                                                                                                                    |
| memo             | `string`                                                             | Detailed description of the transaction                                                                                                                                                                                      |
| createdOn        | `string`                                                             | Date transaction was created                                                                                                                                                                                                 |
| completedOn      | `string`                                                             | Date transaction was completed                                                                                                                                                                                               |
| currency         | `string`                                                             | 3-letter ISO 4217 currency code                                                                                                                                                                                              |
| grossAmount      | `integer`                                                            | The total transaction amount. The amount is in the smallest unit of the specified currency. In USD this is cents, so $12.04 is 1204 and $0.99 would be 99                                                                    |
| fee              | `integer`                                                            | Total fees paid for the transaction. The amount is in the smallest unit of the specified currency. In USD this is cents, so $12.04 is 1204 and $0.99 would be 99                                                             |
| netAmount        | `integer`                                                            | Net amount is the gross amount less fees paid, and the amount that affects the wallet's balance. The amount is in the smallest unit of the specified currency. In USD this is cents, so $12.04 is 1204 and $0.99 would be 99 |
| availableBalance | `integer`                                                            | The wallet's total available balance after recording a completed transaction. The value is in the smallest unit of the specified currency. In USD this is cents, so $12.04 is 1204 and $0.99 would be 99.                    |

### [WalletTransactionListCriteria](#wallettransactionlistcriteria)

**Properties**

| Property               | Type                                                                 | Description                                                  |
|------------------------|----------------------------------------------------------------------|--------------------------------------------------------------|
| transactionType        | [WALLET\_TRANSACTION\_TYPE](#wallet_transaction_type)                | Only return transactions of this type                        |
| sourceType             | [WALLET\_TRANSACTION\_SOURCE\_TYPE](#wallet_transaction_source_type) | Only return transactions of this source type                 |
| sourceID               | `string`                                                             | Only return transactions that were part of this transfer ID  |
| status                 | [WALLET\_TRANSACTION\_STATUS](#wallet_transaction_status)            | Only return transactions in this state                       |
| createdStartDateTime   | `string`                                                             | Only return transactions created on or after this datetime   |
| createdEndDateTime     | `string`                                                             | Only return transactions created before this datetime        |
| completedStartDateTime | `string`                                                             | Only return transactions completed on or after this datetime |
| completedEndDateTime   | `string`                                                             | Only return transactions completed before this datetime      |
| count                  | `number`                                                             | Maximum number of transactions to return in results          |
| skip                   | `number`                                                             | Number of transactions to skip before collection results     |

## [Enums](#enums)

### [WALLET\_TRANSACTION\_TYPE](#wallet_transaction_type)

| Value                            | Description                                                                                                                                         |
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| ACH\_REVERSAL                    | When an ACH payment is returned, funds are either returned or taken from the wallet balance                                                         |
| CARD\_PAYMENT                    | A payment that was made from a card                                                                                                                 |
| CASH\_OUT                        | Transfer of funds out of a wallet to the account’s bank                                                                                             |
| DISPUTE                          | When a customer disputes a charge, the disputed amount is debited from the wallet                                                                   |
| DISPUTE\_REVERSAL                | If a dispute is won, funds will be credited back to their wallet                                                                                    |
| FACILITATOR\_FEE                 | Fee earned on a transfer                                                                                                                            |
| ISSUING\_REFUND                  | A refund on a purchase from a Moov issued card                                                                                                      |
| ISSUING\_TRANSACTION             | An authorized purchase from a Moov issued card                                                                                                      |
| ISSUING\_TRANSACTION\_ADJUSTMENT | If an authorized purchase is captured for more or less than the original authorization amount, an adjustment will be made to reflect the difference |
| ISSUING\_AUTH\_RELEASE           | Any funds that were not captured from an authorized purchase from a Moov issued card will be released                                               |
| PAYMENT                          | An ACH payment from a bank to the account’s wallet                                                                                                  |
| PAYOUT                           | A payment from a wallet to another accounts bank                                                                                                    |
| REFUND                           | When a refund is initiated, the requested refund amount is debited from the wallet                                                                  |
| REFUND\_FAILURE                  | To account for refund failures, a credit will be made back into the wallet                                                                          |
| TOP\_UP                          | Transfer of funds into a wallet from the account’s bank                                                                                             |
| WALLET\_TRANSFER                 | Funds that move between Moov wallets                                                                                                                |

### [WALLET\_TRANSACTION\_SOURCE\_TYPE](#wallet_transaction_source_type)

| Value                | Description                                    |
|----------------------|------------------------------------------------|
| TRANSFER             | Transaction was part of a transfer             |
| DISPUTE              | Transaction was part of a dispute              |
| ISSUING\_TRANSACTION | Transaction was part of an issuing transaction |

### [WALLET\_TRANSACTION\_STATUS](#wallet_transaction_status)

| Value     | Description                   |
|-----------|-------------------------------|
| PENDING   | Transaction has not completed |
| COMPLETED | Transaction has completed     |
| FAILED    | Transaction failed            |
