Skip to content
OTA payouts

otapayout.reconcile

Reconcile Airbnb Earnings, Booking.com Reconciliation API v1, and Vrbo payout CSVs with bank deposits. Confirm only completed bank credits from a documented OTA payer with an exact transfer reference and agreeing currency, amount, and date. Maximum 100 distinct reservations per call.

POSThttps://api.kanagu.dev/v1/otapayout/reconcile
Price
$0.30 per 100 reservations, on successful calls only
Without a key
10 free calls per IP per UTC day, shared by REST and MCP.
MCP tool
otapayout.reconcile at https://api.kanagu.dev/mcp
curl https://api.kanagu.dev/v1/otapayout/reconcile \
  -H "Content-Type: application/json" \
  -d '{"otaReports":[{"csv":"Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"}],"bankCsv":"Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED","bankColumns":{"date":"Date","amount":"Amount","description":"Description","currency":"Currency","reference":"Reference","counterparty":"Sender","status":{"column":"State","completedValues":["COMPLETED"]}}}'
curl https://api.kanagu.dev/v1/otapayout/reconcile \
  -H "Authorization: Bearer $KANAGU_KEY" \
  -H "Content-Type: application/json" \
  -d '{"otaReports":[{"csv":"Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"}],"bankCsv":"Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED","bankColumns":{"date":"Date","amount":"Amount","description":"Description","currency":"Currency","reference":"Reference","counterparty":"Sender","status":{"column":"State","completedValues":["COMPLETED"]}}}'
const res = await fetch("https://api.kanagu.dev/v1/otapayout/reconcile", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KANAGU_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "otaReports": [
      {
        "csv": "Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"
      }
    ],
    "bankCsv": "Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED",
    "bankColumns": {
      "date": "Date",
      "amount": "Amount",
      "description": "Description",
      "currency": "Currency",
      "reference": "Reference",
      "counterparty": "Sender",
      "status": {
        "column": "State",
        "completedValues": [
          "COMPLETED"
        ]
      }
    }
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "otapayout.reconcile",
    "arguments": {
      "otaReports": [
        {
          "csv": "Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"
        }
      ],
      "bankCsv": "Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED",
      "bankColumns": {
        "date": "Date",
        "amount": "Amount",
        "description": "Description",
        "currency": "Currency",
        "reference": "Reference",
        "counterparty": "Sender",
        "status": {
          "column": "State",
          "completedValues": [
            "COMPLETED"
          ]
        }
      }
    }
  }
}
Request body
{
  "otaReports": [
    {
      "csv": "Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"
    }
  ],
  "bankCsv": "Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED",
  "bankColumns": {
    "date": "Date",
    "amount": "Amount",
    "description": "Description",
    "currency": "Currency",
    "reference": "Reference",
    "counterparty": "Sender",
    "status": {
      "column": "State",
      "completedValues": [
        "COMPLETED"
      ]
    }
  }
}
Response · 200
{
  "reservationCount": 1,
  "reports": [
    {
      "file": 1,
      "format": "airbnb-earnings-en-2025",
      "source": "https://www.airbnb.com/help/article/414",
      "channel": "airbnb"
    }
  ],
  "payouts": [
    {
      "key": "1:2",
      "file": 1,
      "row": 2,
      "date": "2026-11-12",
      "reference": "G-KANAGU001",
      "reported": {
        "currency": "USD",
        "amount": "194"
      },
      "lineTotal": {
        "currency": "USD",
        "amount": "194"
      },
      "expected": {
        "currency": "USD",
        "amount": "194"
      },
      "lines": [
        {
          "row": 3,
          "type": "Reservation",
          "kind": "reservation",
          "reservationId": "HM12345678",
          "transactionDate": "2026-11-12",
          "net": {
            "currency": "USD",
            "amount": "194"
          },
          "breakdown": {
            "currency": "USD",
            "gross": "200",
            "hostFee": "6",
            "cleaningFee": "25",
            "calculatedNet": "194"
          }
        }
      ],
      "status": "matched",
      "match": {
        "deposit": {
          "row": 2,
          "date": "2026-11-14",
          "description": "Payout",
          "reference": "G-KANAGU001",
          "amount": {
            "currency": "USD",
            "amount": "194"
          }
        },
        "method": "reference",
        "amountDifference": "0"
      },
      "issues": [],
      "candidateDepositRows": [
        2
      ]
    }
  ],
  "unmatchedDeposits": [],
  "unallocatedLines": [],
  "adjustments": [],
  "needs_review": false
}

Request body

application/json

otaReportsarray of objectrequired
One report per OTA. Include complete payout groups.
otaReports[].csvstring (max 524288 chars)required
English Airbnb Earnings, Booking.com Reconciliation API v1, or Vrbo CSV text. The headers identify the format.
otaReports[].slashDateOrder"mdy" | "dmy"
Order for slash dates in Airbnb and Vrbo reports.
bankCsvstring (max 524288 chars)required
One account's bank CSV. Use bankColumns to declare its column meanings when they are not covered by a built-in profile.
bankColumnsobject
bankColumns.datestring (max 200 chars)required
Booking date or timestamp column.
bankColumns.slashDateOrder"mdy" | "dmy"
bankColumns.amountstring (max 200 chars)required
Amount column. Without direction, a positive amount is an incoming credit.
bankColumns.currencystring (max 200 chars)required
Three-letter currency code column.
bankColumns.descriptionstring (max 200 chars)required
Bank transfer description column.
bankColumns.referencestring (max 200 chars)
Transfer reference column, when separate from the description.
bankColumns.counterpartystring (max 200 chars)
Bank-reported sender of an incoming credit.
bankColumns.directionobject
Recognizes standard credit/debit codes and additional incomingValues. Negative amounts are debits. Unknown codes and negative credits require review.
bankColumns.direction.columnstring (max 200 chars)required
bankColumns.direction.incomingValuesarray of string (max 100 chars)required
bankColumns.statusobject
Omit only for exports containing booked transactions exclusively.
bankColumns.status.columnstring (max 200 chars)required
bankColumns.status.completedValuesarray of string (max 100 chars)required
bankColumns.ignoredarray of string (max 200 chars)
List any other columns whose values do not affect the reconciliation.

Response

200 · application/json

reservationCountinteger (0 to 100)required
reportsarray of objectrequired
reports[].fileinteger (-9007199254740991 to 9007199254740991)required
One-based index in otaReports.
reports[].format"airbnb-earnings-en-2025" | "booking-reconciliation-en-v1" | "vrbo-payout-summary-en-2026" | "vrbo-payment-history-en-2026" | "vrbo-bank-deposits-en-2026"required
reports[].sourcestringrequired
reports[].channel"airbnb" | "booking" | "vrbo"required
payoutsarray of objectrequired
payouts[].keystringrequired
File and payout record number joined by a colon.
payouts[].fileinteger (-9007199254740991 to 9007199254740991)required
payouts[].rowinteger (-9007199254740991 to 9007199254740991)required
One-based CSV record number, including the header.
payouts[].datestring (date)required
payouts[].referencestring
payouts[].reportedobject
payouts[].reported.currencystringrequired
payouts[].reported.amountstringrequired
Exact decimal amount in currency units.
payouts[].lineTotalobject
payouts[].lineTotal.currencystringrequired
payouts[].lineTotal.amountstringrequired
Exact decimal amount in currency units.
payouts[].expectedobject
Reported payout total or sum of single-currency detail lines.
payouts[].expected.currencystringrequired
payouts[].expected.amountstringrequired
Exact decimal amount in currency units.
payouts[].linesarray of objectrequired
payouts[].lines[].rowinteger (-9007199254740991 to 9007199254740991)required
payouts[].lines[].typestringrequired
payouts[].lines[].kind"reservation" | "adjustment" | "other"required
Normalized transaction category.
payouts[].lines[].needs_reviewtrue
The source transaction type is unrecognized.
payouts[].lines[].reservationIdstring
payouts[].lines[].transactionIdstring
payouts[].lines[].transactionDatestring (date)
payouts[].lines[].gueststring
payouts[].lines[].checkInstring (date)
payouts[].lines[].checkOutstring (date)
payouts[].lines[].netobjectrequired
payouts[].lines[].net.currencystringrequired
payouts[].lines[].net.amountstringrequired
Exact decimal amount in currency units.
payouts[].lines[].breakdownobjectrequired
Reported amounts preserve the source signs. Absent fields were unavailable.
payouts[].lines[].breakdown.currencystringrequired
payouts[].lines[].breakdown.grossstring
payouts[].lines[].breakdown.hostFeestring
payouts[].lines[].breakdown.processingFeestring
payouts[].lines[].breakdown.commissionTaxstring
payouts[].lines[].breakdown.deductionsstring
payouts[].lines[].breakdown.cleaningFeestring
payouts[].lines[].breakdown.petFeestring
payouts[].lines[].breakdown.resortFeestring
payouts[].lines[].breakdown.taxWithheldstring
payouts[].lines[].breakdown.taxRemittedByOtastring
payouts[].lines[].breakdown.taxPassedToHoststring
payouts[].lines[].breakdown.occupancyTaxstring
payouts[].lines[].breakdown.coHostPayoutstring
payouts[].lines[].breakdown.adjustmentstring
payouts[].lines[].breakdown.exchangeRatestring
payouts[].lines[].breakdown.otherItemsarray of object
Additional monetary columns or transaction types with their original amount signs.
payouts[].lines[].breakdown.otherItems[].columnstringrequired
payouts[].lines[].breakdown.otherItems[].amountstringrequired
payouts[].lines[].breakdown.calculatedNetstring
Net reconstructed from the reported monetary breakdown.
payouts[].status"matched" | "suggested" | "not_received" | "no_deposit_expected" | "needs_review"required
payouts[].matchobject
payouts[].match.depositobjectrequired
payouts[].match.deposit.rowinteger (-9007199254740991 to 9007199254740991)required
payouts[].match.deposit.datestring (date)
Bank booking date, when available.
payouts[].match.deposit.descriptionstringrequired
payouts[].match.deposit.referencestring
payouts[].match.deposit.amountobjectrequired
payouts[].match.deposit.amount.currencystringrequired
payouts[].match.deposit.amount.amountstringrequired
Exact decimal amount in currency units.
payouts[].match.method"reference" | "amount_date_channel" | "batched_amount_date_channel"required
payouts[].match.amountDifferencestring
Bank deposit minus expected payout in the same currency.
payouts[].match.impliedExchangeRatestring
Bank currency units per payout currency unit based on the two reported amounts.
payouts[].issuesarray of stringrequired
payouts[].candidateDepositRowsarray of integer (-9007199254740991 to 9007199254740991)required
unmatchedDepositsarray of objectrequired
Bank deposits without a confirmed link, including suggested allocations and debits that require review.
unmatchedDeposits[].rowinteger (-9007199254740991 to 9007199254740991)required
unmatchedDeposits[].datestring (date)
Bank booking date, when available.
unmatchedDeposits[].descriptionstringrequired
unmatchedDeposits[].referencestring
unmatchedDeposits[].amountobjectrequired
unmatchedDeposits[].amount.currencystringrequired
unmatchedDeposits[].amount.amountstringrequired
Exact decimal amount in currency units.
unmatchedDeposits[].candidatePayoutKeysarray of stringrequired
unmatchedDeposits[].candidatePayoutGroupsarray of array of string
Each exact amount allocation found for this deposit. A singleton is one possible allocation.
unmatchedDeposits[].issuesarray of string
unallocatedLinesarray of objectrequired
unallocatedLines[].rowinteger (-9007199254740991 to 9007199254740991)required
unallocatedLines[].typestringrequired
unallocatedLines[].kind"reservation" | "adjustment" | "other"required
Normalized transaction category.
unallocatedLines[].needs_reviewtrue
The source transaction type is unrecognized.
unallocatedLines[].reservationIdstring
unallocatedLines[].transactionIdstring
unallocatedLines[].transactionDatestring (date)
unallocatedLines[].gueststring
unallocatedLines[].checkInstring (date)
unallocatedLines[].checkOutstring (date)
unallocatedLines[].netobjectrequired
unallocatedLines[].net.currencystringrequired
unallocatedLines[].net.amountstringrequired
Exact decimal amount in currency units.
unallocatedLines[].breakdownobjectrequired
Reported amounts preserve the source signs. Absent fields were unavailable.
unallocatedLines[].breakdown.currencystringrequired
unallocatedLines[].breakdown.grossstring
unallocatedLines[].breakdown.hostFeestring
unallocatedLines[].breakdown.processingFeestring
unallocatedLines[].breakdown.commissionTaxstring
unallocatedLines[].breakdown.deductionsstring
unallocatedLines[].breakdown.cleaningFeestring
unallocatedLines[].breakdown.petFeestring
unallocatedLines[].breakdown.resortFeestring
unallocatedLines[].breakdown.taxWithheldstring
unallocatedLines[].breakdown.taxRemittedByOtastring
unallocatedLines[].breakdown.taxPassedToHoststring
unallocatedLines[].breakdown.occupancyTaxstring
unallocatedLines[].breakdown.coHostPayoutstring
unallocatedLines[].breakdown.adjustmentstring
unallocatedLines[].breakdown.exchangeRatestring
unallocatedLines[].breakdown.otherItemsarray of object
Additional monetary columns or transaction types with their original amount signs.
unallocatedLines[].breakdown.otherItems[].columnstringrequired
unallocatedLines[].breakdown.otherItems[].amountstringrequired
unallocatedLines[].breakdown.calculatedNetstring
Net reconstructed from the reported monetary breakdown.
unallocatedLines[].fileinteger (-9007199254740991 to 9007199254740991)required
adjustmentsarray of objectrequired
adjustments[].fileinteger (-9007199254740991 to 9007199254740991)required
adjustments[].rowinteger (-9007199254740991 to 9007199254740991)required
adjustments[].reservationIdstring
adjustments[].payoutKeystring
adjustments[].amountobjectrequired
adjustments[].amount.currencystringrequired
adjustments[].amount.amountstringrequired
Exact decimal amount in currency units.
adjustments[].priorPayoutCandidatesarray of stringrequired
adjustments[].needs_reviewbooleanrequired
needs_reviewbooleanrequired

Try it

otapayout.reconcile

$0.30/100 reservations

No key needed · 10 free calls per IP per day

Response

Run the request to see the live response here.

Errors

Errors are JSON {"error":{"code","message"}}. An operation may add its own 400 codes; the message says what to fix.

StatusCode and meaning
400invalid_input

The body does not match the request schema. The message names each field.

400invalid_json

The body is missing or is not valid JSON.

400invalid_idempotency_key

Idempotency-Key must be 1–128 visible ASCII characters.

401invalid_api_key

The Bearer key is missing, malformed, invalid or inactive.

402free_allowance_exhausted

This month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left.

404not_found

No operation at this path.

409idempotency_conflict

The Idempotency-Key was already used with a different body.

413payload_too_large

JSON bodies may be at most 64 KiB.

429trial_limit

The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.

500internal_error

The call failed on our side. It is not billed; retry with the same Idempotency-Key.

JSON Schema

Request schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "otaReports": {
      "minItems": 1,
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "csv": {
            "type": "string",
            "minLength": 1,
            "maxLength": 524288,
            "description": "English Airbnb Earnings, Booking.com Reconciliation API v1, or Vrbo CSV text. The headers identify the format."
          },
          "slashDateOrder": {
            "default": "mdy",
            "description": "Order for slash dates in Airbnb and Vrbo reports.",
            "type": "string",
            "enum": [
              "mdy",
              "dmy"
            ]
          }
        },
        "required": [
          "csv"
        ],
        "additionalProperties": false
      },
      "description": "One report per OTA. Include complete payout groups."
    },
    "bankCsv": {
      "type": "string",
      "minLength": 1,
      "maxLength": 524288,
      "description": "One account's bank CSV. Use bankColumns to declare its column meanings when they are not covered by a built-in profile."
    },
    "bankColumns": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Booking date or timestamp column."
        },
        "slashDateOrder": {
          "type": "string",
          "enum": [
            "mdy",
            "dmy"
          ]
        },
        "amount": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Amount column. Without direction, a positive amount is an incoming credit."
        },
        "currency": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Three-letter currency code column."
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Bank transfer description column."
        },
        "reference": {
          "description": "Transfer reference column, when separate from the description.",
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "counterparty": {
          "description": "Bank-reported sender of an incoming credit.",
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "direction": {
          "description": "Recognizes standard credit/debit codes and additional incomingValues. Negative amounts are debits. Unknown codes and negative credits require review.",
          "type": "object",
          "properties": {
            "column": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "incomingValues": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            }
          },
          "required": [
            "column",
            "incomingValues"
          ],
          "additionalProperties": false
        },
        "status": {
          "description": "Omit only for exports containing booked transactions exclusively.",
          "type": "object",
          "properties": {
            "column": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "completedValues": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            }
          },
          "required": [
            "column",
            "completedValues"
          ],
          "additionalProperties": false
        },
        "ignored": {
          "description": "List any other columns whose values do not affect the reconciliation.",
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "required": [
        "date",
        "amount",
        "currency",
        "description"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "otaReports",
    "bankCsv"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "otaReports": [
        {
          "csv": "Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"
        }
      ],
      "bankCsv": "Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED",
      "bankColumns": {
        "date": "Date",
        "amount": "Amount",
        "description": "Description",
        "currency": "Currency",
        "reference": "Reference",
        "counterparty": "Sender",
        "status": {
          "column": "State",
          "completedValues": [
            "COMPLETED"
          ]
        }
      }
    }
  ]
}
Response schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "reservationCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "reports": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "One-based index in otaReports."
          },
          "format": {
            "type": "string",
            "enum": [
              "airbnb-earnings-en-2025",
              "booking-reconciliation-en-v1",
              "vrbo-payout-summary-en-2026",
              "vrbo-payment-history-en-2026",
              "vrbo-bank-deposits-en-2026"
            ]
          },
          "source": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "airbnb",
              "booking",
              "vrbo"
            ]
          }
        },
        "required": [
          "file",
          "format",
          "source",
          "channel"
        ],
        "additionalProperties": false
      }
    },
    "payouts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "File and payout record number joined by a colon."
          },
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "One-based CSV record number, including the header."
          },
          "date": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "reference": {
            "type": "string"
          },
          "reported": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "lineTotal": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "expected": {
            "description": "Reported payout total or sum of single-currency detail lines.",
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "row": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "type": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "reservation",
                    "adjustment",
                    "other"
                  ],
                  "description": "Normalized transaction category."
                },
                "needs_review": {
                  "description": "The source transaction type is unrecognized.",
                  "type": "boolean",
                  "const": true
                },
                "reservationId": {
                  "type": "string"
                },
                "transactionId": {
                  "type": "string"
                },
                "transactionDate": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "guest": {
                  "type": "string"
                },
                "checkIn": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "checkOut": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "net": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "amount": {
                      "type": "string",
                      "description": "Exact decimal amount in currency units."
                    }
                  },
                  "required": [
                    "currency",
                    "amount"
                  ],
                  "additionalProperties": false
                },
                "breakdown": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "gross": {
                      "type": "string"
                    },
                    "hostFee": {
                      "type": "string"
                    },
                    "processingFee": {
                      "type": "string"
                    },
                    "commissionTax": {
                      "type": "string"
                    },
                    "deductions": {
                      "type": "string"
                    },
                    "cleaningFee": {
                      "type": "string"
                    },
                    "petFee": {
                      "type": "string"
                    },
                    "resortFee": {
                      "type": "string"
                    },
                    "taxWithheld": {
                      "type": "string"
                    },
                    "taxRemittedByOta": {
                      "type": "string"
                    },
                    "taxPassedToHost": {
                      "type": "string"
                    },
                    "occupancyTax": {
                      "type": "string"
                    },
                    "coHostPayout": {
                      "type": "string"
                    },
                    "adjustment": {
                      "type": "string"
                    },
                    "exchangeRate": {
                      "type": "string"
                    },
                    "otherItems": {
                      "description": "Additional monetary columns or transaction types with their original amount signs.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "column": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "column",
                          "amount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "calculatedNet": {
                      "description": "Net reconstructed from the reported monetary breakdown.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "currency"
                  ],
                  "additionalProperties": false,
                  "description": "Reported amounts preserve the source signs. Absent fields were unavailable."
                }
              },
              "required": [
                "row",
                "type",
                "kind",
                "net",
                "breakdown"
              ],
              "additionalProperties": false
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "matched",
              "suggested",
              "not_received",
              "no_deposit_expected",
              "needs_review"
            ]
          },
          "match": {
            "type": "object",
            "properties": {
              "deposit": {
                "type": "object",
                "properties": {
                  "row": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "date": {
                    "description": "Bank booking date, when available.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "description": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "object",
                    "properties": {
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      "amount": {
                        "type": "string",
                        "description": "Exact decimal amount in currency units."
                      }
                    },
                    "required": [
                      "currency",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "row",
                  "description",
                  "amount"
                ],
                "additionalProperties": false
              },
              "method": {
                "type": "string",
                "enum": [
                  "reference",
                  "amount_date_channel",
                  "batched_amount_date_channel"
                ]
              },
              "amountDifference": {
                "description": "Bank deposit minus expected payout in the same currency.",
                "type": "string"
              },
              "impliedExchangeRate": {
                "description": "Bank currency units per payout currency unit based on the two reported amounts.",
                "type": "string"
              }
            },
            "required": [
              "deposit",
              "method"
            ],
            "additionalProperties": false
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "candidateDepositRows": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          }
        },
        "required": [
          "key",
          "file",
          "row",
          "date",
          "lines",
          "status",
          "issues",
          "candidateDepositRows"
        ],
        "additionalProperties": false
      }
    },
    "unmatchedDeposits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "date": {
            "description": "Bank booking date, when available.",
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "amount": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "candidatePayoutKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "candidatePayoutGroups": {
            "description": "Each exact amount allocation found for this deposit. A singleton is one possible allocation.",
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "row",
          "description",
          "amount",
          "candidatePayoutKeys"
        ],
        "additionalProperties": false
      },
      "description": "Bank deposits without a confirmed link, including suggested allocations and debits that require review."
    },
    "unallocatedLines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "type": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "reservation",
              "adjustment",
              "other"
            ],
            "description": "Normalized transaction category."
          },
          "needs_review": {
            "description": "The source transaction type is unrecognized.",
            "type": "boolean",
            "const": true
          },
          "reservationId": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          },
          "transactionDate": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "guest": {
            "type": "string"
          },
          "checkIn": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "checkOut": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "net": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "breakdown": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "gross": {
                "type": "string"
              },
              "hostFee": {
                "type": "string"
              },
              "processingFee": {
                "type": "string"
              },
              "commissionTax": {
                "type": "string"
              },
              "deductions": {
                "type": "string"
              },
              "cleaningFee": {
                "type": "string"
              },
              "petFee": {
                "type": "string"
              },
              "resortFee": {
                "type": "string"
              },
              "taxWithheld": {
                "type": "string"
              },
              "taxRemittedByOta": {
                "type": "string"
              },
              "taxPassedToHost": {
                "type": "string"
              },
              "occupancyTax": {
                "type": "string"
              },
              "coHostPayout": {
                "type": "string"
              },
              "adjustment": {
                "type": "string"
              },
              "exchangeRate": {
                "type": "string"
              },
              "otherItems": {
                "description": "Additional monetary columns or transaction types with their original amount signs.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "column": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "column",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "calculatedNet": {
                "description": "Net reconstructed from the reported monetary breakdown.",
                "type": "string"
              }
            },
            "required": [
              "currency"
            ],
            "additionalProperties": false,
            "description": "Reported amounts preserve the source signs. Absent fields were unavailable."
          },
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "row",
          "type",
          "kind",
          "net",
          "breakdown",
          "file"
        ],
        "additionalProperties": false
      }
    },
    "adjustments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reservationId": {
            "type": "string"
          },
          "payoutKey": {
            "type": "string"
          },
          "amount": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "priorPayoutCandidates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "needs_review": {
            "type": "boolean"
          }
        },
        "required": [
          "file",
          "row",
          "amount",
          "priorPayoutCandidates",
          "needs_review"
        ],
        "additionalProperties": false
      }
    },
    "needs_review": {
      "type": "boolean"
    }
  },
  "required": [
    "reservationCount",
    "reports",
    "payouts",
    "unmatchedDeposits",
    "unallocatedLines",
    "adjustments",
    "needs_review"
  ],
  "additionalProperties": false
}