---
search:
  tags:
    - invoices
    - POST
seo:
  description: >-
    Reference for the POST /v1/invoices/{invoiceId}/refund endpoint in the
    Vortex Payments API.
sidebar:
  label: POST /v1/invoices/{invoiceId}/refund
  badge: POST
title: POST /v1/invoices/{invoiceId}/refund
type: openapi-operation
---
`POST /v1/invoices/{invoiceId}/refund`

**curl**

```bash
curl "https://api.vortex.nyc/v1/invoices/:invoiceId/refund?environment=...&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'
```

**TypeScript**

```ts
import { refundInvoice, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await refundInvoice({
  client: vortex,
  path: { invoiceId: "..." },
  query: { environment: "...", merchantAccountId: "..." },
  body: {...},
});
```

**Request body** (`application/json`, required)

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `organizationId` (string | null)
- `invoiceId` (string | null)
- `paymentId` (string, required)
- `amount` (number, required)
- `reason` (string, required)
- `requestedByType` (string, required)
- `requestedByRef` (string, required)
- `idempotencyKey` (string | null)
- `taxable` (boolean | null)
- `customerTaxAddress` (object | null)
- `taxBehavior` (string | null)
- `taxClassificationKey` (string | null)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "organizationId": "string",
  "invoiceId": "string",
  "paymentId": "string",
  "amount": 0,
  "reason": "string",
  "requestedByType": "system",
  "requestedByRef": "string",
  "idempotencyKey": "string",
  "taxable": true,
  "customerTaxAddress": {
    "line1": "string",
    "city": "string",
    "region": "string",
    "postalCode": "string",
    "country": "string",
    "line2": "string"
  },
  "taxBehavior": "inclusive",
  "taxClassificationKey": "string"
}
```

**Responses**

- `200` — Success

Response example, 200:

```json
{
  "data": {
    "invoiceId": "string",
    "refundId": "string",
    "refundStatus": "pending"
  },
  "requestId": "string"
}
```
