---
title: "Create Plan"
method: POST
path: "/v5/plans"
tags: ["Plans"]
---

# Create Plan

`POST /v5/plans`

## Request

- Base URL: `https://sandbox.nmi.com/api`
- URL: `https://sandbox.nmi.com/api/v5/plans`
- Auth: API key in header `Authorization`

Create a new recurring payment plan. Plans can be used to define recurring billing schedules that subscriptions can be associated with.

## Request body

- union
  - object: Creating a plan directly requires `id` and `plan_name`.
    - `plan_amount` number, required: The plan amount to be charged each billing cycle. Format: `x.xx`
    - `plan_payments` integer, required: The number of payments before the recurring plan is complete. Use '0' for until canceled
    - `id` string, required: The unique identifier for the plan. Required when creating a plan directly; optional when defining a custom plan inline via a subscription.
    - `plan_name` string, required: The display name of the plan
    - `month_frequency` integer, required: How often, in months, to charge the customer.
    - `day_of_month` integer, required: The day of the month that the customer will be charged. For months without 29, 30, or 31 days, the charge will be on the last day.
  - object: Creating a plan directly requires `id` and `plan_name`.
    - `plan_amount` number, required: The plan amount to be charged each billing cycle. Format: `x.xx`
    - `plan_payments` integer, required: The number of payments before the recurring plan is complete. Use '0' for until canceled
    - `id` string, required: The unique identifier for the plan. Required when creating a plan directly; optional when defining a custom plan inline via a subscription.
    - `plan_name` string, required: The display name of the plan
    - `day_frequency` integer, required: How often, in days, to charge the customer.

## Response `200`

Success

- PlanResponse: Plan response matching PlanRestSerializer structure
  - `object` 'plan', required: Resource type identifier
  - `id` string, required: Plan ID (SKU)
  - `plan_name` string: Plan name
  - `plan_amount` string: Plan amount
  - `plan_payments` string: Number of payments (0 = until canceled)
  - `day_frequency` string: Day frequency (0 if not applicable, empty if not set)
  - `month_frequency` string: Month frequency (0 if not applicable, empty if not set)
  - `day_of_month` string: Day of month (empty if not applicable)

## Other responses

- `400`: Bad Request - Validation Error
- `401`: Unauthorized

---

[API](https://skmtc.dev/nmi/apis/payments-api.md) - [All operations](https://skmtc.dev/nmi/apis/payments-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nmi/apis/payments-api/revisions/c03727f27e27?raw)
