Skip to main content
Debug mode gives you detailed error information that is invaluable during development and troubleshooting. It reveals stack traces, SQL queries, and the full middleware pipeline for every request.
Never enable debug mode in production. It exposes sensitive information including database credentials, encryption keys, and internal file paths in error pages and logs.

Enabling debug mode

Set the environment variable in your .env file:
No server restart is needed - the change takes effect on the next request.

What debug mode reveals

When APP_DEBUG=true, OwnPay provides additional information in several areas:

Debug logging

Regardless of APP_DEBUG, OwnPay writes logs to storage/logs/. Log levels follow PSR-3:
The LogSanitizer automatically strips passwords, API keys, encryption keys, and card numbers from all log output. Even in debug mode, these values appear as [REDACTED].

Common debugging scenarios

Payment failing silently

  1. Enable debug mode and attempt the payment again
  2. Check storage/logs/ for the most recent entries
  3. Look for gateway-specific errors (timeout, auth failure, invalid response)
  4. Verify the gateway credentials are correct in Gateways > Payment Gateways

Webhook not arriving

  1. Check Developer > Webhook Delivery Logs for the delivery status and response code
  2. If status is failed, review the error message
  3. Test endpoint reachability: curl -X POST -d '{}' https://your-endpoint.com/webhooks/ownpay
  4. If using Cloudflare or a WAF, check that it is not blocking the request

Plugin not loading

  1. Check Plugins in the admin panel for the plugin’s status
  2. If status is scan_failed, the sandbox rejected the code - check the error for the prohibited function
  3. If status is inactive, click Activate and check for migration errors
  4. Look at storage/logs/ for plugin boot errors

Blank checkout page

  1. Enable debug mode - a Twig compilation error will now show the template name and line
  2. Check that the brand has at least one active gateway
  3. Verify the brand’s theme CSS does not contain syntax errors
  4. Check the browser console for CSP violations (indicates a blocked script or style)

Disabling debug mode

When you have finished troubleshooting, disable debug mode:
Clear the application cache to ensure no debug information lingers in compiled templates:
  1. Go to Settings > Cache in the admin panel
  2. Click Clear All Caches

Last modified on August 25, 2026