List Subscriptions
curl --request GET \
--url https://api.payviox.com/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.payviox.com/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.payviox.com/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.payviox.com/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.payviox.com/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.payviox.com/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payviox.com/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": [
{
"id": "psub_8fKx2LmQp4ZrT7vW1nYc3aBd",
"status": "active",
"amount": 999,
"unit_amount": 1029,
"currency": "USD",
"interval": "month",
"interval_count": 1,
"interval_label": "every month",
"customer": "customer_abc123",
"customer_email": "john@example.com",
"order_id": "order_12345",
"items": [
{ "name": "Pro plan", "quantity": 1, "price": 999 }
],
"metadata": { "user_id": "usr_123" },
"payment_method": "credit",
"provider": "stripe",
"provider_subscription_id": "sub_1QxYz2AbCdEfGhIj",
"cycles_count": 2,
"current_period_end": "2026-12-13T10:30:00+00:00",
"cancel_at_period_end": false,
"canceled_at": null,
"canceled_by": null,
"cancel_requested_by": null,
"cancellation_reason": null,
"initial_session_id": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"management_url": "https://secure.payviox.com/subscription/k3Jd9QwL2xVb7NmP4tRz8YcF1sHg6UaE5oWi0qXn3BvM7ZpD",
"created_at": "2026-10-13T10:30:00+00:00"
}
],
"total": 1,
"page": 1,
"per_page": 50
}
{
"error": "Unauthorized"
}
API - Endpoints
List Subscriptions
List your subscriptions with the secret key. Filters: status (active, past_due, canceled, canceling = scheduled to end), search (ID, customer, email, order_id), customer (exact). Pagination with page/per_page (max 100), sorting by created_at, current_period_end, amount or unit_amount. Returns
GET
/
subscriptions
List Subscriptions
curl --request GET \
--url https://api.payviox.com/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.payviox.com/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.payviox.com/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.payviox.com/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.payviox.com/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.payviox.com/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payviox.com/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": [
{
"id": "psub_8fKx2LmQp4ZrT7vW1nYc3aBd",
"status": "active",
"amount": 999,
"unit_amount": 1029,
"currency": "USD",
"interval": "month",
"interval_count": 1,
"interval_label": "every month",
"customer": "customer_abc123",
"customer_email": "john@example.com",
"order_id": "order_12345",
"items": [
{ "name": "Pro plan", "quantity": 1, "price": 999 }
],
"metadata": { "user_id": "usr_123" },
"payment_method": "credit",
"provider": "stripe",
"provider_subscription_id": "sub_1QxYz2AbCdEfGhIj",
"cycles_count": 2,
"current_period_end": "2026-12-13T10:30:00+00:00",
"cancel_at_period_end": false,
"canceled_at": null,
"canceled_by": null,
"cancel_requested_by": null,
"cancellation_reason": null,
"initial_session_id": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"management_url": "https://secure.payviox.com/subscription/k3Jd9QwL2xVb7NmP4tRz8YcF1sHg6UaE5oWi0qXn3BvM7ZpD",
"created_at": "2026-10-13T10:30:00+00:00"
}
],
"total": 1,
"page": 1,
"per_page": 50
}
{
"error": "Unauthorized"
}
Overview
Returns a page of your subscriptions. Use it to reconcile your own records, find a customer’s subscription, or list the ones about to end.Each item is a Subscription object. All amounts are in cents.
Authentication
This endpoint requires your Secret API Key (server-side only). See Authentication for details.Authorization: Bearer sk_live_xxxxxxxxxxxx
Query Parameters
Filter by status:
active, past_due, canceled, or canceling — subscriptions not canceled yet but scheduled to end at current_period_end (cancel_at_period_end: true). Any other value is ignored.active also returns subscriptions scheduled to end (they stay active until then), and canceling covers both active and past_due subscriptions scheduled to end.Case-insensitive partial match on the subscription ID, customer, customer email or
order_id (first 100 characters used).created_at, current_period_end, amount (your price) or unit_amount (what the customer pays). Any other value falls back to created_at.Response Fields
Subscriptions of this page. See the Subscription object.
Example Requests
curl "https://api.payviox.com/subscriptions?status=active&customer=customer_abc123&per_page=50" \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxx"
const params = new URLSearchParams({
status: 'canceling', // scheduled to end at current_period_end
sort_by: 'current_period_end',
sort_order: 'asc',
});
const response = await fetch(`https://api.payviox.com/subscriptions?${params}`, {
headers: { Authorization: `Bearer ${process.env.PAYVIOX_SECRET_KEY}` },
});
const { data, total } = await response.json();
console.log(`${total} subscriptions ending soon`);
import os
import requests
response = requests.get(
'https://api.payviox.com/subscriptions',
params={'status': 'past_due', 'page': 1, 'per_page': 100},
headers={'Authorization': f"Bearer {os.environ['PAYVIOX_SECRET_KEY']}"}
)
page = response.json()
for subscription in page['data']:
print(subscription['id'], subscription['customer'])
Example Response
{
"data": [
{
"id": "psub_8fKx2LmQp4ZrT7vW1nYc3aBd",
"status": "active",
"amount": 999,
"unit_amount": 1029,
"currency": "USD",
"interval": "month",
"interval_count": 1,
"interval_label": "every month",
"customer": "customer_abc123",
"customer_email": "john@example.com",
"order_id": "order_12345",
"items": [
{ "name": "Pro plan", "quantity": 1, "price": 999 }
],
"metadata": { "user_id": "usr_123" },
"payment_method": "credit",
"provider": "stripe",
"provider_subscription_id": "sub_1QxYz2AbCdEfGhIj",
"cycles_count": 2,
"current_period_end": "2026-12-13T10:30:00+00:00",
"cancel_at_period_end": false,
"canceled_at": null,
"canceled_by": null,
"cancel_requested_by": null,
"cancellation_reason": null,
"initial_session_id": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"management_url": "https://secure.payviox.com/subscription/k3Jd9QwL2xVb7NmP4tRz8YcF1sHg6UaE5oWi0qXn3BvM7ZpD",
"created_at": "2026-10-13T10:30:00+00:00"
}
],
"total": 1,
"page": 1,
"per_page": 50
}
{
"error": "Unauthorized"
}