> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesadepagos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Queries

> Account balance and transaction history in v3.

The Queries module provides the authenticated business account balance and transaction history for reconciliation. Get a token with [POST /v3/auth/login](https://docs.mesadepagos.com/en/v3/auth.md) and send `Authorization: Bearer {accessToken}` with every request.

## Account Balance

```http theme={null}
GET /v3/transactions/payouts/balance
```

### Response: HTTP 200

```json theme={null}
{
  "fiat": "BOB",
  "available": 1000,
  "accounting": 1200,
  "held": 200,
  "lastCredit": "2026-05-12T12:00:00.000Z",
  "lastDebit": "2026-05-12T12:00:00.000Z"
}
```

| Field | Description |
| - | - |
| `fiat` | Account fiat currency, for example `BOB`. |
| `available` | Balance available for transactions. |
| `accounting` | Accounting balance, including funds not yet released. |
| `held` | Held balance, unavailable for transactions. |
| `lastCredit` | Date of the last credit, or `null` when there are no credits. |
| `lastDebit` | Date of the last debit, or `null` when there are no debits. |

The v3 balance response is a single account object. It uses `available`, `accounting`, and `held`; the v2 array of product balances has a different contract. HTTP `400` indicates a missing account configuration or an invalid request, `401` indicates an authentication failure, and `503` indicates that the balance could not be retrieved.

See the [balance API reference](https://docs.mesadepagos.com/en/v3/api-reference/consultas/balance.md).

## Transaction History

```http theme={null}
GET /v3/transactions/history
```

The history endpoint keeps the v2 request and response contract. Pagination defaults to `page=1` and `limit=10`. A successful query returns HTTP `200`.

### Query Parameters

| Parameter | Required | Description |
| - | - | - |
| `type` | No | Transaction type. |
| `transactionStatus` | No | Transaction status. |
| `page` | No | Requested page. |
| `limit` | No | Records per page. |
| `fromDate` | No | Start date. |
| `toDate` | No | End date. |
| `search` | No | Search text. |

The `type` filter accepts `deposit_virtual_account` for virtual account collections. Transactions of this type can also appear in unfiltered history with `type: "deposit_virtual_account"`. `amountFiat` and `fiatCode` may be `0` and `N/A` while provider details are pending; retrieve the transaction again later for updated values. ACH collections in ATC virtual accounts also include `achNumber` and `recipientNumber` when the provider reports them; these fields are not sent for other types.

### Response

```json theme={null}
{
  "transactions": [
    {
      "amountFiat": 69.6,
      "amountCrypto": 10,
      "assetCode": "USDC",
      "fiatCode": "BOB",
      "exchangeRate": 6.96,
      "transactionId": "550e8400-e29b-41d4-a716-446655440000",
      "type": "deposit_express",
      "status": "completed_transaction",
      "createdAt": "2026-05-12T12:00:00.000Z",
      "updatedAt": "2026-05-12T12:00:00.000Z",
      "externalReference": "ORDER-1001"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1
  }
}
```

See the [transaction history API reference](https://docs.mesadepagos.com/en/v3/api-reference/consultas/historial-de-transacciones.md) for accepted filters and response schemas. Use the history together with [Webhooks v3](https://docs.mesadepagos.com/en/v3/webhooks.md) to reconcile status notifications.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.