---
title: "Unsubscribe customer from plan"
method: POST
path: "/plans/{planId}/unsubscribe"
tags: ["plans"]
---

# Unsubscribe customer from plan

`POST /plans/{planId}/unsubscribe`

## Request

- Base URL: `https://api.agentpaid.io/api/v1`
- URL: `https://api.agentpaid.io/api/v1/plans/{planId}/unsubscribe`
- Auth: HTTP bearer

Cancels the renewal of an active order for a customer's plan subscription. The order will remain active until the cancellation date.

## Path parameters

- `planId` string, uuid, required

## Query parameters

- `customerExternalId` string, required

## Response `200`

Customer unsubscribed from plan successfully

- CancelRenewalResponse: Response after successfully cancelling an order's renewal
  - `orderId` string, uuid, required: The ID of the order
  - `amendmentId` string, uuid, required: The ID of the amendment record
  - `version` integer, required: The new version of the order after the amendment
  - `endDate` string, date-time, required: The new end date of the order
  - `effectiveDate` string, date-time, required: The effective date of the cancellation

## Other responses

- `400`: Bad request - Missing required parameters
- `403`: Forbidden - Invalid or missing API key
- `404`: Plan, customer, or order not found

---

[API](https://skmtc.dev/paid/apis/paid-2.md) - [All operations](https://skmtc.dev/paid/apis/paid-2/llms.txt) - [OpenAPI document](https://skmtc.dev/paid/apis/paid-2/revisions/dbdf4a60ed27?raw)
