Nhận thông báo ngay lập tức khi sự kiện xảy ra trong tài khoản Laabam của bạn
Được thông báo ngay lập tức khi sự kiện xảy ra
Tự động thử lại với backoff theo cấp số nhân
Theo dõi trạng thái giao hàng và debug vấn đề
invoice.createdKích hoạt khi tạo hóa đơn mới
Payload Ví Dụ:
{
"invoice_id": "inv_123",
"status": "draft",
"amount": 50000
}invoice.paidKích hoạt khi nhận được thanh toán hóa đơn
Payload Ví Dụ:
{
"invoice_id": "inv_123",
"payment_id": "pay_456",
"amount": 50000
}customer.createdKích hoạt khi thêm khách hàng mới
Payload Ví Dụ:
{
"customer_id": "cust_789",
"name": "John Doe",
"email": "john@example.com"
}payment.failedKích hoạt khi nỗ lực thanh toán thất bại
Payload Ví Dụ:
{
"payment_id": "pay_456",
"reason": "insufficient_funds"
}Đây là cách xử lý webhook trong ứng dụng của bạn:
// Webhook endpoint example (Node.js/Express)
const express = require('express');
const app = express();
app.post('/webhooks/laabam', express.json(), (req, res) => {
const event = req.body;
// Verify webhook signature
const signature = req.headers['x-laabam-signature'];
if (!verifySignature(signature, req.body)) {
return res.status(401).send('Invalid signature');
}
// Handle different event types
switch (event.type) {
case 'invoice.created':
console.log('New invoice:', event.data.invoice_id);
// Your business logic here
break;
case 'invoice.paid':
console.log('Payment received:', event.data.payment_id);
// Update your database, send email, etc.
break;
}
res.status(200).send('Webhook received');
});https://api.yoursite.com/webhooks/laabamGiao Hàng Cuối
2 minutes ago
Tỷ Lệ Thành Công
99.8%
https://staging.yoursite.com/webhooksGiao Hàng Cuối
15 minutes ago
Tỷ Lệ Thành Công
100%
Xây dựng tích hợp thời gian thực với webhook Laabam