Skip to main content
GET
/
subscriptions
Find subscriptions
curl --request GET \
  --url https://sandbox-api.paynext.com/subscriptions \
  --header 'X-API-Version: <x-api-version>'
{
  "object": "subscriptions",
  "total_count": 142,
  "url": "/v1/subscriptions",
  "data": [
    {
      "id": "sub_123e4567-e89b-12d3-a456-426614174000",
      "current_period_end": "<string>",
      "current_period_start": "<string>",
      "customer": {
        "id": "cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f",
        "address": {
          "city": "San Francisco",
          "line1": "123 Market Street",
          "line2": "Suite 400",
          "postal_code": "94105",
          "state": "CA"
        },
        "email": "alice.johnson@example.com",
        "external_id": "ext_001",
        "full_name": "Alice Johnson",
        "phone": "+1-555-123-4567",
        "metadata": {
          "key": "value"
        },
        "created_at": "2025-05-28T14:00:00Z",
        "updated_at": "2025-05-28T14:05:00Z"
      },
      "next_billing_date": "2025-06-26T12:00:00Z",
      "past_due": {
        "attempt_count": 2,
        "max_attempts_count": 7
      },
      "plan": {
        "id": "price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
        "archived_at": "2025-06-01T10:00:00Z",
        "interval": "days",
        "interval_count": 1,
        "name": "Pro Plan",
        "price": {
          "amount": 1999,
          "currency": "AED"
        },
        "tax": {
          "collect_tax": "<unknown>"
        },
        "trial_interval": "days",
        "trial_interval_count": 14,
        "trial_price": {
          "amount": 1999,
          "currency": "AED"
        },
        "type": "recurring"
      },
      "metadata": {
        "key": "value"
      },
      "created_at": "2025-05-26T10:00:00Z",
      "updated_at": "2025-05-27T10:00:00Z"
    }
  ],
  "has_more": false,
  "next_page": null
}

Headers

X-API-Version
enum<string>
required

Specifies the version of the API to use

Available options:
2.0.0

Query Parameters

query
string
required

The search query string. Uses PayNext's Search Query Language. Supports exact match (:), substring match (~), numeric comparisons (>, >=, <, <=), negation (-), logical operators (AND, OR), and nested field access (dot notation). Field names use dotted paths (for example payment_status, customer.email, payment_method.details.last4); short aliases are not accepted. See the endpoint description for the full list of searchable fields and their types. Maximum 10 clauses per query.

limit
integer
default:10

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

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

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

Response

A dictionary with a data property that contains an array of up to limit subscriptions. If no subscriptions match the query, the resulting array will be empty.

object
enum<string>

String representing the object's type. Value is always subscriptions.

Available options:
subscriptions
Example:

"subscriptions"

total_count
integer

The accurate total number of records matching the query (not capped at 10,000). Returned alongside the cursor pagination fields.

Example:

142

url
string

The URL for accessing this list.

Example:

"/v1/subscriptions"

data
object[]

An array of up to limit subscriptions that match the query. Each entry in the array is a separate subscription object. If no subscriptions match the query, the resulting array will be empty.

has_more
boolean

Whether or not there are more elements available after this set. If false, this set comprises the end of the list.

Example:

false

next_page
string | null

A cursor for use in pagination. If has_more is true, you can pass the value of next_page to a subsequent call to fetch the next page of results.

Example:

null