```php
<?php

require_once '../../core/api_bootstrap.php';

$data = Request::get();

try {

    Validator::required($data,['plan_id']);

    $db = new Database();
    $conn = $db->connect();

    $query = "

        SELECT *

        FROM plans

        WHERE id = :plan_id

        LIMIT 1

    ";

    $stmt = $conn->prepare($query);

    $stmt->execute([
        ':plan_id'=>$data['plan_id']
    ]);

    $plan = $stmt->fetch();

    if(!$plan){
        Response::error("Plan not found",404);
    }

    Response::success($plan);

}
catch(Exception $e){

    Logger::log("system.log",$e->getMessage());

    Response::error("Server error",500);

}