dj-stripe
Django + Stripe made easy
What it is and what it does
dj-stripe is a Django package that mirrors Stripe's payment infrastructure into your database as Django models. Instead of querying Stripe's API every time you need payment data, you set up a webhook endpoint and dj-stripe automatically creates and updates local Django model instances whenever Stripe events occur. This gives you queryable, relational access to Stripe objects like Customers, Charges, Subscriptions, and Payment Intents.
The package covers Stripe's core payment features, billing, cards, payment methods with SCA support, and partial Stripe Connect support. It's designed for Django applications that need to work with Stripe data in their own database—useful for reporting, filtering, joining with local data, or avoiding repeated API calls. It requires Django >=5.0, Python >=3.11, and a supported database backend.
Use it for:
- Store Stripe customer and subscription data locally so you can query and filter it without hitting Stripe's API repeatedly.
- Build Django admin interfaces to view and manage Stripe objects (customers, charges, invoices) alongside your own models.
- Generate reports or analytics on payment history by joining Stripe data with your own application data.
- Implement webhook handlers that react to Stripe events and update your application state in a single transaction.
- Support multi-account or multi-API-key scenarios where you manage Stripe data for multiple organizations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
dj-stripe syncs Stripe payment objects into Django models via webhooks, giving you a local database copy of your Stripe data that stays in sync automatically.
Yes, if you're building a Django application that integrates Stripe payments and you want local, queryable access to Stripe data. The low install friction, active maintenance, permissive license, and no known vulnerabilities make it a solid choice. Requires Django 5.0+ and Python 3.11+, so only viable for projects on current versions.
Install
dj-stripe on PyPI
pip
pip install dj-stripeuv
uv add dj-stripepoetry
poetry add dj-stripeInstalling dj-stripe
Before you install
Low friction install with just two runtime dependencies (django and stripe). Actively maintained with a release 49 days ago. Requires Django >=5.0 and Python >=3.11, so only works with current versions.
License in practice
MIT license is permissive and places no restrictions on commercial use, modification, or redistribution.
Quickstart
pip install dj-stripe
import dj_stripe
from dj_stripe.models import Customer
# Access synced Stripe Customer records
customer = Customer.objects.get(id='cus_...')
Requires Django >=5.0, Python >=3.11, and a supported database (PostgreSQL recommended; MySQL >=8.0 or MariaDB >=10.5; SQLite >=3.26 but not recommended for production).
Verify before relying
- Whether webhook setup and configuration are straightforward or require significant boilerplate.
- Performance characteristics when syncing large volumes of Stripe events.
- Extent of Stripe Connect support beyond 'partial'.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — django, stripe |
| Maintenance | actively maintained — 49 days since the last release |
| First released | |
| Downloads | 487,489/month — #6,384 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dj_stripe-2.11.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
stripeProvides Python bindings to the Stripe API,…
permissive · top 1,000 on PyPI
async-stripeProvides an asynchronous wrapper around the…
permissive · top 15,000 on PyPI
django-dirtyfieldsTracks which fields on a Django model instance…
permissive · top 15,000 on PyPI
mollie-api-pythonPython client library for the Mollie payment…
permissive · top 15,000 on PyPI
django-signal-webhooksAdds webhook support to Django models by…
permissive · top 15,000 on PyPI
django-postgres-copyProvides Django ORM integration for…
permissive · top 5,000 on PyPI
django-waffleDjango Waffle provides feature flags (toggles)…
permissive · top 5,000 on PyPI
django-health-checkProvides pluggable health check endpoints for…
permissive · top 5,000 on PyPI
beanstreamProvides a Python client library for the…
permissive · top 15,000 on PyPI