Laravel
Configuration
Vatly Laravel Package - Configuration
Vatly Laravel needs your API credentials, webhook secret, and default redirect URLs.
Publish the config file
php artisan vendor:publish --tag=vatly-config
This publishes config/vatly.php so you can customize the package defaults.
Environment variables
Add your credentials to .env:
VATLY_KEY=test_xxxxxxxxxxxxxxxxxxxx
VATLY_WEBHOOK_SECRET=your-webhook-secret
VATLY_REDIRECT_URL_SUCCESS=https://your-app.com/checkout/success
VATLY_REDIRECT_URL_CANCELED=https://your-app.com/checkout/canceled
Available config options
| Config key | Env variable | Description |
|---|---|---|
api_key | VATLY_KEY | Your Vatly API key. Use test_ in test mode and live_ in production. |
webhook_secret | VATLY_WEBHOOK_SECRET | Secret used to verify incoming webhook signatures. |
redirect_url_success | VATLY_REDIRECT_URL_SUCCESS | Default success URL for hosted checkout and billing flows. |
redirect_url_canceled | VATLY_REDIRECT_URL_CANCELED | Default cancel URL for hosted checkout and billing flows. |
Example config file
return [
'api_key' => env('VATLY_KEY'),
'webhook_secret' => env('VATLY_WEBHOOK_SECRET'),
'redirect_url_success' => env('VATLY_REDIRECT_URL_SUCCESS'),
'redirect_url_canceled' => env('VATLY_REDIRECT_URL_CANCELED'),
];
Test mode vs live mode
The package uses whatever API key you configure:
test_...keys talk to your Vatly test environmentlive_...keys talk to your live environment
Use test credentials while building your integration. Switch to your live key only when your products, Mollie onboarding, and webhook handling are ready for production.
Webhook configuration
Make sure your webhook secret in .env matches the webhook endpoint configured in Vatly. The package uses this secret to verify the x-vatly-signature header on incoming webhooks.
For the full webhook setup flow, see Webhooks.