Create Plan
curl --request POST \
--url https://api.payaza.africa/live/subscription/api/v1/subscription-plans \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Basic Monthly Instant",
"description": "Basic tier billed monthly",
"amount": 100,
"currency": "NGN",
"interval": "MONTHLY",
"trialPeriodDays": 2,
"billingLimit": 1
}
'import requests
url = "https://api.payaza.africa/live/subscription/api/v1/subscription-plans"
payload = {
"name": "Basic Monthly Instant",
"description": "Basic tier billed monthly",
"amount": 100,
"currency": "NGN",
"interval": "MONTHLY",
"trialPeriodDays": 2,
"billingLimit": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Basic Monthly Instant',
description: 'Basic tier billed monthly',
amount: 100,
currency: 'NGN',
interval: 'MONTHLY',
trialPeriodDays: 2,
billingLimit: 1
})
};
fetch('https://api.payaza.africa/live/subscription/api/v1/subscription-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.payaza.africa/live/subscription/api/v1/subscription-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([
'name' => 'Basic Monthly Instant',
'description' => 'Basic tier billed monthly',
'amount' => 100,
'currency' => 'NGN',
'interval' => 'MONTHLY',
'trialPeriodDays' => 2,
'billingLimit' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.payaza.africa/live/subscription/api/v1/subscription-plans"
payload := strings.NewReader("{\n \"name\": \"Basic Monthly Instant\",\n \"description\": \"Basic tier billed monthly\",\n \"amount\": 100,\n \"currency\": \"NGN\",\n \"interval\": \"MONTHLY\",\n \"trialPeriodDays\": 2,\n \"billingLimit\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.payaza.africa/live/subscription/api/v1/subscription-plans")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Basic Monthly Instant\",\n \"description\": \"Basic tier billed monthly\",\n \"amount\": 100,\n \"currency\": \"NGN\",\n \"interval\": \"MONTHLY\",\n \"trialPeriodDays\": 2,\n \"billingLimit\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/subscription/api/v1/subscription-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Basic Monthly Instant\",\n \"description\": \"Basic tier billed monthly\",\n \"amount\": 100,\n \"currency\": \"NGN\",\n \"interval\": \"MONTHLY\",\n \"trialPeriodDays\": 2,\n \"billingLimit\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Plan created",
"data": {
"id": 69,
"name": "Basic Monthly (B)",
"description": "Basic tier billed monthly",
"amount": 100,
"currency": "NGN",
"interval": "MONTHLY",
"intervalCount": 1,
"trialPeriodDays": 2,
"billingLimit": 1,
"status": "ACTIVE",
"planCode": "PLN_821DCFD",
"billingDaysOfWeek": null,
"metadata": null,
"createdAt": "2026-07-08T17:17:14.173360552",
"updatedAt": "2026-07-08T17:17:14.173362175"
}
}Subscription Plans
Create Plan
This endpoint creates a new subscription plan.
Note:
- Save the generated
planCodeafter creating a plan. This value is required when creating subscriptions.
POST
/
subscription
/
api
/
v1
/
subscription-plans
Create Plan
curl --request POST \
--url https://api.payaza.africa/live/subscription/api/v1/subscription-plans \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Basic Monthly Instant",
"description": "Basic tier billed monthly",
"amount": 100,
"currency": "NGN",
"interval": "MONTHLY",
"trialPeriodDays": 2,
"billingLimit": 1
}
'import requests
url = "https://api.payaza.africa/live/subscription/api/v1/subscription-plans"
payload = {
"name": "Basic Monthly Instant",
"description": "Basic tier billed monthly",
"amount": 100,
"currency": "NGN",
"interval": "MONTHLY",
"trialPeriodDays": 2,
"billingLimit": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Basic Monthly Instant',
description: 'Basic tier billed monthly',
amount: 100,
currency: 'NGN',
interval: 'MONTHLY',
trialPeriodDays: 2,
billingLimit: 1
})
};
fetch('https://api.payaza.africa/live/subscription/api/v1/subscription-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.payaza.africa/live/subscription/api/v1/subscription-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([
'name' => 'Basic Monthly Instant',
'description' => 'Basic tier billed monthly',
'amount' => 100,
'currency' => 'NGN',
'interval' => 'MONTHLY',
'trialPeriodDays' => 2,
'billingLimit' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.payaza.africa/live/subscription/api/v1/subscription-plans"
payload := strings.NewReader("{\n \"name\": \"Basic Monthly Instant\",\n \"description\": \"Basic tier billed monthly\",\n \"amount\": 100,\n \"currency\": \"NGN\",\n \"interval\": \"MONTHLY\",\n \"trialPeriodDays\": 2,\n \"billingLimit\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.payaza.africa/live/subscription/api/v1/subscription-plans")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Basic Monthly Instant\",\n \"description\": \"Basic tier billed monthly\",\n \"amount\": 100,\n \"currency\": \"NGN\",\n \"interval\": \"MONTHLY\",\n \"trialPeriodDays\": 2,\n \"billingLimit\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/subscription/api/v1/subscription-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Basic Monthly Instant\",\n \"description\": \"Basic tier billed monthly\",\n \"amount\": 100,\n \"currency\": \"NGN\",\n \"interval\": \"MONTHLY\",\n \"trialPeriodDays\": 2,\n \"billingLimit\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Plan created",
"data": {
"id": 69,
"name": "Basic Monthly (B)",
"description": "Basic tier billed monthly",
"amount": 100,
"currency": "NGN",
"interval": "MONTHLY",
"intervalCount": 1,
"trialPeriodDays": 2,
"billingLimit": 1,
"status": "ACTIVE",
"planCode": "PLN_821DCFD",
"billingDaysOfWeek": null,
"metadata": null,
"createdAt": "2026-07-08T17:17:14.173360552",
"updatedAt": "2026-07-08T17:17:14.173362175"
}
}Authorizations
Payaza {{Public API Key in Base 64}}
Body
application/json
The name of the subscription plan.
Example:
"Basic Monthly Instant"
The amount to charge on each billing cycle. Must be greater than or equal to zero.
Example:
100
The 3-letter ISO currency code for the billing.
Example:
"NGN"
Billing frequency. Supported values are DAILY, WEEKLY, MONTHLY, QUARTERLY, and ANNUAL.
Example:
"MONTHLY"
Number of free trial days before billing begins. Defaults to 0.
Example:
2
A brief overview or summary explaining what the plan offer entails.
Example:
"Basic tier billed monthly"
The maximum number of billing cycles. Leave empty for unlimited billing.
Example:
1
⌘I