API
Get price, availability, discount info, variants, and suggested max_budget for a product before purchasing. No auth required.
https://api.agentmall.sh
{ "title": "Apple Magic Mouse", "price": 6900, "listPrice": 7900, "discountPercent": 13, "currency": "USD", "availability": "In Stock", "retailer": "Amazon.com", "suggestedMaxBudget": 9085, "variants": [{ "label": "Style", "value": "USB-C", "price": 69.00 }] }{ "error": "Missing required query parameter: url" }{ "error": "Rate limited" }{ "error": "Product lookup is temporarily unavailable..." }Place a new order. Payment handled via MPP — first request returns 402 challenge, agent pays, then retries with receipt. Always look up the product first with GET /api/products. Successful responses include a buyerToken for checking order and refund status later.
https://api.agentmall.sh
{ "id": "pur_1Mo5rKYlo2C8xQ", "status": "submitted", "buyerToken": "amtk_..." }{ "id": "pur_1Mo5rKYlo2C8xQ", "status": "submitted", "buyerToken": "amtk_...", "deduplicated": true }WWW-Authenticate: Payment method="tempo", description="Purchase: $79.35 product + $1.50 service fee"
{ "error": "Missing required field: buyer_email" }{ "error": "Payment receipt already used for a different purchase" }{ "error": "Rate limited" }{ "error": "Unable to create purchase" }Retrieve a single purchase using the buyer_token returned by create_purchase. No API key required.
https://api.agentmall.sh
{ "id": "pur_1Mo5rKYlo2C8xQ", "status": "ordered", "items": [{ "productRef": "https://amazon.com/dp/B0DDQJLVJW", "quantity": 1, "title": "SanDisk 64GB Phone Drive", "price": 2499 }], "maxBudget": 5000, "finalTotal": 2499, "tracking": [{ "carrier": "ups", "tracking_number": "1Z999AA10123456784" }], "failureReason": null, "createdAt": 1711036800000 }{ "error": "Missing required field: buyer_token" }{ "error": "Invalid buyer token" }Retrieve a refund using the buyer_token returned by create_purchase. No API key required.
https://api.agentmall.sh
{ "id": "rfd_1Mo5rKYlo2C8xQ", "purchaseId": "pur_1Mo5rKYlo2C8xQ", "amountCents": 1690, "reason": "Order failed: refund full charge of $16.90", "status": "pending", "createdAt": 1711036800000 }{ "error": "Missing required field: buyer_token" }{ "error": "Invalid buyer token" }{ "error": "Not found" }No payment credential. API returns 402 with WWW-Authenticate header containing the payment challenge.
Sends USDC on Tempo to recipient address. Amount = max_budget + $1.50 service fee.
Resends POST with Authorization header containing the payment receipt.
Payment verified on-chain. 201 response returned with Payment-Receipt header.
tempo request -X POST \
-H "Content-Type: application/json" \
--json '{
"items": [{
"product_url": "https://amazon.com/dp/B0DDQJLVJW",
"quantity": 1
}],
"delivery_address": {
"first_name": "Jane",
"last_name": "Doe",
"address_line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"phone_number": "+14155550100",
"country": "US"
},
"max_budget": 5000,
"buyer_email": "jane@example.com"
}' \
https://api.agentmall.sh/api/purchases