Skip to main content
GET
/
plans
Find plans
curl --request GET \
  --url https://sandbox-api.paynext.com/plans \
  --header 'X-API-Version: <x-api-version>'
{
  "object": "plans",
  "total_count": 142,
  "url": "/v1/plans",
  "data": [
    {
      "id": "price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "archived_at": "2025-06-01T10:00:00Z",
      "interval_count": 1,
      "name": "Pro Plan",
      "price": {
        "countries": [
          {
            "countries": [],
            "price": {
              "amount": 1999,
              "currency": "AED"
            }
          }
        ],
        "default": {
          "amount": 1999,
          "currency": "AED"
        }
      },
      "tax": {
        "collect_tax": "<unknown>"
      },
      "trial_interval_count": 14,
      "trial_price": {
        "countries": [
          {
            "countries": [],
            "price": {
              "amount": 1999,
              "currency": "AED"
            }
          }
        ],
        "default": {
          "amount": 1999,
          "currency": "AED"
        }
      },
      "type": "recurring",
      "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. Use archived_at:null to find active plans. 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 plans. If no plans match the query, the resulting array will be empty.

object
enum<string>

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

Available options:
plans
Example:

"plans"

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/plans"

data
object[]

An array of plan objects.

has_more
boolean

Whether or not there are more elements available after this set.

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