---
title: "Update an invoice"
method: PATCH
path: "/v2/invoices/{invoiceId}"
---

# Update an invoice

`PATCH /v2/invoices/{invoiceId}`

## Request

- Base URL: `https://api.slash.com`
- URL: `https://api.slash.com/v2/invoices/{invoiceId}`
- Auth: API key in header `X-API-Key`

Edit a `scheduled` or `unpaid` invoice. Only the fields you send change, and `null` clears a field. See [Edit an invoice](/docs/v2/invoices/creating-and-sending#edit-an-invoice).

## Request body

- InvoiceUpdate: Partial update. An omitted field is left unchanged; `null` clears a clearable field. `lineItems`, `ccEmails` and `paymentMethods` are replaced as a whole.
  - `accountId` string: The account payments settle into, with the `sa_group_` prefix.
  - `virtualAccountId` string, nullable: A virtual account to settle into, with the `subaccount_` prefix. `null` settles into the account's primary virtual account.
  - `number` string
  - `issueDate` string, date
  - `dueDate` string, date
  - `timezone` string
  - `scheduledSendDate` string, date: Only for `scheduled` invoices.
  - `lineItems` InvoiceLineItemCreate[]
    - `name` string, required
    - `quantity` number, required: Number of units greater than zero. Fractional quantities are allowed.
    - `unitAmount` object, required: Price per unit in USD cents.
      - `amount` integer, required
      - `currency` 'USD', required
    - `catalogItemId` string: The catalog item this line comes from, with the `cat_item_` prefix. Send the item's `name` and `unitAmount` too; the line keeps what you send.
  - `discount` union: Taken off the line items' subtotal before tax.
    - object
      - `type` 'percentage', required
      - `percent` number, required: Percent of the subtotal. `10` means 10%.
    - object
      - `type` 'fixed', required
      - `amount` UsdMoney, required: A positive USD amount expressed in cents.
        - `amount` integer, required: Amount in cents. For example, `1250` represents USD 12.50.
        - `currency` 'USD', required
  - `taxRate` number, nullable: `null` removes the tax.
  - `memo` string, nullable: `null` clears the memo.
  - `ccEmails` string[]
  - `paymentMethods` InvoicePaymentMethodInput[]
    - `type` 'bank_transfer' | 'ach_debit' | 'card' | 'crypto', required
    - `passFeeToPayer` boolean: Whether the payer covers the processing fee. Defaults to `false`; ignored for `bank_transfer`.

## Response `200`

The updated invoice.

- Invoice: A request for payment you send a customer. Slash emails it, hosts a payment page at `payUrl`, matches incoming deposits to it and keeps its `status` and `amounts` up to date. All amounts are in USD.
  - `id` string, required: Invoice id with the `inv_` prefix.
  - `number` string, required: Unique per legal entity.
  - `status` 'scheduled' | 'unpaid' | 'partially_paid' | 'paid' | 'void', required: See [Invoice lifecycle](/docs/v2/invoices/overview#invoice-lifecycle).
  - `overdue` boolean, required: Whether the invoice is `unpaid` or `partially_paid` and its due date has passed in its `timezone`.
  - `customerId` string: Customer id with the `le_cus_` prefix.
  - `accountId` string, required: The account payments settle into, with the `sa_group_` prefix.
  - `virtualAccountId` string: The virtual account payments settle into, with the `subaccount_` prefix. Absent when they settle into the account's primary virtual account.
  - `seriesId` string: The recurring series that issued the invoice, with the `inv_series_` prefix.
  - `issueDate` string, date, required
  - `dueDate` string, date, required
  - `timezone` string, required: The IANA timezone the invoice's dates are in.
  - `scheduledSendDate` string, date: When a `scheduled` invoice will be emailed, at 9:00 in its `timezone`.
  - `lineItems` InvoiceLineItem[], required
    - `name` string, required
    - `quantity` number, required
    - `unitAmount` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `total` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `catalogItemId` string: The catalog item the line was added from, with the `cat_item_` prefix. The line keeps the name and price it was written with.
  - `discount` union: Taken off the line items' subtotal before tax.
    - object
      - `type` 'percentage', required
      - `percent` number, required: Percent of the subtotal. `10` means 10%.
    - object
      - `type` 'fixed', required
      - `amount` Money, required: A signed monetary amount expressed in minor units.
        - `amount` integer, required: Amount in the currency's minor units.
        - `currency` string, required: Uppercase ISO 4217 currency code.
  - `taxRate` number: Tax as a percent of the subtotal after the discount. `8.5` means 8.5%.
  - `amounts` object, required
    - `subtotal` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `discount` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `tax` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `total` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `paid` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `outstanding` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
  - `memo` string: A note printed on the invoice.
  - `ccEmails` string[], required: Also copied on the invoice and its reminders.
  - `billedTo` object, required: The customer's details as they were when the invoice was created.
    - `name` string, required
    - `email` string, required
    - `address` Address
      - `line1` string, required
      - `line2` string
      - `city` string, required
      - `state` string
      - `postalCode` string
      - `countryCode` string: ISO 3166-1 alpha-2 country code.
  - `paymentMethods` InvoicePaymentMethod[], required
    - `type` 'bank_transfer' | 'ach_debit' | 'card' | 'crypto', required: `bank_transfer` (ACH, wire or realtime payment to the account's details) is always offered.
    - `passFeeToPayer` boolean, required: Whether the payer covers the method's processing fee.
  - `payments` InvoicePayment[], required: Oldest first.
    - `id` string, required: Payment id with the `inv_tr_link_` prefix. Remove it with `DELETE /v2/invoices/{invoiceId}/payments/{paymentId}`.
    - `amount` Money, required: A signed monetary amount expressed in minor units.
      - `amount` integer, required: Amount in the currency's minor units.
      - `currency` string, required: Uppercase ISO 4217 currency code.
    - `paidOn` string, date, required: The day the payment arrived, in the invoice's `timezone`.
    - `method` 'ach' | 'wire' | 'international_wire' | 'realtime' | 'ach_debit' | 'card' | 'crypto' | 'other', required: How the money arrived.
    - `transactionId` string: The deposit, with the `agg_tx_` prefix, readable at `GET /v2/transactions/{transactionId}`. Absent for payments received outside Slash.
    - `matchedBy` 'automatic' | 'manual', required: `automatic` when Slash matched the deposit or the payer paid on the payment page; `manual` when it was recorded by hand.
    - `createdAt` string, date-time, required: When the payment was recorded.
  - `payUrl` string, required: The hosted page where the customer views and pays the invoice.
  - `documentId` string, required: The invoice's PDF, with the `st_` prefix. Download it with `GET /v2/documents/{documentId}`. Each edit issues a new PDF.
  - `nextReminderAt` string, date-time: When the next automatic reminder is due to go out.
  - `paidAt` string, date-time: When the invoice became `paid`.
  - `voidedAt` string, date-time: When the invoice was voided.
  - `createdAt` string, date-time, required

## Other responses

- `400`: - `invoice_amount_below_crypto_minimum` — Crypto payments have a minimum amount. Offer another payment method or raise the total. - `invoice_amount_exceeds_ach_debit_limit` — A single ACH debit cannot cover the invoice total. Offer another payment method or lower the total. - `invoice_due_before_issue` — With the change applied, the invoice would be due before it is issued. - `invoice_total_not_positive` — After the discount and tax are applied, the line items must add up to more than zero. - `payment_method_not_available` — The payment method is not available for the legal entity or for the account receiving the invoice. Global USD accounts do not accept ACH debit. - `invalid_request (request shape)` — The body, query, or headers failed validation, or a required header is missing. `details` has one entry per failing location, keyed by JSON pointer or header name.
- `401`: - `unauthorized` — API key authentication is missing or invalid.
- `403`: - `feature_not_enabled` — The feature this request uses is not enabled for the legal entity. Contact Slash support to enable it. - `forbidden` — The credential is not permitted to perform this action on the resource. When the resource is a field of the request, `details` names that `field` and the `id` it received. - `forbidden (legal entity)` — The credential is not permitted to act for the selected legal entity. - `not_available` — Public API v2 is not yet available. Use [Public API v1](https://docs.slash.com/introduction) in the meantime. - `user_api_key_required` — The API key is scoped to a legal entity rather than a user. Every v2 request needs a user API key, created under Settings → API keys in the Slash dashboard, together with the `x-legal-entity` header.
- `404`: - `not_found` — No resource matches the identifier. When the identifier is a field of the request, `details` names that `field` and the `id` it received.
- `409`: - `invoice_not_editable` — Invoices can be edited until they take a payment. Remove the payments first, or void the invoice and issue a new one. See [Invoice lifecycle](/docs/v2/invoices/overview#invoice-lifecycle). - `invoice_not_scheduled` — The invoice has already been sent, so it has no send date to change. See [Invoice lifecycle](/docs/v2/invoices/overview#invoice-lifecycle). - `invoice_number_taken` — Invoice numbers are unique per legal entity. Pick another number, or leave it out to take the next one. - `invoice_payment_in_flight` — The payer started an ACH debit or card payment that has not settled yet. The invoice cannot change until it does.
- `429`: The request exceeded the applicable rate limit. The response body is plain text, not the error object; clients must not depend on its wording.
- `500`: - `internal` — Slash could not complete the request. Quote `referenceId` when contacting Slash support.

## Changes

- **2026-10-16** `8b5d371ffeea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/slashfi/apis/slash-public-api/changes/v2/invoices/:invoiceId/patch.md)

---

[API](https://skmtc.dev/slashfi/apis/slash-public-api.md) - [All operations](https://skmtc.dev/slashfi/apis/slash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/slashfi/apis/slash-public-api/revisions/eaed2d63c9e2?raw)
