Create a plan

Creates a plan.

SecurityAPI Key: SecretApiKey or HTTP: JWT
Request
Request Body schema: application/json

Plan resource.

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.

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.

post
/plans
Request samples
application/json
{ "name": "string", "description": "string", "richDescription": "string", "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ", "productOptions": { "color": "red", "size": "xxl" }, "currency": "USD", "pricing": { "formula": "fixed-fee", "price": 99.95 }, "setup": { "price": 0.1 }, "customFields": { "foo": "bar" }, "isActive": true }
Responses

201

Plan created.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

Response samples
application/json
{ "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.1 }, "customFields": { "foo": "bar" }, "isActive": true, "revision": 0, "isTrialOnly": true, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ ], "id": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X" }