Skip to main content

RedwoodSDK demo

Build a Cloudflare-native contribution flow with React Server Components. One Worker route creates the order for all three payment modes.

This demo uses the current RedwoodSDK, not the legacy RedwoodGraphQL stack.

What you’ll build

  • React Server Components and Web-standard request handling in RedwoodSDK
  • A Worker-held API key and application-lifetime Inttegro client
  • React integration through @inttegro/react
  • Trusted Product and Price lookup before Order creation
  • Bounded tiers, retry-safe idempotency, and a readable order number
  • Safe completion, cancellation, and error states

See the flow

The gallery shows one Worker-created order in each Checkout presentation. Worker secrets never enter the React component tree.

Select any image to view it full screen.

Run the demo

Add the API key to .dev.vars, set the Product and Price IDs, and run the Worker. The released README has the exact commands.

Key files

  1. src/checkout.ts validates the tier and creates the order.
  2. src/worker.tsx connects the Worker route, React rendering, and response.
  3. src/inttegro-demo-checkout.tsx manages the React Checkout surface.
  4. public/checkout-presentations.js coordinates the three Checkout modes.

Before you ship

Store contributions and consume authenticated server events. Update public totals only from verified payment state.

Next