List
curl --request GET \
--url https://{defaultHost}/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/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{
"object": "list",
"pagination": {
"count": 1,
"limit": 20,
"page": 1,
"url": "/v1/subscriptions"
},
"data": [
{
"id": "f125c612-d06f-428b-b607-8cffdfa8e81d",
"object": "subscription",
"ad_hoc_amount": null,
"affiliation_expires_at": null,
"cancel_at_period_end": false,
"currency": "usd",
"current_period_end_at": 1798655996,
"current_period_start_at": 1796063996,
"ended_at": null,
"finite": false,
"last_renewal_reminder_sent_at": null,
"live_mode": true,
"manual_payment": false,
"metadata": {},
"pending_update": {},
"price_readonly": false,
"portal_url": "http://app.example.com/portal_redirect/subscriptions/f125c612-d06f-428b-b607-8cffdfa8e81d",
"quantity": 1,
"remaining_period_count": null,
"restart_on_completed": false,
"restore_at": null,
"subtotal_amount": 2900,
"status": "active",
"tax_enabled": false,
"trial_end_at": null,
"trial_start_at": null,
"variant_options": null,
"affiliation": null,
"current_cancellation_act": null,
"current_period": "64f54fdf-82dd-4207-883d-e5a478d8aa84",
"customer": "34049b85-4eaa-43fc-a388-84654cf78210",
"discount": null,
"manual_payment_method": null,
"payment_method": "b475681d-d6f0-45e2-a17c-735030d59544",
"price": "4c189e66-e5b7-4fe0-8577-2fa25135442f",
"purchase": "93e49022-a9e7-4a96-91fe-b09b09d7a4b6",
"shipping_method": null,
"variant": null,
"created_at": 1796063996,
"updated_at": 1796063996
}
]
}Subscriptions
List
Returns a list of your subscriptions.
GET
/
v1
/
subscriptions
List
curl --request GET \
--url https://{defaultHost}/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/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{
"object": "list",
"pagination": {
"count": 1,
"limit": 20,
"page": 1,
"url": "/v1/subscriptions"
},
"data": [
{
"id": "f125c612-d06f-428b-b607-8cffdfa8e81d",
"object": "subscription",
"ad_hoc_amount": null,
"affiliation_expires_at": null,
"cancel_at_period_end": false,
"currency": "usd",
"current_period_end_at": 1798655996,
"current_period_start_at": 1796063996,
"ended_at": null,
"finite": false,
"last_renewal_reminder_sent_at": null,
"live_mode": true,
"manual_payment": false,
"metadata": {},
"pending_update": {},
"price_readonly": false,
"portal_url": "http://app.example.com/portal_redirect/subscriptions/f125c612-d06f-428b-b607-8cffdfa8e81d",
"quantity": 1,
"remaining_period_count": null,
"restart_on_completed": false,
"restore_at": null,
"subtotal_amount": 2900,
"status": "active",
"tax_enabled": false,
"trial_end_at": null,
"trial_start_at": null,
"variant_options": null,
"affiliation": null,
"current_cancellation_act": null,
"current_period": "64f54fdf-82dd-4207-883d-e5a478d8aa84",
"customer": "34049b85-4eaa-43fc-a388-84654cf78210",
"discount": null,
"manual_payment_method": null,
"payment_method": "b475681d-d6f0-45e2-a17c-735030d59544",
"price": "4c189e66-e5b7-4fe0-8577-2fa25135442f",
"purchase": "93e49022-a9e7-4a96-91fe-b09b09d7a4b6",
"shipping_method": null,
"variant": null,
"created_at": 1796063996,
"updated_at": 1796063996
}
]
}Authorizations
Query Parameters
Was this page helpful?