RAIA™ Specification

3.23 Payment Rails Strategy — The Flow-Through (Airbnb/Stripe) Model

Think of how Airbnb handles money. Airbnb doesn't become your bank — it collects the guest's payment, takes its cut, and forwards the rest to the host's own bank account. EstateAigents.com does the sa

← Back to Developer Hub TEXTBOOK SPECIFICATION
RAIA™ (Real estate Artificial Intelligence Agent) Specification

Think of how Airbnb handles money. Airbnb doesn't become your bank — it collects the guest's payment, takes its cut, and forwards the rest to the host's own bank account. EstateAigents.com does the sa

🧩 Section A: In Plain English

3.23 Payment Rails Strategy — The Flow-Through (Airbnb/Stripe) Model

Think of how Airbnb handles money — it collects the guest's payment, takes its cut, and forwards the rest to the host's bank account. EstateAigents does the same for rent, operating as a flow-through orchestrator, not a bank.

🟢 ELI5 — Plain English Summary

Think of how Airbnb handles money. Airbnb doesn't become your bank — it collects the guest's payment, takes its cut, and forwards the rest to the host's own bank account. EstateAigents.com does the same for rent: the tenant pays, we deduct our fee, and the money lands in the letting agent's (or landlord's) own existing bank account — the one already protected by their own Client Money Protection scheme. We never hold the money. We just move it and keep the record. Same for expenses: the agent approves a contractor invoice, we initiate a payment straight from their account to the contractor. Because the money flows THROUGH us and never RESTS with us, we are a payment orchestrator, not a bank — which is cheaper, lighter to run, and far easier for an agent to adopt because they keep their bank, their CMP, and their control.

Sovereign Engineering (ADR-265, supersedes hold-client-money draft)

3.23 Payment Rails Strategy — The Flow-Through (Airbnb/Stripe) Model

Why EstateAigents.com processes rent and expense payments as a flow-through orchestrator (money never rests with us), how this keeps us out of the client-money / banking-licence trap, and the end-to-end technical flow built on the existing tbl_payments_transactions schema.

1. First Principles — Why Flow-Through, Not Hold

An earlier draft of this document proposed becoming a Banking-as-a-Service (BaaS) operator — holding client money in our own ring-fenced accounts (via Railsr or ClearBank). That premise was wrong for our objective. The objective is not to be a bank. The objective is: (1) cut the ~0.5% PayProp/automated bank reconciliation gateway-style transaction cost, (2) kill automated bank reconciliation gateway's bugs and poor rent-statement UX, and (3) own the end-to-end experience on a single platform.

The cleanest way to do all three is the flow-through model used by Airbnb, Stripe Connect, and modern open-banking marketplaces: collect the payment, deduct the fee, and settle the net directly into the recipient's own bank account. The money never comes to rest in an EstateAigents account. We initiate and record; we do not hold.

Dimension Hold model (automated bank reconciliation gateway/Griffin) Flow-through model (this doc)
Agent keeps existing bankNo — must move client money to GriffinYes — keeps their bank + relationships
CMP membershipTied to platform/bankStays the agent's own — unchanged
Adoption frictionHigh (migrate all client money)Near-zero (just point rent at us)
Our regulatory burdenSafeguarding / EMI / bank partnerMuch lighter — orchestrator only
Rent statement / UXautomated bank reconciliation gateway's (buggy, ugly)Ours, native, end-to-end
Cost per transaction~0.5%~0.15% (TrueLayer PIS) + our margin
Float income (interest on held money)Yes (but regulatorily encumbered)No — accepted trade-off

2. The Regulatory Line — Where "Money Resting" Begins

The single most important rule: the moment money comes to rest in an account we control — even for one hour — we are providing a regulated payment service and/or holding client money. That triggers FCA authorisation (a Payment Institution licence, or being the agent of one) plus safeguarding obligations. Avoiding that is the entire point of the design.

There are two ways to build flow-through, with very different regulatory weight:

2.1 Model A — Pure orchestration (RECOMMENDED)

  • TrueLayer's Payment Initiation Service (PIS) moves money directly from the tenant's bank to the agent's/landlord's bank. The funds never touch an EstateAigents or TrueLayer-held account in a way we control — TrueLayer is the authorised PISP; we are its customer/agent.
  • A PISP by definition never holds client money — safeguarding does not apply. (FCA: "a pure Payment Initiation Service Provider may never hold client money, so safeguarding does not apply.")
  • Our fee is billed separately (see §5), not skimmed from the in-flight rent.
  • Regulatory load: lightest possible. We are a software orchestration layer on top of TrueLayer's PIS authorisation.

2.2 Model B — Collect-deduct-remit (AVOID unless authorised)

  • Rent lands in our account → we deduct fee → we push the net out. This is money remittance / payment processing and needs a Payment Institution licence or agent-of-authorised-PI status. This is the automated bank reconciliation gateway/PayProp model and the reason they carry a bank/EMI wrapper.
  • We do not want this. It is the trap the earlier draft fell into.

2.3 The Commercial Agent Exclusion (CAE) — our backstop

The Payment Services Regulations 2017 contain a Commercial Agent Exclusion: a firm that acts on behalf of either the payer or the payee (but not both) and is genuinely authorised to negotiate or conclude the transaction is excluded from payment-services authorisation. The exclusion is narrow — the FCA explicitly warns it cannot be used by a platform acting for both sides. We do not rely on the CAE as primary cover; Model A (pure orchestration via TrueLayer's PISP authorisation) is the primary structure. The CAE is noted only so the legal review understands why "acting for both payer and payee" must be avoided in our contracts.

Action for legal review (Eugin / red-team): confirm with counsel whether EstateAigents needs to register as an agent of TrueLayer (the authorised PI) under the agent model, or whether pure technical orchestration with separate fee billing keeps us fully outside scope. This is the one open regulatory question that gates go-live.

3. The Two Money Flows

3.1 Rent collection (money IN, then straight out to the agent/landlord)

  1. EstateAigents raises a rent request in tbl_payments_transactions (direction='inbound', status='pending', scheduled_for = rent due date).
  2. Tenant receives a Pay-by-Bank link (email/SMS/portal). They tap it, choose their bank, approve in their banking app.
  3. TrueLayer PIS moves the rent directly to the agent's/landlord's own bank account (the beneficiary_account_ref on the transaction). EstateAigents is never in the funds chain.
  4. TrueLayer fires a payment-status webhook. We update the row: status='paid', paid_at, bank_transaction_id.
  5. The transaction appears on the landlord statement (see §4) as money received.

3.2 Expense / contractor payment (money OUT of the agent's account)

  1. A contractor invoice arrives (or is raised) in EstateAigents. The agent reviews and approves it in the portal.
  2. We create a tbl_payments_transactions row: direction='outbound', payer_organisation_id = the agent, beneficiary_* = the contractor, status='pending'.
  3. We initiate a payment from the agent's own bank account → to the contractor via open banking — either a one-off PIS the agent approves in-app, or a pre-authorised VRP (Variable Recurring Payment) mandate up to a ceiling the agent set.
  4. Because this is the agent's own operating money (not tenant client money), there is no CMP question at all.
  5. Webhook confirms; we mark status='paid', paid_at, store bank_transaction_id. It lands on the statement as money paid out.

VRP is the key technology for §3.2. It lets the agent pre-authorise EstateAigents to initiate payments from their account up to an agreed limit — exactly the "debit their account and pay the contractor" flow, without us ever holding the money or asking them to re-approve every single payment.

4. The Landlord Statement — Just Payments Sent & Received

The user asked the right question: "Will it work just showing payments sent and received for a landlord statement?" — Yes. Because we own tbl_payments_transactions end-to-end, the landlord statement is simply a filtered, grouped view of that one table. No held balance to reconcile, no client-money ledger to maintain — just a record of what flowed in and what flowed out, per property, per period.

A statement row is derived directly from the columns we already have:

  • Money in = rows where direction='inbound' and status='paid' (rent, deposit top-ups) — shown with paid_at, amount, payer, payment_ref.
  • Money out = rows where direction='outbound' and status='paid' (contractor payments, fees, landlord disbursement) — shown with paid_at, amount, beneficiary, payment_ref.
  • Net position for the period = SUM(inbound paid) − SUM(outbound paid). This is a reported net, not a held balance — the money physically lives in the agent's bank, not ou

Repository Code

The live codebase implementation for this specification sits within the following repository folder:

rs.
  • Pending = rows where status IN ('pending','initiated') — shown as "expected" so the landlord sees what's coming.
  • This is the single-platform UX win: the statement layout, the tenant portal, the expense-approval screen, and the arrears view are all EstateAigents.com frontend reading one table. No dependency on automated bank reconciliation gateway's statement renderer.

    5. How Payment Initiation & Reference Work from tbl_payments_transactions

    The existing tbl_payments_transactions schema (db_raia) is already built for this — it is a Stripe-Connect-shaped table, not a hold-the-money table. Key columns:

    Column Role in the flow
    payment_transaction_id (uuid, PK)Our internal idempotency key. One row = one intended movement of money.
    directioninbound (rent in) / outbound (expense/payout out)
    payer_person_id / payer_organisation_idWho is paying (tenant for rent; agent for expense)
    beneficiary_person_id / beneficiary_organisation_id / beneficiary_account_refWho receives + the destination bank account the PIS settles to directly
    payment_processortruelayer (was lettspay) — connector identifier
    payment_methodpay_by_bank / vrp / direct_debit
    payment_refOur reference — the string the tenant sees on their bank statement AND the key we reconcile against. Format: RAIA-{org_short}-{asset_ref}-{YYYYMM}-{seq}
    bank_reference / bank_transaction_idThe bank's / TrueLayer's own IDs, captured from the webhook for audit
    statusState machine: pending → initiated → paid (or failed)
    scheduled_for / initiated_at / paid_at / failed_at / failure_reasonFull lifecycle timestamps
    retry_of_transaction_idLinks a retry to its failed original (no double-payment)
    reconciled_at / reconciled_by_user_id / reconciliation_notesManual or auto reconciliation audit trail

    5.1 The initiation sequence (rent)

    The payment_ref is generated by EstateAigents at row-creation time, before any bank involvement, and is the spine of reconciliation:

    1. Create the row → generate a unique payment_ref (e.g. RAIA-Sovereign Node-PR171473-202606-001). UNIQUE constraint on payment_ref prevents double-issue.
    2. Call TrueLayer's PIS API, passing payment_ref as the payment reference and beneficiary_account_ref as the destination. Store TrueLayer's returned payment id in bank_reference; set status='initiated', initiated_at=now().
    3. Tenant authorises in their bank app. Money moves bank-to-bank.
    4. TrueLayer webhook (HMAC-signed) returns final status. Match on bank_reference → update status='paid', paid_at, bank_transaction_id.
    5. Reconciliation job confirms the agent's bank shows the credit with the matching payment_ref → set reconciled_at.

    This reuses the architecture of the existing automated bank reconciliation gateway delta-sync pipeline (§3.16) — but instead of polling automated bank reconciliation gateway's /api/v2/Request and mapping its integer status codes (1=active … 4=cleared), we consume TrueLayer's webhook events and write straight into tbl_payments_transactions. The reconciliation/dedup logic (unique key, never-discard raw payload, idempotency) carries over directly.

    5.2 Fee collection (keeping us in Model A)

    To stay in pure-orchestration, the fee must not be skimmed from in-flight rent. Two compliant options:

    • Separate monthly invoice — we bill the agent for the month's transaction fees via a single outbound VRP/PIS from their account. Simple; carries minor credit risk (agent could churn owing fees). Mitigate with a small rolling deposit.
    • Per-transaction separate debit — a second, tiny PIS for the fee, initiated at the same time as the rent but as an independent payment leg. Cleaner attribution; slightly more transactions.

    Do NOT route rent into our account, deduct the fee, and forward the rest — that is Model B and pulls us into the licensing trap.

    6. Will It Work? — Honest Assessment

    Yes, with three caveats that must be closed before go-live:

    • ✅ The data model already supports it. tbl_payments_transactions is empty (greenfield) and shaped for exactly this — direction, payer/beneficiary, processor-agnostic, full state machine, reconciliation columns. No schema change needed to start.
    • ✅ The statement is trivial. Sent/received view over one table. No held-balance reconciliation.
    • ✅ TrueLayer PIS settles single-leg to a third-party beneficiary. This is their core payout/Pay-by-Bank product. Confirmed as the right rail.
    • ⚠️ Open: FCA agent registration. Must confirm with counsel whether pure orchestration + separate fee billing keeps us fully out of scope, or whether we register as an agent of TrueLayer. GATES go-live.
    • ⚠️ Open: TrueLayer beneficiary onboarding. TrueLayer must allow dynamic third-party beneficiaries (the agent's bank account) without each one being a pre-vetted merchant. Confirm in their enterprise contract.
    • ⚠️ Open: rent-holding requests. If an agent wants us to HOLD rent until the landlord's payment date (rather than immediate flow-through), that re-enters client-money territory. Default offering is immediate flow-through; agents needing holding keep their own client account.
    🔧 Section C: Developer Guide

    Architecture Details

    Payment architecture follows the flow-through (Airbnb/Stripe) model with a three-layer pipeline: authorisation → capture → settlement. The system integrates with Stripe Connect for payment processing, handles multi-currency transactions, and maintains a complete audit trail for every financial event.

    • Core Component: Payment processing engine and ledger system
    • Data Flow: Payment Initiation → Authorisation → Capture → Settlement → Reconciliation → Audit
    • Integration Points: Stripe Connect, bank accounts, accounting systems, reporting

    Configuration Reference

    Key configuration parameters for this system:

    Parameter Type Default Description
    stripe_mode string test Stripe API mode (test or live)
    payout_schedule string daily Payout frequency (daily, weekly, monthly)
    currency string GBP Default transaction currency
    PAYMENT ARCHITECTURE — AUTHORISE → CAPTURE → SETTLE 1. AUTHORISATION Payment Initiation Stripe Auth Hold 🔒 Authorise 2. CAPTURE Payment Capture Fee Calculation 💰 Capture 3. SETTLEMENT Payout Distribution Reconciliation 📊 Settlement Flow-through payment model: authorisation hold → capture on completion → settlement with reconciliation Stripe Connect integration · Multi-currency · Idempotency · Full audit trail Auth / Hold Capture / Processing Settlement / Reconciliation Data flow →

    Figure 2: Payment architecture — component interaction and data flow.

    Troubleshooting

    Issue Cause Resolution
    Payment capture timeout Stripe API latency or webhook delivery failure Enable idempotency keys and retry with exponential backoff
    Settlement mismatch Rounding difference or fee calculation error Run reconciliation report and adjust with manual correction
    Repo Reference RAIA

    This component is part of the RAIA (Real estate Artificial Intelligence Agent) platform mono-repo. Implementation details, API contracts, and integration tests are available in the repository.