List subscriptions
curl --request GET \
--url https://api.example.com/api/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/subscriptions', 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://api.example.com/api/v1/subscriptions",
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://api.example.com/api/v1/subscriptions"
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://api.example.com/api/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/subscriptions")
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": [
{
"auto_advance_invoices": true,
"billing_day_anchor": 123,
"charge_automatically": true,
"created_at": "2023-11-07T05:31:56Z",
"current_period_start": "2023-12-25",
"custom_properties": "<unknown>",
"customer_id": "<string>",
"customer_name": "<string>",
"id": "<string>",
"mrr_cents": 1,
"net_terms": 1,
"plan_id": "<string>",
"plan_name": "<string>",
"plan_version": 1,
"plan_version_id": "<string>",
"start_date": "2023-12-25",
"activated_at": "2023-11-07T05:31:56Z",
"billing_start_date": "2023-12-25",
"current_period_end": "2023-12-25",
"customer_alias": "<string>",
"end_date": "2023-12-25",
"invoice_memo": "<string>",
"payment_methods_config": {
"config": {
"card": {
"enabled": true
},
"direct_debit": {
"enabled": true
}
}
},
"plan_description": "<string>",
"purchase_order": "<string>",
"trial_duration": 1
}
],
"pagination_meta": {
"page": 1,
"per_page": 1,
"total_items": 1,
"total_pages": 1
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Subscriptions
List subscriptions
List subscriptions with optional filtering by customer or plan.
GET
/
api
/
v1
/
subscriptions
List subscriptions
curl --request GET \
--url https://api.example.com/api/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/subscriptions', 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://api.example.com/api/v1/subscriptions",
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://api.example.com/api/v1/subscriptions"
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://api.example.com/api/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/subscriptions")
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": [
{
"auto_advance_invoices": true,
"billing_day_anchor": 123,
"charge_automatically": true,
"created_at": "2023-11-07T05:31:56Z",
"current_period_start": "2023-12-25",
"custom_properties": "<unknown>",
"customer_id": "<string>",
"customer_name": "<string>",
"id": "<string>",
"mrr_cents": 1,
"net_terms": 1,
"plan_id": "<string>",
"plan_name": "<string>",
"plan_version": 1,
"plan_version_id": "<string>",
"start_date": "2023-12-25",
"activated_at": "2023-11-07T05:31:56Z",
"billing_start_date": "2023-12-25",
"current_period_end": "2023-12-25",
"customer_alias": "<string>",
"end_date": "2023-12-25",
"invoice_memo": "<string>",
"payment_methods_config": {
"config": {
"card": {
"enabled": true
},
"direct_debit": {
"enabled": true
}
}
},
"plan_description": "<string>",
"purchase_order": "<string>",
"trial_duration": 1
}
],
"pagination_meta": {
"page": 1,
"per_page": 1,
"total_items": 1,
"total_pages": 1
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by customer ID or alias
Example:
"plan_7n42DGM5Tflk9n8mt7Fhc7"
Available options:
PENDING_ACTIVATION, PENDING_CHARGE, TRIAL_ACTIVE, ACTIVE, TRIAL_EXPIRED, PAUSED, SUSPENDED, CANCELLED, ABORTED, COMPLETED, SUPERSEDED, ERRORED Sort order. Format: column.direction. Allowed columns: customer_name, plan_name, mrr_cents, billing_start_date, end_date, status, created_at. Direction: asc or desc. Default: created_at.desc.
Page number (0-indexed)
Required range:
x >= 0Number of items per page
Required range:
1 <= x <= 100⌘I