← Back to AsterPay

Documentation

The trust layer for AI agent payments. 8 security checks. Trust Score 0-100. Fiat in seconds.

What is AsterPay?

AsterPay is The Trust Layer for AI Agent Payments. Every payment passes through 8 security checks: agent identity verification (ERC-8004), sanctions screening (Chainalysis), Trust Score computation, and fiat settlement (EUR/GBP/USD via SEPA Instant). MiCA-compliant. x402 + AP2 protocol support.

5 layers: Verify → Screen → Score → Settle → Comply

Quick Start

Get started in under 2 minutes. The Trust Score API is free — no signup needed.

1. Check an agent's trust score (free, no auth)

# Check any agent wallet — no API key, no payment
curl https://x402-api-production-ba87.up.railway.app/v1/agent/trust-score/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

# Response:
# { "trustScore": 34, "tier": "verified", "maxPerTx": 1000, ... }

2. Create an account & get API keys

Sign up at app.asterpay.io and create a sandbox API key from the dashboard.

3. Test with the API Playground

Use the built-in API Playground to make test requests instantly — no code required.

4. Make your first x402 request

# The x402 flow: request → 402 → pay USDC → retry → 200

# Step 1: Request a paid endpoint (returns 402 + payment requirements)
curl https://x402-api-production-ba87.up.railway.app/v1/market/price/bitcoin

# Step 2: Use @x402/fetch to handle payment automatically
npm install @x402/fetch

5. Submit KYB for production fiat settlement

When you're ready to receive EUR, submit a KYB application from the dashboard. Approval enables stablecoin → fiat settlement to your bank account.

How x402 Works

The x402 payment flow:

  1. Client requests a paid API endpoint
  2. Server responds with 402 Payment Required + payment details (USDC amount, address)
  3. Client signs a USDC transferWithAuthorization on Base
  4. Client retries the request with PAYMENT-SIGNATURE header
  5. Server verifies payment, settles on-chain, returns 200 with data
  6. (Optional) AsterPay converts USDC → EUR via SEPA Instant to your bank

API Reference

Know Your Agent (KYA) — FREE

GET /v1/agent/trust-score/:address FREE

Full agent trust assessment. Returns Trust Score (0-100), tier, breakdown of 7 components, ERC-8004 identity check, sanctions screening, and wallet analysis.

GET /v1/agent/verify/:address FREE

Quick ERC-8004 identity check. Returns whether the agent is registered in the on-chain identity registry on Base.

GET /v1/agent/tier/:address FREE

Fast tier lookup. Returns agent tier (open/verified/trusted/enterprise) and transaction limits.

POST /v1/agent/trust-score/batch FREE

Batch trust assessment for up to 10 agent addresses at once.

GET /v1/agent/framework FREE

Returns the full KYA framework documentation: layers, tiers, score components, and premium endpoints.

Agent Deep Analysis — PREMIUM (x402)

GET /v1/agent/deep-analysis/:address $0.01

Behavioral intelligence: velocity scoring, consistency analysis, funding source risk, actionable recommendations (allow/limit/review/block), and comparative percentile ranking.

POST /v1/agent/deep-analysis/batch $0.05

Batch deep analysis for up to 10 agents. Includes all behavioral signals and recommendations.

Market Data

GET /v1/market/price/:symbol $0.005

Get current price, 24h change, market cap, and volume for any crypto asset.

GET /v1/market/ohlcv/:symbol $0.01

OHLCV candle data (1–90 days). Symbols: BTC, ETH, SOL, USDC, and 20+ more.

GET /v1/market/trending $0.005

Trending coins with price, rank, and 24h change.

AI Tools

POST /v1/ai/summarize $0.004

AI-powered text summarization.

POST /v1/ai/sentiment $0.004

Sentiment analysis on any text.

POST /v1/ai/translate $0.02

AI translation between languages.

POST /v1/ai/code-review $0.05

Automated code review with suggestions.

Crypto Analytics

GET /v1/crypto/wallet-score/:address $0.05

On-chain wallet reputation score.

GET /v1/crypto/token-analysis/:address $0.10

Deep token analysis with holder data and risk assessment.

GET /v1/crypto/whale-alerts $0.02

Real-time large transaction alerts.

Utilities

POST /v1/util/qr-code FREE

Generate QR codes from any data. Free gateway endpoint.

POST /v1/util/screenshot $0.02

Capture a screenshot of any URL.

POST /v1/util/pdf-generate $0.03

Generate PDF documents from HTML/data.

Settlement

GET /v1/settlement/estimate FREE

Get a real-time USDC → EUR conversion estimate.

GET /v1/settlement/quote FREE

Get a settlement quote with fees and delivery time.

Facilitator (x402 v2)

POST /v2/x402/verify

Verify an x402 payment payload.

POST /v2/x402/settle

Settle an x402 payment on-chain.

GET /v2/x402/supported FREE

List supported payment schemes and networks.

Discovery & System

GET /discovery/resources FREE

x402 Bazaar resource discovery (ERC-8004 compatible).

GET /health FREE

Health check.

GET /docs FREE

Interactive Swagger API documentation.

Authentication

x402 Payment (primary)

All paid endpoints use the x402 protocol. No API key needed — payment is the authentication. Your client signs a USDC transaction and includes it in the request header.

API Keys (optional, for tracking)

Create API keys in the dashboard to track usage, set rate limits, and view analytics.

curl -H "Authorization: Bearer sk_sand_your_key" \
     https://x402-api-production-ba87.up.railway.app/v1/market/price/bitcoin
Key PrefixEnvironmentDescription
sk_sand_SandboxTesting, no real payments
sk_live_ProductionReal USDC payments + EUR settlement

Supported Chains

ChainStablecoinsStatus
BaseUSDC, EURC✅ Primary
Base SepoliaUSDC✅ Testnet
EthereumUSDC, EURC, EURCV✅ Supported
PolygonUSDC✅ Supported
SolanaUSDC✅ Supported
XRPLEURCV✅ Supported
BNB ChainUSDC🚧 Q2 2026
MonadUSDC🚧 Roadmap

Fiat Settlement

AsterPay converts your stablecoin earnings to fiat and sends them to your bank account.

Agent Trust Score

Every agent that interacts with AsterPay receives a Trust Score (0-100) based on 8 security checks:

ComponentMax PointsSource
Wallet Age15On-chain (first tx)
Wallet Activity15Transaction count
Sanctions Screening20Chainalysis Oracle (OFAC/EU/UN)
Agent Identity20ERC-8004 on-chain registry
Operator KYB20Off-chain verification
Payment History5AsterPay track record
Trust Bond5Staked collateral

Scores map to access tiers:

TierScoreMax Per TxMax Daily
Open0–19$1$10
Verified20–49$1,000$5,000
Trusted50–79$10,000$50,000
Enterprise80–100UnlimitedUnlimited

SDKs

@asterpay/x402 (TypeScript/JavaScript)

x402 protocol client with AI Agent Wallet and LangChain integration.

# Install
npm install @asterpay/x402

# Usage
import { createX402Client, createAgentWallet } from '@asterpay/x402';

const wallet = createAgentWallet({
  privateKey: process.env.AGENT_KEY,
  network: 'base',
  spendingLimits: { daily: 10 }
});

const client = createX402Client({ wallet });
const response = await client.fetch('https://x402-api-production-ba87.up.railway.app/v1/market/price/bitcoin');

asterpay (Python)

Full Python SDK with async support. CrewAI and LangChain integrations included.

# Install
pip install asterpay

# Usage
from asterpay import AsterPay

client = AsterPay(api_key="sk_live_...")
score = client.discovery.trust_score("0xd8dA...96045")
print(score.trust_score, score.tier)  # 34, "verified"

# Async
import asyncio
from asterpay import AsyncAsterPay

async def main():
    client = AsyncAsterPay(api_key="sk_live_...")
    price = await client.market.get_price("bitcoin")
    print(price)

asterpay-openai-agents (Python)

Payment tools for OpenAI Agents SDK — give your AI agents the ability to pay.

# Install
pip install asterpay-openai-agents

# Usage
from agents import Agent
from asterpay_agents import get_asterpay_tools, AsterPayWallet

wallet = AsterPayWallet(
    private_key=os.environ["AGENT_KEY"],
    network="base",
    daily_limit=10.0
)

agent = Agent(
    name="Shopping Assistant",
    tools=get_asterpay_tools(wallet)
)

Code Examples

Trust Score — cURL (free)

# Get full trust assessment for any wallet
curl https://x402-api-production-ba87.up.railway.app/v1/agent/trust-score/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

# Quick tier check
curl https://x402-api-production-ba87.up.railway.app/v1/agent/tier/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

# Batch check 10 agents at once
curl -X POST https://x402-api-production-ba87.up.railway.app/v1/agent/trust-score/batch \
  -H "Content-Type: application/json" \
  -d '{"addresses": ["0xd8dA...", "0xABC..."]}'

Trust Score — Python

from asterpay import AsterPay

client = AsterPay()
result = client.discovery.trust_score("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")

if result.tier in ("trusted", "enterprise"):
    process_payment(result.wallet)
elif result.screening.sanctioned:
    block_wallet(result.wallet)
else:
    require_additional_verification(result.wallet)

Node.js — Fetch with x402 payment

import { fetchWithPayment } from '@x402/fetch';

const response = await fetchWithPayment(
  'https://x402-api-production-ba87.up.railway.app/v1/ai/summarize',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ text: 'Your text here...' })
  },
  wallet
);

Python — Market data

import requests

# Free endpoint (no payment needed)
r = requests.get("https://x402-api-production-ba87.up.railway.app/v1/settlement/estimate",
    params={"amount": "100"})
print(r.json())  # { "eur": "92.50", "rate": 0.925, ... }

cURL — Check supported networks

curl https://x402-api-production-ba87.up.railway.app/v2/x402/supported

Webhooks

Configure webhooks in the dashboard to receive real-time notifications.

// Webhook payload example
{
  "event": "settlement.completed",
  "transaction_id": "txn_abc123",
  "amount_usdc": "100.00",
  "amount_eur": "92.50",
  "status": "settled",
  "sepa_reference": "ASTER-2026-0213"
}

Dashboard

The AsterPay Dashboard gives you full control:

Infrastructure Partners

Support

We're here to help you integrate fast.