Skip to content

Update Plan

PUT
/api/products/{productId}/plans/{id}
curl --request PUT \
--url https://example.com/api/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/plans/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "description": "example", "price": 1, "setupFee": 1, "frequency": "OneOff", "trialDays": 1, "minimumContractMonths": 1, "cancellationFee": 1, "isActive": true, "isPublic": true }'

Updates an existing plan. Changes are synced back to the payment gateway.

productId
required
string format: uuid

The parent product’s identifier.

id
required
string format: uuid

The plan’s unique identifier.

Updated plan data.

object
id
string format: uuid
name
required
string
>= 1 characters <= 200 characters
description
string
nullable <= 1000 characters
price
required
number format: double
setupFee
number format: double
nullable
frequency
required
string
Allowed values: OneOff Daily Weekly Fortnightly Monthly Quarterly Yearly
trialDays
integer format: int32
<= 365
minimumContractMonths
integer format: int32
nullable <= 120
cancellationFee
number format: double
nullable
isActive
required
boolean
isPublic
boolean

Plan updated successfully.

Media type application/json
object
id
string format: uuid
merchantId
string format: uuid
productId
string format: uuid
name
string
nullable
description
string
nullable
price
number format: double
setupFee
number format: double
nullable
frequency
string
Allowed values: OneOff Daily Weekly Fortnightly Monthly Quarterly Yearly
trialDays
integer format: int32
minimumContractMonths
integer format: int32
nullable
cancellationFee
number format: double
nullable
isActive
boolean
isPublic
boolean
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{
"frequency": "OneOff"
}

Validation failed — check the errors object.

Media type application/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

No plan with the given ID exists.

Media type application/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}