Skip to main content
Create a new one-time purchase product with multi-currency pricing.
POST /v1/actions/onetime-product/create-product
Authentication: API Key

Request Body

FieldTypeRequiredDescription
storeIdstringYesStore ID (Short ID format STO_xxx)
namestringYesProduct name
descriptionstringNoProduct description (supports Markdown)
pricesobjectYesMulti-currency pricing map (see below)
mediaarrayNoProduct images/videos (see below)
successUrlstringNoRedirect URL after successful purchase
metadataobjectNoCustom key-value data (max 50 keys)

Price Object Format

Prices are a map of ISO 4217 currency codes to price configuration objects. At least one currency is required.
{
  "USD": {
    "amount": 2900,
    "taxIncluded": false,
    "taxCategory": "saas"
  },
  "EUR": {
    "amount": 2700,
    "taxIncluded": true,
    "taxCategory": "saas"
  }
}
FieldTypeDescription
amountintegerPrice in smallest currency unit (e.g., 2900 = $29.00)
taxIncludedbooleanWhether the amount already includes tax
taxCategorystringTax category for tax calculation
Supported taxCategory values:
ValueDescription
digital_goodsGeneral digital goods
saasSoftware as a Service
softwareDownloadable software
ebookElectronic books
online_courseOnline courses and education
consultingConsulting services
professional_serviceProfessional services

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 for images, recommended for videos)

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: "STO_2aUyqjCzEIiEcYMKj7TZtw",
  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 },
  },
  media: [
    { type: "image", url: "https://example.com/templates-preview.png", alt: "Template preview" },
  ],
  successUrl: "https://example.com/thank-you",
  metadata: { category: "design", fileCount: "50" },
});

Success Response (200)

{
  "data": {
    "id": "PROD_3kF9mNpQrStUvWxYz1A2bC",
    "storeId": "STO_2aUyqjCzEIiEcYMKj7TZtw",
    "prodVersionId": null,
    "testVersionId": "PROD_7dG4hJkLmNpQrStUvWxYz1",
    "prodStatus": "inactive",
    "testStatus": "active",
    "createdAt": "2026-01-15T10:30:00.000Z",
    "updatedAt": "2026-01-15T10:30:00.000Z",
    "version": {
      "id": "PROD_7dG4hJkLmNpQrStUvWxYz1",
      "productId": "PROD_3kF9mNpQrStUvWxYz1A2bC",
      "versionNumber": 1,
      "name": "Premium Template Pack",
      "description": "50 premium design templates for your next project.",
      "prices": {
        "USD": { "amount": 4900, "taxIncluded": false, "taxCategory": "digital_goods" },
        "EUR": { "amount": 4500, "taxIncluded": true, "taxCategory": "digital_goods" }
      },
      "media": [
        { "type": "image", "url": "https://example.com/templates-preview.png", "alt": "Template preview" }
      ],
      "successUrl": "https://example.com/thank-you",
      "metadata": { "category": "design", "fileCount": "50" },
      "createdAt": "2026-01-15T10:30:00.000Z"
    }
  }
}

Response Fields

FieldTypeDescription
idstringProduct ID (PROD_xxx)
storeIdstringStore ID (STO_xxx)
prodVersionIdstring | nullActive production version ID (PROD_xxx), null if not published
testVersionIdstring | nullActive test version ID (PROD_xxx), null if not in test
prodStatusstringProduction status: active or inactive
testStatusstringTest status: active or inactive
createdAtstringCreation timestamp (ISO 8601)
updatedAtstringLast update timestamp (ISO 8601)
versionobjectThe version created or active in the current environment
Version object:
FieldTypeDescription
idstringVersion ID (PROD_xxx)
productIdstringParent product ID (PROD_xxx)
versionNumberintegerSequential version number (starts at 1)
namestringProduct name at this version
descriptionstring | nullProduct description at this version
pricesobjectMulti-currency pricing map
mediaarrayMedia items at this version
successUrlstring | nullSuccess redirect URL at this version
metadataobject | nullCustom metadata at this version
createdAtstringVersion creation timestamp (ISO 8601)
When created in the test environment (default), testStatus is active and prodStatus is inactive. When created in the production environment, the values are reversed.

Error Responses

StatusErrorDescription
400Missing required field: storeIdstoreId not provided
400Missing required field: namename not provided
400Prices must not be emptyprices is missing or an empty object
404Store not foundStore does not exist or is not accessible