Update Plan

Update plan.

 

Request Path Parameters
Parameter Type Required Description
org_id number Yes The unique identifier of your organization
id number Yes The unique identifier of the plan

 

Request Body Parameter
Attribute Type Required Description
name string Yes Name of the plan
currency string Yes e.g usd
amount number Yes
interval string Yes e.g month or yearly
trial_duration number No Number of trial days
trial_duration_unit string No e.g day

Example Request & Response


$ curl https://api.custerem.com/<org_id>/plans/<id>/ \
-X PUT \
-H 'Authorization: X-API-KEY <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{
    "name": "pro_plan",
    "currency": "usd",
    "amount": 29,
    "interval": "month",
    "trial_duration": 20,
    "trial_duration_unit": "day"
}'

 

204 No Content

{
    "name": "pro_plan",
    "currency": "usd",
    "amount": 29,
    "interval": "month",
    "trial_duration": 20,
    "trial_duration_unit": "day"
}

 

404 Not Found

{
    "status_code": 404,
    "message": "Plan with id 3 not found"
}