- 稳定性
- 稳定
- 作用域
- 全局
- 边界
- packages/integrations/webhooks
https://api.example.com/v1/hooks
活跃上次投递 2 分钟前最近投递5
| 状态 | 事件 | 状态码 | 尝试次数 | 延迟 | 时间 |
|---|---|---|---|---|---|
| 2xx | invoice.paid | 200 | 1/5 | 184ms | 2 分钟前 |
| 2xx | user.created | 201 | 1/5 | 142ms | 5 分钟前 |
| subscription.canceled | 503 | 3/5重试中 | 4,821ms | 刚刚 | |
| 4xx | user.updated | 429 | 2/5 | 312ms | 12 分钟前 |
| 5xx | invoice.paid | 500 | 5/5 | 1,204ms | 1 小时前 |
99.2% 成功 · p95 248ms · HMAC 签名
使用方式webhooks.ts
typescriptwebhooks.ts
1import { getWebhooks } from "@nebutra/webhooks";
2
3const webhooks = await getWebhooks();
4
5await webhooks.sendEvent({
6 id: crypto.randomUUID(),
7 eventType: "user.created",
8 payload: { userId: user.id, email: user.email },
9 timestamp: new Date().toISOString(),
10 tenantId: org.id,
11});