Django demo
Build a Django ticket checkout with embedded, modal, and hosted payment. Django validates the guest and creates the order on the server.
What you’ll build
- A Django 5.2 form and view boundary for guest ticket checkout
- Typed order construction with the Inttegro Python SDK
- Non-blocking API calls through
AsyncInttegroClient - One ASGI app for containers and Cloudflare Python Workers
- Django Templates progressively enhanced with
@inttegro/js - Safe public errors without exposing API details
See the flow
The gallery shows one server-created order in all three Checkout presentations. The API key never reaches the browser.
- Desktop
- Mobile
Select any image to view it full screen.
Run the demo
Create a Python virtual environment, install the requirements, set the environment values, and start Django. The released README has the exact commands.
Key files
src/checkout/service.pycreates the order and maps safe errors.src/checkout/views.pyvalidates the form and returns JSON or a303redirect.checkout-presentations.jspresents Checkout in all three modes.src/worker.pyadapts Django to Cloudflare Workers.
Before you ship
Keep the API key on the server. Store the booking and Inttegro order IDs together, then verify payment before issuing a ticket.