---
title: "Pay bills with a withdrawal"
method: POST
path: "/bank-transactions/{bankTransactionId}/match-bill"
tags: ["Banking"]
---

# Pay bills with a withdrawal

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

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/bank-transactions/{bankTransactionId}/match-bill`
- 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 withdrawal as a vendor bill payment: DR Accounts Payable / CR bank through the hardened posting service, claiming the existing feed row inside the same transaction (no duplicate register row) and creating the vendor payment that feeds payment history and 1099 totals. Allocations must be bills of one vendor, capped at each bill's amount due, and must add up to the full withdrawal. Never posts to expense. Undoing the feed post restores the bills and removes the payment.

## Path parameters

- `bankTransactionId` string, uuid, required

## Request body

- object
  - `allocations` object[], required
    - `billId` string, uuid, required
    - `amountCents` integer, required: Positive allocation in integer cents
  - `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)
