Skip to main content

Products

List Products

GET /api/v1/products

Create Product

POST /api/v1/products
Body:
{
  "name": "AI Agent Pro",
  "description": "Professional AI agent plan"
}

Get Product

GET /api/v1/products/{product_id}

Rate Plans

Rate plans define pricing tiers for products.

Create Rate Plan

POST /api/v1/products/{product_id}/rateplans
Body:
{
  "name": "Monthly Plan",
  "billing_cycle_code": "monthly"
}

Get Rate Plan

GET /api/v1/products/rateplans/{rate_plan_id}

Charge Models

Charge models define pricing strategies (flat fee, tiered, per-unit, etc.).

List Charge Models

GET /api/v1/charge_models

Create Charge Model

POST /api/v1/charge_models
Body:
{
  "name": "Tiered Outcome Pricing",
  "description": "Tiered pricing based on outcomes",
  "type": "tiered",
  "pricing_strategy": {
    "tiers": [
      {
        "price": 0,
        "start": 1,
        "counter": 10
      },
      {
        "price": 0,
        "start": 11,
        "counter": 110
      }
    ],
    "unit_of_measure": "@outcome"
  }
}
Fields:
  • name (string, required): Charge model name
  • description (string, required): Description
  • type (string, required): Pricing type (e.g., “flat”, “tiered”, “per_unit”)
  • pricing_strategy (object, required): Pricing configuration

Charges

Charges define pricing components within rate plans.

Create Charge

POST /api/v1/products/rateplans/{rate_plan_id}/charges
Body:
{
  "name": "API Calls",
  "charge_model_id": "cm_usage",
  "charge_type_code": "usage",
  "pricing": {
    "unit_price": 0.001
  }
}

Pricing Simulation

Simulate pricing before creating subscriptions.
POST /api/v1/simulation/charges
Body:
{
  "rate_plan_id": "rp_123",
  "usage_data": {
    "api_calls": 10000
  }
}