Create an new plan
POST/recurrency/plans
This endpoint is used to create new subscription plans. Subscription plans define the terms, prices and benefits associated with different levels of service offered to customers. When creating a new plan, pertinent details such as the plan name, description, price, duration, and any other relevant attributes must be provided in the body of the request. Upon successful creation, the system returns the complete details of the newly created plan, including a unique identifier for future reference.
Requestβ
- application/json
Body
required
Possible values: [DAILY
, WEEKLY
, MONTHLY
, QUARTERLY
, BIANNUAL
, ANNUAL
]
Possible values: >= 1
Possible values: >= 1
initialFee
object
Possible values: >= 1
Possible values: non-empty
Responsesβ
- 200
- 400
- 401
- 415
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
initialFee
object
Indicates if the plan is enabled or not.
{
"id": "string",
"billingCycle": "string",
"totalBillingCycles": 0,
"initialGraceCycles": 0,
"initialFee": {
"description": "Fee test description",
"amount": 25,
"cycles": 10
},
"tag": "string",
"paymentType": "string",
"amount": 15,
"enabled": false
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Authorization token not found.",
"success": false,
"errors": {
"message": "Authorization token not found",
"field": "Authorization Token"
}
}
Unsupported Media Type
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Request object is invalid or incorrectly formatted",
"success": false,
"errors": null
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Internal Server Error",
"success": false,
"errors": null
}