Skip to main content
GET
/
v1
/
subscriptions
/
plans
JavaScript
import Hercules from '@usehercules/sdk';

const client = new Hercules({
  apiVersion: '2025-12-09',
  apiKey: process.env['HERCULES_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const plan of client.beta.subscriptions.plans.list()) {
  console.log(plan.id);
}
{
  "data": [
    {
      "id": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "active": true,
      "stripe_product_id": "<string>",
      "description": "<string>",
      "default_price": {
        "id": "<string>",
        "currency": "<string>",
        "unit_amount": 0,
        "interval": "day",
        "interval_count": 0
      },
      "default_proration_behavior": "create_prorations",
      "upgrade_timing": "immediate",
      "downgrade_timing": "immediate",
      "billing_cycle_anchor": "now"
    }
  ],
  "has_more": true
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as: Bearer

Query Parameters

limit
integer
default:100

Maximum number of plans to return (1-100)

Required range: 1 <= x <= 100
starting_after
string

Cursor for forward pagination

ending_before
string

Cursor for backward pagination

active
enum<string>

Filter by active status

Available options:
true,
false

Response

200 - application/json

A paginated list of plan objects

Paginated list of subscription plans

data
object[]
required

Array of plan objects

has_more
boolean
required

Whether there are more plans available after this page