Skip to main content
POST
Create plan

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Body

application/json

The plan to create, with the plan charges of its first plan version.

name
string
required

The name of the plan.

Minimum string length: 1
Example:

"Plano Essencial"

productId
string<uuid>
required

The unique identifier of the product that the plan belongs to.

planCharges
object[]
required

The plan charges of the first plan version of the plan, each at the position of its index in the list.

Required array length: 1 - 100 elements

A fixed charge: bills a flat amount once per period of its billingFrequency, at the boundary its billingTiming picks.

description
null | string

The description of the plan, or null for none. Leave it out for none.

Example:

"Assinatura mensal com entrega diária de pães."

Response

A plan, a reusable set of charges of the catalog, with its product and its active plan version. A contract bills a plan through a plan instance.

id
string<uuid>
required

The unique identifier of the plan in our system.

name
string
required

The name of the plan.

Minimum string length: 1
Example:

"Plano Essencial"

description
null | string
required

The description of the plan, or null when it has none.

Example:

"Assinatura mensal com entrega diária de pães."

product
object
required

The product that the plan belongs to.

activePlanVersion
object
required

The active plan version of the plan, whose plan charges a new plan instance of the plan bills.