Skip to main content
POST
Create a new plan

Headers

x-admin-api-key
string
required

The API key to access the admin API

Body

application/json
name
string
required
Example:

"Premium Plan"

code
string
required

Unique code for the plan

Example:

"iqraa_starter_monthly"

interval
enum<string>
required

Billing interval

Available options:
yearly,
monthly
Example:

"monthly"

currency
string
required

Currency code

Example:

"USD"

amount
number
required

Plan amount

Required range: x >= 0
Example:

99.99

trialPeriod
number

Trial period in days

Required range: x >= 0
Example:

14

gracePeriod
number

Grace period in days after subscription expiry

Required range: x >= 0
Example:

7

charges
object[]

Add multiple billable metrics in plan

Example:

Response

The plan has been successfully created

name
string
required
Example:

"Premium Plan"

code
string
required

Unique code for the plan

Example:

"iqraa_starter_monthly"

interval
enum<string>
required

Billing interval

Available options:
yearly,
monthly
Example:

"monthly"

currency
string
required

Currency code

Example:

"USD"

amount
number
required

Plan amount

Required range: x >= 0
Example:

99.99

trialPeriod
number

Trial period in days

Required range: x >= 0
Example:

14

gracePeriod
number

Grace period in days after subscription expiry

Required range: x >= 0
Example:

7

charges
object[]

Add multiple billable metrics in plan

Example: