Prood
ApplicationsCheckout

Checkout App

The standalone hosted checkout application for payment processing with Redis session persistence.

apps/checkout is the hosted payment application. After the storefront places an order, the customer is redirected here to complete payment via Stripe, Easypay, or Ifthenpay.

Port: 3004 · Framework: Next.js 16 · Database: None (Upstash Redis for sessions)

Architecture

Drag to pan · Scroll to zoom

Key dependencies

PackageRole
@prood/checkout-hostSession create/load/persist, webhook forwarding
@prood/checkoutCheckoutSession state machine (used internally)
@prood/typesError response helpers
@prood/uiButton, skeleton, toast components
@stripe/react-stripe-jsStripe Payment Element

Routes

RoutePurpose
/Landing / entry page
/c/[id]Payment UI
/confirm/[id]Post-3DS / async confirmation
/success/[id]Success page → redirect to storefront

See Sessions for API route details.

Configuration

VariableRequiredPurpose
UPSTASH_REDIS_REST_URLYesRedis REST endpoint
UPSTASH_REDIS_REST_TOKENYesRedis REST token
CHECKOUT_API_SECRETYesProtects session creation API
CHECKOUT_URLYesPublic checkout base URL
COMMERCE_API_URLYesWebhook forwarding target
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYStripeClient-side Stripe key
Payment provider env varsPer providerFallback credentials

Security

  • Session creation requires x-checkout-secret header — only trusted callers (storefront) can create sessions
  • Webhook routes are org-scoped: /api/webhooks/{provider}/{orgId}
  • Payment provider credentials loaded per tenant from encrypted integration config
  • No direct database access — all order updates go through the Commerce API

On this page