Skip to main content
Plans are pricing options embedded within products. They define how customers pay for access — whether through a flat recurring fee, per-unit usage charges, a one-time purchase, or a combination of recurring and usage-based billing.

Plan Types

SolvaPay supports four plan types, each optimized for different monetization strategies:

Recurring

Fixed-price plans billed on a regular cycle. Best for SaaS subscriptions with predictable pricing.
FieldTypeDescription
billingCycleenumweekly, monthly, quarterly, yearly, or custom
setupFeenumberOne-time fee charged on first billing
trialDaysnumberFree trial period before billing starts
autoRenewbooleanWhether the plan auto-renews at period end
cancellationNoticeDaysnumberNotice required to cancel (default: 1 day)
pricingTiersarrayOptional tiered pricing (e.g. Basic, Pro, Enterprise)
prorationPolicyobjectHow to handle mid-cycle upgrades/downgrades
limitsobjectOptional maxTransactions cap
{
  "type": "recurring",
  "price": 1900,
  "currency": "USD",
  "billingCycle": "monthly",
  "trialDays": 14,
  "autoRenew": true,
  "features": {
    "api_access": true,
    "priority_support": true
  }
}

Usage-Based

Pay-per-use plans where customers are billed based on actual consumption tracked by a meter.
FieldTypeDescription
meterIdObjectIdReference to the meter that tracks usage
billingModelenumpre-paid (pay upfront for a quota) or post-paid (pay after usage)
pricePerUnitnumberCost per metered unit
limitnumberHard usage cap per period (0 = unlimited)
freeUnitsnumberUnits included before billing starts
rolloverUnusedUnitsbooleanCarry unused units to the next period
billingCyclestringRequired for post-paid plans
limitsobjectOptional maxTransactions, maxUsage
{
  "type": "usage-based",
  "price": 0,
  "currency": "USD",
  "billingModel": "post-paid",
  "billingCycle": "monthly",
  "meterId": "60f7b2...",
  "pricePerUnit": 10,
  "freeUnits": 100,
  "limit": 10000
}
The meterId links the plan to a specific meter. When checking limits, SolvaPay queries the meter’s event timeseries for the customer’s total usage in the current billing period and compares it against the plan’s limit.

Hybrid

Combines a recurring base price with usage-based overage billing. Best for enterprise SaaS where customers pay a base fee that includes some usage, with additional charges for overages.
FieldTypeDescription
basePricenumberFixed recurring portion
billingCycleenumSame options as recurring plans
meterIdObjectIdReference to the meter that tracks usage
limitnumberIncluded units in the base price
freeUnitsnumberAdditional free units beyond the base
pricePerUnitnumberFlat per-unit rate (fallback if no tiers)
usageTiersarrayVolume-based tiered pricing for the usage component
overagePolicyobjectallowOverage, overageRate, maxOverage
billingStrategyobjectWhether to bill recurring_first, usage_first, or combined
{
  "type": "hybrid",
  "basePrice": 4900,
  "currency": "USD",
  "billingCycle": "monthly",
  "meterId": "60f7b2...",
  "limit": 1000,
  "freeUnits": 0,
  "pricePerUnit": 5,
  "overagePolicy": {
    "allowOverage": true,
    "overageRate": 8,
    "maxOverage": 5000
  },
  "usageTiers": [
    { "name": "Standard", "minUsage": 0, "maxUsage": 500, "pricePerUnit": 5 },
    { "name": "High Volume", "minUsage": 501, "maxUsage": 2000, "pricePerUnit": 3 },
    { "name": "Enterprise", "minUsage": 2001, "pricePerUnit": 1 }
  ]
}

One-Time

Single-purchase plans for digital goods, lifetime access, or physical products.
FieldTypeDescription
isRecurringbooleanWhether the one-time purchase can be repeated
limitsobjectOptional maxTransactions
availabilityobjectstartDate, endDate, maxQuantity, currentQuantity
fulfillmentobjecttype (digital/physical), deliveryMethod, estimatedDelivery
warrantyobjectduration, unit, terms
returnPolicyobjectallowed, period, conditions
{
  "type": "one-time",
  "price": 9900,
  "currency": "USD",
  "fulfillment": {
    "type": "digital",
    "deliveryMethod": "instant"
  }
}

Common Plan Fields

All plan types share these base fields:
FieldTypeDescription
referencestringAuto-generated identifier (pln_XXXXXXXX)
pricenumberBase price in smallest currency unit (e.g. cents)
currencystringISO 4217 currency code (default: USD)
statusenumactive, inactive, or archived
isFreeTierbooleanWhether this is a free tier
requiresPaymentbooleanWhether payment is needed to activate
defaultbooleanWhether this is the product’s default plan
maxActiveUsersnumber?Maximum concurrent users on this plan
accessExpiryDaysnumber?Days until access expires
featuresobjectProvider-defined feature flags
metadataobjectArbitrary provider-defined metadata

Plans Are Embedded in Products

Plans are stored as sub-documents inside product documents — there is no separate plans collection. Each product has a plans[] array where each entry is discriminated by the kind field. This means:
  • A product owns its plans
  • Plans are created, updated, and deleted through the product
  • Plan references (pln_...) are globally unique across all products
Product (prd_myapi)
├── Plan: Free Tier (pln_abc123) — recurring, $0/month
├── Plan: Pro (pln_def456) — usage-based, $0.01/request
└── Plan: Enterprise (pln_ghi789) — hybrid, $49/month + overage

Plan API

All plan endpoints are scoped to a product:
MethodEndpointDescription
GET/sdk/products/:productRef/plansList plans for a product
GET/sdk/products/:productRef/plans/:planRefGet a single plan
POST/sdk/products/:productRef/plansCreate a plan
PUT/sdk/products/:productRef/plans/:planRefUpdate a plan
DELETE/sdk/products/:productRef/plans/:planRefDelete a plan
Plans can also be managed via the NATS event bus using the solvapay.plan.* subjects.

Default Plan

Each product can have one default plan. Setting a new plan as default automatically un-defaults all other plans in that product. The default plan is used as the fallback for:
  • MCP server tool access (when no specific plan is assigned to a tool)
  • New customer sign-ups (when auto-provisioning is configured)

Plans and MCP Servers

Plans integrate with MCP servers in two ways:
  • Server default plan — the defaultPlanId on an MCP server determines which plan is used for general tool access
  • Per-tool plan assignments — individual MCP tools can reference specific plans via planIds, enabling tool-level access tiering
When plans are created, updated, or deleted, MCP server configurations are automatically synced.

Purchase Snapshots

When a customer purchases a plan, the plan’s configuration is frozen into a snapshot on the purchase record:
{
  "planSnapshot": {
    "reference": "pln_abc123",
    "price": 1900,
    "currency": "USD",
    "planType": "usage-based",
    "billingCycle": "monthly",
    "meterId": "60f7b2...",
    "limit": 10000,
    "freeUnits": 100,
    "pricePerUnit": 10
  }
}
This ensures billing is deterministic — changing a plan’s price or limits does not retroactively affect existing purchases.

Next Steps

  • Billing — billing cycles, usage billing, and end-of-period processing
  • Meters — meter definitions linked to usage-based plans
  • Meter Events — how usage data is recorded and queried