# Payouts

Tools for retrieving channel payout statements and owner payout templates from the Lavanda platform.

## Available Tools

| Tool | Description |
| ---- | ----------- |
| [`find_payout`](/mcp/tools/payouts/find_payout/) | Retrieve a single channel payout by ID, including its lines and totals |
| [`list_payouts`](/mcp/tools/payouts/list_payouts/) | List payouts with ID/workspace filtering and Relay pagination |
| [`list_payout_templates`](/mcp/tools/payouts/list_payout_templates/) | List a workspace's owner payout templates; super admins also get hidden deductions and Lavanda terms |
| [`get_payout_template`](/mcp/tools/payouts/get_payout_template/) | Retrieve a single owner payout template by ID within a workspace |

## Overview

A payout represents a bank payout statement ingested from an OTA channel (Booking.com, Airbnb,
etc.), grouping the reservations and adjustments that make up one deposit. Each payout includes:

- Source channel, grouping reference, payout date, status, and currency
- The owning workspace
- Payout-level totals (gross amount, commission, payments service fee, net)
- Payout lines — reservation and adjustment lines, each with per-line money fields

Only ID-based filtering is supported on the list (payout ID and workspace ID, with
`eq` / `neq` / `in` / `nin` operators). Use `find_payout` for full per-line detail.

## Payout templates

A payout template holds the rules that split a booking's revenue between the owner, the property manager
and any third-party beneficiaries. Both template tools are read-only:

- `managementFee` and percentage deduction `value`s are fractions (`0.2` = 20%); a `fixed` deduction's
  `value` is an amount in the template currency, charged per `stay` or per `night` (its `basis`).
- `lpmPermissions` says whether the property manager may view, also edit, or not see a deduction
  (`Not Visible`).
- `baseAmountRule` is the amount the payout is calculated from; `baseAmountRuleDescription` spells it out:
  `accomodation_fare` (LVDAM's spelling) is accommodation revenue only, `post_platform_booking_value`
  subtracts channel commission and payment charge, and `gross_booking_value` adds the cleaning fee.
- `Not Visible` deductions (e.g. Lavanda Home Guarantee) and `lavandaTerms` are returned only when the
  caller is a Lavanda super admin; everyone else gets what the PMS shows a property manager, with
  `lavandaTerms: null`.
- `lavandaTerms.lavandaFeeRule` says what the Lavanda fee is taken from: `lpm_fee` (a share of the
  property manager's management fee), `gross_booking_value` (a share of the booking's total value) or
  `monthly` (a fixed monthly charge, not taken per booking). `lavandaFee` is a fraction when
  `lavandaFeeUnit` is `percentage`, otherwise an amount in the template currency. `platformFees` lists
  each channel's fee fraction, `null` where none is set. `partnershipProgram` is the back office
  "Partnership Program" tick box.
- A beneficiary `share` is its fraction of the deduction (`0.5` = 50%); a deduction's shares sum to `1`.

`get_payout_template` reads the workspace's template list and returns the matching entry, so it needs the
template's workspace ID as well as its own ID.

## Related Documentation

- [Tools Overview](/mcp/tools/)
