api.botsubscription.com
GET /v1/endpoint
Authentication Bearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Request GET Response —
cURL Node Python PHP Go Ruby
Copy curl --request GET \
--url https://api.botsubscription.com/v1/endpoint \
--header 'Authorization: Bearer sk_live_•••'— — · — · —
Response will appear here.
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} /plans CopyTry it Authorization Bearer Token Required
Path Parameters The unique identifier of the project.
Request Body Display name of the plan.
Price amount for the plan as a string (e.g., '10', '29.99').
Three-letter currency code (e.g., USD, EUR).
Duration of the plan (e.g., '1 hour', '1 day', '1 month').
Formatted price display string (e.g., '$10.00').
Additional plan configuration options.
Whether the plan supports recurring payments.
Whether the plan supports one-time payments.
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"
}' const project_id = 'YOUR_PROJECT_ID' ;
const response = await fetch ( `https://api.botsubscription.com/v2/projects/${ project_id }/plans` , {
method: 'POST' ,
headers: {
'Authorization' : 'Bearer YOUR_TOKEN' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({
plan_name: 'Pro Plan' ,
plan_price: '29.99' ,
plan_currency: 'USD' ,
plan_duration: '1 month' ,
plan_price_formatted: '$29.99'
})
});
const data = await response. json (); import requests
project_id = 'YOUR_PROJECT_ID'
response = requests.post(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /plans' ,
headers = { 'Authorization' : 'Bearer YOUR_TOKEN' },
json = {
'plan_name' : 'Pro Plan' ,
'plan_price' : '29.99' ,
'plan_currency' : 'USD' ,
'plan_duration' : '1 month' ,
'plan_price_formatted' : '$29.99'
}
)
data = response.json() $project_id = 'YOUR_PROJECT_ID' ;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.botsubscription.com/v2/projects/{ $project_id }/plans" );
curl_setopt ($ch, CURLOPT_POST , true );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [
'Authorization: Bearer YOUR_TOKEN' ,
'Content-Type: application/json'
]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , json_encode ([
'plan_name' => 'Pro Plan' ,
'plan_price' => '29.99' ,
'plan_currency' => 'USD' ,
'plan_duration' => '1 month' ,
'plan_price_formatted' => '$29.99'
]));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch); Plan created application/json
{
"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: May 28, 2026
PreviousGet Plan Next Update Plan