Skip to main content
GET
/
v1
/
subscriptions
/
coupons
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 coupon of client.beta.subscriptions.coupons.list()) {
  console.log(coupon.id);
}
{
  "data": [
    {
      "id": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "code": "<string>",
      "duration": "once",
      "times_redeemed": 0,
      "active": true,
      "name": "<string>",
      "percent_off": 123,
      "amount_off": 0,
      "currency": "<string>",
      "duration_in_months": 0,
      "max_redemptions": 0,
      "redeem_by": "2023-11-07T05:31:56Z"
    }
  ],
  "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 coupons to return (1-100)

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

Cursor for forward pagination

ending_before
string

Cursor for backward pagination

active
boolean

Filter by active status

Response

200 - application/json

A paginated list of coupon objects

Paginated list of coupons

data
object[]
required

Array of coupon objects

has_more
boolean
required

Whether there are more coupons available after this page