---
title: "Cancel a Payment"
method: POST
path: "/payments/payment/{id}/cancel"
tags: ["payments"]
---

# Cancel a Payment

`POST /payments/payment/{id}/cancel`

Cancel a payment.

## Path parameters

- `id` string, required

## Headers

- `Authorization` string, required
- `X-Api-Key` string, required
- `X-API-Version` string
- `Idempotency-Key` string

## Response `200`

Successfully cancelled

- PaymentsPostPaymentsPaymentIdCancelResponse200
  - `id` string — The unique identifier of the payment.
  - `cancelled` boolean — Whether the payment was successfully cancelled.
  - `reason` string — The outcome of the cancellation request. Either 'Payment cancelled successfully' or 'Payment not cancellable'.
  - `payment` PaymentsPaymentIdCancelPostResponsesContentApplicationJsonSchemaPayment — The full payment object reflecting its state after the cancellation attempt.

## Other responses

- `400` — Bad request - Invalid parameters or request format
- `403` — Forbidden - Access denied or insufficient permissions
- `404` — Not found - Resource does not exist
- `409` — Payment not cancellable

## Changes

- **2026-08-22** `75aab60eedc9` — 2 breaking, 1 warning
  - for the `header` request parameter `Idempotency-Key`, the minLength was increased from `0` to `1`
  - added the pattern `^[A-Za-z0-9._\-+=/]{1,128}$` to the `header` request parameter `Idempotency-Key`
  - for the `header` request parameter `Idempotency-Key`, the maxLength was set to `128`
- **2026-08-19** `c0b5cf6c7a72` — 1 info
  - added the non-success response with the status `403`
- **2026-08-17** `c231509a03cf` — 2 breaking, 4 info
  - the `message` response's property type/format changed from `string`/`` to ``/`` for status `400`
  - the `message` response's property type/format changed from `string`/`` to ``/`` for status `404`
  - the response property `code` became required for the status `400`
  - the response property `code` became required for the status `404`
  - …2 more
- **2026-08-13** `1f089f3e34d9` — 6 breaking
  - the response property `code` became optional for the status `400`
  - the response property `code` became optional for the status `404`
  - the response property `message` became optional for the status `400`
  - the response property `message` became optional for the status `404`
  - …2 more

[Change history](https://skmtc.dev/ottimate/apis/api-reference/changes/payments/payment/:id/cancel/post.md)

---

[API](https://skmtc.dev/ottimate/apis/api-reference.md) · [All operations](https://skmtc.dev/ottimate/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ottimate/api-reference/revisions/ba91ff4c6969/schema)
