# Server Configuration MPESA_SERVER_PORT=8080 # Database Configuration MPESA_DATABASE_URL=postgres://mpesa:mpesa_password@localhost:5432/mpesa_gateway?sslmode=require MPESA_DB_MAX_CONNS=25 MPESA_DB_MIN_CONNS=5 # Redis Configuration MPESA_REDIS_URL=redis://localhost:6379/0 # Security MPESA_INTERNAL_SECRET=change-this-to-a-strong-random-secret-in-production MPESA_SAFARICOM_IPS=196.201.214.200,196.201.214.206,196.201.213.114,196.201.214.207,196.201.214.208,196.201.213.44,196.201.212.127,196.201.212.138,196.201.212.129,196.201.212.136,196.201.212.74,196.201.212.69 # Request Limits MPESA_MAX_REQUEST_SIZE=1048576 # 1MB in bytes # Worker Configuration MPESA_WORKER_CONCURRENCY=10 # Safaricom API Credentials (REQUIRED - Get from Safaricom Developer Portal) MPESA_SAFARICOM_CONSUMER_KEY=your_consumer_key_here MPESA_SAFARICOM_CONSUMER_SECRET=your_consumer_secret_here MPESA_SAFARICOM_PASSKEY=your_passkey_here MPESA_SAFARICOM_SHORT_CODE=174379 # Your business short code # Safaricom API URLs (Use sandbox for testing, production for live) MPESA_SAFARICOM_AUTH_URL=https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials MPESA_SAFARICOM_STK_PUSH_URL=https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest # Your public callback URL (MUST be accessible from Safaricom servers) MPESA_SAFARICOM_CALLBACK_URL=https://your-domain.com/callback # Production URLs (comment out sandbox URLs above when going live) # MPESA_SAFARICOM_AUTH_URL=https://api.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials # MPESA_SAFARICOM_STK_PUSH_URL=https://api.safaricom.co.ke/mpesa/stkpush/v1/processrequest