---
title: "Refund an invoice"
method: PUT
path: "/billing/invoices/{invoiceId}/refund"
---

# Refund an invoice

`PUT /billing/invoices/{invoiceId}/refund`

## Request

- Base URL: `https://api-sandbox.ezypay.com/v2`
- URL: `https://api-sandbox.ezypay.com/v2/billing/invoices/{invoiceId}/refund`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://identity-sandbox.ezypay.com/token`

## Path parameters

- `invoiceId` string, required

## Headers

- `merchant` string, required

## Request body

- object
  - `amount` number, double: Partial amount to be refunded. This amount should be less than the invoice amount less Customer Fees. If not provided, it will be refunded in full.
  - `items` object[]: List of Invoice Items to be refunded
    - `id` string: Auto-generated identifier of the invoice item.
    - `amount` number, double: Amount to be refunded. This should be less than actual invoice item less already refunded. If not provided, it will be refunded in full.

## Response `200`

200

- object
  - `id` string
  - `creditNoteId` string
  - `documentNumber` string
  - `date` string
  - `dueDate` string
  - `scheduledPaymentDate` unknown
  - `status` string
  - `memo` unknown
  - `items` object[]
    - `description` string
    - `amount` object
      - `currency` string
      - `value` integer
      - `type` unknown
    - `tax` object
      - `rate` integer
    - `id` string
    - `type` string
    - `discounted` object
      - `currency` string
      - `value` integer
      - `type` unknown
    - `accountingCode` unknown
  - `amount` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `amountWithoutDiscount` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalDiscounted` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalRefunded` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalTax` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `customerId` string
  - `subscriptionId` unknown
  - `subscriptionName` unknown
  - `paymentMethodToken` string
  - `autoPayment` boolean
  - `createdOn` string

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `924be4030f56`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ezypay/apis/vault/changes/billing/invoices/:invoiceId/refund/put.md)

---

[API](https://skmtc.dev/ezypay/apis/vault.md) - [All operations](https://skmtc.dev/ezypay/apis/vault/llms.txt) - [OpenAPI document](https://skmtc.dev/ezypay/apis/vault/revisions/924be4030f56?raw)
