Installation
Prerequisites
Python 3.8 or higher
Django 3.2 or higher
pip (or Poetry / PDM)
Install from PyPI
pip install paystack-django
With development extras:
pip install paystack-django[dev]
Install for Development
git clone https://github.com/HummingByteDev/paystack-django.git
cd django-paystack
pip install -e ".[dev]"
Docker
Add to your requirements.txt:
paystack-django>=1.1.0
Verify Installation
python -c "import djpaystack; print(djpaystack.__version__)"
# 1.1.0
Django Setup
Add djpaystack to INSTALLED_APPS and run migrations:
INSTALLED_APPS = [
# ...
'djpaystack',
]
python manage.py migrate djpaystack
On startup, Django system checks will verify that PAYSTACK['SECRET_KEY'] is configured
(error djpaystack.E001) and warn if PAYSTACK['WEBHOOK_SECRET'] is missing
(warning djpaystack.W001).
Dependencies
paystack-django installs the following automatically:
Django >= 3.2requests >= 2.25.0urllib3 >= 1.26.0
No other dependencies are required. Configuration values are read from Django’s
settings.PAYSTACK dictionary — use os.environ, django-environ, or any
config loader of your choice.
Troubleshooting
ImportError: No module named ‘djpaystack’
Ensure the package is installed in the correct virtual environment:
pip install paystack-django
SSL Certificate or Proxy Issues
pip install --proxy [user:passwd@]proxy.server:port paystack-django
Next Steps
Once installed, proceed to Configuration to set up your API keys.