> For the complete documentation index, see [llms.txt](https://docs.velafi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.velafi.com/velafi-1/api-reference/merchant/get-a-list-of-merchant-accounts.md).

# Get a List of Merchant Accounts

This API retrieves a list of accounts associated with merchants based on optional query parameters.

#### Endpoint Information

* **Request Header**: `X-BH-TOKEN: ******`
* **Request Method**: `GET`
* **Request Path**: `/v2/merchant/accounts`
* **Authorization Required**: Yes

#### Query Parameters

* **merchantId**: (int) The ID (MID) associated with the Merchant (optional).
* **merchantName**: (string) The name of the merchant (optional).
* **email**: (string) The email of the merchant (optional).
* **fiat**: (string) The fiat currency (optional).
* **status**: (int) The status of the merchant \[1: authenticating, 2: normal, 3: authentication failed] (optional).
* **currentPage**: (int) The current page number (optional).
* **pageSize**: (int) The number of results per page (default is 10, maximum is 1000).

#### Response Structure

The response will include the following fields:

```json
{
    "code": 200,
    "msg": "SUCCESS",
    "data": {
        "currentPage": 1,                  // (number: current page number)
        "size": 10,                         // (number: number of results per page)
        "total": 100,                       // (number: total number of results)
        "data": [                           // (array: list of merchant accounts)
            {   
                "merchantId": 1,            // (number: id of the merchant)
                "fiat": "MXN",               // (string: name of the fiat currency)
                "balance": "100.00",         // (decimal: amount of Merchant balance)
                "status": 1,                 // (enum: status of the merchant [1: authenticating, 2: normal, 3: authentication failed, 4: incomplete])
                "buyAmountLimit": "0",       // (number: from amount limit of the fiat currency)
                "buyAmountUsed": "2000.00",  // (number: from amount used of the fiat currency)
                "sellAmountLimit": "10000.00", // (number: to amount limit of the fiat currency)
                "sellAmountUsed": "0",       // (number: to amount used of the fiat currency)
                "paymentId": 58,             // (number: ID of the payment configuration)
                "paymentMethodName": "Automated SPEI - Arcus", // (string: name of the payment method)
                "createTime": "1737452292000", // (string: timestamp of the create time (milliseconds))
                "updateTime": "1737452344000" // (string: timestamp of the update time (milliseconds))
            }
        ]
    }
}
```

#### Example Response

```json
{
    "code": 200,
    "msg": "SUCCESS",
    "data": {
        "currentPage": 1,
        "size": 10,
        "total": 100,
        "data": [
            {
                "merchantId": 1,
                "fiat": "MXN",
                "balance": "100.00",
                "status": 2,
                "buyAmountLimit": "0",
                "buyAmountUsed": "2000.00",
                "sellAmountLimit": "10000.00",
                "sellAmountUsed": "0",
                "paymentId": 58, 
                "paymentMethodName": "Automated SPEI - Arcus",
                "createTime": "1737452292000",
                "updateTime": "1737452344000"
            },
            {
                "merchantId": 2,
                "fiat": "ARS",
                "balance": "500.00",
                "status": 1,
                "buyAmountLimit": "1000.00",
                "buyAmountUsed": "500.00",
                "sellAmountLimit": "20000.00",
                "sellAmountUsed": "1000.00",
                "paymentId": 63, 
                "paymentMethodName": "Automated Bank Transfer",
                "createTime": "1737452292001",
                "updateTime": "1737452344001"
            }
            // Additional merchant accounts may be included
        ]
    }
}
```

#### Notes

* The `currentPage` field indicates the page of results currently being returned.
* The `size` field shows the number of results returned per page.
* The `total` field indicates the total number of merchant accounts available based on the query.
* Each account object includes relevant details such as merchant ID, fiat currency, balance, status, limits, and timestamps for creation and updates.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.velafi.com/velafi-1/api-reference/merchant/get-a-list-of-merchant-accounts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
