---
title: "Refund"
method: POST
path: "/payments/{uniqueId}"
tags: ["Payment or refund"]
---

# Refund

`POST /payments/{uniqueId}`

Refund a successful debit transaction. You can only refund [certain payment methods](https://developer.peachpayments.com/docs/pp-payment-methods).

For more information, see the [documentation](https://developer.peachpayments.com/docs/payments-api-flows#refund-flow), and for sample calls, see our [public Postman collection](https://www.postman.com/peachpayments/peach-payments-public-workspace/request/i97xsu8/payments-public?action=share&creator=20323380&ctx=documentation&active-environment=13324425-9345d747-fcdd-4a5c-83e4-6f637771b28b).

## Path parameters

- `uniqueId` string, required — The unique transaction ID provided by Peach Payments.

## Request body

- RefundRequest — Refund a successful debit transaction.
  - `authentication` Authentication, required — Authenticate requests using the userId, password, and entityId.
    - `userId` string, required — Authentication userId.
    - `password` string, required — Authentication password.
    - `entityId` string, required — Authentication entityId
  - `amount` string, required — The payment request amount.
  - `currency` string, iso-4217, required — The currency code of the payment request amount as defined by ISO-4217.
  - `paymentType` 'RF', required — Refund type of the transaction.

## Response `200`

OK.

- union
  - RefundResponse
    - `id` string, required — The unique transaction ID provided by Peach Payments.
    - `amount` string, required — The payment request amount.
    - `currency` string, iso-4217, required — The currency code of the payment request amount as defined by ISO-4217.
    - `paymentBrand` 'PAYFLEX' | 'ZEROPAY' | '1FORYOU' | 'MASTERPASS' | 'MPESA' | 'BLINKBYEMTEL' | 'MOBICRED' | 'CAPITECPAY' | 'PEACHEFT' | 'MCBJUICE' | 'RCS' | 'FLOAT' | 'HAPPYPAY' | 'MAUCAS' | 'MONEYBADGER' | 'PAYSHAP' | 'NEDBANKDIRECTEFT' — The payment brand specifies the method of payment for the request.
    - `paymentType` 'RF', required — Refund type of the transaction.
    - `result` Result, required — The result object.
      - `code` string, required — The unique code that indicates the result status of the request.
      - `description` string, required
    - `resultDetails` ResultDetails — Additional details that can provide information about the status or result of the transaction.
      - `ExtendedDescription` string
      - `AcquirerResponse` string
      - `UserDisplayMessage` string
    - `connectorTxID1` string — The unique transaction identifier provided by the payment service provider.
    - `timestamp` string, date-time, required — The timestamp of the transaction.
    - `customParameters` CustomParameters — A JSON object depicting custom information sent by the merchant. Echoed back in the response.
  - Refund200ErrorResponse — Error 200 response.
    - `id` string, required — The unique transaction ID provided by Peach Payments.
    - `amount` string, required — The payment request amount.
    - `currency` string, iso-4217, required — The currency code of the payment request amount as defined by ISO-4217.
    - `paymentType` 'RF', required — Refund type of the transaction.
    - `result` Result, required — The result object.
      - `code` string, required — The unique code that indicates the result status of the request.
      - `description` string, required
    - `timestamp` string, date-time, required — The timestamp of the transaction.

## Other responses

- `400` — Bad request.
- `401` — Unauthorised.
- `404` — Not found.
- `500` — Internal server error.
- `502` — Bad gateway.

---

[API](https://skmtc.net/peachpayments/apis/checkout.md) · [All operations](https://skmtc.net/peachpayments/apis/checkout/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/peachpayments/checkout/revisions/3a98165665f8/schema)
