API04002: Unexpected Response Code
What This Means
The server returned an HTTP status code that wasn't expected for this request. Common codes include 500 (server error), 403 (forbidden), 404 (not found), etc.
Common Causes
- 500 Internal Server Error — PHP crashed or encountered an error
- 403 Forbidden — Access denied by security settings
- 404 Not Found — The endpoint doesn't exist
- 502/503/504 — Server gateway or availability issues
How to Fix
For 500 Errors (Server Error)
- Check PHP error logs
- Increase PHP memory limit
- Look for plugin conflicts
- Check
wp-content/debug.log
For 403 Errors (Forbidden)
- Check security plugin settings (Wordfence, Sucuri, etc.)
- Whitelist the POS or your IP
- Check
.htaccessfor blocking rules - Verify ModSecurity isn't blocking requests
For 404 Errors (Not Found)
- Verify the WCPOS plugin is active
- Flush WordPress permalinks (Settings → Permalinks → Save)
- Check if REST API is enabled
- Verify URL configuration
For 502/503/504 Errors (Gateway Issues)
- Contact your hosting provider
- Wait for server to recover
- Check if site is under heavy load
- Verify server is running
General Troubleshooting
- Try accessing your site directly
- Check hosting control panel for issues
- Review server access logs
- Contact hosting support if needed