AEP2 PlaygroundLearn how embedded payment works step by step

💡 Deferred Payment Concept: The server returns results immediately (Step 3), while the payment transaction is settled on-chain later (Step 4). This enables fast API responses without waiting for blockchain confirmation.

Step 1

Create AI Debit Wallet

AI Debit Wallet

An ai wallet that allows your ai agent to spend your funds — assign a debit balance to your ai for autonomous payments.

Connect MetaMask or any Web3 wallet

Step 2

Sign Payment Mandates

Please connect your wallet in Step 1 first

Step 3

API Request → Immediate Response

ETH Price Prediction API

This is a pay-per-use API that provides 5-minute ETH price predictions based on crypto market–driven large-model forecasts.

GET /predict - ETH-USD Price Oracle

âš¡ Fast Response: API returns results immediately. Payment is settled on-chain later (see Step 4).

HTTP Headers

How to use:
  1. Sign a mandate in the Wallet panel
  2. Copy the Base64 encoded mandate
  3. Paste it into the X-Payment-Mandate header
  4. Click "Send Request" to get the ETH-USD price
Step 4

On-Chain Settlement (Later)

On-Chain Settlement

Disconnected

Payments enqueued in Step 3 are settled here on-chain. This happens after the API response.

Latest Mandates

No mandates yet
Signed mandates will appear here
SP Not Connected

Make sure the Settlement Processor is running:

npm run sp