For developers building agents

The policy layer between your agent and any payment rail

One open-source engine. Budgets, categories, schedules, approvals. Plugs in front of Stripe, x402, or your own checkout. Same engine, unified budget, every rail.

Apache-2.0 · Self-hosted or SaaS · 9 framework guides · MCP-compatible

One call before the payment

Wrap any payment rail. The engine returns approve / deny / pending with an audit trail. No SDK lock-in — the REST API is two endpoints.

Python — Stripe in front

from letagentpay import LetAgentPay
import stripe

lap = LetAgentPay(token="agt_...")

result = lap.request_purchase(
    amount=49.99,
    category="cloud",
    description="GPU credits, runpod.io",
)

if result.status == "auto_approved":
    stripe.PaymentIntent.create(
        amount=4999, currency="usd",
        # ...your Stripe call
    )
elif result.status == "pending":
    # human approval flow
    show_pending_to_user(result.id)
else:
    suggest_cheaper_alternative(agent)

TypeScript — Vercel AI SDK tools

import { generateText } from "ai";
import { createLetAgentPayTools } from "@letagentpay/ai";

const tools = createLetAgentPayTools(process.env.LAP_TOKEN!);

await generateText({
  model: anthropic("claude-sonnet-4-6"),
  tools, // requestPurchase, checkBudget,
         // listCategories, myRequests,
         // confirmPurchase
  prompt: "Top up our GPU credits if budget allows.",
});

Why this isn't just if amount > limit

Stateful budgets

Atomic Redis counters with PostgreSQL reconciliation. Per-request, daily, weekly, monthly, total — all checked together, no race conditions.

Category resolution

Custom per-account categories with AI alias matching. Free-form descriptions resolve to your taxonomy, orphans flagged for review.

Schedule + auto-approve

Cron-like windows per category. Threshold-based auto-approve for routine spend, escalation to human for unusual.

Multi-rail under one engine

x402 USDC settlement and fiat purchases share the same budget and policy. Switch rails without rewriting governance.

Pending request flow built in

Email/push/Telegram approval channels. Action tokens with TTL, atomic approval, full audit log — not a hack.

Open-source and self-hostable

Apache-2.0. Run on your own Postgres + Redis with docker-compose, or use the hosted SaaS. Same code, same APIs.

Works with your stack

Native packages and integration guides for the frameworks agent builders actually use.

Python SDK
letagentpay (PyPI)
TypeScript SDK
letagentpay (npm)
Vercel AI SDK
@letagentpay/ai
MCP Server
letagentpay-mcp
OpenAI Agents SDK
guide + example
LangChain
guide + example
CrewAI
guide + example
Google ADK
guide + example
Stripe (governance)
guide + example

Get a token, ship in an afternoon

Free during early access. Magic-link signup, no credit card.