Skip to main content
POST
/
api
/
v1
/
subscription
/
plans
Create a subscription plan
curl --request POST \
  --url https://payments.oaknetwork.org/api/v1/subscription/plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Monthly Pro",
  "description": "Monthly professional plan",
  "frequency": 30,
  "price": 2999,
  "currency": "USD",
  "created_by": "admin@example.com"
}
'
{
  "msg": "plan created",
  "data": "<string>"
}

Authorizations

Authorization
string
header
required

Merchant authentication token. Obtained via POST /api/v1/merchant/token/grant. Pass as: Authorization: Bearer

Body

application/json
name
string
required
description
string
required
frequency
integer
required

Billing frequency in days

price
integer
required

Price amount

currency
string
required
created_by
string
required
overridden_price
integer
start_time
string<date>
end_time
string<date>
is_auto_renewable
boolean
allow_amount_override
boolean
campaign_id
string
campaign_name
string

Response

201 - application/json

Plan created

msg
string
required

Human-readable message describing the result

Example:

"plan created"

data
string
required

Plan hash ID