Connect ChargeDesk to ChatGPT: Manage Charges, Refunds & Subscriptions
from the team behind Truto
ChargeDesk in ChatGPT, in about a minute.
The best way to connect ChargeDesk to ChatGPT is Elaichi: connect ChargeDesk to Elaichi once, then add Elaichi to ChatGPT as a connector. Two steps, about a minute, with a 14‑day free trial and no credit card required.
- No credit card required
- 500+ connectors
- Credentials vaulted, never read back
-
Start your free trial
14 days free, no credit card required.
-
Connect ChargeDesk
Once, in Elaichi. ChatGPT never gets more access than you have.
-
Add Elaichi to ChatGPT
In ChatGPT, open Plugins, press +, and paste the URL into Server URL. Sign in and approve.
https://api.elaichi.ai/mcp
Building ChargeDesk into your own product? This guide is for you.
A step-by-step engineering guide to generating a secure MCP server for ChargeDesk. Connect it to ChatGPT to automate refunds, subscription cancellations, and live gateway charges using natural language.
The developer guide
Learn how to connect ChargeDesk to ChatGPT using a managed MCP server. Execute live gateway charges, process refunds, and sync customer billing data via AI.
If you need to connect ChargeDesk to ChatGPT to automate billing operations, manage refunds, or orchestrate subscription lifecycles, you need a Model Context Protocol (MCP) server. This server acts as the secure translation layer between ChatGPT's JSON-RPC tool calls and ChargeDesk's REST APIs. You can either build and maintain this infrastructure in-house, or use a managed integration platform like Truto to dynamically generate a production-ready MCP server URL in seconds.
If your team uses Claude, check out our guide on connecting ChargeDesk to Claude or explore our broader architectural overview on connecting ChargeDesk to AI Agents.
Giving a Large Language Model (LLM) read and write access to your financial operations is an engineering risk. You must strictly control which endpoints the model can reach, map natural language inputs to precise financial schemas, and cleanly separate read-only auditing from live gateway mutations. Every time ChargeDesk updates a payload requirement, custom MCP server code must be updated, redeployed, and tested.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for ChargeDesk, connect it natively to ChatGPT, and execute complex billing workflows using natural language.
The Engineering Reality of the ChargeDesk API
A custom MCP server is essentially a self-hosted integration layer. While the MCP standard provides a predictable way for models to discover tools, implementing it against ChargeDesk's unique architecture requires specific domain knowledge.
If you decide to build a custom MCP server for ChargeDesk, you own the entire API lifecycle. Here are the specific integration challenges you will face:
The Gateway vs. Record Abstraction
ChargeDesk sits on top of multiple underlying payment gateways (Stripe, Braintree, PayPal). The API enforces a strict separation between logging a record and executing a live transaction. For example, if an LLM calls the standard create charge endpoint, ChargeDesk simply creates a visual record of an external charge - it does not process a payment. To actually charge a card on file, the LLM must call a specific gateway method. If your MCP tool descriptions do not explicitly guide the LLM on this distinction, your agent will hallucinate live charges that never hit the bank.
Polymorphic Gateway Payloads
When orchestrating live payments or subscriptions through the gateway methods, the payload structure changes based on the intent. Passing using=card charges a stored payment method, passing product.interval starts a recurring subscription, and passing contact (instead of a customer ID) sends a hosted payment link. Your MCP server must flatten these polymorphic requirements into distinct, strictly-typed JSON schemas so the LLM understands exactly which arguments trigger which behavior.
Rate Limits and Error Handling
ChargeDesk enforces rate limits on API requests. A critical architectural note when using Truto: Truto does not retry, throttle, or apply backoff on rate limit errors. When the ChargeDesk API returns an HTTP 429, Truto passes that error directly to the caller. However, Truto normalizes the upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller (your LLM orchestration framework or the ChatGPT client) is entirely responsible for reading these headers and implementing retry or backoff logic. Do not assume the integration layer will absorb rate limit spikes.
Generating a ChargeDesk MCP Server
Truto dynamically derives MCP tool definitions directly from the integration's resource configurations and documentation. A tool only appears in the MCP server if it has a corresponding documentation entry - ensuring only well-described, curated endpoints are exposed to the LLM.
Each MCP server is scoped to a single integrated account (a connected instance of ChargeDesk). You can generate the server via the Truto dashboard or programmatically via the API.
Method 1: Via the Truto UI
For quick prototyping or manual setup, you can generate the server directly from the Truto dashboard:
- Navigate to the Integrated Accounts page and select your connected ChargeDesk instance.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., restrict to
readmethods or specific tags likecustomers). - Copy the generated MCP server URL. This URL contains a hashed cryptographic token that authenticates the connection.
Method 2: Via the Truto API
For programmatic provisioning - such as generating a temporary MCP server for an automated agent run - use the Truto REST API. This validates that the integration has tools available, generates a secure token, provisions the server at the edge, and returns a ready-to-use URL.
curl -X POST https://api.truto.one/integrated-account/<INTEGRATED_ACCOUNT_ID>/mcp \
-H "Authorization: Bearer $TRUTO_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "ChargeDesk Financial Ops Agent",
"config": {
"methods": ["read", "write", "custom"],
"tags": ["charges", "customers", "subscriptions"]
}
}'The response contains the secure URL:
{
"id": "mcp_abc123",
"name": "ChargeDesk Financial Ops Agent",
"config": { "methods": ["read", "write", "custom"] },
"expires_at": null,
"url": "https://api.truto.one/mcp/a1b2c3d4e5f67890..."
}Treat this URL like a highly sensitive credential. It securely routes ChatGPT to your specific ChargeDesk tenant.
Connecting the MCP Server to ChatGPT
Once you have your Truto MCP URL, you can connect it to your LLM environment. ChatGPT supports remote MCP servers natively.
Method A: Via the ChatGPT UI
If you are using ChatGPT Pro, Plus, Business, Enterprise, or Education, you can add the server directly via the interface:
- In ChatGPT, navigate to Settings -> Apps -> Advanced settings.
- Enable the Developer mode toggle to reveal MCP capabilities.
- Under MCP servers / Custom connectors, click to add a new server.
- Enter a recognizable Name (e.g., "ChargeDesk Operations").
- Paste the Truto MCP URL into the Server URL field.
- Click Save.
ChatGPT will immediately execute a handshake with the Truto server, listing all available ChargeDesk tools. No additional configuration is required.
Method B: Via Manual Config File (Local Desktop)
If you are running the Claude Desktop app, Cursor, or testing via the MCP Inspector locally, you connect to the remote Truto URL using a Server-Sent Events (SSE) proxy configuration.
Add the following to your mcp.json or claude_desktop_config.json file:
{
"mcpServers": {
"chargedesk-truto": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/a1b2c3d4e5f67890..."
]
}
}
}This instructs the local client to securely tunnel JSON-RPC tool calls to the remote Truto MCP endpoint.
Security and Access Control
Giving an LLM access to billing systems requires strict guardrails. Truto's MCP servers are designed with security primitives that operate at the edge, before a request ever reaches ChargeDesk.
- Method Filtering (
config.methods): Restrict the server to specific operation types. Set["read"]to allow onlygetandlistoperations, physically preventing the LLM from executing charges or refunds. - Tag Filtering (
config.tags): Scope the server to specific functional areas. Set["customers"]to expose directory tools while hiding financial transaction tools. - Token Expiry (
expires_at): Create short-lived, ephemeral MCP servers by passing an ISO datetime. Truto automatically schedules a background cleanup task to permanently invalidate the URL at the exact second of expiration. - Layered Authentication (
require_api_token_auth): By default, the cryptographically hashed URL acts as the authentication token. For high-security environments, enable this flag to require the caller to also pass a valid Truto API token in theAuthorizationheader, preventing unauthorized access if the URL leaks.
High-Leverage ChargeDesk Tools for AI Agents
Truto exposes ChargeDesk endpoints as dynamically generated, descriptive snake_case tools. The flat input namespace allows query and body parameters to be passed cleanly by the LLM.
Here are the most powerful operations to expose to ChatGPT:
1. Execute Live Gateway Charges
Tool: create_a_charge_desk_gateway_charge
This is the live gateway mutation method. It charges a customer's card on file through the connected payment gateway. It requires the using, amount, currency, and customer.id fields. If you want to start a subscription instead, the LLM can pass product.interval.
"Charge customer ID cus_8910 for $150 USD using their default card on file. This is for the annual maintenance fee."
2. Process Gateway Refunds
Tool: charge_desk_gateway_charges_refund
This tool processes a refund for a previously captured charge and synchronizes the state with the originating payment gateway.
"Issue a full refund for charge ID ch_4567. The customer reported they were billed twice in error."
3. Cancel Active Subscriptions
Tool: charge_desk_gateway_subscriptions_cancel
Cancels future recurring charges through the original payment gateway. This is critical for churn management workflows.
"Cancel the subscription sub_999 effective immediately, and pull the latest customer record to confirm the status."
4. Retrieve Comprehensive Customer Profiles
Tool: get_single_charge_desk_customer_by_id
Returns the full customer record, including their manage_url (a hosted page where the customer can update their payment methods). This is useful for support agents generating self-service links.
"Find the customer record for ID cus_123 and generate a summary containing their email and their hosted billing management URL."
5. Audit Agent Activity Logs
Tool: list_all_charge_desk_agent_activity_logs
Retrieves the internal audit trail of actions performed within the ChargeDesk account, such as manual refunds, edits, and overrides. Critical for security monitoring and anomaly detection.
"List the last 50 agent activity logs to see who manually approved the refund for charge ch_777."
6. Trigger Transaction Notifications
Tool: charge_desk_charges_email
Sends a contextual email notification to the customer based on the charge status. Paid charges send a receipt; refunded charges send a refund notice.
"Trigger an email receipt to the customer for charge ch_123."
To view the complete schema definitions and the full inventory of available operations, visit the ChargeDesk Integration Page.
Workflows in Action
By connecting these tools to ChatGPT, you can build autonomous agents capable of executing complex financial support workflows.
Scenario 1: Resolving a Billing Dispute and Issuing a Refund
When a support request comes in regarding a duplicate charge, the AI agent can autonomously investigate, execute the refund, and notify the customer.
"A user emailed saying they were charged twice yesterday. Their customer ID is cus_555. Find the duplicate charges, refund the second one, and send them an email receipt of the refund."
list_all_charge_desk_charges: The agent searches for charges associated withcustomer_id: "cus_555"over the last 48 hours.charge_desk_gateway_charges_refund: The agent identifies two identical charges and executes the gateway refund on the secondcharge_id.charge_desk_charges_email: The agent triggers the official ChargeDesk refund notification email to the customer.
sequenceDiagram participant Agent as ChatGPT Agent participant MCP as Truto MCP Server participant CD as ChargeDesk API Agent->>MCP: Call tool (list_all_charge_desk_charges)<br>customer_id=cus_555 MCP->>CD: GET /v1/charges?customer_id=cus_555 CD-->>MCP: Returns charge array MCP-->>Agent: ToolResult (charge data) Agent->>MCP: Call tool (charge_desk_gateway_charges_refund)<br>charge_id=ch_999 MCP->>CD: POST /v1/charges/ch_999/refund CD-->>MCP: Returns refunded charge MCP-->>Agent: ToolResult (success)
Scenario 2: Processing a Subscription Cancellation and Audit
A user requests to close their account. The agent handles the cancellation and audits the internal logs to ensure compliance.
"Cancel subscription sub_444. Once canceled, fetch the agent activity logs to verify the cancellation event was recorded properly."
charge_desk_gateway_subscriptions_cancel: The agent terminates the recurring billing schedule on the gateway.list_all_charge_desk_agent_activity_logs: The agent pulls the recent audit trail to confirm anaction_typematching the cancellation was permanently logged in the system.
The agent returns a natural language summary to the operator, confirming the subscription is closed and the system of record reflects the change.
Strategic Wrap-up
Connecting ChargeDesk to ChatGPT using a managed MCP server fundamentally changes how teams interact with their financial operations. By decoupling the integration architecture from your core business logic, you avoid writing brittle, point-to-point scripts for every gateway mutation or customer query. Truto handles the dynamic tool generation, token management, and standardized error mapping, allowing your engineering team to focus entirely on designing the AI agent's orchestration logic and security constraints. Whether you are building an internal FinOps copilot or a customer-facing billing assistant, an API-driven MCP architecture provides the control and scale required for production workloads.
FAQ
- What is the easiest way to connect ChargeDesk to ChatGPT?
- The best way to connect ChargeDesk to ChatGPT is Elaichi: connect ChargeDesk to Elaichi once, then add Elaichi to ChatGPT as a connector. Two steps, about a minute, with a 14-day free trial and no credit card required.
- How do I handle API rate limits when connecting ChargeDesk to ChatGPT?
- Truto passes HTTP 429 rate limit errors directly to the caller and normalizes upstream rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Truto does not retry or throttle requests automatically; your AI agent or orchestration logic must implement its own backoff strategy.
- Can I restrict ChatGPT to only read data from ChargeDesk?
- Yes. When generating the MCP server, you can set method filters (e.g., config.methods: ["read"]) so the server only exposes safe GET or LIST operations, completely removing the LLM's ability to mutate billing records.
- What is the difference between a ChargeDesk charge and a Gateway charge?
- In ChargeDesk, creating a 'charge' simply logs an external record of a payment. To actually charge a customer's card on file through your connected payment gateway (like Stripe or Braintree), you must use the gateway charge methods.