RADZOR
ComponentsRecipesDocsContributeGitHub
Get Started
RADZOR

The universal component registry for LLM-driven development. Empowering developers to build better apps, faster.

Product
  • Components
  • Standard
Resources
  • Documentation
  • API Reference
  • AI Agent Integration
  • Pipeline Guide
  • MCP Server
Community
  • GitHub
  • X / Twitter
  • Discord

© 2026 Radzor Registry. All rights reserved.

Cookbook
Beginnerpaymentemailautomation

Payment FlowAI Workflow

Full Stripe checkout with email confirmation: creates the payment session, listens to the webhook, and automatically sends a receipt.

Prerequisites

Environment variables

STRIPE_SKSTRIPE_WEBHOOK_SECRETRESEND_KEY
Stripe webhook endpoint must be configured in the Stripe dashboard.

Install

$npx radzor@latest recipe add payment-flow

AI Prompt

“Run `npx radzor@latest add stripe-checkout webhook-receiver email-send` to install 3 Radzor components. Then read components/radzor/stripe-checkout/radzor.manifest.json, components/radzor/webhook-receiver/radzor.manifest.json, components/radzor/email-send/radzor.manifest.json and each component's llm/integration.md. Wire them together to full Stripe checkout with email confirmation: creates the payment session, listens to the webhook, and automatically sends a receipt. Use the manifest's inputs (check envVar for required environment variables), outputs (check fields for object shapes), composability (check mapField for field extraction), and actions — don't invent custom interfaces.”

Paste this into Claude Code, Cursor, Windsurf, or any AI coding agent.

Pipeline

StripeCheckout

Creates the Stripe payment session

→
↓
checkout URL

WebhookReceiver

Receives and verifies Stripe events

→
↓
payment event

EmailSend

Sends a receipt to the customer

Scaffolded Code

payment-flow-recipe.ts
// npx radzor@latest add stripe-checkout webhook-receiver email-send
import { StripeCheckout }  from "./components/radzor/stripe-checkout"
import { WebhookReceiver } from "./components/radzor/webhook-receiver"
import { EmailSend }       from "./components/radzor/email-send"

const checkout = new StripeCheckout({
  secretKey: process.env.STRIPE_SK!,
  webhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
  successUrl: "/success",
  cancelUrl: "/cancel",
  priceId: "price_xxx",
})

const webhook = new WebhookReceiver({
  secret: process.env.STRIPE_WEBHOOK_SECRET!,
  algorithm: "sha256",
  signatureHeader: "stripe-signature",
})

const mailer = new EmailSend({
  provider: "resend",
  apiKey: process.env.RESEND_KEY!,
  from: "noreply@myapp.com",
})

// POST /api/webhook — verify signature, then handle event
async function handleWebhook(req: Request) {
  const body = await req.text()
  const signature = req.headers.get("stripe-signature") ?? ""
  const event = webhook.verifyStripe(body, signature)

  if (event.type === "checkout.session.completed") {
    await mailer.send({
      to: event.data.customer_email,
      subject: "Payment confirmed",
      html: `<p>Thank you! Your payment was received.</p>`,
    })
  }
}

// Create checkout session and redirect
const session = await checkout.createCheckout("customer@example.com")
// redirect user to session.url

Components used

StripeCheckoutCreates the Stripe payment session
View
WebhookReceiverReceives and verifies Stripe events
View
EmailSendSends a receipt to the customer
View

LLM tip

Pass all 3 radzor.manifest.json files to your agent at once. It will read the outputs of each step and match them against the inputs of the next — wiring the full pipeline without any extra instructions.

stripe-checkout/manifest.jsonwebhook-receiver/manifest.jsonemail-send/manifest.json