Installation
Prerequisites
Section titled “Prerequisites”- Node.js >= 18
- Package manager: pnpm, npm, or yarn
Install by use case
Section titled “Install by use case”Stripe with Hono
Section titled “Stripe with Hono”pnpm add @kotodayori/stripe @kotodayori/hono stripeStripe with Express
Section titled “Stripe with Express”pnpm add @kotodayori/stripe @kotodayori/express stripeStripe with AWS Lambda
Section titled “Stripe with AWS Lambda”pnpm add @kotodayori/stripe @kotodayori/lambda stripeCustom webhooks (without Stripe)
Section titled “Custom webhooks (without Stripe)”Use the core router with any adapter:
pnpm add @kotodayori/core @kotodayori/hono# or @kotodayori/express, @kotodayori/lambdaRuntime validation with Zod
Section titled “Runtime validation with Zod”If you want runtime schema validation in addition to type safety:
pnpm add @kotodayori/stripe @kotodayori/zod @kotodayori/hono stripe zodScaffolding with create-kotodayori
Section titled “Scaffolding with create-kotodayori”The fastest way to create a new project is with the scaffolding tool:
npx create-kotodayoriThis will interactively guide you through creating a new Kotodayori project with your preferred framework and package manager.
You can also specify options directly:
# Create a new Hono-based webhook handlernpx create-kotodayori my-webhook-handler --fw=hono
# With custom package managernpx create-kotodayori my-webhook-handler --fw=hono --pm=pnpmPeer dependencies
Section titled “Peer dependencies”- Stripe adapter (
@kotodayori/stripe):stripe>= 17.0.0 - Hono adapter (
@kotodayori/hono):hono>= 4.0.0 - Express adapter (
@kotodayori/express):express>= 4.0.0 - Zod integration (
@kotodayori/zod):zod^4.0.0
Install the peer dependencies for the packages you use.