Subscriptions

List Subscriptions

Search and filter Subscriptions with pagination. Results are sorted by creation date (newest first) by default.

Authorization

Public key
x-fngs-public-key<token>

In: header

Query Parameters

status?string

Filter Subscriptions by their status:

  • active: Currently active Subscription
  • past_due: Payment failed but will retry
  • canceled: Subscription has been canceled
  • incomplete: Initial payment failed
  • incomplete_expired: Initial payment failed and expired
  • trialing: In trial period
  • unpaid: Payment failed and won't retry

Value in

  • "all"
  • "active"
  • "canceled"
  • "incomplete"
  • "incomplete_expired"
  • "past_due"
  • "trialing"
  • "paused"
  • "unpaid"
userId?string

Return only Subscriptions belonging to this User UUID.

Formatuuid
createdFrom?|

Filter Subscriptions created on or after this timestamp. Accepts Unix timestamp in seconds or milliseconds. Must not be later than createdTo.

Formatint64
Range0 <= value <= 9007199254740991
createdTo?|

Filter Subscriptions created on or before this timestamp. Accepts Unix timestamp in seconds or milliseconds. Must not be earlier than createdFrom.

Formatint64
Range0 <= value <= 9007199254740991
cursor?string

Cursor returned with the previous page. Send it to fetch the next one.

take?integer

Number of Subscriptions per page. Defaults to 10, maximum 100.

Formatint64
Range1 <= value <= 100
Default10

Response Body

application/json

application/json

GET
/v0/subscriptions/list
curl -X GET "https://example.com/v0/subscriptions/list"
{  "status": "success",  "data": {    "subscriptions": [      {        "object": "subscription",        "id": "string",        "status": "all",        "createdAt": 0,        "currentIntervalEnd": 0,        "currentIntervalStart": 0,        "cancelAtIntervalEnd": false,        "canceledAt": null,        "userId": null,        "user": null,        "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",        "orderNumber": "string",        "order": {          "object": "order",          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "number": "string",          "status": "PENDING"        },        "lastPaymentId": null,        "lastPaymentNumber": null,        "lastPayment": null      }    ],    "count": -1.7976931348623157e+308,    "cursor": "string",    "hasMore": false  }}