---
title: "Refund pay-in"
method: POST
path: "/payment/v1/payins/{transactionReference}/refund"
tags: ["Fiat Payments"]
---

# Refund pay-in

`POST /payment/v1/payins/{transactionReference}/refund`

## Request

- Base URL: `https://api.sandbox.bvnk.com`
- URL: `https://api.sandbox.bvnk.com/payment/v1/payins/{transactionReference}/refund`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/bvnk/apis/bvnk-api-endpoints/docs/payment/v1/payins/:transactionReference/refund/post.ts> (a function with typed inputs; its response is checked against the schema)

Initiates seamless one-click refund processing for any previous pay-in. Once accepted, a refund transaction appears in your  portal and can be acquired via API. 

 Upon activation, the system automatically generates a new transaction according to our standard workflow. You can request multiple refunds for the same transaction, as long as the total refunded amount doesn't exceed what was originally paid in.

## Path parameters

- `transactionReference` string, uuid, required

## Headers

- `X-Idempotency-Key` string, uuid, required

## Request body

- object
  - `paymentReference` string, required: Merchant-side reference that ties the refund to your order, user, or invoice.
  - `amount` object, required: The amount that will be refunded. **Note**: Only full refunds are supported for Automated Clearing House (ACH) transfers. The refund customer payment reference will not be propagated to the bank. The original pay-in customer payment reference is shown in the refund.
    - `value` number, double, required: Amount in major currency units (use dot as decimal separator).
    - `currency` 'GBP' | 'USD' | 'EUR', required: Three-letter ISO-4217 currency code.
  - `metadata` Metadata: Custom metadata key-value pairs. Structure: key: value. Restrictions: - Maximum five keys. - Each key maximum length 50 characters. - Each value maximum length 100 characters. - Keys and values must be simple strings.

## Response `200`

Refund request accepted

- object
  - `transactionReference` string, uuid, required: Unique identifier for the refund transaction
  - `fee` object, required: Projected fee for processing the refund
    - `value` number, required
    - `currency` string, required

## Other responses

- `400`: Refund could not be created because the pay-in is not refundable or the amount is invalid.
- `500`: Unexpected Error

---

[API](https://skmtc.dev/bvnk/apis/bvnk-api-endpoints.md) - [All operations](https://skmtc.dev/bvnk/apis/bvnk-api-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/bvnk/apis/bvnk-api-endpoints/revisions/c386d436bf2c?raw)
