Create Single Plan
curl --request POST \
--url https://api.spotflow.co/api/v1/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Standard Monthly Plan",
"cycleCount": "3",
"retrial": "3",
"endDate": "2026-10-29",
"internalReference": "PLAN-STD-001",
"pricingOptions": [
{
"amount": 123,
"currency": "NGN"
}
],
"trial": {
"periodInDays": 0,
"pricingList": [
{
"amount": 123,
"currency": "NGN"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Standard Monthly Plan',
cycleCount: '3',
retrial: '3',
endDate: '2026-10-29',
internalReference: 'PLAN-STD-001',
pricingOptions: [{amount: 123, currency: 'NGN'}],
trial: {periodInDays: 0, pricingList: [{amount: 123, currency: 'NGN'}]}
})
};
fetch('https://api.spotflow.co/api/v1/plans', 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"
payload = {
"title": "Standard Monthly Plan",
"cycleCount": "3",
"retrial": "3",
"endDate": "2026-10-29",
"internalReference": "PLAN-STD-001",
"pricingOptions": [
{
"amount": 123,
"currency": "NGN"
}
],
"trial": {
"periodInDays": 0,
"pricingList": [
{
"amount": 123,
"currency": "NGN"
}
]
}
}
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"
payload := strings.NewReader("{\n \"title\": \"Standard Monthly Plan\",\n \"cycleCount\": \"3\",\n \"retrial\": \"3\",\n \"endDate\": \"2026-10-29\",\n \"internalReference\": \"PLAN-STD-001\",\n \"pricingOptions\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 0,\n \"pricingList\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ]\n }\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",
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' => 'Standard Monthly Plan',
'cycleCount' => '3',
'retrial' => '3',
'endDate' => '2026-10-29',
'internalReference' => 'PLAN-STD-001',
'pricingOptions' => [
[
'amount' => 123,
'currency' => 'NGN'
]
],
'trial' => [
'periodInDays' => 0,
'pricingList' => [
[
'amount' => 123,
'currency' => 'NGN'
]
]
]
]),
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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Standard Monthly Plan\",\n \"cycleCount\": \"3\",\n \"retrial\": \"3\",\n \"endDate\": \"2026-10-29\",\n \"internalReference\": \"PLAN-STD-001\",\n \"pricingOptions\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 0,\n \"pricingList\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ]\n }\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
}{
"message": "Authorization token is required.",
"statusCode": 401,
"code": "AUTH_ERROR",
"requestMarker": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Subscription Plans
Create Single Plan
Create a subscription plan under your integration.
POST
/
plans
Create Single Plan
curl --request POST \
--url https://api.spotflow.co/api/v1/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Standard Monthly Plan",
"cycleCount": "3",
"retrial": "3",
"endDate": "2026-10-29",
"internalReference": "PLAN-STD-001",
"pricingOptions": [
{
"amount": 123,
"currency": "NGN"
}
],
"trial": {
"periodInDays": 0,
"pricingList": [
{
"amount": 123,
"currency": "NGN"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Standard Monthly Plan',
cycleCount: '3',
retrial: '3',
endDate: '2026-10-29',
internalReference: 'PLAN-STD-001',
pricingOptions: [{amount: 123, currency: 'NGN'}],
trial: {periodInDays: 0, pricingList: [{amount: 123, currency: 'NGN'}]}
})
};
fetch('https://api.spotflow.co/api/v1/plans', 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"
payload = {
"title": "Standard Monthly Plan",
"cycleCount": "3",
"retrial": "3",
"endDate": "2026-10-29",
"internalReference": "PLAN-STD-001",
"pricingOptions": [
{
"amount": 123,
"currency": "NGN"
}
],
"trial": {
"periodInDays": 0,
"pricingList": [
{
"amount": 123,
"currency": "NGN"
}
]
}
}
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"
payload := strings.NewReader("{\n \"title\": \"Standard Monthly Plan\",\n \"cycleCount\": \"3\",\n \"retrial\": \"3\",\n \"endDate\": \"2026-10-29\",\n \"internalReference\": \"PLAN-STD-001\",\n \"pricingOptions\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 0,\n \"pricingList\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ]\n }\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",
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' => 'Standard Monthly Plan',
'cycleCount' => '3',
'retrial' => '3',
'endDate' => '2026-10-29',
'internalReference' => 'PLAN-STD-001',
'pricingOptions' => [
[
'amount' => 123,
'currency' => 'NGN'
]
],
'trial' => [
'periodInDays' => 0,
'pricingList' => [
[
'amount' => 123,
'currency' => 'NGN'
]
]
]
]),
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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Standard Monthly Plan\",\n \"cycleCount\": \"3\",\n \"retrial\": \"3\",\n \"endDate\": \"2026-10-29\",\n \"internalReference\": \"PLAN-STD-001\",\n \"pricingOptions\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ],\n \"trial\": {\n \"periodInDays\": 0,\n \"pricingList\": [\n {\n \"amount\": 123,\n \"currency\": \"NGN\"\n }\n ]\n }\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
}{
"message": "Authorization token is required.",
"statusCode": 401,
"code": "AUTH_ERROR",
"requestMarker": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Mobile Money
When it is a
mobile_moneypayment and a planId is included, Spotflow will automatically send a mandate approval request to the customer’s phone. The subscription will only activate once the mandate is approved.See the full guide on Mobile Money Subscriptions.Authorizations
Body
application/json
Response
A JSON array of subscription objects.
⌘I

