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

Overview

The prism-fastapi package provides async middleware for FastAPI applications, leveraging Python’s modern async/await syntax for high-performance payment validation.

Async/Await

Full async support with Python asyncio

Dependency Injection

Works with FastAPI’s Depends system

Type Hints

Full type hint support with Pydantic

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


Route Protection

Multiple Routes


Accessing Payment Info


Settlement Validation

FastAPI middleware intercepts responses to validate settlement:

Dependency Injection

Payer Dependency


Testing


Production Deployment

Docker Deployment


Type Hints

Last modified on May 15, 2026