---
title: "Cancel a payment"
method: PATCH
path: "/payments/{paymentId}/cancel"
---

# Cancel a payment

`PATCH /payments/{paymentId}/cancel`

## Request

- Base URL: `https://api.sandbox.cleeng.com/3.1`
- URL: `https://api.sandbox.cleeng.com/3.1/payments/{paymentId}/cancel`
- Auth: API key in header `X-Publisher-Token`

To cancel a payment, you use a payment resource. 

Payments at Cleeng are a reference to the actual payment that happens at the payment gateway or in-app store.

To cancel a payment, make a `PATCH` request to the `/3.1/payments/{paymentId}/cancel` endpoint where `paymentId` is the reference of the payment you want to cancel. 

Please note that you can use this endpoint to cancel a payment that has been **authorized but not captured** yet. (For more information about payment authorization and capture, see [here](https://developers.cleeng.com/docs/subscription-recurring-billing#overview)).

Cancelling a payment means that the payment is not processed any further.

## Path parameters

- `paymentId` string, required

## Headers

- `Content-Type` string

## Response `200`

200

- object
  - `success` boolean
  - `message` string

## Other responses

- `422`: 422

---

[API](https://skmtc.dev/cleeng/apis/api-31.md) - [All operations](https://skmtc.dev/cleeng/apis/api-31/llms.txt) - [OpenAPI document](https://skmtc.dev/cleeng/apis/api-31/revisions/df55396cda4f?raw)
