import { WaffoPancake, BillingPeriod, 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.subscriptionProducts.create({
storeId: "STO_2D5F8G3H1K4M6N9P",
name: "Pro Plan",
billingPeriod: BillingPeriod.Monthly,
prices: {
USD: { amount: 2900, taxIncluded: false, taxCategory: TaxCategory.SaaS },
EUR: { amount: 2700, taxIncluded: false, taxCategory: TaxCategory.SaaS },
},
description: "Full access to all Pro features.",
successUrl: "https://example.com/welcome",
metadata: { trialDays: 14 },
});