Next.js demo
Build a Next.js storefront and the backend used by all four mobile demos. Web Checkout can be embedded, modal, or hosted.
What you’ll build
- A Next.js App Router storefront with a server-only checkout route
- Typed order creation with the Inttegro TypeScript SDK
- React integration through
@inttegro/react - One web order used in all three Checkout presentations
- A narrow
POST /mobile/ordersbackend that returns only a finalized order ID - Explicit completion and cancellation URLs for hosted checkout
See the flow
The gallery shows the web order in each Checkout presentation. Order creation and the API key stay in a server-only route.
- Desktop
- Mobile
Select any image to view it full screen.
Run the demo
Install a supported Node.js release,
set the server environment values, and start Next.js. Never use NEXT_PUBLIC_
for the API key. The
released README
has the exact commands.
Key files
lib/checkout.tscreates web and mobile orders.app/checkout/route.tsvalidates checkout and returns JSON or a303redirect.app/inttegro-demo-checkout.tsxmanages the React Checkout surface.public/checkout-presentations.jscoordinates the three Checkout modes.app/mobile/orders/route.tsreturns finalized order IDs to mobile apps.
Before you ship
Authenticate the mobile route. Keep prices, currency, customer identity, and fulfillment decisions on the server.