Skip to content
myela

interval is one of day, week, month, year; unknown values are refused here rather than upstream. intervalCount is a positive integer, default 1. One plan per unique (amount, currency, interval, intervalCount): a matching request returns the existing plan with **200** — its name may differ from the one you sent. **201** means the plan was created.

Create plan

POST/v1/plansLink

interval is one of day, week, month, year; unknown values are refused here rather than upstream. intervalCount is a positive integer, default 1.

One plan per unique (amount, currency, interval, intervalCount): a matching request returns the existing plan with 200 — its name may differ from the one you sent. 201 means the plan was created.

SandboxSecret keyplans.create

Request fields

Edit a field and the generated request updates immediately.

Request body
stringrequired

A human-readable name.

integerrequired

A non-negative integer in the currency’s minor unit. 4999 represents $49.99.

integer · minor units

stringrequired

A three-letter ISO 4217 currency code.

ISO 4217

stringrequired

How often the plan renews.

Optional fields1
integeroptional

Number of intervals between renewals. Defaults to 1.

Response contract

The successful wire shape and errors an integration should branch on.

201

Plan

application/json
idstringrequired
Unique plan identifier.
object"plan"required
Stable resource discriminator.
namestringrequired
Plan name.
amountintegerrequired
Renewal amount in minor units.
currencystringrequired
Three-letter currency code.
intervalstringrequired
Renewal interval.
intervalCountintegerrequired
Intervals between renewals.
createdAtstringrequired
ISO 8601 creation timestamp.
Example response
{
  "id": "plan_01JEXAMPLE",
  "object": "plan",
  "name": "Standard monthly",
  "amount": 4999,
  "currency": "USD",
  "interval": "month",
  "intervalCount": 1,
  "createdAt": "2026-08-10T20:49:51.653Z"
}
Error responses
401authentication_failed

The key is missing, malformed, revoked, or invalid for this environment.

403permission_denied

The key does not have plans.create.

422invalid_request

One or more request fields are invalid.