SanestlyPay

open source

Give AI agents spending power. Keep control.

What it does

SanestlyPay sits between your agent and the money. Every payment request is evaluated against policy before a provider is called: ALLOW, DENY, or REQUIRES_APPROVAL. Approvals are single-use, budgets are reserved atomically, and ambiguous provider outcomes are reconciled - never guessed.

The public Playground is a credential-free mock sandbox with nine scenarios and an audit timeline. The same gateway code runs locally with one command; SDKs wrap one OpenAPI contract so behavior stays identical across languages.

What is inside

  • FastAPI gateway with HMAC signing, idempotency, and scoped keys (agent / approver / operator)
  • Atomic budget reservations and single-use approvals - no self-approval, no double-settle
  • Interactive mock Playground: nine scenarios, visitor isolation, audit timeline
  • SDKs for Python, Node.js, PHP, Ruby, Rust, Java, and Swift
  • MCP server plus LangChain, OpenAI, CrewAI, AutoGen, and LlamaIndex examples
  • Mock-first: real providers (Stripe Issuing, x402) activate only with your credentials

What are agentic payments

Agentic payments are transactions an AI agent initiates on your behalf - buying a SaaS seat, topping up an API balance, paying an invoice its workflow approved. The hard part is not the payment; it is that 'the agent may spend X, on Y, after Z approves' has to be enforced by a machine, not written in a prompt the agent can reinterpret.

Card networks and protocols (x402, agent payment initiatives from Visa, Mastercard, Stripe) are standardizing the rails. Policy - who may spend what - stays your problem either way.

A payment policy engine, not a checkout

Every payment request is evaluated before any provider is called: ALLOW, DENY, or REQUIRES_APPROVAL. Approvals are single-use, budgets are reserved atomically, and an agent can never approve its own spend. When a provider outcome is ambiguous, the gateway reconciles - it never guesses.

The audit trail records every decision with the policy version that produced it, so 'why did the agent spend this' has an answer, not a shrug.

AI agent spending limits that survive a retry loop

A spending limit that lives in the agent's instructions fails the first time the agent retries. SanestlyPay limits live in the gateway: idempotent requests, atomic budget reservations and scoped keys mean a duplicated tool call cannot double-settle and a burst of retries cannot drain a budget.

Try the sandbox, then run it locally

The public Playground at /pay/demo is a credential-free sandbox: nine scenarios, an audit timeline, nothing real to break. The same gateway then runs locally with one command, and typed SDKs wrap one OpenAPI contract - Python, Node, PHP, Ruby, Rust, Java and Swift behave identically.

Guides and how-tos

Common questions

Does it move real money?

Mock-first by design: real providers like Stripe Issuing or x402 activate only when you supply your own credentials. The playground never touches real payment rails.

Which agent frameworks does it work with?

There is an MCP server plus examples for LangChain, OpenAI Agents, CrewAI, AutoGen and LlamaIndex - anything that can call an HTTP tool can run against the gateway.

Where does it run?

Local-first and self-hosted: a FastAPI gateway you run yourself. Your keys and your audit data stay on your infrastructure.

What happens if the agent requests something ambiguous?

Ambiguous outcomes get REQUIRES_APPROVAL or reconciled explicitly - the gateway never silently guesses whether a payment went through.

More for Open Source

More for WordPress & WooCommerce

More for Wix

More for OpenCart

More for Shopify

Have a workflow that deserves a tool?

Tell us what eats your week. If it is a real problem, we probably think about it already.

Talk to us