Skip to main content

Create Single Plan

Create a subscription plan with Spotflow.

POST https://api.spotflow.co/api/v1/plans

Headers

authorization
String

Bearer SECRET_KEY
Include your secret key in the request header as a Bearer token for authorization. Unauthorized requests will result in a 401 HTTP status code.

content-type
String
application/json

Body Parameters

title
String

Name/Title of plan

amount
Integer
Amount should be in the subunit of our supported currency i.e your local currency or USD.
frequency
String
This simply means how often. Valid frequencies are: dailyweeklymonthly, quarterlybiannually (every 6 months), annually.
internalReference
String
A unique reference number generated by your company to identify each customer.
pricingOptions
String
Specify one or more amount or currency for your payment plan.
currency
String
Select the currency for the charges. Can either be in USD or in the local currency of your collection region.

Sample Request Body

{
"title": "My Nutrifit",
"frequency": "DAILY",
"internalReference": "ref-prod",
"pricingOptions": [
{
"amount": 100,
"currency": "NGN"
},
{
"amount": 10,
"currency": "GHS"
}
]
}

Sample Response

200 OK

{
"id": "acbabde0-1293-4b8b-9eb9-7e532e34d9bf",
"title": "My Nutrifit",
"frequency": "DAILY",
"internalReference": "ref-prod",
"status": "active",
"regions": [
"Ghana",
"Nigeria"
],
"subscribers": 0,
"subscriptions": 0,
"pricingOptions": [
{
"amount": 100,
"currency": "NGN"
},
{
"amount": 10,
"currency": "GHS"
}
]
}