Configure the Python server environment
mainTo run the Python implementation, you must set several environment variables in a .env file. The server uses python-dotenv to load these values.
Required environment variables:
STRIPE_SECRET_KEY: Your Stripe secret API key.STRIPE_PUBLISHABLE_KEY: Your Stripe publishable API key.PRICE: A valid Stripe Price ID (e.g.,price_123...).DOMAIN: The base URL of your application (e.g.,http://localhost:4242).STATIC_DIR: The directory containing your static assets and templates.
Optional environment variables:
STRIPE_WEBHOOK_SECRET: The signing secret used to verify webhook signatures.
STRIPE_SECRET_KEY=sk_test_...
STRIPE_PUBLISHABLE_KEY=pk_test_...
PRICE=price_...
DOMAIN=http://localhost:4242
STATIC_DIR=public
STRIPE_WEBHOOK_SECRET=whsec_...