Skip to main content

NestJS demo

Build a NestJS contribution service with a Svelte checkout. The server resolves the price and creates one order for all three payment modes.

What you’ll build

  • NestJS controllers, dependency injection, and DTO validation
  • Typed Product lookup and Order creation with the Inttegro TypeScript SDK
  • A stable idempotency key and readable order number
  • A Svelte 5 payment island using @inttegro/svelte
  • Server-owned contribution tiers and safe errors

See the flow

The gallery shows one server-created order in each Checkout presentation. The browser cannot choose the price or use the API key.

Select any image to view it full screen.

Run the demo

Add your API key, Product ID, Price ID, and public origin. The released README has the local, Docker, build, and test commands.

Key files

  1. src/checkout.service.ts validates the tier and creates the order.
  2. src/campaign.controller.ts handles validation, safe errors, and the response.
  3. client/CheckoutFlow.svelte manages embedded and modal Checkout.
  4. client/main.ts mounts Svelte in the server-rendered page.

Before you ship

Store the contribution, idempotency key, and Inttegro order ID. Update totals and send receipts only after server-side payment verification.

Next