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 '
{
  "name": "Basic Plan",
  "accessExpiryDays": 30,
  "basePrice": 29.99,
  "billingCycle": "monthly",
  "billingModel": "pre-paid",
  "currency": "USD",
  "default": false,
  "description": "Basic recurring plan with monthly billing",
  "features": {
    "apiAccess": true,
    "prioritySupport": false
  },
  "freeUnits": 100,
  "isFreeTier": false,
  "limits": {
    "maxTransactions": 1000
  },
  "maxActiveUsers": 10,
  "metadata": {},
  "price": 29.99,
  "pricePerUnit": 0.01,
  "quota": 10000,
  "requiresPayment": true,
  "rolloverUnusedUnits": false,
  "setupFee": 0,
  "status": "active",
  "trialDays": 7,
  "type": "recurring",
  "unit": "request"
}
'

Path Parameters

productRef
string
required

Product reference or ID

Body

application/json
name
string
required

Plan name

Example:

"Basic Plan"

accessExpiryDays
number

Access expiry in days

Example:

30

basePrice
number

Base price for hybrid plans

Example:

29.99

billingCycle
enum<string>

Billing cycle (required for recurring/hybrid, optional for post-paid usage-based)

Available options:
weekly,
monthly,
quarterly,
yearly,
custom
Example:

"monthly"

billingModel
enum<string>

Billing model for usage-based plans

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

"pre-paid"

currency
enum<string>

Currency code (ISO 4217)

Available options:
USD,
EUR,
GBP,
SEK,
NOK,
DKK,
CAD,
AUD,
JPY,
CHF,
PLN,
CZK,
HUF,
RON,
BGN,
HRK,
RSD,
MKD,
BAM,
ALL,
ISK,
TRY,
RUB,
UAH,
BYN,
MDL,
GEL,
AMD,
AZN,
KZT,
KGS,
TJS,
TMT,
UZS,
MNT,
CNY,
KRW,
THB,
VND,
IDR,
MYR,
SGD,
PHP,
INR,
PKR,
BDT,
LKR,
NPR,
AFN,
IRR,
IQD,
JOD,
KWD,
LBP,
OMR,
QAR,
SAR,
SYP,
AED,
YER,
ILS,
EGP,
MAD,
TND,
DZD,
LYD,
SDG,
ETB,
KES,
TZS,
UGX,
RWF,
BIF,
DJF,
SOS,
ERN,
SLL,
GMD,
GNF,
CVE,
STN,
AOA,
ZAR,
BWP,
SZL,
LSL,
NAD,
ZMW,
ZWL,
MZN,
MWK,
MGA,
MUR,
SCR,
KMF,
MVR
Example:

"USD"

default
boolean

Whether this is the default plan

Example:

false

description
string

Plan description

Example:

"Basic recurring plan with monthly billing"

features
object

Plan features (generic key/value, shape is provider-defined)

Example:
{
"apiAccess": true,
"prioritySupport": false
}
freeUnits
number

Number of free units included

Example:

100

isFreeTier
boolean

Whether this is a free tier plan

Example:

false

limits
object

Usage limits (shape varies by plan type)

Example:
{ "maxTransactions": 1000 }
maxActiveUsers
number

Maximum number of active users

Example:

10

metadata
object

Additional metadata

price
number

Plan price

Example:

29.99

pricePerUnit
number

Price per unit for usage-based plans

Example:

0.01

quota
number

Usage quota for usage-based plans

Example:

10000

requiresPayment
boolean

Whether payment is required

Example:

true

rolloverUnusedUnits
boolean

Whether to rollover unused units

Example:

false

setupFee
number

Setup fee

Example:

0

status
enum<string>

Plan status

Available options:
active,
inactive,
archived
Example:

"active"

trialDays
number

Trial days

Example:

7

type
enum<string>

Plan type

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

"recurring"

unit
string

Unit name for usage-based plans

Example:

"request"

Response

201 - undefined