What is SoutiPay?
SoutiPay exposes your payment operations as an AI-orchestrated mesh. Every transaction flows through purpose-built agents that reason, adapt, and act — replacing rigid rule engines with intelligent automation.
Platform architecture
All requests enter through the API Gateway and are dispatched to the X8004 Agent Mesh. Agents communicate over X402 and write to the canonical Ledger. External rails are accessed only through the Rail Abstraction layer.
X8004 Agents
The X8004 suite is a collection of specialized autonomous agents, each owning a specific domain of your payment operations. Agents run continuously, communicate over X402, and expose REST endpoints for direct orchestration.
Agent runtime status
| Agent ID | Name | Status | Invocations / 24h | P99 Latency | X402 Calls |
|---|---|---|---|---|---|
| X8004-RT | Router | Active | 2.4M | 12ms | — |
| X8004-GD | Guard | Active | 2.4M | 38ms | 44k |
| X8004-LG | Ledger | Active | 4.9M | 8ms | 210k |
| X8004-MR | Merchant | Active | 18k | 420ms | 3.1k |
| X8004-FX | FX | Active | 340k | 22ms | 88k |
| X8004-NC | Notify | Degraded | 1.8M | 95ms | — |
X402 Protocol
X402 extends HTTP with a machine-readable payment layer. It allows agents and API consumers to request, negotiate, and complete payments inline — without out-of-band orchestration. When a resource requires payment, the server responds 402 Payment Required with a structured payload describing the exact payment terms.
{
"x402Version": "1",
"accepts": [{
"scheme": "exact",
"network": "soutipay",
"maxAmount": "1000",
"asset": "USDC",
"payTo": "spay:merchant_id",
"extra": {
"description": "API access fee",
"agent": "X8004-LG"
}
}],
"error": null
}
{
"x402Version": "1",
"scheme": "exact",
"network": "soutipay",
"payload": {
"authorization": "0xabcd...ef12",
"amount": "1000",
"asset": "USDC",
"from": "spay:client_wallet",
"nonce": "8f3a91cc"
}
}
Quickstart
Create your first AI-routed payment in under 5 minutes. The SDK handles agent dispatch, X402 negotiation, and receipt verification automatically.
import { SoutiPay } from "@soutipay/sdk"; const client = new SoutiPay({ apiKey: process.env.SOUTIPAY_KEY, agents: { router: "X8004-RT", // enable smart routing guard: "X8004-GD", // enable fraud defense ledger: "X8004-LG", // enable auto-reconcile }, x402: { enabled: true, autoSettle: true } }); // Create a payment — agents handle routing, fraud, and ledger const payment = await client.payments.create({ amount: 5000, // in minor units currency: "USD", source: { type: "card", token: "tok_live_..." }, destination: { merchant: "mch_abc123" }, metadata: { orderId: "ord_9912" } }); console.log(payment.id); // pay_xk7m... console.log(payment.routedVia); // "SEPA" — selected by X8004-RT console.log(payment.riskScore); // 0.04 — assessed by X8004-GD
autoSettle: true, the SDK will autonomously authorize and complete X402 payment handshakes on behalf of your application. Set maxAutoSettleAmount to cap autonomous spend.
// Call the Guard Agent directly for pre-auth risk assessment const risk = await client.agents.guard.score({ amount: 15000, currency: "EUR", ip: "41.89.202.10", device: { fingerprint: "dfp_abc..." }, merchant: "mch_abc123" }); if (risk.score > 0.7) { // High risk — trigger 3DS before proceeding await client.agents.guard.challenge({ paymentId: risk.ref }); }
API reference
Base URL: https://api.soutipay.com/v3 — All endpoints require a Bearer token. Agent-dispatched calls include an X-Agent-ID header identifying the originating agent.
Webhooks & agent events
Every significant action taken by an X8004 agent emits a structured event to your registered webhook endpoints. Events include the agent ID, decision rationale, and full payload. All events are signed with HMAC-SHA256.
{
"event": "agent.decision",
"agent": "X8004-GD",
"timestamp": "2026-04-01T14:22:11Z",
"payload": {
"paymentId": "pay_xk7m...",
"decision": "block",
"riskScore": 0.94,
"signals": ["velocity_spike", "geo_mismatch"],
"rationale": "Velocity 8x above merchant baseline in 4h window"
}
}
{
"event": "agent.route_selected",
"agent": "X8004-RT",
"timestamp": "2026-04-01T14:22:11Z",
"payload": {
"paymentId": "pay_xk7m...",
"selectedRail": "SEPA",
"costUSD": 0.12,
"latencyMs": 9,
"fallbacks": ["SWIFT", "ACH"]
}
}