v1

latestOpenAPI 3.0.02026-07-243678114.1 KB
Plans

Create Plan

The Create Plan endpoint allows you to create a new subscription plan. It requires a payload containing the plan's details. Use this endpoint to create flexible and tailored subscription options that align with your business needs.

📘 Note

When creating a plan, you automatically create a paylink associated with it. This allows you to offer the plan for immediate purchase.

post/v1/plan

Request body

amountstring

The amount associated with the plan, specified as a string. This parameter represents the cost or price of the plan.

currencystring

The currency in which the plan amount is expressed.

descriptionstring

A brief description or summary of the plan. This parameter provides additional information about the purpose or features of the plan.

interval'Week' | 'Month' | 'Year'

The recurring interval for the payment link:

  • Week
  • Month
  • Year
intervalCountinteger

The number of intervals between each billing cycle. This parameter determines how often the plan is billed within the specified interval.

metadataobject

An object containing additional metadata associated with the plan.

namestring

A name or label associated with the plan. This parameter represents a identifier or title for the plan.

referencestring

A reference identifier associated with the plan. This parameter allows for linking the plan to external identifiers.

trial_periodstring

Specifies the trial period duration for the plan, if applicable. This parameter represents the duration of any trial period associated with the plan.

Response

OK

errorboolean

Example response

{
  "data": {
    "id": "2eJh1L1rDrCZxTyE6vwGhck7LWI",
    "org_id": "2Tpmnmh6GHJXumKN1oBy2u56Ima",
    "metadata": {
      "key": "value"
    },
    "properties": {
      "key": "value"
    }
  }
}