Plans

Use pricing plans to describe how the customer must pay for products.

Rebilly provides the following plan types:

  • Trial only: Use this plan to create and offer a free or discounted trial period for your product. For example, a free 2 week trial of an internet service. After the trial, the customer can choose to sign up for a paid subscription, or stop using the service.
  • Recurring: Use this plan to create and offer a subscription for your product. For example, a monthly subscription to an internet service that is charged at 20 USD per month.
  • One time sale: Use this plan to create and offer a one-off sale for your products. For example, a one time purchase of two bags of coffee.

For information on the plans resource, see Plans.

For information on plan pricing, see Pricing formulas.

Retrieve plans

Request

Retrieves a list of plans.

Security
SecretApiKey or JWT or ApplicationJWT
Query
filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

limitinteger, [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offsetinteger, [ 0 .. 1000 ]

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

qstring

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

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/plans?filter=string&sort=string&limit=1000&offset=1000&q=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

List of plans retrieved.

Headers
Pagination-Totalinteger

Total number of items.

Example:332
Pagination-Limitinteger

Maximum number of items per page.

Example:100
Pagination-Offsetinteger

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
Bodyapplication/json
Array [
One of:

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

]
Response
[ { "id": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "name": "string", "description": "string", "richDescription": "string", "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ", "productOptions": {}, "currency": "USD", "currencySign": "string", "pricing": {}, "setup": {}, "customFields": {}, "isActive": true, "revision": 0, "isTrialOnly": false, "recurringInterval": null, "trial": null, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [] } ]