title: Correctly send a 200 response with an empty body to a WebHook. Minimal example provided
body: <p>Following some examples online, I am to return a 200 response for a correctly signed payload, and a 401 response for an incorrectly signed, or malformed payload.</p>
  
  <p>The following minimal example has been tested.  </p>
  
  <p>The signature is being generated correctly, and the <code>checkHash()</code> function identifies the correctly signed/formed payloads.</p>
  
  <p>The feedback I am getting from the endpoint is <strong>Response contained a body</strong>.  The advice given <a href="https://community.xero.com/developer/discussion/73651430" rel="nofollow noreferrer">here</a> is to strip everything from the body of the response -but as far as I can see  all I am return is the literal response as an echo i.e. <strong>200</strong> or <strong>401</strong>.</p>
  
  <pre><code>$key = 'abcSomeKey';    
  $rawPayload = file_get_contents("php://input");
  checkHash();
  
  function getSignature() {
      return base64_encode(hash_hmac('sha256', $rawPayload, $key, true));
  }
  
  function checkHash() {
      $signature = getSignature();
  
      if($signature === $_SERVER['HTTP_X_XERO_SIGNATURE']) {
          echo 200;
      }
      else {
          echo 401;
      }
  }
  </code></pre>