curl --request POST \
--url https://api.spotflow.co/api/v1/plans/{plan-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "TestingPlan",
"frequency": "WEEKLY",
"internalReference": "PLANS001",
"pricingOptions": [
{
"amount": 100,
"currency": "NGN"
},
{
"amount": 2,
"currency": "GHS"
}
],
"trial": {
"periodInDays": 7,
"pricingList": [
{
"amount": 0,
"currency": "NGN",
"type": "flat"
}
]
},
"endDate": "2026-10-30",
"cycleCount": 3,
"retrial": 2
}
'import requests
url = "https://api.spotflow.co/api/v1/plans/{plan-id}"
payload = {
"title": "TestingPlan",
"frequency": "WEEKLY",
"internalReference": "PLANS001",
"pricingOptions": [
{
"amount": 100,
"currency": "NGN"
},
{
"amount": 2,
"currency": "GHS"
}
],
"trial": {
"periodInDays": 7,
"pricingList": [
{
"amount": 0,
"currency": "NGN",
"type": "flat"
}
]
},
"endDate": "2026-10-30",
"cycleCount": 3,
"retrial": 2
}
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({
title: 'TestingPlan',
frequency: 'WEEKLY',
internalReference: 'PLANS001',
pricingOptions: [{amount: 100, currency: 'NGN'}, {amount: 2, currency: 'GHS'}],
trial: {periodInDays: 7, pricingList: [{amount: 0, currency: 'NGN', type: 'flat'}]},
endDate: '2026-10-30',
cycleCount: 3,
retrial: 2
})
};
fetch('https://api.spotflow.co/api/v1/plans/{plan-id}', 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.spotflow.co/api/v1/plans/{plan-id}",
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([
'title' => 'TestingPlan',
'frequency' => 'WEEKLY',
'internalReference' => 'PLANS001',
'pricingOptions' => [
[
'amount' => 100,
'currency' => 'NGN'
],
[
'amount' => 2,
'currency' => 'GHS'
]
],
'trial' => [
'periodInDays' => 7,
'pricingList' => [
[
'amount' => 0,
'currency' => 'NGN',
'type' => 'flat'
]
]
],
'endDate' => '2026-10-30',
'cycleCount' => 3,
'retrial' => 2
]),
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.spotflow.co/api/v1/plans/{plan-id}"
payload := strings.NewReader("{\n \"title\": \"TestingPlan\",\n \"frequency\": \"WEEKLY\",\n \"internalReference\": \"PLANS001\",\n \"pricingOptions\": [\n {\n \"amount\": 100,\n \"currency\": \"NGN\"\n },\n {\n \"amount\": 2,\n \"currency\": \"GHS\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 7,\n \"pricingList\": [\n {\n \"amount\": 0,\n \"currency\": \"NGN\",\n \"type\": \"flat\"\n }\n ]\n },\n \"endDate\": \"2026-10-30\",\n \"cycleCount\": 3,\n \"retrial\": 2\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.spotflow.co/api/v1/plans/{plan-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"TestingPlan\",\n \"frequency\": \"WEEKLY\",\n \"internalReference\": \"PLANS001\",\n \"pricingOptions\": [\n {\n \"amount\": 100,\n \"currency\": \"NGN\"\n },\n {\n \"amount\": 2,\n \"currency\": \"GHS\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 7,\n \"pricingList\": [\n {\n \"amount\": 0,\n \"currency\": \"NGN\",\n \"type\": \"flat\"\n }\n ]\n },\n \"endDate\": \"2026-10-30\",\n \"cycleCount\": 3,\n \"retrial\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spotflow.co/api/v1/plans/{plan-id}")
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 \"title\": \"TestingPlan\",\n \"frequency\": \"WEEKLY\",\n \"internalReference\": \"PLANS001\",\n \"pricingOptions\": [\n {\n \"amount\": 100,\n \"currency\": \"NGN\"\n },\n {\n \"amount\": 2,\n \"currency\": \"GHS\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 7,\n \"pricingList\": [\n {\n \"amount\": 0,\n \"currency\": \"NGN\",\n \"type\": \"flat\"\n }\n ]\n },\n \"endDate\": \"2026-10-30\",\n \"cycleCount\": 3,\n \"retrial\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "string",
"frequency": "DAILY",
"amount": 123,
"currency": "NGN",
"status": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z",
"internalReference": "string",
"regions": [
"<string>"
],
"subscribers": 123,
"subscriptions": 123,
"trial": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"periodInDays": 123,
"pricingList": [
{
"type": "FLAT",
"amount": 123,
"currency": "NGN"
}
]
},
"pricingOptions": [
{
"amount": 123,
"currency": "NGN"
}
]
}{
"error": "Missing Parameter",
"message": "missing_parameter",
"status": 400
}Update Plan
Update the details of an existing subscription plan
curl --request POST \
--url https://api.spotflow.co/api/v1/plans/{plan-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "TestingPlan",
"frequency": "WEEKLY",
"internalReference": "PLANS001",
"pricingOptions": [
{
"amount": 100,
"currency": "NGN"
},
{
"amount": 2,
"currency": "GHS"
}
],
"trial": {
"periodInDays": 7,
"pricingList": [
{
"amount": 0,
"currency": "NGN",
"type": "flat"
}
]
},
"endDate": "2026-10-30",
"cycleCount": 3,
"retrial": 2
}
'import requests
url = "https://api.spotflow.co/api/v1/plans/{plan-id}"
payload = {
"title": "TestingPlan",
"frequency": "WEEKLY",
"internalReference": "PLANS001",
"pricingOptions": [
{
"amount": 100,
"currency": "NGN"
},
{
"amount": 2,
"currency": "GHS"
}
],
"trial": {
"periodInDays": 7,
"pricingList": [
{
"amount": 0,
"currency": "NGN",
"type": "flat"
}
]
},
"endDate": "2026-10-30",
"cycleCount": 3,
"retrial": 2
}
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({
title: 'TestingPlan',
frequency: 'WEEKLY',
internalReference: 'PLANS001',
pricingOptions: [{amount: 100, currency: 'NGN'}, {amount: 2, currency: 'GHS'}],
trial: {periodInDays: 7, pricingList: [{amount: 0, currency: 'NGN', type: 'flat'}]},
endDate: '2026-10-30',
cycleCount: 3,
retrial: 2
})
};
fetch('https://api.spotflow.co/api/v1/plans/{plan-id}', 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.spotflow.co/api/v1/plans/{plan-id}",
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([
'title' => 'TestingPlan',
'frequency' => 'WEEKLY',
'internalReference' => 'PLANS001',
'pricingOptions' => [
[
'amount' => 100,
'currency' => 'NGN'
],
[
'amount' => 2,
'currency' => 'GHS'
]
],
'trial' => [
'periodInDays' => 7,
'pricingList' => [
[
'amount' => 0,
'currency' => 'NGN',
'type' => 'flat'
]
]
],
'endDate' => '2026-10-30',
'cycleCount' => 3,
'retrial' => 2
]),
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.spotflow.co/api/v1/plans/{plan-id}"
payload := strings.NewReader("{\n \"title\": \"TestingPlan\",\n \"frequency\": \"WEEKLY\",\n \"internalReference\": \"PLANS001\",\n \"pricingOptions\": [\n {\n \"amount\": 100,\n \"currency\": \"NGN\"\n },\n {\n \"amount\": 2,\n \"currency\": \"GHS\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 7,\n \"pricingList\": [\n {\n \"amount\": 0,\n \"currency\": \"NGN\",\n \"type\": \"flat\"\n }\n ]\n },\n \"endDate\": \"2026-10-30\",\n \"cycleCount\": 3,\n \"retrial\": 2\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.spotflow.co/api/v1/plans/{plan-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"TestingPlan\",\n \"frequency\": \"WEEKLY\",\n \"internalReference\": \"PLANS001\",\n \"pricingOptions\": [\n {\n \"amount\": 100,\n \"currency\": \"NGN\"\n },\n {\n \"amount\": 2,\n \"currency\": \"GHS\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 7,\n \"pricingList\": [\n {\n \"amount\": 0,\n \"currency\": \"NGN\",\n \"type\": \"flat\"\n }\n ]\n },\n \"endDate\": \"2026-10-30\",\n \"cycleCount\": 3,\n \"retrial\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spotflow.co/api/v1/plans/{plan-id}")
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 \"title\": \"TestingPlan\",\n \"frequency\": \"WEEKLY\",\n \"internalReference\": \"PLANS001\",\n \"pricingOptions\": [\n {\n \"amount\": 100,\n \"currency\": \"NGN\"\n },\n {\n \"amount\": 2,\n \"currency\": \"GHS\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 7,\n \"pricingList\": [\n {\n \"amount\": 0,\n \"currency\": \"NGN\",\n \"type\": \"flat\"\n }\n ]\n },\n \"endDate\": \"2026-10-30\",\n \"cycleCount\": 3,\n \"retrial\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "string",
"frequency": "DAILY",
"amount": 123,
"currency": "NGN",
"status": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z",
"internalReference": "string",
"regions": [
"<string>"
],
"subscribers": 123,
"subscriptions": 123,
"trial": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"periodInDays": 123,
"pricingList": [
{
"type": "FLAT",
"amount": 123,
"currency": "NGN"
}
]
},
"pricingOptions": [
{
"amount": 123,
"currency": "NGN"
}
]
}{
"error": "Missing Parameter",
"message": "missing_parameter",
"status": 400
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier for the plan to create or update.
Body
Name or title of the plan
"Standard Monthly Plan"
Billing frequency for the plan
DAILY, WEEKLY, MONTHLY, QUARTERLY, BIANNUAL, ANNUAL Internal reference code for the plan
"PLAN-STD-001"
Pricing options for the plan
Show child attributes
Show child attributes
Trial period configuration for the plan. If omitted, the plan has no trial.
Show child attributes
Show child attributes
Date the plan stops billing/renewing. If omitted, the plan has no fixed end date.
"2026-10-30"
Number of billing cycles the plan runs for before it ends. If omitted, the plan runs indefinitely.
3
Number of retry attempts allowed for a failed billing charge.
2
Response
Subscription plan successfully created or updated.
Represents detailed information about a subscription plan including pricing, trial, and region availability.
Unique identifier of the subscription plan (UUID).
The title or name of the subscription plan.
"string"
Billing frequency for the subscription plan.
DAILY, WEEKLY, MONTHLY, QUARTERLY, BIANNUAL, ANNUAL The cost amount for the subscription plan.
The currency of the subscription plan (e.g., NGN, USD).
"NGN"
The current status of the subscription plan.
ACTIVE, INACTIVE, ARCHIVED Date and time when the plan was created.
Internal reference code or identifier for the plan.
"string"
List of regions where this plan is available.
Total number of active subscribers under this plan.
Total number of subscriptions created for this plan.
Details about the trial period associated with this plan.
Show child attributes
Show child attributes
Different pricing options available for the plan.
Show child attributes
Show child attributes

