The API to authorize, limit, and settle autonomous AI spend.
Axis is the machine-to-machine financial firewall. Configure spending caps, approved merchant vectors, and period windows—then let the policy engine authorize every transaction in under 20 milliseconds.
Autonomous Safety
Eliminate unbound card exposure by granting scoped, hard-capped virtual wallets to agents.
Sub-20ms Evaluation
The 5-check engine verifies limits, balance, and vector similarity before settling to the ledger.
Ähnlich Vector Core
In-memory vector database matches messy prompt merchant intents to corporate allowlists.
5-Minute Quickstart
Provision your first agent wallet and execute an authorized payment intent.
Provision Wallet
Create an agent wallet in the dashboard with spend caps and approved vendor domains.
Copy API Key
Secure the secret `ax_live_...` key. Inject it into your agent's environment runtime.
Send Payment Intent
Call the payment intent endpoint from your agent code or tool execution schema.
import { Axis } from "useaxis";
// Initialize the Axis client with your scoped wallet API key
const axis = new Axis({
apiKey: process.env.AXIS_API_KEY!, // ax_live_...
});
// Authorize agent spend in < 20ms
const decision = await axis.paymentIntent.create({
amount: 45000, // ₦45,000.00
merchantName: "vercel.com", // Vendor domain
recipientAccountNo: "0123456789", // NIP account number
recipientBankCode: "058", // CBN bank code (GTBank)
reason: "Monthly serverless edge deployment",
});
if (decision.status === "approved") {
console.log("Settlement Ref:", decision.settlement.reference);
} else {
console.error("Blocked by policy:", decision.blockedReason);
}Authentication
Every request to Axis requires an x-api-keyHTTP header. This key is cryptographically tied to a single virtual wallet and inherits all of that wallet's spending policies.
x-api-key: ax_live_YOUR_WALLET_SECRET_KEYIf an API key is compromised, revoke it immediately in the Axis Dashboard. Revocation takes effect instantly across all authorization nodes.
Core Concepts
How Axis safeguards funds without human-in-the-loop latency bottlenecks.
Virtual Agent Wallet
A segregated balance provisioned for a single autonomous agent. Features a dedicated virtual account (Wema Bank via Korapay) for automatic funding and an isolated ledger partition.
Per-Transaction Limit (spendLimitPerTx)
The maximum allowable amount (in Naira) for any single payment intent. Requests exceeding this threshold are blocked immediately with code SPEND_LIMIT_PER_TX_EXCEEDED.
Rolling Period Cap (spendLimitPeriod)
The cumulative expenditure ceiling across a rolling window (e.g. ₦100,000 per 30 days). Axis dynamically aggregates ledger transactions within the active window.
Semantic Merchant Allowlist
A list of authorized vendors. When enabled, agent intents are matched via Ähnlich Cosine Similarity against approved domains (e.g. vercel.com, aws.amazon.com).
The 5-Check Pipeline
Every payment intent is programmatically validated against 5 sequential checks in < 20ms before hitting the ledger:
Verifies the wallet is active and not expired.
Validates amount ≤ spendLimitPerTx ceiling.
Aggregates rolling spend + intent ≤ spendLimitPeriod.
Evaluates merchant Cosine Similarity & category policy.
Ensures sufficient funded balance before execution.
Ähnlich Vector Intelligence
Autonomous agents generate unstructured, fuzzy prompts like "Pay for AWS Frankfurt GPU cluster" instead of canonical domains like aws.amazon.com. Axis embeds Ähnlich—an in-memory vector database and similarity search engine—to resolve merchant intents and categories in sub-2ms mathematical precision.
Lightweight sentence embeddings generating 384-dimensional dense vectors in < 1ms.
Normalized dot product matching fuzzy vendor names to corporate allowlists.
TypeScript SDK (useaxis)
Install the official lightweight SDK for Node.js, Deno, Bun, and Next.js environments.
import { Axis } from "useaxis";
// Initialize the Axis client with your scoped wallet API key
const axis = new Axis({
apiKey: process.env.AXIS_API_KEY!, // ax_live_...
});
// Authorize agent spend in < 20ms
const decision = await axis.paymentIntent.create({
amount: 45000, // ₦45,000.00
merchantName: "vercel.com", // Vendor domain
recipientAccountNo: "0123456789", // NIP account number
recipientBankCode: "058", // CBN bank code (GTBank)
reason: "Monthly serverless edge deployment",
});
if (decision.status === "approved") {
console.log("Settlement Ref:", decision.settlement.reference);
} else {
console.error("Blocked by policy:", decision.blockedReason);
}AI Agent Tool Calling
Expose payment capabilities to Vercel AI SDK, LangChain, AutoGen, CrewAI, or raw OpenAI Function Calling:
import { tool } from "ai";
import { z } from "zod";
import { Axis } from "useaxis";
const axis = new Axis({ apiKey: process.env.AXIS_API_KEY! });
// Expose spending tool to OpenAI, Claude, or Gemini agents
export const axisPayTool = tool({
description: "Authorize and execute an autonomous payment for software, hosting, or services.",
parameters: z.object({
amount: z.number().describe("Spend amount in Naira (e.g. 15000)"),
merchantName: z.string().describe("Target vendor domain (e.g. vercel.com, aws.amazon.com)"),
recipientAccountNo: z.string().describe("10-digit NIP destination bank account"),
bankName: z.string().optional().describe("Bank name or alias (e.g. GTBank, Zenith)"),
reason: z.string().describe("Justification prompt for this expenditure"),
}),
execute: async ({ amount, merchantName, recipientAccountNo, bankName, reason }) => {
return await axis.paymentIntent.create({
amount,
merchantName,
recipientAccountNo,
reason,
});
},
});/api/payment-intentRequest spend authorization and programmatic settlement on behalf of an autonomous agent. Evaluated deterministically against all configured wallet policies.
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| amount | number | Yes | Spend amount in Naira (e.g. 45000 = ₦45,000.00) |
| merchantName | string | Yes | Target vendor domain e.g. 'vercel.com' |
| recipientAccountNo | string | No | Destination 10-digit NIP bank account number |
| recipientBankCode | string | No | 3-digit CBN bank code e.g. '058' (GTBank) |
| bankName | string | No | Bank name alias (e.g. 'GTBank', 'Zenith') |
| reason | string | No | Agent reasoning prompt or transaction justification |
Interactive Policy Simulator
Select a real-world scenario to simulate the Axis policy engine and Ähnlich vector matching response:
Error Codes Dictionary
When a payment is blocked by policy, the response body includes a structured code.
WALLET_DEACTIVATEDHTTP 403Wallet status is marked as deactivated or the defined validity expiry timestamp has lapsed.
SPEND_LIMIT_PER_TX_EXCEEDEDHTTP 403Requested amount exceeds the configured per-transaction expenditure ceiling.
PERIOD_BUDGET_EXCEEDEDHTTP 403Cumulative spend within the rolling period window has reached its hard cap.
MERCHANT_NOT_ALLOWEDHTTP 403Merchant vector failed Ähnlich similarity matching against allowed domain vectors.
INSUFFICIENT_BALANCEHTTP 402The wallet's virtual ledger account has insufficient funds to settle the requested intent.
INVALID_API_KEYHTTP 401The provided x-api-key header is missing, malformed, or has been revoked.