API For Vendor
Endpoint
Production : https://api.p2wtopup.com/
Sandbox : https://api.2wtopup.com/
Authentication
ทุก Endpoint ต้องส่ง Header ดังนี้
{
"Content-Type" : "application/json",
"Authorization" : "Bearer <token>"
}GET Game Topup Products
สำหรับดึงข้อมูลเกมที่เปิดให้บริการ
GET : {endpoint}/vendor/products
// Response
{
"products": [{
"id": "hsr",
"name": "Honkai: Star Rail",
"status": "sale", // sale, suspend
"providers": [{
"id": "lapak", // lapak, oneone, razer, wepay, uid
"form": [{
"input_type": "textbox",
"name": "uid"
},{
"input_type": "select",
"name": "server",
"option": [
{ "value": "881", "text": "Asia" },
{ "value": "882", "text": "America" },
{ "value": "883", "text": "Europe" },
{ "value": "884", "text": "TW, HK, MO" }
]
}]
}, ... ]
}, ... ]
}GET Packages
สำหรับดึงข้อมูล Packages ที่เปิดขาย
GET: {endpoint}/vendor/products/{product_id}
Change Package (Webhook)
webhook สำหรับ update ข้อมูลเมื่อมีการเปลี่ยนแปลงค่า package
Topup Game
สร้างคำสั่งซื้อ
POST: {endpoint}/vendor/topup
Get Topup Status
สอบถามสถานะการสั่งซื้อ
GET: {endpoint}/vendor/topup/{ref_id}
Update Topup Status (Webhook)
Webhook สำหรับ update สถานะการเติมเงิน
Last updated