---
title: "Refund a Transaction"
method: POST
path: "/v3/transactions/{code}/refunds"
tags: ["Refund API"]
---

# Refund a Transaction

`POST /v3/transactions/{code}/refunds`

Requests a refund for a transaction processed by PagSeguro.  Refunds can be requested for the full transaction amount or a partial amount.  Requires Basic Authentication.

## Path parameters

- `code` string, uuid, required

## Request body

- object
  - `notification_url` string, url, required — URL where PagSeguro will send status update notifications regarding the refund request.
  - `amount` number, float — Amount to be refunded. If not provided, the full transaction amount will be refunded. The maximum value aceppted is equal to the transaction amount.
  - `reference` string — Unique refund reference assigned by the merchant for tracking purposes.

## Response `201`

Refund request created successfully.

- object
  - `id` integer — Unique identifier of the refund request.
  - `reference` string — Refund reference assigned by the merchant. Can be used for tracking purposes.
  - `amount` number, float — Amount approved for refund. If a partial refund is processed, this field will reflect the refunded amount.
  - `status` string — Current status of the refund request. Possible values: - `REQUESTED`: Refund has been requested. - `PROCESSING`: Refund is being processed. - `PROCESSED`: Refund has been successfully completed. - `REJECTED`: Refund request was denied.
  - `created_at` string, date-time — Date and time when the refund request was created (UTC format).
  - `updated_at` string, date-time — Date and time when the refund request was last updated (UTC format).

## Other responses

- `400` — Bad Request - The request was malformed or contained invalid data.
- `401` — Unauthorized - Authentication failed due to missing or invalid credentials.
- `422` — Unprocessable Entity - The request was well-formed but could not be processed due to semantic errors.

---

[API](https://skmtc.net/pagseguro/apis/pagseguro-international-api.md) · [All operations](https://skmtc.net/pagseguro/apis/pagseguro-international-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pagseguro/pagseguro-international-api/revisions/032af0550731/schema)
