Standard Setup Workflow (Use for Every Provider)
- Create provider account and complete email/KYC/billing verification.
- Create app/project inside provider dashboard.
- Generate credentials (API key, secret, webhook secret, client ID/secret).
- Add keys to
.envon server and local, then clear/rebuild cache. - Map same credentials in admin system settings if your panel supports runtime overrides.
- Test in sandbox/test mode first, then switch to live credentials.
After changing provider keys, run:
php artisan optimize:clearphp artisan config:cacheAI Providers
Common flow for OpenAI, Anthropic, xAI, DeepSeek, ElevenLabs, Stability AI, Replicate, Fal.ai, Tavily:
Official portals:OpenAI,Anthropic,xAI,DeepSeek,ElevenLabs,Stability AI,Replicate,Fal.ai,Tavily.
- Sign up on the provider website and verify account/billing.
- Open dashboard sections usually named API Keys, Developers, or Credentials.
- Create a new API key and copy it immediately (many platforms only show it once).
- If needed, add allowed domain/IP restrictions and usage limits.
- Paste key into the matching env variable from your project
.env.example.
Typical env variables (based on provider):
OPENAI_API_KEY=sk-xxxxANTHROPIC_API_KEY=sk-ant-xxxxXAI_API_KEY=xxxxDEEPSEEK_API_KEY=xxxxELEVENLABS_API_KEY=xxxx- Set default model/provider in admin settings after env update.
- Run a small test prompt in admin or user panel before go-live.
Auth and Security Providers
Official portals:Google Cloud Console,Cloudflare Dashboard.
Google OAuth setup:
- Create/select project in Google Cloud Console.
- Enable required Google APIs and configure OAuth consent screen.
- Create OAuth Client ID (Web Application).
- Add authorized redirect URI exactly as used by your app route.
- Copy Client ID and Client Secret into env and admin settings.
GOOGLE_CLIENT_ID=xxxxxxxx.apps.googleusercontent.comGOOGLE_CLIENT_SECRET=xxxxxxxxGOOGLE_REDIRECT_URI=https://yourdomain.com/auth/google/callbackCloudflare Turnstile setup:
- Open Cloudflare dashboard and create Turnstile widget for your domain.
- Copy site key (frontend) and secret key (backend).
- Add both keys in env and enable captcha from admin settings page.
TURNSTILE_SITE_KEY=0x4AAAA...TURNSTILE_SECRET_KEY=0x4AAAA...- Always test callback URLs and login flow on production domain before launch.
Payment Gateways
Supported examples include Stripe, Flutterwave, Paystack, PayPal, Cryptomus, Airwallex, Razorpay, Mollie, CoinGate, YooKassa, Midtrans, Iyzico, Paddle, and 2Checkout.
Official portals:Stripe,Flutterwave,Paystack,PayPal,Cryptomus,Airwallex,Razorpay,Mollie,CoinGate,YooKassa,Midtrans,Iyzico,Paddle,2Checkout.
- Register merchant account and complete business verification.
- Open developer/API section and generate test keys first.
- Set webhook URL in provider dashboard (usually
/webhooks/provider-name). - Copy webhook signing secret and store in env.
- Map gateway mode (test/live), public key, secret key in admin settings.
Typical payment env keys:
STRIPE_KEY=pk_test_xxxxSTRIPE_SECRET=sk_test_xxxxSTRIPE_WEBHOOK_SECRET=whsec_xxxxPAYSTACK_PUBLIC_KEY=pk_test_xxxxPAYSTACK_SECRET_KEY=sk_test_xxxx- Do one successful payment and one failed/cancelled payment test before enabling live mode.
Storage Providers (S3 / R2)
Official portals:AWS Console,Cloudflare R2.
Amazon S3: create IAM user with programmatic access, grant least-privilege policy to target bucket, then copy access keys.
Cloudflare R2: create bucket, create API token/access keys, copy account endpoint.
FILESYSTEM_DISK=s3AWS_ACCESS_KEY_ID=xxxxAWS_SECRET_ACCESS_KEY=xxxxAWS_DEFAULT_REGION=us-east-1AWS_BUCKET=your-bucket-nameAWS_ENDPOINT=https://<accountid>.r2.cloudflarestorage.com- For R2, many setups use
AWS_DEFAULT_REGION=auto. - Test upload, read, delete, and signed/private URL access from the app.
Project Env Key Reference (.env.example Mapped)
Use these exact variable names from your current project file. Replace sample values with your own secrets.
AI and Research
OPENAI_API_KEY=ANTHROPIC_API_KEY=XAI_API_KEY=DEEPSEEK_API_KEY=ELEVENLABS_API_KEY=STABILITY_API_KEY=REPLICATE_API_KEY=FAL_KEY=TAVILY_API_KEY=JSEARCH_API_KEY=Google and Auth Security
GOOGLE_CLIENT_ID=GOOGLE_CLIENT_SECRET=GOOGLE_REDIRECT_URI=https://yourdomain.com/auth/google/callbackGOOGLE_DRIVE_CLIENT_ID=GOOGLE_DRIVE_CLIENT_SECRET=GOOGLE_DRIVE_REDIRECT_URI=https://yourdomain.com/admin/integrations/google-drive/callbackTURNSTILE_SITE_KEY=TURNSTILE_SECRET_KEY=Payment Gateways
STRIPE_KEY=STRIPE_SECRET=STRIPE_WEBHOOK_SECRET=FLUTTERWAVE_PUBLIC_KEY=FLUTTERWAVE_SECRET_KEY=FLUTTERWAVE_SECRET_HASH=PAYSTACK_PUBLIC_KEY=PAYSTACK_SECRET_KEY=PAYPAL_CLIENT_ID=PAYPAL_CLIENT_SECRET=PAYPAL_MODE=sandboxCRYPTOMUS_MERCHANT_ID=CRYPTOMUS_PAYMENT_KEY=AIRWALLEX_CLIENT_ID=AIRWALLEX_API_KEY=AIRWALLEX_ENV=demoRAZORPAY_KEY_ID=RAZORPAY_KEY_SECRET=RAZORPAY_WEBHOOK_SECRET=MOLLIE_KEY=MOLLIE_WEBHOOK_SECRET=COINGATE_API_TOKEN=COINGATE_ENVIRONMENT=sandboxCOINGATE_RECEIVE_CURRENCY=USDYOOKASSA_SHOP_ID=YOOKASSA_SECRET_KEY=MIDTRANS_SERVER_KEY=MIDTRANS_CLIENT_KEY=MIDTRANS_IS_PRODUCTION=falseIYZICO_API_KEY=IYZICO_SECRET_KEY=IYZICO_BASE_URL=https://sandbox-api.iyzipay.comPADDLE_VENDOR_ID=PADDLE_API_KEY=PADDLE_ENV=sandboxPADDLE_WEBHOOK_SECRET=TWOCHECKOUT_MERCHANT_CODE=TWOCHECKOUT_SECRET_KEY=TWOCHECKOUT_BUY_LINK_SECRET=Storage
FILESYSTEM_DISK=s3AWS_ACCESS_KEY_ID=AWS_SECRET_ACCESS_KEY=AWS_DEFAULT_REGION=autoAWS_BUCKET=AWS_ENDPOINT=AWS_URL=How to Map Keys in Admin System Settings
- Log in to Filament admin as super admin.
- Open Settings area (usually API/Integrations/Payment/SMTP modules).
- Paste corresponding values from
.envfor each provider. - Save settings, then run connection/test actions if available.
- If admin values are DB-stored overrides, document whether env or DB has priority in your project.
- AI page: set default provider and model after entering API keys.
- Payments page: keep gateway in test mode until webhook and callback tests pass.
- Security page: enable Turnstile only after keys are valid for your domain.
- Integrations page: verify OAuth redirect URI exactly matches provider dashboard.
Recommended: keep secrets in server .env and use admin settings mainly for toggles, labels, and non-secret config where possible.
What to Avoid (Security and Reliability)
- Never commit real API keys into git repositories.
- Never expose secret keys in frontend JavaScript or public responses.
- Do not skip webhook signature verification for payment providers.
- Do not use live keys directly without sandbox testing.
- Do not mix old/new keys across env and admin settings without cache clear.
- Rotate keys immediately if exposed in logs, screenshots, or support chats.