---
title: "Refund a payment"
method: POST
path: "/payments/{paymentId}/refund"
---

# Refund a payment

`POST /payments/{paymentId}/refund`

## Request

- Base URL: `https://api.open-finance.ai/v2`
- URL: `https://api.open-finance.ai/v2/payments/{paymentId}/refund`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.open-finance.ai/oauth/token` scopes: `create:payments`

## Path parameters

- `paymentId` string, required

## Request body

- object
  - `description` string, required: The description of the refund payment
  - `psuId` string: The national id of the merchant making the refund
  - `psuCorporateId` string: The business id of the merchant making the refund
  - `phoneNumber` string: The phone number of the merchant making the refund
  - `sendSMS` boolean: Send an SMS to the merchant with the refund journey
  - `amount` number, required: The refund amount

## Response `200`

Response

- object
  - `id` string: The payment id of the refund payment
  - `payUrl` string: The journey url for the refund
  - `sentMerchantSMS` boolean: Was sn SMS sent to the merchant

## Other responses

- `400`: Invalid request format or parameters
- `401`: Unauthorized access - Invalid access token
- `403`: Forbidden - Access token missing the required permissions to preform this action
- `404`: Not found - The route or resource were not found
- `500`: Internal server error

---

[API](https://skmtc.dev/open-finance/apis/data.md) - [All operations](https://skmtc.dev/open-finance/apis/data/llms.txt) - [OpenAPI document](https://skmtc.dev/open-finance/apis/data/revisions/c18eafb2a770?raw)
