Retrieve plans

Retrieves a list of plans.

SecurityAPI Key: SecretApiKey or HTTP: JWT or HTTP: ApplicationJWT
Request
query Parameters
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

sort
Array of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -.

limit
integer [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offset
integer [ 0 .. 1000 ]

Specifies the starting point within the collection of items to be returned.

q
string

Use this field to perform a partial search of text fields.

get
/plans
Request samples
$plans = $client->plans()->search([
    'filter' => 'name:TestPlan',
]);
Responses

200

List of plans retrieved.

Response Headers
Pagination-Total
integer

Total number of items.

Example: 332
Pagination-Limit
integer

Maximum number of items per page.

Example: 100
Pagination-Offset
integer

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example: 2
Response Schema: application/json
Array
Any of:

Details of the one-time sale plan. Use this plan for non-recurring, one-time, sales.

name
required
string <= 255 characters

Name of the plan. This name is displayed on invoices and receipts.

description
string <= 65535 characters

Plain-text description of the plan. This field accepts plain-text only.

richDescription
string <= 65535 characters

Rich-text description of the plan. This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.

productId
required
string <= 50 characters

ID of the related product.

object or null

Name-value pairs that specify the product options.

currency
required
string (CurrencyCode) = 3 characters

Currency code in ISO 4217 format.

currencySign
string

Currency sign.

required
Fixed-fee (object) or Flat rate (object) or Stair-step (object) or Tiered (object) or Volume (object) (PlanPriceFormula)
object or null (PlanSetup)

Set up information of the plan.

customFields
object (ResourceCustomFields)

Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.

isActive
boolean
Default: true

Specifies if the plan is active.

revision
integer

Number of times the plan is modified. Compare this value with materialized subscription item revision values.

isTrialOnly
boolean

Specifies if a plan is a trial that does not have recurring instructions.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of objects

Related links.

id
string <= 50 characters

ID of the plan.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

Response samples
application/json
[ { "id": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "name": "string", "description": "string", "richDescription": "string", "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ", "currency": "USD", "currencySign": "string", "isActive": true, "revision": 0, "isTrialOnly": true, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", } ]