Codapult
料金プラグインドキュメント
Codapult

開発者のためのSaaSボイラープレート

プロダクト

  • 料金
  • プラグイン
  • ドキュメント

会社情報

  • お問い合わせ
  • GitHub

法的情報

  • プライバシーポリシー
  • 利用規約

© 2026 Codapult. All rights reserved.

全記事

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • File Storage
  • Background Jobs

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

  • Plugin System
  • AI Kit Plugin
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Payments

Stripe Setup

Configure Stripe for subscriptions, checkout, customer portal, and Stripe Connect.

Stripe is the default payment provider. This page covers the Codapult-specific setup steps.

API Keys

Get your keys from the Stripe Dashboard:

STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."

Use test keys (sk_test_*) during development. Switch to live keys (sk_live_*) when going to production.

Test Mode

In test mode, use Stripe test card numbers:

Card NumberScenario
4242 4242 4242 4242Successful payment
4000 0000 0000 32203D Secure authentication
4000 0000 0000 9995Declined payment

Webhook Setup

Codapult's Stripe webhook endpoint is POST /api/webhooks/stripe.

Local Development

Use the Stripe CLI to forward events to your local server:

stripe listen --forward-to http://localhost:3000/api/webhooks/stripe

The CLI prints a webhook signing secret (whsec_...) — copy it to STRIPE_WEBHOOK_SECRET in .env.local.

Production

  1. Go to Stripe Dashboard → Webhooks
  2. Add endpoint: https://your-app.com/api/webhooks/stripe
  3. Select the events listed below
  4. Copy the signing secret to STRIPE_WEBHOOK_SECRET

Handled Events

Stripe EventCodapult Action
checkout.session.completedActivate subscription, link to user
customer.subscription.createdRecord new subscription
customer.subscription.updatedUpdate plan, seats, or status
customer.subscription.deletedCancel and deactivate subscription

Webhook payloads include metadata (userId, planId) set during checkout. All deliveries are logged in the webhook_delivery table.

Stripe Connect

For marketplace features, Codapult supports Stripe Connect. Your platform can collect an application fee on transactions:

NEXT_PUBLIC_STRIPE_CONNECT_FEE_PERCENT=10  # 10% platform fee (overrides appConfig.payments.stripeConnectFeePercent)

The server-side fee is read via env.stripeConnectFeePercent from @/lib/config. The Connect dashboard UI reads the display value from appConfig.payments.stripeConnectFeePercent in src/config/app.ts. Keep both values in sync.

The Connect integration handles onboarding, account creation, and fee collection. Manage connected accounts from the admin panel.

Going Live Checklist

  • Switch from sk_test_* to sk_live_* keys
  • Create a production webhook pointing to your live URL
  • Update STRIPE_WEBHOOK_SECRET with the production signing secret
  • Verify webhook events are being received (check webhook_delivery table)
  • Configure the Stripe Customer Portal in Stripe Settings → Customer Portal

For the full Stripe documentation, see docs.stripe.com.

Payments & BillingLemonSqueezy Setup