Fetch Subscriptions

Retrieve subscriptions with created date and next billing date filtering.

curl "https://api.catalystpay.com/api/v1/reconciliation/subscriptions/?start_date=2025-01-01&end_date=2025-03-31&status=ACTIVE" \
  -H "Authorization: Bearer rk_your_api_key"
import requests

response = requests.get(
    "https://api.catalystpay.com/api/v1/reconciliation/subscriptions/",
    headers={"Authorization": "Bearer rk_your_api_key"},
    params={
        "start_date": "2025-01-01",
        "end_date": "2025-03-31",
        "status": "ACTIVE",
        "next_billing_date_from": "2025-04-01",
        "next_billing_date_to": "2025-04-30",
    },
)

data = response.json()
for sub in data["results"]:
    print(f"{sub['id']} | {sub['status']} | {sub['next_billing_date']}")
const params = new URLSearchParams({
  start_date: '2025-01-01',
  end_date: '2025-03-31',
  status: 'ACTIVE',
  next_billing_date_from: '2025-04-01',
  next_billing_date_to: '2025-04-30',
});

const response = await fetch(
  `https://api.catalystpay.com/api/v1/reconciliation/subscriptions/?${params}`,
  { headers: { 'Authorization': 'Bearer rk_your_api_key' } }
);

const data = await response.json();
data.results.forEach(sub => {
  console.log(`${sub.id} | ${sub.status} | ${sub.next_billing_date}`);
});

Response:

{
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "d4e5f6a7-b8c9-0123-defg-456789012345",
      "status": "ACTIVE",
      "billing_amount": "29.99",
      "currency": "EUR",
      "billing_frequency": "MONTHLY",
      "start_date": "2025-01-15",
      "next_billing_date": "2025-04-15",
      "last_billing_date": "2025-03-15",
      "cancelled_at": null,
      "trial_end_date": null,
      "billing_anchor_date": "2025-01-15",
      "successful_billing_count": 3,
      "failed_billing_count": 0,
      "total_revenue": "89.97",
      "order_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
      "lead_id": "b2c3d4e5-f6a7-8901-bcde-234567890123",
      "offer_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "payment_gateway_id": "f7e8d9c0-b1a2-3456-cdef-890123456789"
    }
  ]
}

start_date filters on created_at. Subscription statuses are UPPERCASE (e.g., ACTIVE, CANCELLED, EXPIRED). Use next_billing_date_from and next_billing_date_to to find subscriptions due for billing in a specific window.