---
title: "Update Plan"
method: PUT
path: "/v5/plans/{id}"
tags: ["Plans"]
---

# Update Plan

`PUT /v5/plans/{id}`

## Request

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

Update an existing recurring payment plan. Be careful when updating an existing plan, as all customers signed up for this plan will have their billing changed based on your edits.

## Path parameters

- `id` string, required

## Request body

- union
  - object: Update an existing plan. The plan being updated is identified by the `{id}` path parameter. Body fields are optional; send only the fields to change. When changing the billing schedule, include a complete monthly (`month_frequency` + `day_of_month`) or daily (`day_frequency`) set.
    - `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: New plan identifier when renaming the plan. Omit to keep the existing ID from the path. Distinct from the path parameter `{id}`, which identifies the plan being updated.
    - `plan_name` string: Updated display name of the plan. Optional on update.
    - `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.
    - `current_plan_id` string: Existing plan ID being updated. Optional; the path parameter `{id}` is authoritative and is applied when this is omitted or differs.
  - object: Update an existing plan. The plan being updated is identified by the `{id}` path parameter. Body fields are optional; send only the fields to change. When changing the billing schedule, include a complete monthly (`month_frequency` + `day_of_month`) or daily (`day_frequency`) set.
    - `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: New plan identifier when renaming the plan. Omit to keep the existing ID from the path. Distinct from the path parameter `{id}`, which identifies the plan being updated.
    - `plan_name` string: Updated display name of the plan. Optional on update.
    - `day_frequency` integer, required: How often, in days, to charge the customer.
    - `current_plan_id` string: Existing plan ID being updated. Optional; the path parameter `{id}` is authoritative and is applied when this is omitted or differs.

## 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
- `404`: Plan not found

---

[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)
