Skip to content

Connect Ordway to Claude: Process Payments and Journal Entries

Learn how to build a managed MCP server for Ordway. Connect Claude to Ordway's API to automate subscriptions, payments, journal entries, and revenue rules.

Roopendra Talekar Roopendra Talekar · · 9 min read
Connect Ordway to Claude: Process Payments and Journal Entries

If your team needs to connect Ordway to Claude to automate subscription management, reconcile journal entries, or process complex payment runs, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's tool calls and Ordway's REST API. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on /connect-ordway-to-chatgpt-manage-customer-subscriptions-and-taxes/ or explore our broader architectural overview on /connect-ordway-to-ai-agents-orchestrate-billing-and-revenue-cycles/.

Giving a Large Language Model (LLM) read and write access to a sprawling financial and billing ecosystem like Ordway is an engineering challenge. You have to handle API key token lifecycles, map massive nested JSON schemas to MCP tool definitions, and deal with Ordway's specific data architecture. Every time Ordway updates an endpoint or changes a revenue rule schema, you have to update your server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Ordway, connect it natively to Claude Desktop, and execute complex billing workflows using natural language.

The Engineering Reality of the Ordway API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against specialized B2B financial APIs is painful. Ordway is built to manage complex usage-based billing, multi-entity general ledgers, and intricate revenue recognition rules. Its API reflects that heavy operational complexity.

If you decide to build a custom Ordway MCP server, here are the specific integration challenges you will face:

The Attributes Envelope and Polymorphic Data Many of Ordway's endpoints utilize an envelope pattern where the top-level record contains standard metadata (like id, created_at, updated_at), but the actual domain-specific payload is nested inside an attributes object. When fetching an invoice or a subscription, the LLM must understand that it cannot just read the top-level keys. Writing back to Ordway often requires mirroring this exact envelope structure. A managed MCP server extracts the query and body schemas from the underlying documentation, injecting exact parameter instructions so Claude inherently understands where to place data.

Complex Delta Syncs and Pagination Financial records require precise auditing. When tracking down payment discrepancies, you often need to fetch records updated after a specific timestamp. Ordway handles this via strict ISO 8601 formatting on the updated_date> query parameter. Additionally, the API uses a combination of page, size, and sort parameters for pagination. If an LLM is trying to scan 500 invoices to find a mismatch, it needs explicit guidance on how to iterate through pages. Auto-generated MCP tools automatically inject pagination instructions (like limit and cursor handling) into the tool descriptions, ensuring the model traverses result sets reliably.

Strict Rate Limits and HTTP 429 Handling Financial APIs aggressively rate limit requests to protect their database infrastructure. Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Ordway API returns an HTTP 429, Truto passes that error directly to the caller. However, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. This means your MCP client or AI agent framework is responsible for reading these headers and executing its own retry or backoff strategy. You cannot rely on the integration layer to absorb excessive LLM looping.

Creating the Ordway MCP Server

Truto dynamically derives MCP tools directly from the integration's documented API endpoints. If an endpoint is documented with a description, query schema, and body schema, it becomes a tool. This documentation-driven approach ensures that only curated, well-defined operations are exposed to the LLM.

You can generate an Ordway MCP server in two ways: via the Truto UI for one-off internal use, or via the Truto API for programmatic deployment to your customers.

Method 1: Via the Truto UI

If you are an IT admin or internal developer setting up Claude for your finance team, the UI is the fastest path.

  1. Log into your Truto dashboard and navigate to your connected Ordway environment under Integrated Accounts.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Configure your server. You can assign a human-readable name, filter by specific methods (e.g., read only), or filter by tags (e.g., billing, accounting).
  5. Copy the generated MCP Server URL (it will look like https://api.truto.one/mcp/a1b2c3d4e5f6...).

Method 2: Via the Truto API

If you are building an AI product and need to provision Ordway MCP servers dynamically for your users, you should use the REST API.

Make an authenticated POST request to the /integrated-account/:id/mcp endpoint. You can configure the server to expose only specific operations, which is critical for limiting an LLM's blast radius in a financial system.

// POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp
// Headers: Authorization: Bearer <YOUR_TRUTO_API_KEY>
 
{
  "name": "Ordway Finance AI Assistant",
  "config": {
    "methods": ["read", "write"],
    "tags": ["invoices", "payments", "journal_entries"],
    "require_api_token_auth": false
  },
  "expires_at": "2026-12-31T23:59:59Z"
}

The Truto API will validate that tools exist for your requested configuration. It generates a cryptographic token, stores it securely, and returns the endpoint URL:

{
  "id": "mcp_srv_987654321",
  "name": "Ordway Finance AI Assistant",
  "config": { 
    "methods": ["read", "write"], 
    "tags": ["invoices", "payments", "journal_entries"] 
  },
  "expires_at": "2026-12-31T23:59:59.000Z",
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}

Keep this URL safe. It contains the authentication token required to execute operations against your Ordway account.

Connecting the MCP Server to Claude

Once you have your Truto MCP URL, you need to plug it into your LLM environment. Because Truto handles the JSON-RPC 2.0 mapping internally, the URL acts as a drop-in SSE (Server-Sent Events) transport.

Method A: Via the Claude UI (and ChatGPT)

If your team uses Claude Desktop or web interfaces supporting custom connectors, the process requires zero code.

For Claude Desktop/Web:

  1. Open Claude and navigate to Settings -> Integrations.
  2. Click Add MCP Server (or Custom Connector).
  3. Paste the Truto MCP URL generated in the previous step.
  4. Click Add. Claude will instantly handshake with the server and discover the Ordway tools.

For ChatGPT (Developer Mode):

  1. Navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode.
  3. Under MCP servers / Custom connectors, click to add a new server.
  4. Name it "Ordway Billing (Truto)" and paste the Truto MCP URL.
  5. Save. ChatGPT will immediately ingest the tool schemas.

Method B: Via Manual Config File

For local development or custom agent deployments, you can configure Claude Desktop using the standard claude_desktop_config.json file. Truto's MCP servers communicate over HTTP, so you must use the official @modelcontextprotocol/server-sse package to bridge the standard input/output to the remote SSE endpoint.

Locate your Claude config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Update the configuration to include the Ordway MCP server:

{
  "mcpServers": {
    "ordway_billing": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890"
      ]
    }
  }
}

Restart Claude Desktop. When you open a new chat, you will see a tool icon indicating that the Ordway operations are ready for use.

Hero Tools for Ordway

An integrated Ordway account can expose dozens of tools across customers, billing runs, and products. Here are the highest-leverage tools for financial orchestration.

create_a_ordway_invoice

This tool creates a new invoice directly in Ordway. It accepts a JSON body matching the InvoiceInput schema, which requires line items, customer IDs, and terms. The LLM can use this to generate ad-hoc bills or finalize draft invoices.

"Draft a new invoice in Ordway for customer C-8849. Add a single line item for 'Enterprise Support SLA' at $1,500.00 due net 30."

get_single_ordway_subscription_by_id

Retrieves the full attributes of a subscription, including current plans, terms, and renewal dates. This is critical for agents auditing why an invoice was generated or looking up pricing tiers for support requests.

"Look up subscription S-00042. Tell me the effective start date and what product plan is currently attached to it."

list_all_ordway_payments

Retrieves an array of payment records. This tool is often used with the updated_date> filter to reconcile payments that hit the bank account against payments recognized in Ordway over the last 24 hours.

"List all payments in Ordway updated after midnight yesterday. Group them by status and tell me if there are any failed transactions."

list_all_ordway_journal_entries

Fetches journal entries from the general ledger. This is the cornerstone tool for accounting bots. AI agents use it to audit credits, debits, and account distributions to ensure month-end close balances match.

"Fetch the latest journal entries for this month. Check if the total debits match the total credits across all records returned."

create_a_ordway_refund

Initiates a refund in Ordway for a specific payment. Because this alters financial state, you should ensure the LLM explicitly confirms the amount and reason before executing.

"Process a refund of $50.00 for payment P-9912. Add a custom field note saying 'Refunded due to accidental double billing'."

list_all_ordway_revenue_rules

Retrieves the configured revenue recognition rules. If an accountant needs to verify how a specific subscription's revenue is being amortized over time, the LLM can fetch the rule definitions and cross-reference them with the ledger.

"List all active revenue rules in Ordway. Identify any rule that amortizes revenue over a 12-month period."

For the complete inventory of available tools and exact JSON schema definitions, visit the Ordway integration page.

Workflows in Action

Once connected, Claude can orchestrate multi-step billing and accounting workflows by chaining these tools together. Here are two real-world examples of how AI agents handle Ordway operations.

Scenario 1: Resolving a Billing Dispute and Issuing a Refund

A customer support agent asks Claude to investigate a billing complaint and issue a partial refund.

"A customer (C-992) is complaining they were billed for a canceled subscription. Check their latest invoice and payment, then issue a $100 refund if a payment went through yesterday."

Step-by-step execution:

  1. Claude calls list_all_ordway_invoices with the customer ID to find the most recent billing event.
  2. Claude calls list_all_ordway_payments filtered by the invoice ID or customer ID to confirm the charge was successfully settled.
  3. Claude analyzes the timestamps and statuses of the invoice and payment.
  4. Claude calls create_a_ordway_refund targeting the payment ID, passing $100 in the RefundInput body.
  5. Claude replies to the support rep with the refund confirmation ID and suggests checking the subscription status.
sequenceDiagram
    participant User
    participant Claude
    participant Truto as Truto MCP
    participant Ordway as Ordway API
    User->>Claude: "Refund $100 for customer C-992's latest payment"
    Claude->>Truto: call tools/call (list_all_ordway_payments)<br>{"customer_id": "C-992"}
    Truto->>Ordway: GET /api/v1/payments?customer_id=C-992
    Ordway-->>Truto: JSON payment records
    Truto-->>Claude: Payment payload
    Claude->>Truto: call tools/call (create_a_ordway_refund)<br>{"payment_id": "P-123", "amount": 100}
    Truto->>Ordway: POST /api/v1/refunds
    Ordway-->>Truto: 201 Created
    Truto-->>Claude: Refund confirmation ID
    Claude-->>User: "Refund processed successfully. ID: R-456"

Scenario 2: End-of-Month Journal Entry Audit

A staff accountant asks the LLM to verify that recent high-value orders have corresponding journal entries mapped correctly.

"Find all orders created in the last 7 days. For any order over $10,000, check the journal entries and ensure the revenue was booked to the correct chart of accounts."

Step-by-step execution:

  1. Claude calls list_all_ordway_orders with the updated_date> parameter set to 7 days ago.
  2. Claude filters the returned payload in its context window to find orders where the total amount exceeds $10,000.
  3. For each high-value order, Claude extracts the associated invoice IDs.
  4. Claude calls list_all_ordway_journal_entries to pull the accounting records associated with those invoices.
  5. Claude calls list_all_ordway_chart_of_accounts to verify the account codes.
  6. Claude compiles a markdown report detailing which orders hit the correct accounts and flagging any discrepancies for human review.

Security and Access Control

Exposing financial infrastructure to AI agents demands strict security boundaries. Truto provides several mechanisms to lock down your Ordway MCP servers:

  • Method Filtering: Restrict servers by HTTP operation. Configure the server with config.methods: ["read"] to strictly prevent Claude from issuing refunds, creating invoices, or updating ledger entries.
  • Tag Filtering: Group tools by functional area. Set config.tags: ["support"] to ensure the server only exposes tools related to customer lookup and notes, entirely hiding the journal entry and payment run operations.
  • Expiration (TTL): Use the expires_at property when generating an MCP server for temporary audits or short-lived automated tasks. Once expired, the underlying KV storage automatically purges the token, dropping all access instantly.
  • Require API Token Auth: By default, possessing the MCP URL grants access. Enable require_api_token_auth: true to force the MCP client to also pass a valid Truto API token in the Authorization header, adding a mandatory second layer of identity verification.

Scale Your Financial Automation

Connecting Claude to Ordway via MCP unlocks massive operational efficiency for finance teams. Instead of navigating complex UIs or writing custom Python scripts to reconcile payments, your team can interact with their billing infrastructure through natural language. By relying on a managed MCP provider like Truto, you sidestep the burden of managing API documentation drift, authentication refreshes, and tool schema generation, allowing your engineers to focus on business logic.

FAQ

Does Truto automatically retry rate-limited requests to Ordway?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. If Ordway returns an HTTP 429, Truto passes the error back to the caller along with normalized rate limit headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for implementing retry logic.
Can I prevent Claude from modifying financial records in Ordway?
Yes. When creating the MCP server, you can apply method filtering by setting the configuration to only allow `read` operations. This prevents the LLM from executing `create`, `update`, or `delete` operations.
How are MCP tools generated for Ordway?
Truto dynamically generates tools based on Ordway's documented integration resources. If an API endpoint has a description, query schema, and body schema documented, it automatically becomes an MCP tool. There is no manual coding required.
Do I need to re-authenticate the MCP server if Ordway updates its API?
No. Because the MCP tools are derived dynamically from the underlying API integration schemas, any updates or changes to Ordway's API structure are automatically reflected in the tools the next time Claude calls them.

More from our Blog