Update 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
}
'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));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)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))
}<?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;
}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();{
"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
}Subscription Plans
Update Plan
Update the details of an existing subscription plan
POST
/
plans
/
{plan-id}
Update 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
}
'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));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)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))
}<?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;
}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();{
"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
Body
application/json
Response
Subscription plan successfully created or updated.
Represents detailed information about a subscription plan including pricing, trial, and region availability.
⌘I

