POST
/
plans
curl --request POST \
  --url https://api.sulu.sh/v0/plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "invoiceDisplayName": "<string>",
  "description": "<string>",
  "merchantId": "<string>",
  "productId": "<string>",
  "billingInterval": "monthly",
  "currency": "USD",
  "tax": {},
  "prices": [
    "<string>"
  ]
}'
{
  "id": "<string>",
  "object": "plan",
  "name": "<string>",
  "invoiceDisplayName": "<string>",
  "description": "<string>",
  "billingInterval": "<string>",
  "currency": "<string>",
  "merchantId": "<string>",
  "productId": "<string>",
  "tax": {},
  "prices": [
    {
      "id": "<string>",
      "object": "price",
      "billableMetricId": "<string>",
      "model": "standard",
      "invoiceDisplayName": "<string>",
      "properties": {
        "unitPrice": "<string>"
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name of the plan.

invoiceDisplayName
string
required

The display name of the plan as it appears on invoices.

merchantId
string
required

The merchant organization that will own this plan

productId
string
required

The product this plan belongs to.

billingInterval
enum<string>
required
Available options:
monthly,
yearly
description
string

A brief description of the plan's features and benefits.

currency
string
default:USD
tax
object

The tax configuration for the plan.

prices
string[]

Unique identifier for a price

Response

201
application/json
Plan created successfully
id
string

Unique identifier for a plan

object
enum<string>
Available options:
plan
name
string
invoiceDisplayName
string
description
string
billingInterval
string
currency
string
merchantId
string

The merchant organization that owns this plan

productId
string

The product this plan belongs to

tax
object
prices
object[]
createdAt
string
updatedAt
string
deletedAt
string