Plans
List Plans
Retrieve a list of plans
GET
/
v1
/
plans
List plans
curl --request GET \
--url https://billing.example.com/v1/plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/plans', 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://billing.example.com/v1/plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>",
"interval_unit": "day",
"interval_count": 123,
"active": true,
"hsn_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"prices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "<string>",
"amount": 123,
"type": "recurring",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Query Parameters
| Parameter | Type | Description |
|---|---|---|
q | string | Search by plan name or code |
currency | string | Keep plans that have a price in this currency (e.g. USD) |
interval_unit | string | Filter by billing interval unit (e.g. month, year) |
limit | integer | Max results (default: 50, capped at 1000) |
page | integer | Page number (1-based) |
Example Request
curl "https://api.recurso.dev/v1/plans?currency=USD&interval_unit=month" \
-H "Authorization: Bearer $API_KEY"
Response
{
"object": "list",
"data": [
{
"id": "plan_starter",
"object": "plan",
"name": "Starter",
"interval": "month",
"prices": [{ "amount": 999, "currency": "INR" }],
"active": true
},
{
"id": "plan_pro",
"object": "plan",
"name": "Pro",
"interval": "month",
"prices": [{ "amount": 4999, "currency": "INR" }],
"active": true
}
],
"has_more": false,
"total_count": 2
}
Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Query Parameters
Free-text search filter.
Keep plans that have a price in this currency.
Filter by billing interval unit (e.g. month, year).
Maximum records to return. Defaults to 50 when omitted and is capped at 1000 (a larger request returns the cap, not an error). Pass an explicit limit when you need the full set — omitting it silently returns only the first page.
Required range:
1 <= x <= 10001-based page number.
Required range:
x >= 1Response
Plans for the tenant.
Show child attributes
Show child attributes
⌘I
List plans
curl --request GET \
--url https://billing.example.com/v1/plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/plans', 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://billing.example.com/v1/plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>",
"interval_unit": "day",
"interval_count": 123,
"active": true,
"hsn_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"prices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "<string>",
"amount": 123,
"type": "recurring",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}