วิธีสร้าง 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
Examples:- สำหรับ WooCommerce:
https://{website_url}/wc-api/beamcheckout_order_webhook -
สำหรับ Magento:
https://{website_url}/beamcheckout/payment/webhookหมายเหตุ: ใน{website_url}ให้ใส่ URL เว็บไซต์ของร้านค้า
Note: Replace{website_url}with your store’s website URL
- สำหรับ WooCommerce:
-
คำอธิบาย เพื่อช่วยจดจำ
Description for easier reference
- ในส่วน Events ที่ต้องการใช้งาน ให้เลือก Event ตามด้านล่างนี้
Under Events, select the event as follow.- เลือก (Select): purchase.succeeded (V0) Deprecated
- จากนั้นคลิก สร้าง เพื่อบันทึกการตั้งค่า
Then click Create to save the configuration.
สำหรับการเชื่อมต่อ WooCommerce / Magento ร้านค้าจะต้องใช้ Secret Key (HMAC Key)
โดย Secret Key ในที่นี้คือ HMAC Key ซึ่งจะได้รับหลังจากตั้งค่า Webhook เรียบร้อยแล้ว
For WooCommerce / Magento integration, merchants 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.
วิธีคัดลอก HMAC Key จาก Endpoint
How to Copy the HMAC Key from Endpoint
-
คลิกเข้าไปที่ Endpoint และคัดลอก HMAC Key เพื่อนำไปใช้งาน
Click on the Endpoint and copy the HMAC Key for useหมายเหตุ: บทบาทของผู้ใช้งานที่มีสิทธิ์ตั้งค่า API Key และ Webhook คือบทบาทเจ้าของบัญชี (Account Owner), นักพัฒนา (Developer) และบทบาทที่กำหนดเอง (Custom Roles)