Learn how to collect variable amount payments (donations) and use metadata with Checkout.
Follow these instructions to spin-up a copy of this demo project up on your local machine for development and testing purposes. This is meant to be a guide to show you how to go about building a simple page to collect variable amount payments (donations). If your customers do not control the payment amount, please see our other episode about Checkout.
- Configure your keys
Copy the example .env
file and update those values with your Stripe API keys.
cp ../.env.example .env
Then, be sure to update the publishable key (pk_xxx) in templates/index.html.
- Install Dependencies
python3 -m venv venv
. venv/bin/activate
pip install python-dotenv
pip install Flask
pip install stripe
- Start the server
export FLASK_APP=server.py && flask run