---
title: "Write off an invoice"
method: POST
path: "/billing/invoices/{invoiceId}/writeoff"
---

# Write off an invoice

`POST /billing/invoices/{invoiceId}/writeoff`

## Request

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

## Path parameters

- `invoiceId` string, required

## Headers

- `merchant` string, required

## Request body

- unknown

## Response `200`

200

- object
  - `id` string
  - `documentNumber` string
  - `date` string
  - `dueDate` string
  - `scheduledPaymentDate` unknown
  - `status` string
  - `memo` unknown
  - `items` object[]
    - `description` string
    - `amount` object
      - `currency` string
      - `value` number
      - `type` unknown
    - `tax` object
      - `rate` number
    - `id` string
    - `type` string
    - `discounted` object
      - `currency` string
      - `value` integer
      - `type` unknown
    - `accountingCode` unknown
  - `amount` object
    - `currency` string
    - `value` number
    - `type` unknown
  - `amountWithoutDiscount` object
    - `currency` string
    - `value` number
    - `type` unknown
  - `totalDiscounted` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalRefunded` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalTax` object
    - `currency` string
    - `value` number
    - `type` unknown
  - `customerId` string
  - `subscriptionId` string
  - `subscriptionName` string
  - `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/writeoff/post.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)
