Skip to main content
A Payment Intent is the primary spending action in Axis. Your agent calls this endpoint with the amount and recipient details — Axis runs its authorization engine and either approves (debits the wallet, queues settlement) or blocks (records the attempt for audit, returns a 403). No money moves until every authorization check passes.

Authorization checks

Axis evaluates these checks in strict order. The first check that fails blocks the payment immediately — the remaining checks are not evaluated.
  1. Wallet status must be active — inactive wallets cannot make payments
  2. Current time must be before wallet.expiry — expired wallets are permanently blocked
  3. amount must not exceed the wallet’s spendLimitPerTx — per-transaction cap
  4. totalSpent in the current rolling window + amount must not exceed spendLimitPeriod — period cap using the periodWindowDays rolling window
  5. If useAllowlist is true: merchantName must appear in the wallet’s merchant allowlist
  6. amount must not exceed the wallet’s current balance — insufficient funds check

POST /api/payment-intent

Requires an x-api-key header. See API key authentication for how to obtain and pass your key.

Request body

Approved response — 200 OK

When every authorization check passes, Axis debits the wallet and returns the transaction record alongside a settlement reference.

Blocked response — 403 Forbidden

When a check fails, Axis returns a structured error with a machine-readable errorCode. The transaction is still recorded with decision: "blocked" for audit purposes.
All possible errorCode values, in the order the checks are evaluated:

Blocked transactions are still recorded

A blocked attempt is never silently discarded. Axis creates a transaction record with decision: "blocked" and a blockReason field explaining which check failed. This is intentional — the audit trail is complete regardless of outcome, so you can always inspect why a payment was denied.

TypeScript example — calling from an AI agent tool

The snippet below shows how to wrap the endpoint as a tool function in an AI agent. Handle both the approved and blocked paths explicitly so your agent can react appropriately.
See API key authentication for how to create and pass your x-api-key header.