How to Use the Getpaid MCP in LangChain
Build automated billing chains in LangChain that handle checkout creation, invoice tracking, and refunds via Getpaid MCP Server tools.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Getpaid MCP to LangChain
Create your Vinkius account to connect Getpaid to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
LangChain MCP Server Pipelines
The `create_checkout_session` tool initiates the payment flow inside your LangChain agent. Your ReAct pipeline doesn't just stop at generating a link; it passes that session ID directly into a loop checking `get_checkout_status` until the transaction clears. Once the payment settles, the chain automatically hands the output to `list_billing_subscriptions`. You get a complete, traceable sequence in LangSmith showing exactly how long the checkout took and how many tokens the agent burned making the decision.
Automated Refund Logic
The `refund_billing_payment` tool executes money movement directly from your agent's decision node. You feed customer support tickets into the chain, and the agent pulls transaction metadata using `get_payment_details`. If the rules match, the agent fires the refund tool and logs the state change. You don't write custom API wrappers for Getpaid; the MCP adapter translates the schema, letting the agent chain execute the return instantly.
Customer Data Retrieval
The `get_customer_details` tool feeds live user profiles into your prompt templates. When a user asks about their billing history, the agent calls `list_billing_invoices` and formats the array into a readable summary. You bind these tools directly to the LLM using the standard LangChain interface. The agent decides when to fetch the active webhook configurations via `list_payment_webhooks` and when to just read the cached invoice list.
Set up Getpaid MCP in LangChain
Prerequisites
- Python 3.10+ installed
-
langchain-mcp-adapters+langgraphpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChainBaseToolobjects. - 2
Connect via HTTP transport
Use
MultiServerMCPClientwith"transport": "http"pointing to your Vinkius endpoint. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Create a ReAct agent
Pass the discovered tools to
create_react_agent()from LangGraph. The agent automatically routes Getpaid tool calls through the MCP protocol. - 4
Run with any LLM
Swap
ChatOpenAIforChatAnthropic,ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
async with MultiServerMCPClient({
"getpaid-mcp": {
"transport": "http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
result = await agent.ainvoke({
"messages": "List recent Getpaid transactions"
})
print(result["messages"][-1].content) Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Getpaid. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Getpaid MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Getpaid MCP today
We host it, we monitor it, we maintain it. You just paste one token.