Skip to main content
Configure Modem Pay for your Laravel app.

Environment Variables

Add these to your .env file:
MODEMPAY_API_KEY=your_api_key_here
MODEMPAY_WEBHOOK_SECRET=your_webhook_secret_here
Never commit your API keys to version control. Always use .env file.

Publish Config (Optional)

If you need to customize settings, publish the config file:
php artisan vendor:publish --tag=modempay-config
This creates config/modempay.php:
return [
    'api_key' => env('MODEMPAY_API_KEY'),
    'webhook_secret' => env('MODEMPAY_WEBHOOK_SECRET'),
];

Getting Your API Keys

  1. Log in to your ModemPay Dashboard
  2. Go to DevelopersAPI Keys
  3. Copy your keys
  4. Add them to .env
Use test keys during development and live keys in production.

Verifying Setup

Test your configuration in Tinker:
php artisan tinker
ModemPay::paymentIntents()->list();
If this works, you’re all set!
I