# LawPay MCP MCP

> LawPay MCP connects your AI agent directly to legal payment processing and trust accounting services. It helps law firms manage client billing, track IOLTA funds, process refunds, and reconcile accounts while maintaining compliance with bar association rules.

## Overview
- **Category:** money-moves
- **Price:** Free
- **Tags:** legal-payments, iolta-compliance, trust-accounting, invoicing, billing, financial-reporting

## Description

Managing money in a law firm is complicated. You're dealing not only with standard client retainers but also highly regulated trust (IOLTA) accounts. This MCP lets your agent manage those legal payments through natural conversation, bypassing complex dashboards and manual reconciliation.

Your AI client can treat the entire payment lifecycle as one continuous conversation. Need to check how much money is sitting in a specific client's matter fund? Just ask. Need to bill an outstanding amount? It handles that too. The system manages everything from listing past payments to creating charges, ensuring you always meet compliance standards. You connect this MCP via Vinkius and instantly give your agent access to the entire financial operational suite, letting it handle billing reports, transaction histories, and account reconciliation without you ever touching a dashboard.

## Tools

### create_invoice
Generates a new formal invoice record for a specific amount and due date.

### create_refund
Initiates a refund process for any existing payment transaction.

### get_account_info
Gets detailed information regarding the specific payment merchant setup and configuration.

### get_account
Retrieves basic details about the connected merchant account profile.

### get_payment_method
Retrieves details about a specific payment method used by the client or firm.

### get_account_stats
Pulls current operational metrics, including revenue summaries and account performance data.

### get_transaction
Fetches the full details for any single, specified financial transaction.

### list_accounts
Retrieves a list of all associated merchant accounts connected to LawPay.

### list_invoices
Fetches a list of existing client invoices, including their due dates and status.

### list_payment_methods
Gets a roster of all saved payment methods used by the firm or clients.

### list_settlements
Retrieves records detailing bank settlement amounts and associated dates.

### list_transactions
Provides a comprehensive list of all payment activity, charges, and credits over time.

## Prompt Examples

**Prompt:** 
```
Show payment summary for this month and trust account balances.
```

**Response:** 
```
This month: 45 payments received, $128,400 total. Credit card: 38 ($98,200). ACH/eCheck: 7 ($30,200). Refunds: 2 ($1,500). Average payment: $2,853. Trust accounts: Operating ($45,200), IOLTA Trust ($234,500, 12 client matters). Largest trust balance: Matter #1045 — Smith v. Jones ($45,000).
```

**Prompt:** 
```
Show outstanding invoices and the aging report.
```

**Response:** 
```
Outstanding: 18 invoices, $67,800 total. Current (0-30 days): 10 invoices, $38,200. 31-60 days: 5, $18,400. 61-90 days: 2, $8,200. 90+ days: 1, $3,000 ⚠️ (Matter #892 — Johnson Estate). Top outstanding: 'Corporate Merger — TechCo' ($12,500, 15 days). Collection rate: 94%.
```

**Prompt:** 
```
List recent transactions for Matter #1045 and create a charge.
```

**Response:** 
```
Matter #1045 — Smith v. Jones. Trust balance: $45,000. Transactions (30 days): 3. Deposit: $20,000 (retainer, Apr 5). Disbursement: -$5,000 (filing fees, Apr 12). Disbursement: -$2,500 (expert witness, Apr 20). Charge created! $3,500 — 'Legal services, April billing'. Method: Credit card. Status: Approved ✅.
```

## Capabilities

### Generate client invoices
Creates new formal invoices for clients with specific amounts and due dates.

### Process payments and refunds
Handles the creation of charges to a client's account or processes full/partial refunds for past transactions.

### Audit financial records
Retrieves detailed reports on payment statistics, including revenue summaries and aging accounts.

### Monitor trust funds (IOLTA)
Tracks specific balances and transactions within mandated client trust or operating accounts.

### Review billing history
Lists all outstanding invoices, showing who owes money and how long the bill has been overdue.

## Use Cases

### The partner needs an immediate revenue report.
A senior partner asks their agent for a summary of last quarter's income and outstanding balances. The agent runs `get_account_stats` and then uses `list_invoices` to provide the total amount currently owed, flagging any accounts that are 90+ days overdue.

### A client disputed a charge.
The paralegal tells their agent about the dispute. The agent first runs `get_transaction` on the specific payment ID to verify details, and if necessary, uses `create_refund` to process the credit.

### Closing out a client matter.
The finance team needs to ensure all funds are accounted for. They ask the agent to list all payments (`list_transactions`) associated with that client ID and verify the final balance using `get_account`.

### Creating a retainer invoice.
The paralegal drafts a new service agreement and asks their agent to create an initial billing record. The agent uses `create_invoice` immediately, setting the due date and tracking it via `list_invoices`.

## Benefits

- Stop manually checking payment status. Use `list_transactions` to pull a complete history of payments, charges, and credits in one go.
- Maintain compliance by isolating client funds. Monitor specific IOLTA balances and transactions using tools like `get_account_stats`, keeping the trust account separate from operating revenue.
- Accelerate billing cycles. Your agent can use `list_invoices` to check outstanding bills, then execute `create_invoice` when needed.
- Simplify reconciliation. Access full reports via `get_account_stats` and `list_settlements`, making month-end financial closing much faster.
- Handle collections easily. If a payment fails or needs adjusting, your agent can first review the details with `get_transaction` before running `create_refund`.

## How It Works

The bottom line is you get structured, compliant API calls that handle the complex data logic behind legal payments.

1. Subscribe to this MCP and input your LawPay Secret Key and Merchant ID credentials.
2. Your agent uses these credentials to connect, authenticating access to all payment tools.
3. You ask your AI client to perform a financial action, like 'list the last five transactions' or 'create an invoice for $1,500'.

## Frequently Asked Questions

**How do I list all invoices using the LawPay MCP?**
You use the `list_invoices` tool. This function pulls a complete roster of every invoice, showing its due date and whether it's currently outstanding.

**Can I check my trust account balance with get_account_stats?**
Yes. Running `get_account_stats` provides comprehensive metrics that include the current operating balance and dedicated client matter funds, keeping your compliance separate.

**How do I process a payment refund using LawPay MCP?**
You use `create_refund`. This tool processes the credit against a specific transaction ID, ensuring the reversal is recorded correctly in the system.

**What if I need to see every single payment ever made?**
Use `list_transactions`. This function provides a deep dive into all historical financial activity, allowing you to audit payments and charges from any point in time.

**How do I set up and verify my connected accounts using the `list_accounts` tool?**
You first need to provide your LawPay Secret Key and Merchant ID. After connecting, running `list_accounts` confirms access by retrieving a list of all available merchant accounts linked to your profile.

**If I want full details on one specific payment, how do I use the `get_transaction` tool?**
You specify the unique Transaction ID when using `get_transaction`. This retrieves a detailed breakdown of that single event, including the original amount, processing fees, and associated status.

**What information does `get_account_info` provide about my business profile?**
`get_account_info` pulls your core merchant data. This includes essential details like your registered legal entity name, tax identifiers, and overall account operational status.

**How can I monitor fund movements between different accounts using `list_settlements`?**
`list_settlements` tracks the actual movement of money into or out of your operating accounts. It shows when funds move from one bank to another, which is crucial for reconciliation.

**Can I manage trust account balances?**
Yes. Monitor IOLTA trust account balances, view transactions per client matter, and track deposits and disbursements.

**Does LawPay use Basic Auth?**
Yes. LawPay uses **HTTP Basic Auth** with the Secret Key against `api.affinipay.com/v1`. The Merchant ID is required for identifying the account.

**Can I track invoices and outstanding balances?**
Yes. List all invoices with amounts, due dates, payment status, and client details. Monitor aging reports and outstanding balances.