Skip to content

Operations Copilot ​

Natural language operations intelligence for tenant admins. Ask questions about your payments, recipients, and balances in plain English.

Chat Endpoint ​

POST /api/v1/chat

bash
curl -X POST https://api.paystream.fi/api/v1/chat \
  -H "Authorization: Bearer psk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "How many payments failed this week?",
    "userType": "tenant_admin"
  }'

Response:

json
{
  "data": {
    "response": "## Failed Payments This Week\n\n| Status | Count | Total |\n|...",
    "suggestedActions": [
      "Show me the failed payment details",
      "What's my success rate this week?"
    ]
  }
}

Supported Queries ​

IntentExample Questions
Payment Summary"How many payments today?", "Total paid this month"
Failed Payments"Show failed payments", "Why did payments fail?"
Payment Lookup"Status of PAY-123", "John's payments"
Pending Payments"Pending payments over $500"
Balance"What's my balance?", "How much is available?"
Success Rate"Success rate this month?", "Failure rate today"
Recipients"How many active recipients?", "Recipients by KYC status"
Help"What can you do?", "Show me examples"

Parameters ​

The copilot extracts parameters from natural language:

  • Time windows: "today", "this week", "last 7 days", "this month"
  • Amounts: "$500", "over 1000", "$5,000"
  • Payment IDs: "PAY-xxx" or hex IDs
  • Names: "payments for John Smith"

User Types ​

User TypeAI Service
tenant_adminOperations Copilot (analytics + operations)
platform_adminOperations Copilot (analytics + operations)
recipientSupport Agent (payout status + help)

Get Suggestions ​

GET /api/v1/chat/suggestions

Returns contextual suggested questions based on current data.

Chat History ​

GET /api/v1/chat/history

Returns previous chat messages for the current session.

Released under the MIT License.