Skip to main content
Coming soon. The prism-django package is not yet published to PyPI. This page describes the planned API.

Overview

The prism-django package provides middleware for Django applications, integrating seamlessly with Django’s request/response cycle and middleware stack.

Middleware-Based

Integrates with Django middleware stack

ORM Compatible

Works with Django ORM and models

Admin Support

Compatible with Django Admin

Installation


The canonical SDK config is identify_token (PRISM_IDENTIFY_TOKEN env var) — formerly api_key / PRISM_API_KEY. SDKs accept the legacy names as fallback during the migration window; new code should use the canonical names.

Quick Start


Configuration

Settings.py


Route Protection

URL Patterns


Accessing Payment Info


Settlement Validation

Django middleware intercepts responses to validate settlement:

Class-Based Views


Django REST Framework


Testing


Production Deployment

Settings for Production

WSGI Deployment (Gunicorn)

Docker Deployment


Type Hints

Last modified on May 15, 2026