Environment Variables

Configure third-party service credentials for your storefront — API keys, secrets, and tokens for payment processors, OAuth providers, maps, and more. All values are encrypted at rest using AES-GCM.


Managing Environment Variables

  1. Go to Admin → Settings → Environment
  2. Add your credentials using the key-value editor
  3. Save — values are encrypted and stored securely
  4. Decrypted values are returned only to authenticated dashboard users; API key access returns [encrypted]

Common Variables

Key Description Provider
GOOGLE_CLIENT_ID OAuth 2.0 client ID for Google login Google Cloud Console
GOOGLE_CLIENT_SECRET OAuth 2.0 client secret for Google login Google Cloud Console
GOOGLE_MAPS_API_KEY JavaScript API key for maps and location features Google Maps Platform
FACEBOOK_CLIENT_ID App ID for Facebook login Facebook Developers
FACEBOOK_CLIENT_SECRET App secret for Facebook login Facebook Developers
STRIPE_SECRET_KEY Stripe secret key (sk_live_... or sk_test_...) Stripe Dashboard
STRIPE_WEBHOOK_SECRET Stripe webhook signing secret (whsec_...) Stripe Dashboard
RESEND_API_KEY API key for email delivery via Resend (re_...) Resend Dashboard
MPESA_CONSUMER_KEY M-Pesa API consumer key Safaricom Developer Portal
MPESA_CONSUMER_SECRET M-Pesa API consumer secret Safaricom Developer Portal
MPESA_SHORTCODE M-Pesa business shortcode / till number Safaricom
MPESA_PASSKEY M-Pesa online passkey for payment processing Safaricom Developer Portal

Schema-Driven

Environment variables use the same schema-driven system as other settings. The admin panel reads the schema to generate the form dynamically:

GET /api/v1/settings/schemas/environment

The value field is marked sensitive: true in the schema — the UI renders a password field, and the backend never returns the raw value to unauthenticated requests.


Variable Name Rules

  • Must be uppercase letters, digits, and underscores only
  • Must start with a letter
  • Examples: STRIPE_SECRET_KEY, MPESA_CONSUMER_KEY, MY_CUSTOM_VARIABLE