🔌 Developer API & Webhooks

Tài Liệu Tích Hợp API

Tích hợp đổi thẻ cào tự động sang USDT BEP20 cho website, ứng dụng hoặc Telegram Bot của bạn với tốc độ < 30 giây.

🔒 1. Xác thực (Authentication)

Tất cả các API ngoại trừ endpoint public GET /api/rate đều yêu cầu truyền header X-API-KeyX-API-Secret trong mỗi HTTP Request.

curl -X GET "https://doitheusdt.com/api/user/me" \ -H "X-API-Key: dtusdt_live_xxx" \ -H "X-API-Secret: sec_xxx"
GET /api/rate — Lấy tỷ giá USDT/VND realtime (Public)
// Response (200 OK) { "vndPerUsdt": 26000, "source": "live", "updatedAt": 1784981900000 }
POST /api/card/submit — Nộp thẻ cào gạch thẻ tự động

Body (JSON): { "telco": "VIETTEL", "amount": 100000, "pin": "123456789012", "serial": "987654321098" }

// Response (200 OK) { "success": true, "requestId": "req_884920482", "status": "processing", "telco": "VIETTEL", "amount": 100000, "message": "Thẻ đã được tiếp nhận và đang xử lý" }
GET /api/card/status/:requestId — Kiểm tra trạng thái thẻ cào
// Response (200 OK) { "requestId": "req_884920482", "status": "success", // success | failed | processing "receivedVnd": 85000, "usdtAmount": 3.26, "netUsdt": 3.10 }
POST /api/withdraw — Rút USDT về ví BEP20 qua API

Body (JSON): { "walletAddress": "0x...", "amount": 50 }

// Response (200 OK) { "success": true, "withdrawId": "wd_992019", "status": "completed", "txHash": "0x8f2a...", "netAmount": 49.00 }
🏠 Đổi thẻ 📊 Tài khoản 💸 Rút tiền 📋 Lịch sử