dj-stripe

Stripe Made Easy for Django Developers

The easiest way to integrate Stripe with your Django project. Handle payments, subscriptions, and webhooks with just a few lines of code.

Django ORM Integration

Query Stripe data using Django's ORM. Join Stripe data with your models, create complex queries, and leverage Django's powerful database features.

Automatic Webhooks

Handle Stripe webhooks automatically with signature verification, idempotency, and automatic retries. Never miss an event.

Django Signals

Use Django's native signals architecture to implement custom behavior on webhook events. Clean, decoupled, and testable.

Simple to Use

# Query Stripe data with Django ORM
from djstripe.models import Customer, Subscription

customer = Customer.objects.get(email="user@example.com")
active_subs = customer.subscriptions.filter(status="active")

# Use Django signals for custom webhook behavior
from django.dispatch import receiver
from djstripe import webhooks

@webhooks.handler("customer.subscription.created")
def handle_new_subscription(event):
 # Automatically synced to your database
 subscription = event.data["object"]
 # Your custom business logic here
 send_welcome_email(subscription.customer.email)

Get Started with dj-stripe

Follow our comprehensive documentation to integrate Stripe into your Django project

Support dj-stripe

dj-stripe is maintained by volunteers. Your support helps us continue development and provide better documentation.

Become a Sponsor

Support the project financially and get your logo on our sponsors page

View our sponsors →

Contribute

Help improve dj-stripe by contributing code, documentation, or bug reports

Contributing guide →
Sponsor on GitHub