# Cedros Pay Server - Environment Variables
# Copy this file to .env (gitignored) and fill in your values

# Server Configuration
CEDROS_SERVER_ADDRESS=":8080"
CEDROS_ROUTE_PREFIX=""
CEDROS_ADMIN_METRICS_API_KEY=""

# Stripe Configuration
CEDROS_STRIPE_SECRET_KEY="sk_test_..."
CEDROS_STRIPE_WEBHOOK_SECRET="whsec_..."
CEDROS_STRIPE_PUBLISHABLE_KEY="pk_test_..."
CEDROS_STRIPE_SUCCESS_URL="http://localhost:8080/stripe/success?session_id={CHECKOUT_SESSION_ID}"
CEDROS_STRIPE_CANCEL_URL="http://localhost:8080/stripe/cancel"
CEDROS_STRIPE_TAX_RATE_ID=""
CEDROS_STRIPE_MODE="test"

# X402 / Solana Configuration
CEDROS_X402_PAYMENT_ADDRESS="your-solana-wallet-address"
CEDROS_X402_TOKEN_MINT="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
CEDROS_X402_NETWORK="mainnet-beta"
CEDROS_X402_RPC_URL="https://api.mainnet-beta.solana.com"
CEDROS_X402_WS_URL="wss://api.mainnet-beta.solana.com"
CEDROS_X402_MEMO_PREFIX="cedros"
CEDROS_X402_SKIP_PREFLIGHT="false"
CEDROS_X402_COMMITMENT="confirmed"
CEDROS_X402_GASLESS_ENABLED="false"
CEDROS_X402_AUTO_CREATE_TOKEN_ACCOUNT="false"

# Server wallet keys for gasless transactions (optional)
# X402_SERVER_WALLET_1="[1,2,3,...,64]"
# X402_SERVER_WALLET_2="[1,2,3,...,64]"

# Paywall Configuration
CEDROS_PAYWALL_PRODUCT_SOURCE="yaml"
CEDROS_PAYWALL_POSTGRES_URL=""
CEDROS_PAYWALL_MONGODB_URL=""
CEDROS_PAYWALL_MONGODB_DATABASE=""
CEDROS_PAYWALL_MONGODB_COLLECTION=""
CEDROS_PAYWALL_QUOTE_TTL="5m"
CEDROS_PAYWALL_PRODUCT_CACHE_TTL="5m"

# API Key Configuration (for rate limit exemptions)
CEDROS_API_KEY_ENABLED="false"
# CEDROS_API_KEY_<KEY_NAME>="<tier>"
# Tiers: free, pro, enterprise (bypass wallet/IP limits), partner (bypass all limits)
# CEDROS_API_KEY_STRIPE_WEBHOOK_ABC123="partner"
# CEDROS_API_KEY_ENTERPRISE_CUSTOMER_1="enterprise"
# CEDROS_API_KEY_PRO_USER_123="pro"
