Skip to navigation

Create a plan

Draft scaffold — not implemented or available in the API.

Creates a plan: a named bundle of existing prices and rate cards that an order can be created from in one step. Every line must be active, and the lines must share at least one currency. upgradePath places the plan on a ladder; default: true requires an upgradePath and replaces the group’s previous default.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

This endpoint is in the plans=v1 beta. Send this header to use it.

Allowed values:

Request

Body
lineslist of objectsRequired
Catalog lines sold by this plan.
namestringRequired1-255 characters
The resource name.
defaultbooleanOptional
The default plan in its upgrade group.
descriptionstring or nullOptional
What the resource represents.
displayNamestring or nullOptional<=250 characters

What your customers see on invoices, credit notes, checkout and the portal; null uses the resource name.

externalIdstring or nullOptional1-255 characters
Your stable identifier, 1 to 255 characters.
metadatamap from strings to stringsOptional

String key-value pairs of your own, up to 500 characters per value. Always updatable.

upgradePathobjectOptional
PlanUpgradePath.

Response

201
idstring
The Plan ID.
objectenum

The type of object. Always plan.

Allowed values:
createdAtdatetime
When the object was created.
archivedAtdatetime or null
When this resource was archived, or null.
currencieslist of strings
Currencies offered by every line.
defaultboolean
The default plan in its upgrade group.
descriptionstring or null
What the resource represents.
displayNamestring or null<=250 characters

What your customers see on invoices, credit notes, checkout and the portal; null uses the resource name.

externalIdstring or null1-255 characters
Your stable identifier, 1 to 255 characters.
legacyobject or null
Legacy configuration when conversion is unavailable.
lineslist of objects
Catalog lines sold by this plan.
livemodeboolean

true for an object on a live account, false on a test account.

metadatamap from strings to strings

String key-value pairs of your own, up to 500 characters per value. Always updatable.

namestring1-255 characters
The resource name.
productslist of strings
Products sold by the plan.
updatedAtdatetime
When the object was last changed.
upgradePathobject
PlanUpgradePath.
versioninteger
Version of the plan lines.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error