Updating an existing plan
PUT/recurrency/plans/:planId
This endpoint is used to update the details of an existing subscription plan based on the provided ID. Subscription plans may need to be updated to reflect changes in terms, pricing, benefits or other attributes associated with the plan. When submitting an upgrade request to this endpoint, pertinent plan details such as name, description, price, duration, and features must be provided in the body of the request. The ID of the plan to be updated must be specified in the URL. After successful update, the system returns the updated plan details.
Requestβ
Path Parameters
- 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
}