Skip to content

API reference

Subscriptions

Buyers of a variation billed per period (weekly to yearly). Renewals are fresh orders the buyer pays from the renewal email or the order page, or from their store balance; after the grace period access ends by itself. The subscription.* webhook events carry the same shape.

Endpoints

GET/subscriptionssubscriptions:read

List subscriptions.

Query parameters
Query parametersTypeDescription
statusType: trialing | active | past_due | cancelled | expiredOnly this status.
emailType: stringBuyer email contains this text.
productType: stringProduct id.
limitType: 1..100Page size. Default 25.
cursorType: stringnextCursor from the previous page.
curl https://api.sellhidden.com/v1/subscriptions \
  -H "Authorization: Bearer hsk_live_…"
200 OKjson
{ "ok": true, "subscriptions": [ { "subscriptionId": "clx…", "status": "active", "buyerEmail": "jo@example.com", "productId": "clx…", "productTitle": "Pro plan", "variantId": "clx…", "quantity": 1, "priceUsd": 9, "interval": "month", "currentPeriodStart": "…", "currentPeriodEnd": "…", "graceEndsAt": "…", "cancelAtPeriodEnd": false, "autoRenewFromBalance": false, "initialOrderId": "clx…", "renewalOrderId": null, "renewals": 2, "endedAt": null, "createdAt": "…" } ], "nextCursor": null, "hasMore": false }

GET/subscriptions/{id}subscriptions:read

Get a subscription.

curl https://api.sellhidden.com/v1/subscriptions/ID \
  -H "Authorization: Bearer hsk_live_…"

POST/subscriptions/{id}/cancelsubscriptions:writeIdempotency-Key

Cancel a subscription. By default the buyer keeps access until the period end and nothing more is charged (cancelAtPeriodEnd). With immediate: true access ends now: Discord roles are removed, the pending renewal order is cancelled and subscription.expired is sent with the keys it delivered.

Body
BodyTypeDescription
immediateType: booleanEnd now instead of at the period end. Default false.
curl -X POST \
  https://api.sellhidden.com/v1/subscriptions/ID/cancel \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

POST/subscriptions/{id}/extendsubscriptions:writeIdempotency-Key

Extend by one period. Adds one billing period for free from the current end (or from now when it already ended) and brings an expired or cancelled subscription back, Discord roles included.

curl -X POST \
  https://api.sellhidden.com/v1/subscriptions/ID/extend \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

Get help

Send us the endpoint, the request or delivery id and the response you got. Security findings go through responsible disclosure. Live platform status is on the support page.

See also