- Sign up at app.paymanai.com to create an AI Agent and obtain your API Key.
- Set environment variables (
PAYMAN_API_SECRET
for your API Key,PAYMAN_ENVIRONMENT
for sandbox or production).
Overview
The PaymanAI integration is part of thelangchain-community
(or your custom) package. It allows you to:
- Send payments (
send_payment
) to crypto addresses or bank accounts. - Search for payees (
search_payees
). - Add new payees (
add_payee
). - Request money from customers with a hosted checkout link (
ask_for_money
). - Check agent or customer balances (
get_balance
).
Integration details
Class | Package | Serializable | JS support | Version |
---|---|---|---|---|
PaymanAI | langchain_community | ❌ | ❌ | [PyPI Version] |
Setup
- Install the
langchain-community
(or equivalent) package:
- Install the PaymanAI SDK:
- Set environment variables:
PAYMAN_API_SECRET
should be the secret key from app.paymanai.com. The PAYMAN_ENVIRONMENT
can be sandbox
or production
depending on your usage.
Instantiation
Here is an example of instantiating a PaymanAI tool. If you have multiple Payman methods, you can create multiple tools.Invocation
Invoke directly with args
You can calltool.invoke(...)
and pass a dictionary matching the tool’s expected fields. For example:
Invoke with ToolCall
When used inside an AI workflow, the LLM might produce aToolCall
dict. You can simulate it as follows:
Using the Tool in a Chain or Agent
You can bind a PaymanAI tool to a LangChain agent or chain that supports tool-calling.Quick Start Summary
- Sign up at app.paymanai.com to get your API Key.
-
Install dependencies:
-
Export environment variables:
- Instantiate a PaymanAI tool, passing your desired name/description.
-
Call the tool with
.invoke(...)
or integrate it into a chain or agent.