---
title: "Refund a payment"
method: POST
path: "/v1/refunds"
tags: ["Refund", "Founder login"]
---

# Refund a payment

`POST /v1/refunds`

## Request

- Base URL: `https://hyperscale0.ai`
- URL: `https://hyperscale0.ai/v1/refunds`
- Auth: HTTP bearer

Moves a posted payment into a Product's pool back to the account that paid it, in full or in part, as a correction of the payment. A full refund first gives back the earn-rate fees taken on the payment; a partial refund leaves them in place. A payment takes one refund: a second refund, or a refund of a payment that already has a reversal or return, is refused with transfer_lineage_conflict naming the existing transfer, and a payment with a return in progress is refused with transfer_return_exists. Platform fee transfers and payments into any account other than a Product pool cannot be refunded here.

## Headers

- `X-Hyperscale-Environment` 'sandbox' | 'live'
- `Idempotency-Key` string, required

## Request body

- object
  - `paymentTransferId` string, required: The posted payment to refund: a transfer into a Product's pool account.
  - `amount` string: Minor units to refund, at most the payment. Omit to refund the whole payment.
  - `reason` 'duplicate' | 'fraudulent' | 'requested_by_customer'
  - `transferId` string: Names the refund transfer. Omit to derive one from the request.

## Response `201`

Success

- RefundCreateOutput
  - `transferId` string, required: The refund transfer.
  - `paymentTransferId` string, required: Hyperscale transfer ID
  - `tenantId` string, required: Organization tenant ID
  - `productId` string, required: Hyperscale product ID
  - `sourceAccountId` string, required: Hyperscale account ID
  - `destinationAccountId` string, required: Hyperscale account ID
  - `amount` string, required: Positive minor-unit integer amount serialized as a string (at most 18 digits)
  - `currency` 'SAR', required
  - `reason` 'duplicate' | 'fraudulent' | 'requested_by_customer'
  - `transferStatus` 'posted', required

## Other responses

- `default`: ErrorResponse. See x-error-codes and x-errors for codes, HTTP statuses and retry guidance.

---

[API](https://skmtc.dev/hyperscale0/apis/hyperscale-product-api.md) · [All operations](https://skmtc.dev/hyperscale0/apis/hyperscale-product-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hyperscale0/apis/hyperscale-product-api/revisions/e9e8faa044d5?raw)
