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
| Kind | Description | Use Case |
|---|---|---|
one_time | Single purchase | Setup fees, one-off services |
subscription | Recurring billing | Monthly plans, memberships |
service | Service or package | Treatment 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
| Model | Description | Parameters |
|---|---|---|
fixed | Fixed price per unit | amountMinor |
recurring | Fixed recurring price | amountMinor, interval |
tiered | Volume-based pricing | tiers[] |
usage | Metered billing | unitAmountMinor, meter |
Billing Intervals
| Interval | intervalCount | Description |
|---|---|---|
day | 1 | Daily billing |
week | 1 | Weekly billing |
week | 2 | Bi-weekly billing |
month | 1 | Monthly billing |
month | 3 | Quarterly billing |
year | 1 | Annual 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,
});