FastAPI demo
Build a FastAPI ticket service with an Angular checkout. One server-created order supports embedded, modal, and hosted payment.
What you’ll build
- A FastAPI endpoint that validates a ticket reservation before creating an order
- Typed order construction with the Inttegro Python SDK
- Non-blocking API calls through
AsyncInttegroClient - One ASGI application packaged for containers and Cloudflare Python Workers
- Server-held credentials and safe error messages
- An Angular 21 payment island using
@inttegro/angular
See the flow
The gallery shows the same order in all three Checkout presentations. The Python SDK, API key, Product, and Price remain on the server.
- Desktop
- Mobile
Select any image to view it full screen.
Run the demo
Create a Python virtual environment, install the requirements, and start Uvicorn. The released README has the exact commands.
Key files
src/app/checkout.pycreates the order and maps safe errors.src/app/main.pyconnects validation to the JSON or303response.client/checkout-flow.component.tsmanages embedded and modal Checkout.client/main.tsmounts Angular in the server-rendered page.src/worker.pyexposes the app to Cloudflare Workers.
Before you ship
Store the reservation and Inttegro order ID together. Verify payment on the server before issuing the ticket.