> ## 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 planes

> Obtiene el listado de planes disponibles.

<ParamField query="page" type="number" default="1" required>
  Pagina que desea obtener.
</ParamField>

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

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.onepay.la/v1/plans?page=1', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer sk_test_xxx'
    }
  });
  const data = await response.json();
  console.log(data.data); // Array de planes
  console.log(data.total); // Total de planes
  ```

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

  url = "https://api.onepay.la/v1/plans"
  headers = {
      "Authorization": "Bearer sk_test_xxx"
  }
  params = {
      "page": 1
  }

  response = requests.get(url, headers=headers, params=params)
  data = response.json()
  print(data["data"])  # Array de planes
  print(data["total"])  # Total de planes
  ```

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

  $url = "https://api.onepay.la/v1/plans?" . http_build_query([
      "page" => 1
  ]);

  curl_setopt_array($ch, [
      CURLOPT_URL => $url,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          "Authorization: Bearer sk_test_xxx"
      ]
  ]);

  $response = curl_exec($ch);
  $data = json_decode($response, true);

  print_r($data["data"]); // Array de planes
  echo $data["total"];    // Total de planes

  curl_close($ch);
  ?>
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "9d5f6a52-ff36-41e8-aea3-16d8e0c04f81",
        "name": "SaaS - Plan Empresarial - $120.000",
        "description": "<p>SaaS - Plan Empresarial - $120.000</p>",
        "internal_id": "120KSaaS",
        "coupon_id": null,
        "reference_price_in_cents": "12000000",
        "currency": "COP",
        "amount_in_cents": 12000000,
        "cicle_frequency": "monthly",
        "cicles": 0,
        "allows": {
          "cards": true,
          "accounts": true,
          "card_extra": true,
          "realtime": false,
          "pse": true,
          "transfiya": true
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": [],
        "created_at": "2024-10-30T23:35:12.000000Z",
        "updated_at": "2024-10-30T23:35:12.000000Z",
        "link": "https://pagos.onepay.la/plan/9d5f6a52-ff36-41e8-aea3-16d8e0c04f81"
      },
      {
        "id": "9d3316e7-3272-4f2e-9de1-80a10ecd5aa4",
        "name": "Factcil - Plan Especial",
        "description": "<p>mes 1 al 3 = 25 USD = 100.000 COP<br>Mes 4 al 6 = 50 USD = 200.000 COP<br>Mes 7 en adelante = 100 USD = 400.000 COP</p>",
        "internal_id": null,
        "coupon_id": null,
        "reference_price_in_cents": "400000",
        "currency": "COP",
        "amount_in_cents": 400000,
        "cicle_frequency": "monthly",
        "cicles": 0,
        "allows": {
          "cards": true,
          "accounts": true,
          "card_extra": true,
          "realtime": false,
          "pse": true,
          "transfiya": true
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [
          {
            "amount_in_cents": 100000,
            "apply_on_cicle": 1,
            "for_cicles": 3,
            "label": "Mes 1 al 3",
            "target_price": "400000"
          },
          {
            "amount_in_cents": 200000,
            "apply_on_cicle": 4,
            "for_cicles": 3,
            "label": "Mes 4 al 6",
            "target_price": "400000"
          }
        ],
        "features": [],
        "metadata": null,
        "created_at": "2024-10-08T22:45:31.000000Z",
        "updated_at": "2024-10-08T22:45:31.000000Z",
        "link": "https://pagos.onepay.la/plan/9d3316e7-3272-4f2e-9de1-80a10ecd5aa4"
      },
      {
        "id": "9d5f5cf5-f2a8-4ee0-858a-cac827ec8591",
        "name": "SaaS - Plan Empresarial - $200.000",
        "description": "<p>SaaS Plan Empresarial de $200.000</p>",
        "internal_id": "200KSaaS",
        "coupon_id": null,
        "reference_price_in_cents": "20000000",
        "currency": "COP",
        "amount_in_cents": 20000000,
        "cicle_frequency": "monthly",
        "cicles": 0,
        "allows": {
          "cards": true,
          "accounts": true,
          "card_extra": true,
          "realtime": false,
          "pse": true,
          "transfiya": true
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": [],
        "created_at": "2024-10-30T22:57:50.000000Z",
        "updated_at": "2024-10-30T22:57:50.000000Z",
        "link": "https://pagos.onepay.la/plan/9d5f5cf5-f2a8-4ee0-858a-cac827ec8591"
      },
      {
        "id": "9d62ce3d-10ef-4fb2-adb0-81c8cc95a905",
        "name": "SaaS Plan Empresarial",
        "description": null,
        "internal_id": "balaysubs",
        "coupon_id": null,
        "reference_price_in_cents": "19265100",
        "currency": "COP",
        "amount_in_cents": 19265100,
        "cicle_frequency": "monthly",
        "cicles": 0,
        "allows": {
          "cards": true,
          "accounts": true,
          "card_extra": true,
          "realtime": false,
          "pse": true,
          "transfiya": true
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": null,
        "created_at": "2024-11-01T16:02:04.000000Z",
        "updated_at": "2024-11-01T16:02:04.000000Z",
        "link": "https://pagos.onepay.la/plan/9d62ce3d-10ef-4fb2-adb0-81c8cc95a905"
      },
      {
        "id": "9d62cf0d-0c70-4a1c-9509-5cbbcd62a18b",
        "name": "SaaS Plan empresarial",
        "description": null,
        "internal_id": "softcomputosaas",
        "coupon_id": null,
        "reference_price_in_cents": "4900000",
        "currency": "COP",
        "amount_in_cents": 4900000,
        "cicle_frequency": "monthly",
        "cicles": 6,
        "allows": {
          "cards": true,
          "accounts": true,
          "card_extra": true,
          "realtime": false,
          "pse": true,
          "transfiya": true
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": null,
        "created_at": "2024-11-01T16:04:20.000000Z",
        "updated_at": "2024-11-01T16:04:20.000000Z",
        "link": "https://pagos.onepay.la/plan/9d62cf0d-0c70-4a1c-9509-5cbbcd62a18b"
      },
      {
        "id": "9d62cd1d-071e-41e4-90c9-c73337cdffd2",
        "name": "SaaS Plan Empresarial OnePay",
        "description": null,
        "internal_id": "balaysub",
        "coupon_id": null,
        "reference_price_in_cents": "192651",
        "currency": "COP",
        "amount_in_cents": 192651,
        "cicle_frequency": "monthly",
        "cicles": 0,
        "allows": {
          "cards": true,
          "accounts": true,
          "card_extra": true,
          "realtime": false,
          "pse": true,
          "transfiya": true
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": null,
        "created_at": "2024-11-01T15:58:55.000000Z",
        "updated_at": "2024-11-01T15:58:55.000000Z",
        "link": "https://pagos.onepay.la/plan/9d62cd1d-071e-41e4-90c9-c73337cdffd2"
      },
      {
        "id": "9d858f8e-099c-4c5f-a47c-33fae5c0bed5",
        "name": "Plan Growth",
        "description": "Growth\nTarjetas débito y/o crédito\n1,85% + $300 + IVA\n(Por transacción exitosa)\nPSE, Nequi, DaviPlata\n$1.200 + IVA\n(Por transacción exitosa)",
        "internal_id": "PlanGrowth",
        "coupon_id": null,
        "reference_price_in_cents": "44900000",
        "currency": "COP",
        "amount_in_cents": 44900000,
        "cicle_frequency": "monthly",
        "cicles": null,
        "allows": {
          "cards": true,
          "accounts": true,
          "card_extra": false,
          "realtime": false,
          "pse": true,
          "transfiya": true
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": [],
        "created_at": "2024-11-18T22:40:46.000000Z",
        "updated_at": "2024-11-18T22:40:46.000000Z",
        "link": "https://pagos.onepay.la/plan/9d858f8e-099c-4c5f-a47c-33fae5c0bed5"
      },
      {
        "id": "9ddfae35-61eb-4e7d-9a5c-d9c8644bde28",
        "name": "Plan Empresarial Factcil",
        "description": "1 25usd 2  50 usd  3 100 usd",
        "internal_id": "Factcil-empresarial",
        "coupon_id": null,
        "reference_price_in_cents": "100",
        "currency": "USD",
        "amount_in_cents": 100,
        "cicle_frequency": "monthly",
        "cicles": null,
        "allows": {
          "cards": false,
          "accounts": true,
          "card_extra": false,
          "realtime": false,
          "pse": false,
          "transfiya": false
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": null,
        "created_at": "2025-01-02T17:51:00.000000Z",
        "updated_at": "2025-01-02T17:51:00.000000Z",
        "link": "https://pagos.onepay.la/plan/9ddfae35-61eb-4e7d-9a5c-d9c8644bde28"
      },
      {
        "id": "9ddfb145-d2d5-4806-a8f8-9626a42bcd0b",
        "name": "Plan Empresarial Guama",
        "description": "1 5 USD 2 50 USD 3 100 USD",
        "internal_id": "SaaSGuama",
        "coupon_id": null,
        "reference_price_in_cents": "100",
        "currency": "USD",
        "amount_in_cents": 100,
        "cicle_frequency": "monthly",
        "cicles": null,
        "allows": {
          "cards": false,
          "accounts": true,
          "card_extra": false,
          "realtime": false,
          "pse": false,
          "transfiya": false
        },
        "trial": {
          "has_trial": false,
          "trial_days": 0
        },
        "complex_payments": [],
        "features": [],
        "metadata": null,
        "created_at": "2025-01-02T17:59:34.000000Z",
        "updated_at": "2025-01-02T17:59:34.000000Z",
        "link": "https://pagos.onepay.la/plan/9ddfb145-d2d5-4806-a8f8-9626a42bcd0b"
      }
    ],
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "per_page": 20,
    "to": 9,
    "total": 9
  }
  ```

  ```json 404 theme={null}
  {
     "message":"Registro no encontrado, Token de api no existe",
     "code":10002,
     "code_name":"record_not_found"
  }
  ```
</ResponseExample>
