Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.solvapay.com/llms.txt

Use this file to discover all available pages before exploring further.

What is SolvaPay SDK?

SolvaPay SDK helps you monetize APIs, AI apps, and MCP servers with a type-safe API. You can protect endpoints with paywalls, check purchases, and run checkout flows from one SDK.

Core capability

Protect routes and tools with one pattern:
// Express.js
app.post('/tasks', payable.http(createTask))

// Next.js App Router
export const POST = payable.next(createTask)

// MCP Server
const handler = payable.mcp(createTask)

Headless React components

Build beautiful payment flows with headless React components that work with any design system:
import { PaymentForm, usePurchase } from '@solvapay/react'

function CheckoutPage() {
  const { hasPaidPurchase } = usePurchase()

  return (
    <PaymentForm
      planRef="pln_premium"
      productRef="prd_myapi"
      onSuccess={() => router.push('/dashboard')}
    />
  )
}

Why teams use it

  • Single server API for Node and Edge runtimes
  • CLI setup with npx solvapay init
  • Headless React components for checkout flows
  • Built-in auth adapters and Next.js helpers

Packages

  • @solvapay/core - Types, schemas, and shared utilities
  • @solvapay/server - Paywall protection, purchase checks, and webhooks
  • @solvapay/server/fetch - Fetch-native handlers for Edge / Deno / Cloudflare / Supabase Edge Functions
  • @solvapay/react - Provider, hooks, checkout, and account components
  • @solvapay/react-supabase - Supabase adapter for React
  • @solvapay/auth - Auth adapters and server helpers
  • @solvapay/next - Next.js route helpers
  • @solvapay/mcp - MCP server adapter; @solvapay/mcp/fetch and @solvapay/mcp/express subpaths bridge OAuth by runtime

Next Steps