The problem
Agents increasingly need paid capabilities mid-task: an enrichment lookup, a deep-research report, or an unplanned dataset. Without controls, “select a tool” quietly becomes “spend money”, and a timeout can turn into a duplicate charge. A good outcome is an agent that quotes before it buys, stays within an approved cap, executes once, verifies both the charge and the delivered result, and leaves an audit record without secrets.Prompt
Give this to your agent once AIsa is connected via MCP:APIs and Skills used
Through MCP, your agent reaches every operation via a few meta tools athttps://mcp.aisa.one/mcp: search, list_categories, get_details, and batch_quote are free; batch_use (up to 20 calls) is billed per call.
A quote, like
X-AISA-Max-Price-USD over HTTP, checks the estimate before any provider is called; neither caps the final charge of a metered operation. The key’s spending limit in the Console is the hard ceiling.
Machine payments (MPP). On operations that accept MPP, a request without credentials returns HTTP 402 with a WWW-Authenticate: Payment challenge; the agent pays through Tempo and retries with Authorization: Payment <credential>. The live challenge is authoritative for the amount and terms. Not every endpoint accepts MPP, so check the operation first.
Example output
Illustrative only. Operations and amounts are placeholders, not real prices or account records.
Guardrails
- Separate the stages: select, estimate, authorize, execute, verify payment, verify delivery, and audit. Selecting a tool never grants permission to spend, and a successful payment does not prove delivery.
- Policy lives outside the prompt. Enforce allowed capabilities, per-call, per-task, and time-based limits, confirmation thresholds, and fallback rules in code or another trusted layer.
- A quote is not approval, and a missing quote is not free. Re-quote when the operation, arguments, or scope change. Stop if the quote or documented maximum exceeds the remaining budget.
- Execute once and keep identifiers. Preserve request, usage, and transaction IDs. Use idempotency keys only where an endpoint documents them (for example, synchronous Similarweb routes); never change a key to get past a
409. - Reconcile ambiguous outcomes:
- Rejected before acceptance: fix the request or pick another operation.
- No confirmed charge and no result: check status before any retry.
- Charge recorded, result missing: reconcile or contact support; do not repurchase.
- Result present, settlement unclear: keep the result and reconcile the charge separately.
- A network timeout does not prove the request failed before billing.
- Audit without secrets. Record the task, decision, operation, approved and settled amounts, reference IDs, and outcome. Never store API keys, wallet secrets, payment credentials, or bearer tokens.
- When a simpler flow is better: use normal account funding and application-controlled calls when usage is predictable, purchases do not need to happen at runtime, or you cannot reconcile ambiguous payment states.
Related
Machine Payments
MPP for agents paying per request.
Billing & Credits
Quotes, caps, and settled cost.
Error Codes
Safe retry guidance.
Security & Privacy
Agent safety controls.