---
title: "Receive a deposit as an invoice payment"
method: POST
path: "/bank-transactions/{bankTransactionId}/match-invoice"
tags: ["Banking"]
---

# Receive a deposit as an invoice payment

`POST /bank-transactions/{bankTransactionId}/match-invoice`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/bank-transactions/{bankTransactionId}/match-invoice`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Records the feed deposit as a customer payment: DR bank / CR Accounts Receivable through the hardened posting service, claiming the existing feed row inside the same transaction (no duplicate register row). Allocations are caller-chosen and capped at each invoice's amount due; any remainder above the allocations credits Customer Prepayments. Never posts to income.

## Path parameters

- `bankTransactionId` string, uuid, required

## Request body

- object
  - `allocations` object[], required
    - `invoiceId` string, uuid, required
    - `amountCents` integer, required: Positive allocation in integer cents
  - `method` 'bank_transfer' | 'cash' | 'check' | 'card' | 'other'
  - `reference` string

## Response `201`

Posting receipt

## 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)
