Skip to main content
POST
/
v1
/
sdk
/
products
/
{productRef}
/
plans
Create a plan for a product
curl --request POST \
  --url https://api.example.com/v1/sdk/products/{productRef}/plans \
  --header 'Content-Type: application/json' \
  --data '
{
  "features": {},
  "limits": {},
  "metadata": {},
  "usageTracking": {},
  "accessExpiryDays": 123,
  "autoRenew": true,
  "basePrice": 123,
  "creditsPerUnit": 123,
  "currency": "<string>",
  "default": true,
  "description": "<string>",
  "freeUnits": 123,
  "limit": 123,
  "maxActiveUsers": 123,
  "name": "<string>",
  "price": 123,
  "rolloverUnusedUnits": true,
  "setupFee": 123,
  "trialDays": 123
}
'
{
  "createdAt": "<string>",
  "currency": "USD",
  "isActive": true,
  "price": 2999,
  "reference": "pln_1A2B3C4D",
  "requiresPayment": true,
  "status": "active",
  "type": "recurring",
  "updatedAt": "<string>",
  "accessExpiryDays": 123,
  "billingCycle": "monthly",
  "billingModel": "pre-paid",
  "creditsPerUnit": 1,
  "currencySymbol": "$",
  "description": "Best for teams getting started",
  "features": {},
  "freeUnits": 100,
  "limit": 10000,
  "limits": {},
  "maxActiveUsers": 123,
  "measures": "requests",
  "meterRef": "mtr_1A2B3C4D",
  "name": "Starter",
  "rolloverUnusedUnits": false,
  "setupFee": 500,
  "trialDays": 14
}

Documentation Index

Fetch the complete documentation index at: https://docs.solvapay.com/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

productRef
string
required

Product reference or ID

Body

application/json
features
object
required
limits
object
required
metadata
object
required
usageTracking
object
required
accessExpiryDays
number
autoRenew
boolean
basePrice
number
billingCycle
enum<string>
Available options:
weekly,
monthly,
quarterly,
yearly,
custom
billingModel
enum<string>
Available options:
pre-paid,
post-paid
creditsPerUnit
number
currency
string
default
boolean
description
string
freeUnits
number
limit
number
maxActiveUsers
number
name
string
Minimum string length: 1
price
number
rolloverUnusedUnits
boolean
setupFee
number
status
enum<string>
Available options:
active,
inactive,
archived
trialDays
number
type
enum<string>
Available options:
recurring,
usage-based,
one-time,
hybrid

Response

Plan created successfully

createdAt
string
required

Creation timestamp

currency
string
required

Currency code (ISO 4217)

Example:

"USD"

isActive
boolean
required

Whether the plan is active (derived from status)

Example:

true

price
number
required

Plan price in cents

Example:

2999

reference
string
required

Plan reference

Example:

"pln_1A2B3C4D"

requiresPayment
boolean
required

Whether payment is required

Example:

true

status
string
required

Plan status

Example:

"active"

type
enum<string>
required

Plan type exposed in SDK

Available options:
recurring,
one-time,
usage-based,
hybrid
Example:

"recurring"

updatedAt
string
required

Last update timestamp

accessExpiryDays
number

Access expiry in days

billingCycle
string

Billing cycle

Example:

"monthly"

billingModel
enum<string>

Billing model

Available options:
pre-paid,
post-paid
Example:

"pre-paid"

creditsPerUnit
number

Credits per usage unit (integer, >= 1)

Example:

1

currencySymbol
string

Currency symbol (derived from currency)

Example:

"$"

description
string

Plan description

Example:

"Best for teams getting started"

features
object

Plan features

freeUnits
number

Number of free units included

Example:

100

limit
number

Usage limit for the meter

Example:

10000

limits
object

Usage limits

maxActiveUsers
number

Maximum number of active users

measures
string

What the plan measures for usage tracking

Example:

"requests"

meterRef
string

Meter reference for usage-based plans

Example:

"mtr_1A2B3C4D"

name
string

Plan name

Example:

"Starter"

rolloverUnusedUnits
boolean

Whether unused units roll over to next period

Example:

false

setupFee
number

One-time setup fee

Example:

500

trialDays
number

Free trial period in days

Example:

14