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

# Refund the transaction

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

Refunds the amount of the transaction that was previously settled.

After a transaction is settled, this request can be used to partially or fully refund the transaction amount.

Due to acquirer rules, it is not possible to perform this step online against the acquirer, and, if an error occurrs, we notify the seller company responsible by email to manually check the transaction status 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

- RefundthetransactionRequest — Refund transaction request body information.
  - `value` number, required — Purchase value. The value must be described without using separation for decimals, e.g. to capture a value of 320.50, send 32050.
  - `freight` number — Freigth value, if applicable.
  - `tax` number — Tax value, if applicable.
  - `minicart` object — This field is filled with the content of the cart of the transaction, which can be obtained using [Get Orders](https://developers.vtex.com/docs/api-reference/orders-api?endpoint=get-/api/oms/pvt/orders/-orderId-) or [Transaction Details](https://developers.vtex.com/docs/api-reference/payments-gateway-api?endpoint=get-/api/pvt/transactions/-transactionId-) endpoints. It should only be included for transactions with split payment.

## 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
- **2024-01-16** `e6bea95b9c18` — 2 info
  - the `tax` request property type/format was generalized from `integer`/`` to `number`/``
  - the `value` request property type/format was generalized from `integer`/`` to `number`/``

[Change history](https://skmtc.dev/vtex/apis/payments-gateway-api/changes/api/pvt/transactions/:transactionId/refunding-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)
