Overview
This documentation is intended for AI Agents and third-party systems, describing how to automate product browsing, order creation, and payment confirmation via HTTP API.
All endpoints return JSON. No authentication required.
Base URL
api.php
General Rules
| Rule | Description |
| Request Body | Content-Type: application/json |
| Response | application/json; charset=utf-8 |
| Encoding | UTF-8 |
| CORS | All origins allowed |
| Auth | None, all endpoints are public |
Error Response Format
{
"error": "Error description",
"code": "ERROR_CODE"
}
| Status Code | Meaning |
| 400 | Bad request (insufficient stock, invalid email, etc.) |
| 404 | Resource not found (product or order does not exist) |
Endpoints
GET
/api.php/products
List products with optional filtering by tag, category, price, and stock
GET
/api.php/products/{id}
Get a single product's details
POST
/api.php/orders
Create an order, deduct stock, return USDT payment address
GET
/api.php/orders/{id}
Query order status (pending / paid / delivered)
POST
/api.php/orders/{id}/pay
Confirm an order has been paid (called by AI Agent after on-chain verification)
Step 1 · Browse Products
GET /api.php/products
Query Parameters (optional)
| Parameter | Type | Example | Description |
| tag | string | ?tag=USA&tag=2FA | Filter by tags (can repeat) |
| cat | string | ?cat=Gmail | Filter by category |
| q | string | ?q=old | Search name/tags |
| featured | int | ?featured=1 | Featured products only |
| min_price | float | ?min_price=1 | Minimum price |
| max_price | float | ?max_price=10 | Maximum price |
| stock_min | int | ?stock_min=100 | Minimum stock |
| sort | string | ?sort=price_asc | Sort order |
Sort Options
| Value | Description |
| default | Featured first > Stock desc > Price asc |
| price_asc | Price low → high |
| price_desc | Price high → low |
| stock_desc | Stock high → low |
| stock_asc | Stock low → high |
| name_asc | Name A-Z |
| newest | Newest first |
Example Request
curl -s "api.php/products?cat=Gmail&min_price=1&max_price=5&stock_min=1"
Example Response
{
"products": [
{
"id": 2844,
"name": "Buy Gmail accounts (USA IP | 2FA | PVA)",
"tags": ["USA", "2FA", "PVA"],
"price": 1.50,
"stock": 342,
"image": "https://www.gstatic.com/...",
"category": "Gmail",
"featured": false
}
],
"total": 340
}
Step 2 · Place an Order
POST /api.php/orders
Content-Type: application/json
Request Body
| Field | Type | Required | Description |
| product_id | int | Required | Product ID (from products list) |
| quantity | int | Required | Quantity (≥1) |
| email | string | Required | Email to receive the accounts |
Example Request
curl -s -X POST api.php/orders \
-H 'Content-Type: application/json' \
-d '{
"product_id": 2844,
"quantity": 10,
"email": "[email protected]"
}'
Response 201 (Success)
{
"order_id": 42,
"total": 15.00,
"product_name": "Buy Gmail accounts (USA IP | 2FA | PVA)",
"quantity": 10,
"unit_price": 1.50,
"usdt_address": "TNCer1PzKopxcg26zj1Ao84n6Yp9BuUpPR",
"usdt_network": "TRC-20",
"status": "pending"
}
Response Fields
| Field | Description |
| order_id | Order ID, used for status queries and payment confirmation |
| total | Total amount due (USD) |
| usdt_address | USDT payment address (TRC-20) |
| usdt_network | Network type |
| status | Always returns "pending" |
Error Responses
{ "error": "Insufficient stock", "code": "INSUFFICIENT_STOCK" }
{ "error": "Invalid email address", "code": "INVALID_EMAIL" }
{ "error": "Product not found or unavailable", "code": "PRODUCT_UNAVAILABLE" }
Step 3 · Payment Flow
After placing an order, the AI Agent should follow these steps:
1
Get Payment Info
Extract usdt_address, total, and usdt_network from the order response
↓
2
Transfer on Chain
Send the exact amount of total USDT (TRC-20) to usdt_address via the TRON network
↓
3
Verify Transaction
Check the transaction via TRONGRID API: https://api.trongrid.io/v1/accounts/{address}/transactions
↓
4
Confirm Payment
Call POST /api.php/orders/{id}/pay to update the order status
↓
5
Final Confirmation
Call GET /api.php/orders/{id} to verify the status changed to paid
Step 4 · Confirm Payment
POST /api.php/orders/{id}/pay
Request
No request body required. The AI Agent should call this endpoint after on-chain verification of the USDT transfer.
Example Request
curl -s -X POST api.php/orders/42/pay
Response 200
{
"order_id": 42,
"status": "paid",
"notified": true
}
| Field | Description |
| status | Updated status paid |
| notified | Whether Telegram notification was sent |
Idempotent: Calling this endpoint multiple times on a paid order will not error — it returns the current status.
Step 5 · Query Order
GET /api.php/orders/{id}
Example Request
curl -s api.php/orders/42
Response 200
{
"order_id": 42,
"product_name": "Buy Gmail accounts (USA IP | 2FA | PVA)",
"quantity": 10,
"unit_price": 1.50,
"total": 15.00,
"status": "paid",
"email": "[email protected]",
"created_at": "2026-07-02 18:42:00"
}
Status Flow
| Status | Meaning |
pending | Awaiting payment |
paid | Paid, awaiting delivery |
delivered | Delivered (accounts sent to email) |
AI Agent Complete Workflow
1
Browse Products
GET /api.php/products?cat=Gmail&min_price=1&max_price=5&stock_min=1
← Returns product list [{id: 2844, price: 1.50, stock: 342}]
↓
2
AI Agent Decision
Select product ID, quantity, and target email
↓
3
Create Order
POST /api.php/orders
→ {product_id: 2844, quantity: 10, email: "[email protected]"}
← {order_id: 42, total: 15.00, usdt_address: "TNCer...", status: "pending"}
↓
4
On-Chain Transfer
Send exactly 15.00 USDT (TRC-20) to TNCer...
↓
5
Verify & Confirm
Verify via TRONGRID → POST /api.php/orders/42/pay
← {order_id: 42, status: "paid", notified: true}
↓
6
Final Check
GET /api.php/orders/42 → confirm status: "paid"
Notes
- Product IDs are not sequential — always fetch the latest list via
GET /api.php/products
- Stock is deducted in real time when placing an order; returns
400 if insufficient
- USDT addresses are assigned by
order_id % count round-robin across multiple addresses
- Telegram notifications are automatically sent to the admin upon order creation
- Telegram notifications are also sent when payment is confirmed
- Rate limiting is not yet implemented — please control your call frequency