This solution article is exclusively for Wordpress’ Chargebee plugin users
While testing your WordPress & Chargebee integration, you may possibly receive errors with the following error codes 400, 401, 403 and 404. The reason for these errors and the corresponding steps for rectification are listed below.
Error code | Reason | Fix |
400 | Data used is that of the ‘latest customer created’ and hence cannot be tested twice. For example, after testing the Customer Created webhook once, the error will only be thrown while trying to test it again. This is because the same customer details are attempted to be created twice. | Test webhooks only once. |
401 | Your site’s basic authentication may be broken, as the attributes of Username and Password would not be present if your site is built using CGI/ fast CGI. | Do the following changes to your website’s code. 1. Insert RewriteEngine on RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] </IfModule> in your .htaccess file 2. Insert list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); in your site’s PHP code |
403 | Username or Password is inaccurate. | Check accuracy of Username & Password and make appropriate changes to it. |
404 | The site URL entered is incorrect. | Recheck URL and rectify the discrepancy. |