Webhook

Notification webhook

API สำหรับรับ notification ในกรณีต่างๆ ที่ทาง Betworld จะส่งกลับไปหาดีลเลอร์แพลตฟอร์ม

POST https://{your-domain}/notification-webhook

API path สามารถ provide ได้ตามที่คุณต้องการ ไม่จำเป็นต้องเหมือนตัวอย่าง

Request body เป็น json

การ verify signature สามารถดูได้ที่ Signature verification

Headers

Name
Type
Description

x-casino-signature*

String

เป็น string ที่ได้จากการ hash request body ด้วย authentication key ที่ได้รับจาก Betworld

Request Body

Name
Type
Description

type*

String

ประเภทของ notification

data*

Object

รายละเอียดของ notification

{
    "message": "success"
}

ตัวอย่าง Request ตามประเภทของ Notification

ระบบจะส่ง notification ตาม % คงเหลือของแก๊สขั้นต่ำที่ดีลเลอร์ต้องซื้อครั้งแรก (แก๊สขั้นต่ำ 100,000 gas) ตามนี้ 20% ~ 20,000 gas 15% ~ 15,000 gas 10% ~ 10,000 gas 5% ~ 5,000 gas 0% ~ 0 gas

{
    "type": "gas",
    "data": {
        "alert_percent": 10, // % แก๊สคงเหลือ จาก 100,000 
        "currency": "thb",
        "remaining": 9837.09 // แก๊สคงเหลือ
    }
}

Last updated