"""The POST /api/transactions request shape this suite assumes. Neither spec pins down the request field names for creating a transaction -- only the response envelope (phase-0-base-project-spec.md ยง6.1) is specified. Since the test suite is the contract, this module fixes the shape Agent B's implementation must accept. See tests/README.md, "Request contract assumptions", for the rationale. """ def tx_payload( account_id, kind="deposit", amount_minor=1000, currency="EUR", merchant_name="Test Merchant", category_id=None, ): payload = { "account_id": account_id, "kind": kind, "amount_minor": amount_minor, "currency": currency, "merchant_name": merchant_name, } if category_id is not None: payload["category_id"] = category_id return payload