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

# Listado de cuentas

> Endpoint para obtener el listado de cuentas bancarias.

### Query Parameters

<ParamField query="customer_id" type="string" placeholder="9dd4158b-0e45-42bc-b56f-a4c1f856814d">
  Filtra cuentas por ID de cliente.
</ParamField>

<ParamField query="page" type="integer" default="1">
  Número de página para paginación.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  Cantidad de resultados por página (máximo 100).
</ParamField>

<ParamField query="status" type="string" placeholder="ACTIVE">
  Filtra cuentas por estado \[PENDING, ACTIVE, REJECTED, INACTIVE].
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.onepay.la/v1/accounts?page=1&limit=20 \
    -H "Authorization: Bearer sk_test_xxx"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.onepay.la/v1/accounts?page=1&limit=20', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer sk_test_xxx'
    }
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.onepay.la/v1/accounts',
      params={'page': 1, 'limit': 20},
      headers={
          'Authorization': 'Bearer sk_test_xxx'
      }
  )

  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.onepay.la/v1/accounts?page=1&limit=20",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer sk_test_xxx"
    ]
  ]);

  $response = curl_exec($curl);
  $data = json_decode($response, true);
  ?>
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "84cc072e-90e8-33cf-9305-098095fed32f",
        "title": "Cuenta Ahorros",
        "subtype": "SAVINGS",
        "status": "ACTIVE",
        "authorization": true,
        "customer_id": "9e01d019-b438-40d2-89e1-52430c69dfb7",
        "re_enroll": false,
        "external_id": null,
        "bank_id": "9e01d019-b731-48bc-b111-2baa3ea56ef6",
        "bank": {
          "id": "9e01d019-b731-48bc-b111-2baa3ea56ef6",
          "name": "Bancolombia",
          "logo": "https://example.com/logo.png"
        }
      },
      {
        "id": "9957817d-239b-4032-8dca-bc508a76579c",
        "title": "Nequi",
        "subtype": "ELECTRONIC_DEPOSIT",
        "status": "ACTIVE",
        "authorization": true,
        "customer_id": "9e01d019-b438-40d2-89e1-52430c69dfb7",
        "re_enroll": false,
        "external_id": null,
        "bank_id": "9957817d-239b-4032-8dca-bc508a76579c",
        "bank": {
          "id": "9957817d-239b-4032-8dca-bc508a76579c",
          "name": "Nequi",
          "logo": "https://example.com/nequi.png"
        }
      }
    ],
    "current_page": 1,
    "first_page_url": "https://api.onepay.la/v1/accounts?page=1",
    "from": 1,
    "next_page_url": null,
    "path": "https://api.onepay.la/v1/accounts",
    "per_page": 20,
    "prev_page_url": null,
    "to": 2
  }
  ```
</ResponseExample>
