Environment Configuration ​
Bridge Payments is configured through environment variables managed in the Pubflow Platform dashboard.
Accessing Configuration ​
- Log in to Pubflow Platform
- Navigate to your Bridge Payments instance
- Go to Configuration → Environment Variables
- Add or edit variables
- Click Save Configuration
Changes are applied automatically without requiring a restart.
Core Configuration ​
Database ​
bash
# Database connection (required)
DATABASE_URL=postgresql://user:password@host:5432/database
# Supported databases:
# - PostgreSQL: postgresql://...
# - MySQL: mysql://...
# - SQLite: sqlite://path/to/db.sqlite
# - LibSQL: libsql://...
# - Neon: postgresql://[email protected]/...
# - PlanetScale: mysql://[email protected]/...Flowless Integration ​
bash
# Flowless API URL (required)
FLOWLESS_API_URL=https://your-flowless.pubflow.com
# Bridge validation secret (required)
# Must match the secret in your Flowless instance
BRIDGE_VALIDATION_SECRET=your_shared_secret_here
# Authentication timeout (optional, default: 30000ms)
AUTH_TIMEOUT=30000
# Request timeout (optional, default: 60000ms)
REQUEST_TIMEOUT=60000Shared Secret
The BRIDGE_VALIDATION_SECRET must be identical in both Bridge Payments and Flowless instances for session validation to work.
Payment Providers ​
Stripe ​
bash
# Stripe secret key (required for Stripe)
STRIPE_SECRET_KEY=sk_test_...
# Stripe publishable key (optional, for frontend)
STRIPE_PUBLISHABLE_KEY=pk_test_...
# Stripe webhook secret (required for webhooks)
STRIPE_WEBHOOK_SECRET=whsec_...Get Stripe Keys
- API Keys: Stripe Dashboard → Developers → API Keys
- Webhook Secret: Stripe Dashboard → Developers → Webhooks
PayPal ​
bash
# PayPal client ID (required for PayPal)
PAYPAL_CLIENT_ID=your_client_id
# PayPal client secret (required for PayPal)
PAYPAL_CLIENT_SECRET=your_client_secret
# PayPal mode (optional, default: sandbox)
PAYPAL_MODE=sandbox # or 'live' for production
# PayPal webhook ID (required for webhooks)
PAYPAL_WEBHOOK_ID=your_webhook_idGet PayPal Credentials
- Developer Dashboard: PayPal Developer
- Create App: Dashboard → My Apps & Credentials → Create App
Authorize.net ​
bash
# Authorize.net API login ID (required)
AUTHORIZE_NET_API_LOGIN_ID=your_api_login_id
# Authorize.net transaction key (required)
AUTHORIZE_NET_TRANSACTION_KEY=your_transaction_key
# Authorize.net mode (optional, default: sandbox)
AUTHORIZE_NET_MODE=sandbox # or 'production'
# Authorize.net signature key (required for webhooks)
AUTHORIZE_NET_SIGNATURE_KEY=your_signature_keyGuest Checkout ​
bash
# Enable guest checkout (optional, default: true)
GUEST_CHECKOUT_ENABLED=true
# Require email for guest checkout (optional, default: true)
GUEST_REQUIRE_EMAIL=true
# Guest token expiration (optional, default: 3600 seconds)
GUEST_TOKEN_EXPIRATION=3600Response Format ​
bash
# Enable row mode (optional, default: false)
# When true, responses use object format with ID as key
ROW_MODE=falseStandard Format (ROW_MODE=false):
json
{
"id": "pay_123",
"amount_cents": 2000
}Row Mode (ROW_MODE=true):
json
{
"pay_123": {
"amount_cents": 2000
}
}Caching ​
bash
# Cache TTL in seconds (optional, default: 300)
CACHE_TTL=300
# Cache max size (optional, default: 1000)
CACHE_MAX_SIZE=1000Logging ​
bash
# Log mode (optional, default: production)
LOG_MODE=development # or 'production'
# Log level (optional, default: info)
LOG_LEVEL=info # debug, info, warn, errorSecurity ​
bash
# CORS allowed origins (optional, comma-separated)
CORS_ORIGINS=https://yourapp.com,https://www.yourapp.com
# Rate limit (optional, default: 100 requests per minute)
RATE_LIMIT=100
# Rate limit window (optional, default: 60000ms)
RATE_LIMIT_WINDOW=60000External Webhooks ​
See External Webhooks Guide for detailed configuration.
bash
# Enable external webhooks (optional, default: false)
EXTERNAL_WEBHOOKS_ENABLED=true
# Webhook debug mode (optional, default: false)
WEBHOOK_DEBUG_MODE=true
# Configure webhooks (numbered 1, 2, 3, ...)
WEBHOOK_1_NAME=discord_alerts
WEBHOOK_1_URL=https://discord.com/api/webhooks/...
WEBHOOK_1_EVENTS=payment.failed,subscription.cancelled
WEBHOOK_1_SECRET=optional_secret_for_signatureNext Steps ​
- Pubflow Integration - Connect to Flowless
- Payment Providers - Configure Stripe, PayPal, Authorize.net
- Database Setup - Set up your database