Create Product
Create a new one-time purchase product.
POST /v1/actions/onetime-product/create-product
Authentication: API Key
Request Body
| Field | Type | Required | Description |
|---|
storeId | string | Yes | UUID of the store |
name | string | Yes | Product name |
description | string | No | Product description (supports Markdown) |
prices | object | Yes | Multi-currency pricing (see below) |
media | array | No | Product images/videos |
successUrl | string | No | Redirect URL after successful purchase |
metadata | object | No | Custom key-value data |
Prices are a map of ISO 4217 currency codes to price info:
{
"USD": {
"amount": 2900,
"taxIncluded": false,
"taxCategory": "saas"
},
"EUR": {
"amount": 2700,
"taxIncluded": true,
"taxCategory": "saas"
}
}
| Field | Type | Description |
|---|
amount | integer | Price in smallest currency unit (e.g., cents) |
taxIncluded | boolean | Whether the amount includes tax |
taxCategory | string | One of: digital_goods, saas, software, ebook, online_course, consulting, professional_service |
{
"type": "image",
"url": "https://example.com/product.png",
"alt": "Product screenshot",
"thumbnail": "https://example.com/product-thumb.png"
}
| Field | Type | Description |
|---|
type | string | image or video |
url | string | Media URL |
alt | string | Alt text for accessibility |
thumbnail | string | Thumbnail URL (optional) |
Example Request
import { WaffoPancake, TaxCategory } from "@waffo/pancake-ts";
const client = new WaffoPancake({
merchantId: process.env.WAFFO_MERCHANT_ID!,
privateKey: process.env.WAFFO_PRIVATE_KEY!,
});
const { product } = await client.onetimeProducts.create({
storeId: "store-uuid",
name: "Premium Template Pack",
description: "50 premium design templates for your next project.",
prices: {
USD: { amount: 4900, taxIncluded: false, taxCategory: TaxCategory.DigitalGoods },
EUR: { amount: 4500, taxIncluded: true, taxCategory: TaxCategory.DigitalGoods },
},
successUrl: "https://example.com/thank-you",
});
Update Product
Update a product’s content. If content has changed, a new immutable version is created automatically.
POST /v1/actions/onetime-product/update-product
Authentication: API Key
Request Body
| Field | Type | Required | Description |
|---|
id | string | Yes | Product UUID |
name | string | Yes | Updated product name |
description | string | No | Updated description |
prices | object | Yes | Updated pricing |
media | array | No | Updated media |
successUrl | string | No | Updated redirect URL |
metadata | object | No | Updated metadata |
Product updates create new immutable versions. Existing orders and subscriptions retain their original version. New purchases use the latest version.
Update Status
Activate or deactivate a product.
POST /v1/actions/onetime-product/update-status
Authentication: API Key
Request Body
| Field | Type | Required | Description |
|---|
id | string | Yes | Product UUID |
status | string | Yes | active or inactive |
Example Request
import { ProductVersionStatus } from "@waffo/pancake-ts";
await client.onetimeProducts.updateStatus({
id: "product-uuid",
status: ProductVersionStatus.Inactive,
});
Setting a product to inactive hides it from checkout but does not affect existing orders.
Publish Product
Publish a product from test to production. This is a one-way operation that copies the current test version to production.
POST /v1/actions/onetime-product/publish-product
Authentication: API Key
Do not include the X-Environment header for this endpoint. Publishing is always one-way from test to production.
Request Body
| Field | Type | Required | Description |
|---|
id | string | Yes | Product UUID |
Example Request
await client.onetimeProducts.publish({ id: "product-uuid" });
This enables a workflow where you develop and test products in the test environment, then promote them to production when ready.
Only the first publish is supported. Once a product has been published to production, subsequent updates in test are not automatically synced.