SDKs & Libraries
Waffo Pancake provides an official TypeScript SDK and direct API access.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
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantId | string | Yes | Your Merchant ID |
privateKey | string | Yes | RSA private key (PEM, base64, or raw — auto-normalized) |
baseUrl | string | No | API base URL (default: production) |
fetch | typeof fetch | No | Custom fetch implementation |
Available Resources
| Namespace | Methods | Description |
|---|---|---|
client.stores | create() update() delete() | Store management |
client.onetimeProducts | create() update() publish() updateStatus() | One-time product CRUD |
client.subscriptionProducts | create() update() publish() updateStatus() | Subscription product CRUD |
client.subscriptionProductGroups | create() update() delete() publish() | Product groups for shared trial |
client.orders | cancelSubscription() | Order management |
client.checkout | createSession() | Create checkout sessions |
client.graphql | query<T>() | Typed GraphQL queries |
Checkout Integration
Webhook Verification
Error Handling
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
| Language | Status |
|---|---|
| Node.js / TypeScript | Available — @waffo/pancake-ts |
| Python | Planned |
| Go | Planned |
| PHP | Planned |
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.