Configuring PayPal

Junker uses PayPal REST API to process all transactions.

Before creating any billing plan (or subscriptions) you’ll need to configure PayPal with your credentials. To do this, open the .env file located on the root directory on your project directory and add the following:

PAYPAL_MODE=[sandbox or live]
PAYPAL_ID=[your paypal id]
PAYPAL_SECRET=[your paypal secret key]

Without square brackets!

You can find these credentials on your PayPal Developer Account.

PayPal Webhooks

Create a webhook for all events types that points to For security reasons the URL must be https.

You can change this address on app/Http/Routes/api.php file, look for paypal.webhook.

Debugging PayPal Errors

If you are experiencing errors during the payment process, creation of non-free plans etc, the paypal log file will be helpful. By default logging is disabled for paypal.

To enable PayPal logging, open the .env file and add the following:


On PAYPAL_LOG_LEVEL you can add DEBUG, INFO, WARN or ERROR. If you are using the API with mode set to live, the DEBUG value cannot be used.

All PayPal logs are stored on storage/logs/paypal.log. You can change this by adding PAYPAL_LOG_FILE=path/to/file.log on the .env file.

Still need help? Contact Us Contact Us