curl --request POST \
--url https://api.useplinth.com/v1/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_group_id": "pg_01JABC...",
"name": "Pro",
"amount_minor": 500000,
"billing_interval": "month",
"lookup_key": "pro_monthly",
"billing_interval_count": 1,
"trial_period_days": 14
}
'import requests
url = "https://api.useplinth.com/v1/plans"
payload = {
"plan_group_id": "pg_01JABC...",
"name": "Pro",
"amount_minor": 500000,
"billing_interval": "month",
"lookup_key": "pro_monthly",
"billing_interval_count": 1,
"trial_period_days": 14
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan_group_id: 'pg_01JABC...',
name: 'Pro',
amount_minor: 500000,
billing_interval: 'month',
lookup_key: 'pro_monthly',
billing_interval_count: 1,
trial_period_days: 14
})
};
fetch('https://api.useplinth.com/v1/plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useplinth.com/v1/plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan_group_id' => 'pg_01JABC...',
'name' => 'Pro',
'amount_minor' => 500000,
'billing_interval' => 'month',
'lookup_key' => 'pro_monthly',
'billing_interval_count' => 1,
'trial_period_days' => 14
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useplinth.com/v1/plans"
payload := strings.NewReader("{\n \"plan_group_id\": \"pg_01JABC...\",\n \"name\": \"Pro\",\n \"amount_minor\": 500000,\n \"billing_interval\": \"month\",\n \"lookup_key\": \"pro_monthly\",\n \"billing_interval_count\": 1,\n \"trial_period_days\": 14\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useplinth.com/v1/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_group_id\": \"pg_01JABC...\",\n \"name\": \"Pro\",\n \"amount_minor\": 500000,\n \"billing_interval\": \"month\",\n \"lookup_key\": \"pro_monthly\",\n \"billing_interval_count\": 1,\n \"trial_period_days\": 14\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useplinth.com/v1/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan_group_id\": \"pg_01JABC...\",\n \"name\": \"Pro\",\n \"amount_minor\": 500000,\n \"billing_interval\": \"month\",\n \"lookup_key\": \"pro_monthly\",\n \"billing_interval_count\": 1,\n \"trial_period_days\": 14\n}"
response = http.request(request)
puts response.read_body{
"object": "plan",
"id": "pln_01JABC...",
"name": "Pro",
"amount_minor": "500000",
"lookup_key": "pro_monthly",
"created_at": "2026-06-01T00:00:00Z"
}{
"error": "Not found",
"code": "not_found"
}Create a plan
Creates a plan within a plan group. Amount is in kobo. Set trial_period_days to give new subscribers a free trial before the first charge. Set lookup_key to a stable handle (e.g. pro_monthly) so your app can reference the plan by role instead of by UUID.
curl --request POST \
--url https://api.useplinth.com/v1/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_group_id": "pg_01JABC...",
"name": "Pro",
"amount_minor": 500000,
"billing_interval": "month",
"lookup_key": "pro_monthly",
"billing_interval_count": 1,
"trial_period_days": 14
}
'import requests
url = "https://api.useplinth.com/v1/plans"
payload = {
"plan_group_id": "pg_01JABC...",
"name": "Pro",
"amount_minor": 500000,
"billing_interval": "month",
"lookup_key": "pro_monthly",
"billing_interval_count": 1,
"trial_period_days": 14
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan_group_id: 'pg_01JABC...',
name: 'Pro',
amount_minor: 500000,
billing_interval: 'month',
lookup_key: 'pro_monthly',
billing_interval_count: 1,
trial_period_days: 14
})
};
fetch('https://api.useplinth.com/v1/plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useplinth.com/v1/plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan_group_id' => 'pg_01JABC...',
'name' => 'Pro',
'amount_minor' => 500000,
'billing_interval' => 'month',
'lookup_key' => 'pro_monthly',
'billing_interval_count' => 1,
'trial_period_days' => 14
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useplinth.com/v1/plans"
payload := strings.NewReader("{\n \"plan_group_id\": \"pg_01JABC...\",\n \"name\": \"Pro\",\n \"amount_minor\": 500000,\n \"billing_interval\": \"month\",\n \"lookup_key\": \"pro_monthly\",\n \"billing_interval_count\": 1,\n \"trial_period_days\": 14\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useplinth.com/v1/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_group_id\": \"pg_01JABC...\",\n \"name\": \"Pro\",\n \"amount_minor\": 500000,\n \"billing_interval\": \"month\",\n \"lookup_key\": \"pro_monthly\",\n \"billing_interval_count\": 1,\n \"trial_period_days\": 14\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useplinth.com/v1/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan_group_id\": \"pg_01JABC...\",\n \"name\": \"Pro\",\n \"amount_minor\": 500000,\n \"billing_interval\": \"month\",\n \"lookup_key\": \"pro_monthly\",\n \"billing_interval_count\": 1,\n \"trial_period_days\": 14\n}"
response = http.request(request)
puts response.read_body{
"object": "plan",
"id": "pln_01JABC...",
"name": "Pro",
"amount_minor": "500000",
"lookup_key": "pro_monthly",
"created_at": "2026-06-01T00:00:00Z"
}{
"error": "Not found",
"code": "not_found"
}Authorizations
Use sk_test_ keys for sandbox. Use sk_live_ keys for production. Obtain your key from the dashboard.
Body
"pg_01JABC..."
100"Pro"
Price in kobo. ₦5,000 = 500000.
500000
day, week, month, year "month"
Required. Stable handle (lowercase letters, numbers, underscores), unique per tenant. Reference this instead of the UUID. Reusing an existing key returns 409.
^[a-z0-9_]+$"pro_monthly"
e.g., 3 months = interval "month" + count 3
1
14
Response
Plan created
plan "pln_01JABC..."
"pg_01JABC..."
"Pro"
Amount in kobo as a string. ₦5,000 = "500000".
"500000"
day, week, month, year "month"
1
14
Stable, human-meaningful handle for the plan (e.g. "pro_monthly"). Unique per tenant. Reference this instead of the UUID so your app doesn't hardcode environment-specific ids.
"pro_monthly"
false when the plan is archived — hidden from the default plan list and closed to new subscriptions. Existing subscribers keep billing.
true