Retrieves a list of plans.
filter | string Filters the collection items. This field requires
a special format. Use 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 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. |
List of plans retrieved.
name required | string <= 255 characters Name of the plan. This name is displayed on invoices and receipts. | ||||
currency required | string (CurrencyCode) = 3 characters Currency code in ISO 4217 format. | ||||
productId required | string <= 50 characters Related product ID. | ||||
required | object (PlanPriceFormula) Pricing information. | ||||
| |||||
id | string <= 50 characters ID of the plan. | ||||
description | string Plain-text description of the plan. This field accepts plain-text only. | ||||
richDescription | string Rich-text description of the plan. This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks. | ||||
object or null Name-value pairs that specify the product options. | |||||
currencySign | string Currency sign. | ||||
object or null Set up information of the plan. | |||||
customFields | object (ResourceCustomFields) Default: {} 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 Specifies if the plan is active. | ||||
revision | integer Number of times the plan is modified. Compare this value with materialized subscription item revision values. | ||||
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. | ||||
isTrialOnly | boolean Specifies if a plan is a trial that does not have recurring instructions. | ||||
Array of objects (SelfLink) Related links. | |||||
Unauthorized access. Invalid credentials used.
Access forbidden.
$plans = $client->plans()->search([ 'filter' => 'name:TestPlan', ]);
[- {
- "id": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X",
- "name": "string",
- "description": "string",
- "richDescription": "string",
- "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ",
- "productOptions": {
- "color": "red",
- "size": "xxl"
}, - "currency": "USD",
- "currencySign": "string",
- "pricing": {
- "formula": "fixed-fee",
- "price": 99.95
}, - "setup": {
- "price": 0
}, - "customFields": {
- "foo": "bar"
}, - "isActive": true,
- "revision": 0,
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "isTrialOnly": true,
- "_links": [
- {
- "href": "string",
- "rel": "self"
}
]
}
]