วิธีสร้าง API Key สำหรับเชื่อมต่อกับเว็บไซต์
How to Create an API Key for Website Integration
-
เข้าสู่ระบบ Beam Lighthouse บนเดสก์ท็อป
Log in to Beam Lighthouse on desktop.
-
ไปที่เมนู </> นักพัฒนา และเลือก API Keys ร้านค้าจะเห็นรายการ API Keys ทั้งหมดที่ถูกสร้างไว้
Go to the </> Developers menu and select API Keys. You will see a list of all created API Keys.
-
คลิก สร้าง API Key
Click Create API Key.
- ใส่ชื่อ Key และคลิก Create
Enter a name for the key and click Create.
-
คลิก Show และคัดลอก Key เพื่อนำไปใช้เชื่อมต่อกับเว็บไซต์
Click Show and copy the key to use for your website integration.
วิธีตั้งค่า Webhook
- ไปที่แท็บ Webhook
Go to the Webhook tab.
- คลิก สร้างการตั้งค่า Webhook กรอกข้อมูล Endpoint URL (https://) สำหรับรับ Webhook จากระบบ
Click Create Webhook Settings Fill in Endpoint URL (https://) to receive Webhooks from the system
-
คำอธิบาย เพื่อช่วยจดจำ
Description for easier reference
- ในส่วน Events ที่ต้องการใช้งาน ให้เลือก Event ให้ตรงกับ API ที่ใช้งาน
Under Events, select the event that matches the API you are using:-
charge.succeeded → สำหรับ Charge API V1
charge.succeeded → for Charge API V1
-
payment_link.paid → สำหรับ Payment Link API V1
payment_link.paid → for Payment Link API V1
-
charge.succeeded → สำหรับ Charge API V1
- จากนั้นคลิก สร้าง เพื่อบันทึกการตั้งค่า
Then click Create to save the configuration.
วิธีคัดลอก HMAC Key จาก Endpoint
How to Copy the HMAC Key from Endpoint
สำหรับร้านค้าที่จะต้องใช้ Secret Key (HMAC Key) โดย Secret Key ในที่นี้คือ HMAC Key ซึ่งจะได้รับหลังจากตั้งค่า Webhook เรียบร้อยแล้ว
For merchants who are required to use the Secret Key (HMAC Key).The Secret Key in this case refers to the HMAC Key, which is generated after completing the Webhook setup.
คลิกเข้าไปที่ Endpoint และคัดลอก HMAC Key เพื่อนำไปใช้งาน
Click on the Endpoint and copy the HMAC Key for use
หมายเหตุ: บทบาทของผู้ใช้งานที่มีสิทธิ์ตั้งค่า API Key และ Webhook
คือบทบาทเจ้าของบัญชี (Account Owner), นักพัฒนา (Developer)
และบทบาทที่กำหนดเอง (Custom Roles)