Create Project Plan - Add New Subscription Tiers via API
Add a new subscription tier to your project. Define the plan name, price, currency, and billing duration to offer members different membership options. You can also configure whether the plan supports recurring payments, one-time purchases, or both.
POST
/v2/projects/{project_id}/plansAuthorization
Bearer TokenRequired
Path Parameters
project_idstringRequired
The unique identifier of the project.
Request Body
plan_namestringRequired
Display name of the plan.
plan_pricestringRequired
Price amount for the plan as a string (e.g., '10', '29.99').
plan_currencystringRequired
Three-letter currency code (e.g., USD, EUR).
plan_durationstringRequired
Duration of the plan (e.g., '1 hour', '1 day', '1 month').
plan_price_formattedstringRequired
Formatted price display string (e.g., '$10.00').
plan_dataobject
Additional plan configuration options.
plan_data.plan_recurringboolean
Whether the plan supports recurring payments.
plan_data.plan_one_timeboolean
Whether the plan supports one-time payments.
Request
curl -X POST "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/plans" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"plan_name": "Pro Plan",
"plan_price": "29.99",
"plan_currency": "USD",
"plan_duration": "1 month",
"plan_price_formatted": "$29.99"
}'{
"ok": true,
"request_id": "11111111-1111-1111-1111-111111111111",
"method": "POST",
"path": "/v2/projects/YOUR_PROJECT_ID/plans",
"code": 201,
"message": "Plan created successfully",
"data": {
"plan_name": "Pro Plan",
"plan_price": "29.99",
"plan_currency": "USD",
"plan_duration": "1 month",
"plan_price_formatted": "$29.99",
"plan_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"plan_data": {
"plan_recurring": false,
"plan_one_time": true
},
"plan_targets": []
}
}Last updated: