My PHP http_response_code is not sending status 200 but status code 302?

Hi all I am facing an issue with my Webhook response code whereby I am sending a Http response code of 302 (redirect) based on my http server logs.
This 302 redirect is overriding my default HTTP response code 200 I have set up in my scripts.
The 302 redirect is coming from the require_once in my main script below but it is after my http_response_code(200).
Any suggestion how do I ensure only my main script’s http_responce_code(200) is being sent out and not the require_once files.
We are using PHP version 5 on our end.
Code snippet as below:

  if (hash_equals($provided_signature, $yourHash)) {

    http_response_code(200);

    if ($product === 'v1'){
        $pymntGateway='curlec';
        require_once "v1_backend.php"; (302 redirect from here)
    }
    elseif ($product === 'v2'){
        $pymntGateway='curlec';
        require_once "v2_backend.php"; (302 redirect from here)
    }
    else{
        http_response_code(202);
        exit('Unknown product.');
    }

  }
  else{
      http_response_code(403); // Forbidden
    exit('Invalid signature.');
  }