API ที่ให้บริการสำหรับนักพัฒนา
เชื่อมต่อและจำหน่ายสินค้าแบบ Real-time
ระบบ API ประสิทธิภาพสูง รองรับทั้ง แอพพรีเมียม (V1, V2, V3), ปั้มไลค์โซเชียล (SMM), และเบอร์รับ SMS OTP อัตโนมัติ
เชื่อมต่อผ่านโดเมน api.up2premium.com ได้ทันที
API Documentation & Integration
คู่มือและโค้ดตัวอย่าง cURL สำหรับนำไปยิงทดสอบได้ทันที
Base URL
การส่ง API Key เพื่อยืนยันตัวตน
ท่านสามารถส่ง API Key มากับคำขอได้ 3 รูปแบบ (ระบบตรวจจับให้อัตโนมัติ เลือกรวมใน Header หรือ Body หรือ Query ตามความสะดวก):
ตัวอย่างคำขอ cURL พื้นฐาน (ทดสอบดึงยอดเงิน)
curl -X GET "https://api.up2premium.com/api/v1/money" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Accept: application/json"
ตรวจสอบยอดเงินคงเหลือใน Wallet, บัญชีผู้ใช้ และสถานะแพ็กเกจ API
curl -X GET "https://api.up2premium.com/api/v1/money" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Accept: application/json"
curl -X POST "https://api.up2premium.com/api/v1/money" \
-d "keyapi=UP2-YOUR-API-KEY"
Response Example (JSON 200 OK)
{
"status": "success",
"username": "customer_pailin",
"money": "1520.50",
"balance": 1520.5,
"expires_at": "2026-08-08T00:00:00.000000Z",
"days_left": 150
}
ดึงรายการสินค้าแอพพรีเมียมและโปรแกรมทั้งหมด พร้อมราคาขายสำหรับ API และสต็อกคงเหลือแบบเรียลไทม์
| Parameter | Type | Required | Description |
|---|---|---|---|
| provider | string | Optional | กรองสินค้าตามหมวดหมู่: v1, v2, v3 หรือ custom |
curl -X GET "https://api.up2premium.com/api/v1/products" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Accept: application/json"
# ดึงเฉพาะหมวด V2
curl -X GET "https://api.up2premium.com/api/v1/products?provider=v2" \
-H "X-API-Key: UP2-YOUR-API-KEY"
# ดึงเฉพาะหมวด V3
curl -X GET "https://api.up2premium.com/api/v1/products?provider=v3" \
-H "X-API-Key: UP2-YOUR-API-KEY"
Response Example (JSON 200 OK)
{
"status": "success",
"count": 3,
"data": [
{
"id": "TNICNFPJCHEZJXKIJUZM",
"type_id": "TNICNFPJCHEZJXKIJUZM",
"name": "Netflix 4K จอส่วนตัว 30 วัน",
"provider": "v1",
"category": "แอพพรีเมียม",
"price": 120,
"stock": 35,
"image": "https://...",
"description": "ความคมชัดระดับ Ultra HD 4K"
},
{
"id": "V2_12",
"type_id": "V2_12",
"name": "YouTube Premium 30 วัน (เมลร้าน)",
"provider": "v2",
"category": "แอพพรีเมียม",
"price": 45,
"stock": 100,
"image": "https://...",
"description": "ดูวิดีโอไม่มีโฆษณาคั่น"
},
{
"id": "V3_5",
"type_id": "V3_5",
"name": "Spotify Premium รายเดือน",
"provider": "v3",
"category": "แอพและบริการ",
"price": 39,
"stock": 50,
"image": "https://...",
"description": "ฟังเพลงคุณภาพสูงแบบออฟไลน์"
}
]
}
สั่งซื้อสินค้าแอพพรีเมียม โดยระบบจะหักเงินจากยอดเงิน Wallet ของคุณอัตโนมัติ และส่งข้อมูลรหัสกลับมาในผลลัพธ์ทันที
| Parameter | Type | Required | Description |
|---|---|---|---|
| id หรือ type_id | string | Yes | รหัสสินค้า เช่น TNICNFPJCHEZJXKIJUZM, V2_12, หรือ V3_5 |
| username_customer | string | Optional | เลขอ้างอิงหรือชื่อลูกค้าปลายทางของคุณ สำหรับการบันทึกประวัติการสั่งซื้อ |
curl -X POST "https://api.up2premium.com/api/v1/buy" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "TNICNFPJCHEZJXKIJUZM",
"username_customer": "customer_01"
}'
curl -X POST "https://api.up2premium.com/api/v1/buy" \
-d "keyapi=UP2-YOUR-API-KEY" \
-d "id=V2_12" \
-d "username_customer=customer_02"
curl -X POST "https://api.up2premium.com/api/v1/buy" \
-d "keyapi=UP2-YOUR-API-KEY" \
-d "id=V3_5" \
-d "username_customer=customer_03"
Response Example (JSON 200 OK)
{
"status": "success",
"message": "Purchase successful.",
"order_code": "ORD-API-V2-ABC12345",
"product": "YouTube Premium 30 วัน",
"price_paid": 45,
"credentials": "Email: [email protected]\nPassword: Pass1234\nProfile: 1 Pin: 1234",
"balance": 1475.5
}
ดึงรายการบริการปั้มยอดโซเชียลทั้งหมด (Facebook, TikTok, IG, YouTube) พร้อมเรทราคาต่อ 1,000 ยอด
curl -X GET "https://api.up2premium.com/api/v1/smm/services" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Accept: application/json"
Response Example (JSON 200 OK)
{
"status": "success",
"count": 120,
"data": [
{
"service_id": "101",
"name": "Facebook ปั้มไลค์โพสต์ (คนไทยแท้)",
"category": "Facebook",
"rate_per_1000": 35.00,
"min": 50,
"max": 50000
}
]
}
สั่งซื้อบริการปั้มยอดโซเชียลมีเดีย
| Parameter | Type | Required | Description |
|---|---|---|---|
| service_id | string | Yes | รหัสบริการ SMM (เช่น "101") |
| link | string | Yes | ลิงก์โพสต์ หรือ โปรไฟล์ที่ต้องการให้ระบบไปส่งยอด |
| quantity | integer | Yes | จำนวนยอดที่ต้องการสั่ง (ต้องอยู่ระหว่าง Min และ Max ของบริการนั้น) |
curl -X POST "https://api.up2premium.com/api/v1/smm/buy" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"service_id": "101",
"link": "https://www.facebook.com/posts/123456789",
"quantity": 1000
}'
Response Example (JSON 200 OK)
{
"status": "success",
"message": "SMM order placed successfully.",
"order_code": "ORD-API-SMM-X9K21",
"order_id": "954128",
"price_paid": 35.00,
"balance": 1440.50
}
/otp/buy > นำเบอร์ไปกรอกรับ OTP > วนเช็คสถานะข้อความผ่าน /otp/status จนกว่าจะได้รับ > หากไม่ได้รับข้อความ สามารถสั่งยกเลิกคืนเงินเข้า Wallet 100% ผ่าน /otp/cancel
ดึงรายการบริการที่รองรับและราคาต่อเบอร์
curl -X GET "https://api.up2premium.com/api/v1/otp/services" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Accept: application/json"
ซื้อเบอร์รับรหัส OTP
curl -X POST "https://api.up2premium.com/api/v1/otp/buy" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"product": "openai",
"location": "Thailand"
}'
Response Example (JSON 200 OK)
{
"status": "success",
"order": "18492015",
"number": "0812345678",
"price": 12.00,
"balance": 1428.50
}
เช็คสถานะข้อความ SMS ที่ได้รับ (ส่งพารามิเตอร์ order ที่ได้จากขั้นตอนสั่งซื้อ)
curl -X POST "https://api.up2premium.com/api/v1/otp/status" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"order": "18492015"
}'
Response Example เมื่อได้รับ SMS แล้ว
{
"status": "success",
"sms": "Your verification code is 482910",
"code": "482910"
}
ยกเลิกเบอร์ที่ไม่ได้รับข้อความภายในเวลา และคืนเงินเข้า Wallet 100% ทันที
curl -X POST "https://api.up2premium.com/api/v1/otp/cancel" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"order": "18492015"
}'
Response Example (JSON 200 OK)
{
"status": "success",
"message": "Order cancelled and refunded.",
"balance": 1440.50
}
ตรวจสอบประวัติคำสั่งซื้อทั้งหมดที่ทำผ่านระบบ API ของคุณ
curl -X GET "https://api.up2premium.com/api/v1/orders?limit=20" \
-H "X-API-Key: UP2-YOUR-API-KEY" \
-H "Accept: application/json"
Response Example (JSON 200 OK)
{
"status": "success",
"count": 1,
"data": [
{
"order_code": "ORD-API-V2-ABC12345",
"product_name": "YouTube Premium 30 วัน",
"plan_name": "YouTube Premium 30 วัน (API: customer_02)",
"price": 45.00,
"status": "completed",
"credentials": "Email: [email protected]\nPassword: Pass1234\nProfile: 1 Pin: 1234",
"created_at": "2026-03-08T08:30:00.000000Z"
}
]
}