# Cancel subscription

`POST https://api.tentary.com/v1/orders/{order_id}/cancel-subscription`

Source: https://tentary.com/de/help/api/cancel-subscription/
Area: Bestellungen und Abos
MCP tool: `cancel_subscription`. Changes nothing at once. The answer has a link that the account owner confirms in Tentary.

---

Stops the future payments of a subscription or an installment plan. `access` decides what happens to the access:

- `period_end` (default): a subscription buyer keeps access until the paid period ends and gets an email. An installment buyer keeps access.
- `now`: the buyer also loses access at once, without an email.

This does not refund anything. For a refund, use [`POST /v1/orders/{order_id}/refund`](https://tentary.com/de/help/api/refund-order/) or the Tentary app.

**After the call:** the account owner confirms at the `confirm_url` within 5 minutes. Then check the result with [`GET /v1/confirmations/{confirmation_id}`](https://tentary.com/de/help/api/get-confirmation/).

## Authorization

`Authorization: Bearer <API key>`

A personal API key (tnt_...). Create it in the Tentary app on the page AI & API.

## Path parameters

- `order_id` (integer, required, path): The id from list_orders or get_order (not the order number). Limits: min 1.

## Request body

- `access` (string): When the access ends. Default period_end. Allowed values: `period_end`, `now`.

## Response

The action waits for the seller's confirmation.

- `status` (string): Nothing happened yet. Allowed values: `needs_confirmation`.
- `confirmation_id` (integer): For get_confirmation.
- `confirm_url` (string<uri>): The seller opens it while logged in to Tentary and confirms.
- `expires_at` (string<date-time>): UTC, like 2026-01-31T14:05:00Z. The link works until then.
- `summary` (string): What the seller confirms.
- `message` (string): Next steps for the AI app.

## Example request

```bash
curl -X POST "https://api.tentary.com/v1/orders/1002/cancel-subscription" \
  -H "Authorization: Bearer $TENTARY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "access": "period_end"
}'
```

## Example response

```json
{
  "status": "needs_confirmation",
  "confirmation_id": 6,
  "confirm_url": "https://app.tentary.com/ai/confirm/WD20opF2LF_oQWPWaq0NnMnxainfCvgk",
  "expires_at": "2026-10-27T08:56:48Z",
  "summary": "Cancel subscription P3T8W1N6",
  "message": "Nothing happened yet. Give the seller the confirm_url: they open it while logged in to Tentary and confirm within 5 minutes. Then call get_confirmation to see the result. If the link expired, call this tool again."
}
```
