Ready to watch your AI agent move money? Letβs go. This quickstart helps you send your first payment using test wallets (TSD) in either TypeScript or Python.
π οΈ Prerequisites
Before writing code, you need to set things up:
- π Request an invite and sign in
- π In the dashboard, toggle Developer Mode β this activates TSD wallets
- π§ Go to the Apps tab and register a new app
- Add at least one test payee (type:
Test Rails
)
- Configure your wallets and choose a policy
- π Copy your Client ID and Client Secret from the Credentials tab
Youβre ready to build.
π¦ Start Building!
1. Install the SDK
npm install @paymanai/payman-ts
2. Set up your .env
PAYMAN_CLIENT_ID=your-client-id
PAYMAN_CLIENT_SECRET=your-client-secret
3. Send Your First Payment
import { PaymanClient } from "@paymanai/payman-ts";
import "dotenv/config";
const payman = PaymanClient.withCredentials({
clientId: process.env.PAYMAN_CLIENT_ID!,
clientSecret: process.env.PAYMAN_CLIENT_SECRET!,
});
async function runDemo() {
try {
const wallets = await payman.ask("List all wallets and their balances");
console.log("π° Wallets:", wallets);
const payee = await payman.ask("Create a payee of type Test Rails named John Doe");
console.log("π€ Payee Created:", payee);
const payees = await payman.ask("List all payees");
console.log("π All Payees:", payees);
const payment = await payman.ask("Send 10 TSD to John Doe");
console.log("β
Payment Sent:", payment);
} catch (err: any) {
console.error("β Error:", err.message);
}
}
runDemo();
4. Run it
1. Install the SDK
npm install @paymanai/payman-ts
2. Set up your .env
PAYMAN_CLIENT_ID=your-client-id
PAYMAN_CLIENT_SECRET=your-client-secret
3. Send Your First Payment
import { PaymanClient } from "@paymanai/payman-ts";
import "dotenv/config";
const payman = PaymanClient.withCredentials({
clientId: process.env.PAYMAN_CLIENT_ID!,
clientSecret: process.env.PAYMAN_CLIENT_SECRET!,
});
async function runDemo() {
try {
const wallets = await payman.ask("List all wallets and their balances");
console.log("π° Wallets:", wallets);
const payee = await payman.ask("Create a payee of type Test Rails named John Doe");
console.log("π€ Payee Created:", payee);
const payees = await payman.ask("List all payees");
console.log("π All Payees:", payees);
const payment = await payman.ask("Send 10 TSD to John Doe");
console.log("β
Payment Sent:", payment);
} catch (err: any) {
console.error("β Error:", err.message);
}
}
runDemo();
4. Run it
1. Install the SDK
2. Set up your .env
PAYMAN_CLIENT_ID=your-client-id
PAYMAN_CLIENT_SECRET=your-client-secret
3. Send Your First Payment
import os
from payman_sdk.client import PaymanClient
from dotenv import load_dotenv
load_dotenv()
config = {
"client_id": os.getenv("PAYMAN_CLIENT_ID"),
"client_secret": os.getenv("PAYMAN_CLIENT_SECRET")
}
client = PaymanClient.with_credentials(config)
def run_demo():
try:
wallets = client.ask("List all wallets and their balances")
print("π° Wallets:", wallets)
payee = client.ask("Create a payee of type Test Rails named John Doe")
print("π€ Payee Created:", payee)
payees = client.ask("List all payees")
print("π All Payees:", payees)
payment = client.ask("Send 10 TSD to John Doe")
print("β
Payment Sent:", payment)
except Exception as e:
print("β Error:", str(e))
run_demo()
π Thatβs It
You just:
- Set up the SDK
- Created a test payee
- Sent money using Payman!
β
Ready for production? Just switch from TSD wallets to USD/USDC, and use your Live Credentials!