เอกสารสำหรับนักพัฒนาที่ต้องการเชื่อมต่อกับระบบ — ทุก API ใช้ รูปแบบ เดียวกัน และยืนยันตัวตนด้วย api_key
ส่ง API Key
ส่งผ่าน Authorization: Bearer <KEY>, ค่า api_key ใน body หรือ query
เรียกใช้งาน
Base URL: https://xdzstore.shop — ทดสอบได้จากตัวอย่างในเอกสารนี้
ขอตัวอย่าง
YOUR_API_KEY
API Key ใช้สำหรับยืนยันตัวตนในการเรียกใช้ API ทุกประเภท (Social API / Accounts API / OTP API)
ยังไม่ได้เข้าสู่ระบบ
เข้าสู่ระบบ หรือ สมัครสมาชิก เพื่อรับ API Key
จัดการ API Key ของคุณ
เช็คยอดเงินคงเหลือในบัญชีของคุณ — ใช้ได้กับทั้ง Social API และ Accounts API (ยอดเงินเดียวกับที่เห็นในหน้าเว็บ)
https://xdzstore.shop/api/user/balance?api_key=YOUR_API_KEYapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyParameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | จำเป็น | API Key ของคุณ (query, Header หรือ body) |
curl "https://xdzstore.shop/api/user/balance?api_key=YOUR_API_KEY"ตัวอย่าง Response
{
"status": "success",
"message": "ok",
"data": {
"balance": 0,
"currency": "THB"
}
}API สำหรับซื้อบัญชีโซเชียล / อีเมลสำเร็จรูป (พร้อมใช้งานทันที)
https://xdzstore.shop/api/accounts
Method: GET / POST
Format: application/json
ทุก endpoint มีโครงสร้างเดียวกัน: GET ผ่าน URL, POST ผ่าน JSON body — คัดลอกตัวอย่าง Code ไปใช้ได้เลย
ดึงรายการสินค้าทั้งหมด (ไม่จำเป็นต้องใช้ API Key แนะนำส่งเพื่อการเก็บประวัติ)
https://xdzstore.shop/api/accounts/products?api_key=YOUR_API_KEYapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyParameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | ไม่บังคับ | API Key ของคุณ (query, Header หรือ body) |
curl "https://xdzstore.shop/api/accounts/products?api_key=YOUR_API_KEY"ตัวอย่าง Response
{
"status": "success",
"message": "ดึงข้อมูลสำเร็จ",
"data": {
"categories": [
{
"id": "30",
"name": "Hotmail - Outlook",
"icon": "https://...",
"products": [
{
"id": "42360",
"name": "Outlook Trusted - OAuth2",
"price": 1.70,
"stock": 46054,
"min": 1,
"max": 1000000,
"description": "..."
}
]
}
]
}
}ซื้อบัญชีจาก product_id รับบัญชีอัตโนมัติทันที
https://xdzstore.shop/api/accounts/buyapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyParameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | จำเป็น | API Key ของคุณ (Header, query หรือ body) |
| product_id | string | จำเป็น | รหัสสินค้า (จาก /products) |
| quantity | int | จำเป็น | จำนวนที่ต้องการซื้อ (default: 1) |
ตัวอย่าง Request
{
"api_key": "YOUR_API_KEY",
"product_id": "42360",
"quantity": 1
}curl -X POST "https://xdzstore.shop/api/accounts/buy" \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_API_KEY","product_id":"42360","quantity":1}'ตัวอย่าง Response
{
"status": "success",
"message": "ซื้อสำเร็จ",
"data": {
"trans_id": "JF465f728224ce11",
"total": 1.70,
"quantity": 1,
"accounts": [
"1000040304952|GUTJXYIFPWLHCNDOMBRKVAQESZ"
]
}
}ดึงประวัติการซื้อบัญชีทั้งหมดของคุณ พร้อมแบ่งหน้า
https://xdzstore.shop/api/accounts/orders?page=1&api_key=YOUR_API_KEYapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyParameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | จำเป็น | API Key ของคุณ (query, Header หรือ body) |
| page | int | ไม่บังคับ | หน้าที่ต้องการ (default: 1) |
| limit | int | ไม่บังคับ | จำนวนต่อหน้า (default: 20, max: 50) |
curl "https://xdzstore.shop/api/accounts/orders?page=1&api_key=YOUR_API_KEY"ตัวอย่าง Response
{
"status": "success",
"message": "ok",
"data": {
"orders": [
{
"trans_id": "JF465f728224ce11",
"product_name": "Outlook Trusted - OAuth2",
"quantity": 1,
"price": "1.70",
"total": "1.70",
"created_at": "2026-08-01 14:30:00"
}
],
"total": 1,
"page": 1,
"per_page": 20,
"total_pages": 1
}
}รหัสข้อผิดพลาดที่อาจเกิดจาก Accounts API
รหัสข้อผิดพลาด
| รหัส | HTTP | ความหมาย |
|---|---|---|
| API Key is required | 401 | ไม่ได้ส่ง API Key |
| Invalid API Key | 403 | API Key ไม่ถูกต้อง |
| Product not found | 404 | ไม่พบสินค้าที่ระบุ |
| Insufficient balance | 400 | ยอดเงินไม่เพียงพอ |
| Out of stock | 400 | สินค้าหมดสต็อก |
| Quantity out of range | 400 | จำนวนเกินช่วงที่กำหนด |
API สำหรับซื้อเบอร์รับ SMS OTP (ยืนยันตัวตนหลายแพลตฟอร์ม) — รับ OTP ภายใน 1-2 นาที
https://xdzstore.shop/api/otp
Method: GET / POST
Format: application/json
ส่ง api_key ผ่าน Header Authorization: Bearer, query หรือ body — ราคาและสต็อกอัปเดตจากผู้ให้บริการทุก 1 นาที
ดึงรายการแพลตฟอร์มและประเทศที่รองรับ พร้อมราคา สต็อก และจำนวนครั้งที่ขาย (ไม่ต้องใช้ API Key ก็ได้ แต่แนะนำให้ส่งเพื่อเก็บประวัติ)
https://xdzstore.shop/api/otp/productsapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyprice) คำนวณจากราคาต้นทุนของผู้ให้บริการ + กำไร% ตามที่ Admin ตั้งไว้ — สต็อกอัปเดตอัตโนมัติทุก 1 นาทีParameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | ไม่บังคับ | API Key ของคุณ (query, Header หรือ body) |
curl "https://xdzstore.shop/api/otp/products"ตัวอย่าง Response
{
"status": "success",
"message": "ok",
"data": {
"profit_rate": 40,
"products": [
{
"product": "Facebook",
"img": "\/assets\/uploads\/otp\/otp_12.webp",
"total_sales": 24,
"locations": [
{
"id": 12,
"location": "Thailand",
"location_img": "\/assets\/uploads\/otp\/otploc_12.webp",
"stock": 1234,
"price": 12.6
}
]
}
]
}
}ซื้อเบอร์สำหรับรับ SMS OTP — ระบบหักเงินอัตโนมัติและส่งคำสั่งซื้อไปยังผู้ให้บริการทันที
https://xdzstore.shop/api/otp/buyapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyกรณีผู้ให้บริการตอบกลับด้วยเบอร์ (number/phone) ระบบจะคืนเบอร์มาทันที — ถ้ายังไม่มี ให้เช็คสถานะด้วย /status จนกว่าจะได้รับ SMS
Parameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | จำเป็น | API Key ของคุณ (Header, query หรือ body) |
| product | string | จำเป็น | ชื่อแพลตฟอร์ม เช่น Facebook, Line (จาก /products) |
| location | string | จำเป็น | ประเทศ เช่น Thailand, USA (จาก /products) |
ตัวอย่าง Request
{
"api_key": "YOUR_API_KEY",
"product": "Facebook",
"location": "Thailand"
}curl -X POST "https://xdzstore.shop/api/otp/buy" \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_API_KEY","product":"Facebook","location":"Thailand"}'ตัวอย่าง Response
{
"status": "success",
"message": "สั่งซื้อสำเร็จ",
"data": {
"order": "17401234565678",
"product": "Facebook",
"location": "Thailand",
"phone": "0812345678",
"price": 12.6,
"balance_remaining": 87.4
}
}เช็คสถานะและ SMS OTP ของออเดอร์ — แนะนำให้เช็คซ้ำทุก 2-3 วินาที
https://xdzstore.shop/api/otp/status?order=ORDER_ID&api_key=YOUR_API_KEYapi_key ผ่าน Header Authorization: Bearer, query หรือ bodystatus: pending (รอ OTP), success (ได้รับ OTP — ดูใน sms), canceled/refund (ยกเลิก + คืนเงิน), expired (เบอร์หมดอายุ)Parameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | จำเป็น | API Key ของคุณ (query, Header หรือ body) |
| order | string | จำเป็น | เลขออเดอร์จาก /buy |
curl "https://xdzstore.shop/api/otp/status?order=ORDER_ID&api_key=YOUR_API_KEY"ตัวอย่าง Response
{
"status": "success",
"message": "ok",
"data": {
"order": "17401234565678",
"product": "Facebook",
"location": "Thailand",
"phone": "0812345678",
"price": 12.6,
"status": "success",
"status_api": "STATUS_OK",
"statussms": "รับ OTP สำเร็จ",
"sms": "รหัสยืนยันของคุณคือ 483921",
"refunded": 0,
"created_at": "2026-08-01 14:30:00"
}
}ยกเลิกออเดอร์ก่อนได้รับ OTP — ระบบคืนเงินอัตโนมัติเมื่อยกเลิกสำเร็จ
https://xdzstore.shop/api/otp/cancelapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyParameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | จำเป็น | API Key ของคุณ (Header, query หรือ body) |
| order | string | จำเป็น | เลขออเดอร์จาก /buy |
ตัวอย่าง Request
{
"api_key": "YOUR_API_KEY",
"order": "17401234565678"
}curl -X POST "https://xdzstore.shop/api/otp/cancel" \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_API_KEY","order":"17401234565678"}'ตัวอย่าง Response
{
"status": "success",
"message": "ยกเลิกออเดอร์เรียบร้อย",
"data": {
"order": "17401234565678",
"refunded": 1
}
}ดึงประวัติการซื้อ OTP ทั้งหมดของคุณ พร้อมแบ่งหน้า
https://xdzstore.shop/api/otp/orders?page=1&api_key=YOUR_API_KEYapi_key ผ่าน Header Authorization: Bearer, query หรือ bodyParameters
| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| api_key | string | จำเป็น | API Key ของคุณ (query, Header หรือ body) |
| page | int | ไม่บังคับ | หน้าที่ต้องการ (default: 1) |
| limit | int | ไม่บังคับ | จำนวนต่อหน้า (default: 20, max: 50) |
curl "https://xdzstore.shop/api/otp/orders?page=1&api_key=YOUR_API_KEY"ตัวอย่าง Response
{
"status": "success",
"message": "ok",
"data": {
"orders": [
{
"order_id": "17401234565678",
"product": "Facebook",
"location": "Thailand",
"phone": "0812345678",
"price": 12.60,
"status": "success",
"sms": "รหัสยืนยันของคุณคือ 483921",
"created_at": "2026-08-01 14:30:00"
}
],
"total": 1,
"page": 1,
"per_page": 20,
"total_pages": 1
}
}รหัสข้อผิดพลาดที่อาจเกิดจาก OTP API
รหัสข้อผิดพลาด
| รหัส | HTTP | ความหมาย |
|---|---|---|
| API Key is required | 401 | ไม่ได้ส่ง API Key |
| Invalid API Key | 403 | API Key ไม่ถูกต้อง |
| Missing required parameters (product, location) | 400 | ไม่ได้ส่ง product หรือ location |
| ไม่พบสินค้านี้หรือสินค้าหมด | 404 | สินค้าไม่มีในระบบหรือปิดขาย |
| สินค้าหมดสต็อก | 400 | สต็อกของประเทศนั้นหมด |
| เครดิตไม่เพียงพอ | 400 | ยอดเงินในบัญชีไม่พอ |
| กรุณาระบุเลขออเดอร์ | 400 | ไม่ได้ส่ง parameter order |
| ไม่พบออเดอร์นี้ | 404 | ไม่มีออเดอร์ในระบบ |
| ไม่สามารถยกเลิกได้ | 400 | ออเดอร์ได้รับ OTP แล้วหรือไม่ใช่สถานะรอ |
| ไม่สามารถเชื่อมต่อ API ผู้ให้บริการได้ | 500 | ผู้ให้บริการไม่ตอบสนอง |