Skip to main content

SDKs & Libraries

Waffo Pancake provides official SDKs for TypeScript and Next.js, plus direct API access.

Choose Your Integration Level

Next.js SDK

Fastest — Drop-in components, hooks, and server actions. Handles checkout UI, webhook routing, and buyer self-service out of the box.npm install @waffo/pancake-nextjs

TypeScript SDK

Flexible — Full API coverage with automatic signing, typed responses, and webhook verification. Use with any Node.js framework.npm install @waffo/pancake-ts

Direct API

Full control — REST endpoints for writes, GraphQL for reads. Implement signing and verification yourself. Any language.
Next.js projects: Start with @waffo/pancake-nextjs — it wraps @waffo/pancake-ts and adds React components and server actions. You can always drop down to the TypeScript SDK or raw API calls for advanced use cases.

TypeScript SDK

@waffo/pancake-ts

Official TypeScript SDK on npm

Installation

Features

  • Zero runtime dependencies, ESM + CJS, Node >= 20
  • Automatic request signing with deterministic idempotency keys
  • Full TypeScript type definitions (15 enums, 40+ interfaces)
  • Webhook verification with embedded public keys (test/prod)

Quick Start

Configuration

Available Resources

Checkout Modes

The SDK supports two checkout modes based on whether you know the buyer’s identity:
Always use authenticated checkout when you know the buyer. Authenticated checkout binds orders to the buyerIdentity you provide — a stable, merchant-controlled identifier. Without it:
  • Trial abuse: buyers can claim unlimited free trials by changing their email
  • Order unlinking: different emails are treated as different users
  • No self-service: buyers cannot manage orders in Customer Portal
buyerIdentity is for order attribution and trial tracking only — it is not rendered on the checkout page. To pre-fill the email field on the checkout form, pass buyerEmail explicitly.
With dynamic pricing and trial control:

Anonymous Checkout

Webhook Verification

Error Handling


Next.js SDK

@waffo/pancake-nextjs

Official Next.js SDK — components, hooks, and server actions

Installation

Requires @waffo/pancake-ts as a peer dependency. Works with Next.js 14+ App Router.

Client Exports

Server Exports (@waffo/pancake-nextjs/server)

Quick Example

Webhook Route Handler

Next.js Guide

Full step-by-step Next.js integration guide.

Direct API Access

You can also use the REST and GraphQL API directly. API Key authentication is handled automatically by the SDK — no manual header setup is needed.

SDK Roadmap


Framework Guides

Next.js

Build with Next.js and Server Actions.

Checkout Sessions

Create checkout flows programmatically.

Subscriptions

Implement recurring billing.

Webhooks

Receive real-time event notifications.

API Reference

For complete endpoint documentation:

API Reference

Full REST and GraphQL API documentation.