Skip to main content

Understanding Seat Based Billing

Seat Based Billing allows you to set a per-seat price for your product and let customers purchase multiple seats. This is particularly useful for team-based products, enterprise software, or any service where pricing scales with the number of users. Seat Based Billing in Creem works for both One Time Payments and Subscriptions seamlessly without any special setup.

Key Concepts

Per-Seat Pricing

In Seat Based Billing:
  • Base Price: Set in the Creem dashboard as the price per individual seat
  • Units: Represents the number of seats being purchased
  • Total Price: Automatically calculated as (Base Price × Units)

Implementation

To implement Seat Based Billing:
  1. Create a product in your Creem dashboard where the price is the base seat price
  2. Generate a checkout session with the desired number of seats using the units parameter
  3. Direct your customer to the checkout URL
  • Next.js
  • TypeScript SDK
  • Better Auth
  • REST API
"use client"; // Optional: Works with server components

import { CreemCheckout } from "@creem_io/nextjs";

export function SeatBasedCheckout({ seatCount }: { seatCount: number }) {
  return (
    <CreemCheckout
      productId="prod_YOUR_PRODUCT_ID"
      units={seatCount} // Number of seats to purchase
      referenceId="user_123" // Optional: Track this purchase
    >
      <button>Purchase {seatCount} Seats</button>
    </CreemCheckout>
  );
}

Next.js SDK Documentation

Learn more about the Next.js adapter and advanced features.

Managing Seat Changes

You can manage seat quantities for your customers in subscriptions by:
  • Adding seats: Modify the subscription through the dashboard or update subscription API
  • Reducing seats: Modify the subscription through the dashboard or update subscription API

Programmatically Update Seats

You can add or reduce seats in a subscription programmatically using the Creem API.
1

Get the subscription details

First, retrieve the subscription to get the subscription item ID:
  • TypeScript SDK
  • REST API
import { createCreem } from "creem_io";

const creem = createCreem({
  apiKey: process.env.CREEM_API_KEY!,
  testMode: process.env.NODE_ENV !== "production",
});

// Get subscription details
const subscription = await creem.subscriptions.get({
  subscriptionId: "sub_YOUR_SUBSCRIPTION_ID",
});

// Extract the subscription item ID
const itemId = subscription.items[0].id;
console.log("Item ID:", itemId);
2

Update the seat count

Use the subscription item ID to update the number of seats:
  • TypeScript SDK
  • REST API
// Update the subscription to 15 seats
const updated = await creem.subscriptions.update({
  subscriptionId: "sub_YOUR_SUBSCRIPTION_ID",
  items: [
    {
      id: "sitem_3l8jhRR2jWWhIBbJrKLwPT", // Item ID from step 1
      units: 5, // New seat count
    },
  ],
  updateBehavior: "proration-charge-immediately", // Optional
});

console.log("Subscription updated:", updated);
Update Behavior Options:
  • proration-charge-immediately: Calculate proration and charge immediately
  • proration-charge: Calculate proration and charge at next billing cycle
  • proration-none: No proration, just update the seat count

Manual subscription changes through the Creem Dashboard

You can also modify subscription seats through your Creem Dashboard as a merchant. Simply click on a subscription, and upon the details sheet opening, click on the “Modify Subscription” button

Billing after subscription updates

The new amount will be charged upon subscription renewal. If you need pro-rata charges or different use cases, contact the Creem team.
Remember to validate and track seat usage in your application to ensure customers don’t exceed their purchased seat limit.