Retrieve a plan

Retrieve a plan with specified ID.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

Resource identifier string.

query Parameters
expand
string

Expands a request to include embedded objects within the _embedded property of the response. This field accepts a comma-separated list of objects.

For more information, see Expand to include embedded objects.

Responses
200

Plan was retrieved.

Response Schema: application/json
name
required
string

The plan name, displayed on invoices and receipts.

currency
required
string = 3 characters

Currency code in ISO 4217 format.

productId
required
string <= 50 characters

The related product ID.

required
object (PlanPriceFormula)
formula
required
string

The price formula determines what algorithm is used to calculate the invoice price based on a few factors,

  • the quantity in the order (which may be variable if usage pricing, otherwise determined when creating the order)
  • the price brackets data

To determine which formula is correct, please see the price formula documentation.

price
required
number <double>

For the very simple price when it's fixed and does not depend on the quantity chosen by customer.

If the price is 0, it's free.

id
string <= 50 characters

The plan ID.

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

Name-value pairs to specify the product options.

property name*
additional property
string
currencySign
string

Currency sign.

object

The setup. Set null if no setup.

price
required
number <double>

The price of a setup - 0 is a valid value (for free).

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 whether a plan is active.

revision
integer

Increments when the plan is modified. Compare to materialized subscription items revision.

createdTime
string <date-time>

Plan created time.

updatedTime
string <date-time> (UpdatedTime)

Read-only timestamp. This value updates when the resource is updated.

isTrialOnly
boolean

Whether a plan has a trial without recurring instructions.

Array of Self (object) (Self) non-empty

Related resource links.

Array (non-empty)
Any of:
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
object

Embedded objects that are requested by the expand query parameter.

object (StorefrontProduct)

Products include digital goods, services, and physical goods. Products appear on invoice line items. If you set a tax category identifier, taxes will be calculated upon invoice generation. If it is shippable, shipping will be calculated upon invoice generation. Pricing and variations are set within Plans.

name
required
string <= 255 characters

The product name.

id
string <= 50 characters

The product ID.

unitLabel
string <= 50 characters
Default: "unit"

The unit label, such as per seat or per unit.

description
string <= 512 characters

The product description.

requiresShipping
boolean

If the product requires shipping, shipping calculations will be applied.

options
Array of strings

The product options such as color, size, etc. The product options definition does not include option values. Those are defined within the plans.

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.

createdTime
string <date-time>

The product created time.

updatedTime
string <date-time> (UpdatedTime)

Read-only timestamp. This value updates when the resource is updated.

Array of Self (object) non-empty

Related resource links.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

get/plans/{id}
Request samples
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "description": "string",
  • "richDescription": "string",
  • "productId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "productOptions": {
    },
  • "currency": "USD",
  • "currencySign": "string",
  • "pricing": {
    },
  • "setup": {
    },
  • "customFields": {
    },
  • "isActive": true,
  • "revision": 0,
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "isTrialOnly": true,
  • "_links": [
    ],
  • "_embedded": {
    }
}