---
title: "Cancel the transaction"
method: POST
path: "/api/pvt/transactions/{transactionId}/cancellation-request"
tags: ["Transaction flow"]
---

# Cancel the transaction

`POST /api/pvt/transactions/{transactionId}/cancellation-request`

Cancels a transaction that was previously approved, but not settled. It is possible to cancel partially or complete value of the transaction.

Due to acquirer rules it is not possible to perform this step online against the acquirer.

## Permissions

Any user or [API key](https://developers.vtex.com/docs/guides/api-authentication-using-api-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:

| **Product** | **Category** | **Resource** |
| --------------- | ----------------- | ----------------- |
| PCI Gateway | Payment-Make Payments | **Process payments** |

There are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).

>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing API keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.

## Path parameters

- `transactionId` string, required

## Headers

- `Content-Type` string, required
- `Accept` string, required

## Request body

- CancelthetransactionRequest — Cancel transaction request body information.
  - `value` number, required — Value of the purchase that will be cancelled.

## Response `200`

OK

- SettleResponse — Transaction response body information.
  - `id` string, nullable, required — Settle request identification.
  - `token` string, required — Token identification.
  - `status` number, required — Status code.
  - `statusDetail` string, required — Status detail information.
  - `processingDate` string, required — Settlement processing date.
  - `refundedValue` integer, required — Refunded value.
  - `refundedToken` string, nullable, required — Refund operation token.
  - `message` string, nullable, required — Custom message.
  - `code` string, nullable, required — Custom code.
  - `connectorRefundedValue` number, required — Refunded value by connector (provider).
  - `cancelledValue` integer, required — Cancelled value.

## Changes

- **2026-04-20** `7f58d8045a19` — 2 info
  - api tag `Transaction flow` added
  - api tag `Transaction Flow` removed
- **2024-06-10** `aca4931fa22b` — 2 info
  - the endpoint scheme security `VtexIdclientAutCookie` was added to the API
  - the endpoint scheme security `appKey AND appToken` was added to the API
- **2024-02-06** `f2ac9712d7ce` — 1 info
  - request body became optional

[Change history](https://skmtc.dev/vtex/apis/payments-gateway-api/changes/api/pvt/transactions/:transactionId/cancellation-request/post.md)

---

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