---
title: "Create Plan"
method: POST
path: "/api/subscription/createPlan"
tags: ["Plan APIs"]
---

# Create Plan

`POST /api/subscription/createPlan`

## Request

- Base URL: `https://api.portone.cloud`
- URL: `https://api.portone.cloud/api/subscription/createPlan`
- Auth: none declared

Use this API for Creating Plan.

## Headers

- `Content-Type` string
- `X-Portone-Client-Key` string
- `Authorization` string

## Request body

- object
  - `portone_key` string, required: The unique PortOne key for merchant
  - `signature_hash` string, required: The signature_hash of plan generated as per <a href="/docs/regular-plan" target="_blank">Regular Plan Request Signature Documentation</a> or <a href="/docs/ondemand-plan" target="_blank">Ondemand Plan Request Signature Documentation</a>
  - `merchant_order_ref` string, required: The unique merchant order reference generated by the merchant
  - `source` 'default' | 'api' | 'checkout', required: default, api or checkout -- The Source of Plan creation.
  - `description` string: The description of the plan
  - `environment` 'live' | 'sandbox', required: The environment of plan. Either live OR sandbox
  - `name` string, required: The name of the plan
  - `notes` object[]: Additional Notes
    - `key` string: Title
    - `value` string: Description
  - `currency` string, required: The currency of the plan
  - `plan_type` 'REGULAR' | 'ONDEMAND', required: The type of plan
  - `amount` number, double: The amount of the plan, can be a floating-point number. Required only for REGULAR Plan, not available for ONDEMAND Plan
  - `frequency` integer: The frequency of the plan (must be greater than 0). Required only for REGULAR Plan, not available for ONDEMAND Plan
  - `period` 'H' | 'D' | 'W' | 'M' | 'Q' | 'Y': The period of the plan. Required only for REGULAR Plan, not available for ONDEMAND Plan. Hour period is only for testing purpose.

## Response `200`

Successful response

- object
  - `merchant_order_ref` string: The unique Order reference generated by merchant
  - `order_ref` string: The unique Order reference generated by PortOne
  - `status_code` string: The status_code for API request execution result

## Other responses

- `400`: Failure response

---

[API](https://skmtc.dev/portone/apis/subscription-apis.md) - [All operations](https://skmtc.dev/portone/apis/subscription-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/portone/apis/subscription-apis/revisions/c78029b23b1e?raw)
