Skip to main content

Create Product

Create a new one-time purchase product.
POST /v1/actions/onetime-product/create-product
Authentication: API Key

Request Body

FieldTypeRequiredDescription
storeIdstringYesUUID of the store
namestringYesProduct name
descriptionstringNoProduct description (supports Markdown)
pricesobjectYesMulti-currency pricing (see below)
mediaarrayNoProduct images/videos
successUrlstringNoRedirect URL after successful purchase
metadataobjectNoCustom key-value data

Price Object Format

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"
  }
}
FieldTypeDescription
amountintegerPrice in smallest currency unit (e.g., cents)
taxIncludedbooleanWhether the amount includes tax
taxCategorystringOne of: digital_goods, saas, software, ebook, online_course, consulting, professional_service

Media Item Format

{
  "type": "image",
  "url": "https://example.com/product.png",
  "alt": "Product screenshot",
  "thumbnail": "https://example.com/product-thumb.png"
}
FieldTypeDescription
typestringimage or video
urlstringMedia URL
altstringAlt text for accessibility
thumbnailstringThumbnail 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

FieldTypeRequiredDescription
idstringYesProduct UUID
namestringYesUpdated product name
descriptionstringNoUpdated description
pricesobjectYesUpdated pricing
mediaarrayNoUpdated media
successUrlstringNoUpdated redirect URL
metadataobjectNoUpdated 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

FieldTypeRequiredDescription
idstringYesProduct UUID
statusstringYesactive 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

FieldTypeRequiredDescription
idstringYesProduct 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.