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.
currency
String
Select the currency for the charges. Can either be in USD or in the local currency of your collection region.
regionId
String
Specify the region ID for the payment plan. To see our available regions, kindly go to our Fetch Region List endpoint.

Sample Request Body

{
"title": "Navigately Mini",
"frequency": "DAILY",
"internalReference": "ref-8080",
"amount": 10,
"currency": "USD",
"regionId": "1"
}

Sample Response

200 OK

{
"id": "3cbab046-f06a-4815-941d-d8cc7be43d59", //your plan-id
"title": "Navigately Mini",
"frequency": "DAILY",
"internalReference": "ref-8080",
"amount": 10,
"currency": "USD",
"status": "active",
"createdAt": "2024-07-23T12:17:44.508587Z"
}