---
title: "Record a received payment against an invoice"
method: POST
path: "/invoices/{id}/pay"
tags: ["Invoicing"]
---

# Record a received payment against an invoice

`POST /invoices/{id}/pay`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/invoices/{id}/pay`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Posts the payment through the canonical posting path and updates the invoice balance. Pass Idempotency-Key to retry safely.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `amount` integer, required: Integer cents
  - `date` string, date, required
  - `method` 'bank_transfer' | 'cash' | 'check' | 'card' | 'other'
  - `reference` string, nullable
  - `bankAccountId` string, uuid, nullable

## Response `200`

Updated invoice and created payment

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
