8 min read

Stripe Product Types Reference

Complete reference for product types supported by iaptic's Stripe integration.

Product Types Overview

Type Description Use Case
paid subscription Recurring payment SaaS, memberships
consumable One-time purchase, can buy multiple Credits, tokens
non_consumable One-time purchase, permanent Lifetime access

Subscription Products

Configuration

{
  metadata: {
    product_type: 'paid subscription',
    can_purchase: 'true',
    features?: string,         // Comma-separated features
    tier?: string,            // Product tier
    max_users?: string,       // User limit
    description?: string      // Product description
  },
  prices: [{
    recurring: {
      interval: 'month' | 'year',
      interval_count: number
    },
    currency: string,
    unit_amount: number       // In cents/pence
  }]
}

Example: Premium Plan

{
  name: 'Premium Plan',
  metadata: {
    product_type: 'paid subscription',
    features: 'api,backup,support',
    tier: 'premium',
    max_users: '5',
    can_purchase: 'true'
  },
  prices: [{
    recurring: {
      interval: 'month',
      interval_count: 1
    },
    currency: 'usd',
    unit_amount: 999  // $9.99
  }]
}

Consumable Products

Configuration

{
  metadata: {
    product_type: 'consumable',
    can_purchase: 'true',
    credits?: string,         // Amount of credits
    expires_in?: string,      // ISO duration
    description?: string      // Product description
  },
  prices: [{
    currency: string,
    unit_amount: number      // In cents/pence
  }]
}

Example: Credit Pack

{
  name: '1000 Credits',
  metadata: {
    product_type: 'consumable',
    credits: '1000',
    expires_in: 'P1Y',        // Expires in 1 year
    can_purchase: 'true'
  },
  prices: [{
    currency: 'usd',
    unit_amount: 499  // $4.99
  }]
}

Non-Consumable Products

Configuration

{
  metadata: {
    product_type: 'non_consumable',
    can_purchase: 'true',
    features?: string,        // Comma-separated features
    description?: string      // Product description
  },
  prices: [{
    currency: string,
    unit_amount: number      // In cents/pence
  }]
}

Example: Lifetime Access

{
  name: 'Lifetime Pro Access',
  metadata: {
    product_type: 'non_consumable',
    features: 'all',
    can_purchase: 'true'
  },
  prices: [{
    currency: 'usd',
    unit_amount: 29900  // $299.00
  }]
}

Feature Flags

Standard Features

metadata: {
  features: string  // Comma-separated list
}

// Examples:
'api,backup,support'
'basic,advanced,pro'
'all'                // All features enabled

Usage Limits

metadata: {
  limits: JSON.stringify({
    storage: string,    // e.g., '50GB'
    requests: string,   // e.g., '1000/day'
    users: number,      // e.g., 5
    projects: number    // e.g., 10
  })
}

Visibility Control

Product Visibility

metadata: {
  can_purchase: 'true' | 'false'  // Control visibility
}

Price Visibility

price: {
  active: boolean,              // Control price availability
  metadata: {
    visible: 'true' | 'false'   // Additional control
  }
}

Metadata Schema

Required Fields

interface ProductMetadata {
  product_type: 'paid subscription' | 'consumable' | 'non_consumable';
  can_purchase: 'true' | 'false';
  managed_by_iaptic: 'true';
}

Optional Fields

interface OptionalMetadata {
  features?: string;          // Feature flags
  tier?: string;             // Product tier
  max_users?: string;        // User limit
  credits?: string;          // For consumables
  expires_in?: string;       // ISO duration
  description?: string;      // Product description
  limits?: string;           // JSON stringified limits
  visible?: 'true' | 'false'; // Visibility control
}

Best Practices

  1. Product Types

    • Use explicit product types
    • Don't mix subscription and one-time prices
    • Keep types consistent
  2. Metadata

    • Use string values for all metadata
    • Keep keys consistent
    • Document custom fields
  3. Pricing

    • Use lowest currency unit (cents/pence)
    • Consider regional pricing
    • Plan trial periods carefully
  4. Features

    • Use clear feature names
    • Document feature flags
    • Plan upgrade paths