---
title: "Refund Transaction"
method: POST
path: "/transactions/{transaction_id}/refund"
tags: ["Transactions API"]
---

# Refund Transaction

`POST /transactions/{transaction_id}/refund`

Refunds a transaction. You can either refund the entire amount or specify a partial amount.

## Path parameters

- `transaction_id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- RefundRequest
  - `amount` integer, nullable — The amount to be refunded in cents. If the request omits this parameter, the entire remaining amount on the transaction will be fully refunded.
  - `reference_id` string, nullable — An optional, unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.

## Response `200`

HTTP 200 OK

## Other responses

- `400` — HTTP 400 Bad Request
- `401` — HTTP 401 Unauthorized
- `404` — HTTP 404 Not Found

---

[API](https://skmtc.net/affirm/apis/merchant-transaction-api.md) · [All operations](https://skmtc.net/affirm/apis/merchant-transaction-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affirm/merchant-transaction-api/versions/f2f4252c946f/schema)
