---
title: "Updates an invoice payment"
method: PUT
path: "/invoices/{invoice_id}/payments/{payment_id}"
tags: ["Invoice payments"]
---

# Updates an invoice payment

`PUT /invoices/{invoice_id}/payments/{payment_id}`

## Request

- Base URL: `https://api.rillet.com`
- URL: `https://api.rillet.com/invoices/{invoice_id}/payments/{payment_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/rillet/apis/rillet-accounting-api/docs/invoices/:invoice_id/payments/:payment_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Replaces the amount, date, and cash account on an existing uncleared invoice payment.
Only uncleared payments can be updated; cleared or reconciled payments are rejected.
This is a full-replace operation (PUT semantics) — include all fields in the request body.

## Path parameters

- `invoice_id` string, uuid, required
- `payment_id` string, uuid, required

## Request body

- InvoicePaymentRequest
  - `amount` RoundedMonetaryAmount, required: A monetary amount that must be rounded to the currency's default decimal places (e.g., 2 decimal places for USD).
    - `amount` string, required: Monetary amount in decimal format, using a period (.) as the decimal separator. Must be rounded to the currency's default decimal places (e.g. '1.01' in USD represents 1 dollar and 1 cent).
    - `currency` string, required: Currency code following ISO-4217
  - `date` string, date, required
  - `account_code` string, required: The account code found in the Chart of Accounts

## Response `200`

OK

- InvoicePayment
  - `id` string, uuid, required
  - `status` 'SUCCESSFUL' | 'FAILED' | 'UNCLEARED', required
  - `invoice_id` string, uuid, required
  - `amount` RoundedMonetaryAmount, required: A monetary amount that must be rounded to the currency's default decimal places (e.g., 2 decimal places for USD).
    - `amount` string, required: Monetary amount in decimal format, using a period (.) as the decimal separator. Must be rounded to the currency's default decimal places (e.g. '1.01' in USD represents 1 dollar and 1 cent).
    - `currency` string, required: Currency code following ISO-4217
  - `date` string, date
  - `account_code` string: The account code found in the Chart of Accounts
  - `updated_at` string, date-time, required: ISO 8601 timestamp in UTC timezone (must end with 'Z')

## Other responses

- `default`: Error

---

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