Skip to main content
PATCH
/
subscriptions
/
plans
/
{planId}
Update subscription plan
curl --request PATCH \
  --url https://api.orafi.app/v1/subscriptions/plans/{planId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "amount": 9.99,
  "currency": "USDC"
}
'
{
  "success": true,
  "message": "Plan updated",
  "data": {
    "id": "plan_abc123",
    "name": "Basic Monthly",
    "amount": 9.99,
    "currency": "USDC",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}
Update an existing subscription plan.

Authorizations

x-api-key
string
header
required

API key for merchant authentication required for most endpoints

Path Parameters

planId
string
required

Body

application/json
name
string
duration
enum<string>
Available options:
WEEKLY,
MONTHLY,
SIX_MONTHS,
YEARLY
amount
number

Plan amount

Example:

9.99

currency
string

Currency code (3-letter) for the plan

Example:

"USDC"

Response

200 - application/json

Plan updated

success
boolean
Example:

true

message
string
Example:

"Plan updated"

data
object