---
title: "Cancel order renewal"
method: POST
path: "/orders/{orderId}/cancel"
tags: ["orders"]
---

# Cancel order renewal

`POST /orders/{orderId}/cancel`

## Request

- Base URL: `https://api.agentpaid.io/api/v1`
- URL: `https://api.agentpaid.io/api/v1/orders/{orderId}/cancel`
- Auth: HTTP bearer

Schedules the cancellation of an order's renewal from a specified date. The order will remain active until the cancellation date.

## Path parameters

- `orderId` string, required

## Request body

- CancelRenewalRequest: Request to cancel an order's renewal
  - `orderVersion` integer, required: The current version of the order (for optimistic locking)
  - `cancelFromDate` string, date-time, required: The date from which the renewal should be cancelled (ISO 8601 format)

## Response `200`

Order renewal cancelled 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 - Invalid order version or cancel from date
- `403`: Forbidden - Invalid or missing API key
- `404`: 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)
