You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Trust your AI Agents to deal with money.
4
+
icon: dollar-sign
5
+
---
6
+
7
+
## Description
8
+
9
+
Payman enables your agents to handle USD payments, manage payment destinations, and handle customer deposits. This tool allows agents to send payments, create payees, manage balances, and generate deposit links for customers.
10
+
11
+
## Example
12
+
13
+
Add the Payman tool with
14
+
```bash
15
+
agentstack tools add payman
16
+
```
17
+
18
+
Set up your environment variables:
19
+
```env
20
+
PAYMAN_API_SECRET=your_api_secret_here
21
+
PAYMAN_ENVIRONMENT=sandbox # or "production" for live environment
22
+
```
23
+
24
+
## Features
25
+
26
+
### Send Payments
27
+
Send USD payments to pre-created payment destinations:
28
+
```python
29
+
response = payman.send_payment(
30
+
amount_decimal=50.00,
31
+
payment_destination_id="dest_123",
32
+
customer_name="John Doe",
33
+
memo="Invoice payment"
34
+
)
35
+
```
36
+
37
+
### Create Payment Destinations
38
+
Set up new payment destinations for US ACH or Payman agent transfers:
39
+
```python
40
+
# Create US ACH payment destination
41
+
ach_payee = payman.create_payee(
42
+
type="US_ACH",
43
+
name="John's Bank Account",
44
+
customer_id="cust_123",
45
+
account_holder_name="John Doe",
46
+
account_holder_type="individual",
47
+
account_number="1234567890",
48
+
routing_number="021000021",
49
+
account_type="checking"
50
+
)
51
+
52
+
# Create Payman agent destination
53
+
agent_payee = payman.create_payee(
54
+
type="PAYMAN_AGENT",
55
+
name="Partner Agent",
56
+
payman_agent_id="agent_123"
57
+
)
58
+
```
59
+
60
+
### Customer Deposits
61
+
Generate checkout links for customer deposits:
62
+
```python
63
+
deposit_link = payman.initiate_customer_deposit(
64
+
amount_decimal=100.00,
65
+
customer_id="cust_123",
66
+
customer_email="customer@example.com",
67
+
fee_mode="ADD_TO_AMOUNT"
68
+
)
69
+
```
70
+
71
+
### Balance Management
72
+
Check available balances:
73
+
```python
74
+
# Check agent balance
75
+
agent_balance = payman.get_spendable_balance()
76
+
77
+
# Check customer balance
78
+
customer_balance = payman.get_customer_balance(
79
+
customer_id="cust_123"
80
+
)
81
+
```
82
+
83
+
### Search Payment Destinations
84
+
Find existing payment destinations:
85
+
```python
86
+
destinations = payman.search_destinations(
87
+
name="John",
88
+
customer_id="cust_123",
89
+
contact_email="john@example.com"
90
+
)
91
+
```
92
+
93
+
## Available Functions
94
+
95
+
The Payman tool provides the following core functions:
96
+
97
+
-`send_payment()`: Send USD payments to payment destinations
98
+
-`create_payee()`: Create new payment destinations (US ACH or Payman Agent)
99
+
-`search_destinations()`: Search for existing payment destinations
0 commit comments