Overview
The Waffo Pancake API lets you programmatically manage your entire payment infrastructure:- Create and manage stores
- Create products (one-time and subscription)
- Generate checkout sessions and process orders
- Manage subscriptions and billing
- Query data via GraphQL
- Handle refunds
Base URL
All API requests are made to:Architecture
The API uses a hybrid approach:- REST endpoints (
/v1/actions/...) for all write operations (create, update, delete) - GraphQL (
/v1/graphql) for all read operations (queries)
POST method exclusively. There are no GET, PUT, PATCH, or DELETE methods.
TypeScript SDK
The official@waffo/pancake-ts SDK wraps the entire API with full type safety. It handles authentication, request signing, idempotency keys, and webhook verification automatically.
Authentication
Waffo Pancake uses API Key authentication for all programmatic API access. API Keys provide secure server-to-server communication.API Key authentication is handled automatically by the SDK. Install
@waffo/pancake-ts, provide your Merchant ID and private key, and the SDK will handle request signing automatically.X-Store-Slug header.
Learn more about authentication —>
Common Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | Always application/json |
X-Store-Slug | Conditional | Store slug (for public checkout flows) |
X-Environment | Conditional | test or prod (required with Store Slug auth) |
X-Idempotency-Key | Optional | Unique ID for write operations (cached 24h) |
Request Format
- Method: All write endpoints use
POST - Body: JSON
- IDs: UUID v4 format (e.g.,
550e8400-e29b-41d4-a716-446655440000) - Timestamps: ISO 8601 UTC (e.g.,
2026-01-23T00:00:00.000Z) - Amounts: Smallest currency unit as integers (e.g.,
2900= $29.00 USD) - Currencies: ISO 4217 codes (e.g.,
USD,EUR,JPY) - Status values: Always lowercase (e.g.,
active, notACTIVE)
Example Request
Response Format
Success
Error
In the
errors array, errors[0] is the root cause of the failure. Subsequent entries represent higher-level callers in the request chain.Error Layers
| Layer | Description |
|---|---|
gateway | Request routing / infrastructure |
user | User authentication or authorization |
store | Store operations |
product | Product operations |
order | Order operations |
graphql | GraphQL query errors |
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request — invalid parameters |
| 401 | Unauthorized — authentication failed |
| 403 | Forbidden — insufficient permissions |
| 404 | Not Found |
| 409 | Conflict — idempotent request already in progress |
| 429 | Rate Limited — too many requests |
| 500 | Internal Server Error |
| 501 | Not Implemented |
| 502 | Bad Gateway |
Environments
Switch between test and production using theX-Environment header:
| Environment | Header Value | Description |
|---|---|---|
| Test | X-Environment: test | No real charges, isolated data |
| Production | X-Environment: prod | Real transactions |
API Key authentication does not require the
X-Environment header — the environment is determined by the key’s registered environment. The X-Environment header is required when using Store Slug authentication.Idempotency
Prevent duplicate write operations by including anX-Idempotency-Key header:
- Keys are cached for 24 hours
- Same key returns the same response without re-executing
- If the original request is still processing, returns
409 Conflict
Endpoint Groups
Authentication
API Key signatures and Store Slug auth
Stores
Create, update, and delete stores
One-Time Products
Create and manage one-time purchase products
Subscription Products
Create tiered subscription products
Orders
Create orders and checkout sessions
Subscriptions
Manage subscription lifecycle
Refunds
Request and process refunds
GraphQL
Query data with GraphQL