Skip to main content
PUT
/
api
/
v1
/
subscriptions
/
plans
/
{uuid}
Update a subscription plan
curl --request PUT \
  --url http://localhost:7701/api/v1/subscriptions/plans/{uuid} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "Pro Monthly",
  "description": "Updated description.",
  "billing_day": 10,
  "trial_period_days": 14,
  "is_active": false
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Basic Monthly",
    "description": "<string>",
    "amount": 2990,
    "currency": "BRL",
    "interval": "monthly",
    "interval_count": 1,
    "trial_period_days": 7,
    "billing_day": 5,
    "is_active": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

Company API key. Send in the X-API-Key header.

Path Parameters

uuid
string<uuid>
required

Body

application/json
name
string | null
Example:

"Pro Monthly"

description
string | null
Example:

"Updated description."

billing_day
integer | null

Day of the month to charge (1–28).

Example:

10

trial_period_days
integer | null

Free trial days (1–365).

Example:

14

is_active
boolean | null

Set to false to deactivate the plan and prevent new subscriptions.

Example:

false

Response

Plan updated

data
object