Developer Documentation

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.

01

Provision Wallet

Create an agent wallet in the dashboard with spend caps and approved vendor domains.

02

Copy API Key

Secure the secret `ax_live_...` key. Inject it into your agent's environment runtime.

03

Send Payment Intent

Call the payment intent endpoint from your agent code or tool execution schema.

agentPayment.ts
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.

Header Specification:
x-api-key: ax_live_YOUR_WALLET_SECRET_KEY

If 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).

DETERMINISTIC EVALUATION

The 5-Check Pipeline

Every payment intent is programmatically validated against 5 sequential checks in < 20ms before hitting the ledger:

01
Wallet Status CheckWALLET_DEACTIVATED

Verifies the wallet is active and not expired.

PASS ✓
02
Per-Tx Limit CheckSPEND_LIMIT_PER_TX_EXCEEDED

Validates amount ≤ spendLimitPerTx ceiling.

PASS ✓
03
Period Budget CheckPERIOD_BUDGET_EXCEEDED

Aggregates rolling spend + intent ≤ spendLimitPeriod.

PASS ✓
04
Ähnlich Vector MatchMERCHANT_NOT_ALLOWED

Evaluates merchant Cosine Similarity & category policy.

PASS ✓
05
Ledger Balance CheckINSUFFICIENT_BALANCE

Ensures sufficient funded balance before execution.

PASS ✓
Sponsored Core Infrastructure
gRPC Connection

Ä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.

Embedding Model:
ALL_MINI_LM_L6_V2

Lightweight sentence embeddings generating 384-dimensional dense vectors in < 1ms.

Similarity Algorithm:
Cosine Similarity (≥ 0.65)

Normalized dot product matching fuzzy vendor names to corporate allowlists.

In-Memory Matching Pipeline:
"Amazon Web Services EU"
Ähnlich Cosine: 0.94
Matched: "aws.amazon.com"
OFFICIAL CLIENT LIBRARIES

TypeScript SDK (useaxis)

Install the official lightweight SDK for Node.js, Deno, Bun, and Next.js environments.

$npm install useaxis
v1.0.1
quickstart.ts
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);
}
AGENT RUNTIMES

AI Agent Tool Calling

Expose payment capabilities to Vercel AI SDK, LangChain, AutoGen, CrewAI, or raw OpenAI Function Calling:

paymentTool.ts
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,
    });
  },
});
POST/api/payment-intent

Request spend authorization and programmatic settlement on behalf of an autonomous agent. Evaluated deterministically against all configured wallet policies.

Request Body Parameters

FieldTypeRequiredDescription
amountnumberYesSpend amount in Naira (e.g. 45000 = ₦45,000.00)
merchantNamestringYesTarget vendor domain e.g. 'vercel.com'
recipientAccountNostringNoDestination 10-digit NIP bank account number
recipientBankCodestringNo3-digit CBN bank code e.g. '058' (GTBank)
bankNamestringNoBank name alias (e.g. 'GTBank', 'Zenith')
reasonstringNoAgent reasoning prompt or transaction justification
LIVE INTERACTIVE PLAYGROUND

Interactive Policy Simulator

Select a real-world scenario to simulate the Axis policy engine and Ähnlich vector matching response:

POST/api/payment-intent
Latency: 1.8ms

Error Codes Dictionary

When a payment is blocked by policy, the response body includes a structured code.

WALLET_DEACTIVATEDHTTP 403

Wallet status is marked as deactivated or the defined validity expiry timestamp has lapsed.

SPEND_LIMIT_PER_TX_EXCEEDEDHTTP 403

Requested amount exceeds the configured per-transaction expenditure ceiling.

PERIOD_BUDGET_EXCEEDEDHTTP 403

Cumulative spend within the rolling period window has reached its hard cap.

MERCHANT_NOT_ALLOWEDHTTP 403

Merchant vector failed Ähnlich similarity matching against allowed domain vectors.

INSUFFICIENT_BALANCEHTTP 402

The wallet's virtual ledger account has insufficient funds to settle the requested intent.

INVALID_API_KEYHTTP 401

The provided x-api-key header is missing, malformed, or has been revoked.

Was this documentation helpful?Help us improve the Axis developer experience.