Products

Define your product catalog with flexible pricing models

Products define what you sell and how you price it. RevKeen supports one-time purchases, recurring subscriptions, and usage-based billing.

Product Types

KindDescriptionUse Case
one_timeSingle purchaseSetup fees, one-off services
subscriptionRecurring billingMonthly plans, memberships
serviceService or packageTreatment packages, service bundles

Creating Products

Recurring Product (Subscription)

const product = await client.products.create({
  productId: 'pro_monthly',
  name: 'Pro Plan',
  description: 'Full access to all features',
  kind: 'subscription',
  pricingModel: 'recurring',
  amountMinor: 2900, // $29.00
  currency: 'USD',
  interval: 'month',
  intervalCount: 1,
  trialDays: 14,
  
  // Optional: Features list for checkout display
  features: [
    'Unlimited projects',
    'Priority support',
    'Advanced analytics',
  ],
});

One-Time Product

const product = await client.products.create({
  productId: 'setup_fee',
  name: 'Setup Fee',
  description: 'One-time onboarding and configuration',
  kind: 'one_time',
  pricingModel: 'fixed',
  amountMinor: 9900, // $99.00
  currency: 'USD',
});

Pricing Models

ModelDescriptionParameters
fixedFixed price per unitamountMinor
recurringFixed recurring priceamountMinor, interval
tieredVolume-based pricingtiers[]
usageMetered billingunitAmountMinor, meter

Billing Intervals

IntervalintervalCountDescription
day1Daily billing
week1Weekly billing
week2Bi-weekly billing
month1Monthly billing
month3Quarterly billing
year1Annual billing

Listing Products

// List all active products
const products = await client.products.list({
  isActive: true,
});

// Filter by kind
const subscriptions = await client.products.list({
  kind: 'subscription',
  isActive: true,
});

Updating Products

const product = await client.products.update('prod_xxxxxxxx', {
  name: 'Pro Plan (2024)',
  amountMinor: 3900, // Price increase
});
Updating a product's price doesn't affect existing subscriptions. New subscriptions will use the updated price.

Archiving Products

// Archive a product (hide from new purchases)
const product = await client.products.update('prod_xxxxxxxx', {
  isActive: false,
});

Related