POST
/
plans

Authorizations

Authorization
string
header
required

API Keys can be issued in the Orb's web application.

Body

application/json
currency
string
required

An ISO 4217 currency string for invoices generated by subscriptions on this plan.

name
string
required
prices
object[]
required

Prices for this plan. If the plan has phases, this includes prices across all phases of the plan.

default_invoice_memo
string | null

Free-form text which is available on the invoice PDF and the Orb invoice portal.

external_plan_id
string | null
metadata
object | null

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

net_terms
integer | null

The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0.

Required range: 0 < x < 365
status
enum<string>
default:
active

The status of the plan to create (either active or draft). If not specified, this defaults to active.

Available options:
active,
draft

Response

201 - application/json

The Plan resource represents a plan that can be subscribed to by a customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices in the Price resource.

adjustments
object[]
required

Adjustments for this plan. If the plan has phases, this includes adjustments across all phases of the plan.

base_plan
object | null
required
base_plan_id
string | null
required

The parent plan id if the given plan was created by overriding one or more of the parent's prices

created_at
string
required
currency
string
requireddeprecated

An ISO 4217 currency string or custom pricing unit (credits) for this plan's prices.

default_invoice_memo
string | null
required

The default memo text on the invoices corresponding to subscriptions on this plan. Note that each subscription may configure its own memo.

description
string
required
discount
object | null
required
external_plan_id
string | null
required

An optional user-defined ID for this plan resource, used throughout the system as an alias for this Plan. Use this field to identify a plan by an existing identifier in your system.

id
string
required
invoicing_currency
string
required

An ISO 4217 currency string for which this plan is billed in. Matches currency unless currency is a custom pricing unit.

maximum
object | null
required
maximum_amount
string | null
required
metadata
object
required

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

minimum
object | null
required
minimum_amount
string | null
required
name
string
required
net_terms
integer | null
required

Determines the difference between the invoice issue date and the due date. A value of "0" here signifies that invoices are due on issue, whereas a value of "30" means that the customer has a month to pay the invoice before its overdue. Note that individual subscriptions or invoices may set a different net terms configuration.

plan_phases
object[] | null
required
prices
object[]
required

Prices for this plan. If the plan has phases, this includes prices across all phases of the plan.

product
object
required
status
enum<string>
required
Available options:
active,
archived,
draft
trial_config
object
required
version
integer
required