Skip to main content

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.

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

  1. src/checkout/service.py creates the order and maps safe errors.
  2. src/checkout/views.py validates the form and returns JSON or a 303 redirect.
  3. checkout-presentations.js presents Checkout in all three modes.
  4. src/worker.py adapts 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.

Next