Webhook masuk, peristiwa siap dipakai.
Tentukan tipe data payload, ulangi pengiriman yang gagal, dan jalankan kembali peristiwa yang tercatat.
curl --json @evt_1042.json https://relay.example.com/in/billing
Gratis hingga 100.000 peristiwa per bulan.
{"…Raw webhookinvoice.paidTyped event503 ┄┄Retry, waiting
Satu alur untuk semua penyedia
Setiap webhook tampil dengan tipe data serta status pengirimannya.
Empat fungsi dalam satu alur
Alur yang menghubungkan penyedia peristiwa ke endpoint Anda.
Setiap payload dibaca, lalu setiap kolom diberi tipe.
evt_1042.json
{
"type": "invoice.paid",
"id": "evt_1042",
"amount": 960000,
"currency": "IDR",
"paid_at": "2026-10-08T09:42:16Z"
}
invoice-paid.ts
// inferred from evt_1042
export type InvoicePaid = {
type: "invoice.paid";
id: string;
amount: number;
currency: "IDR";
paid_at: string;
};
When your endpoint is down, Relay holds evt_1042 and tries again: a 503, a timeout, then 200 OK.
- 503Service Unavailable in 2.1 s
Attempt 1, 09:42:18 - 10.0 sNo answer, timed out
Attempt 2, 09:42:48 - 200OK in 182 ms
Attempt 3, 09:43:48
Pilih peristiwa lama untuk dikirim kembali langsung dari alur.
Putar ulang
invoice.paidevt_1042- Event
evt_1042, invoice.paid- Destination
https://example.com/hooks/billing
Payload dikirim ulang sesuai data yang disimpan
09:58:14Replayedevt_1042200 OK164 ms09:31:02Replayedevt_0987200 OK201 ms08:12:40Replayedevt_0961200 OK176 ms
curl --json @evt_1042.json https://example.com/hooks/billing
Setiap penyedia memakai alamatnya sendiri. Semua peristiwa terkumpul dalam satu alur.
| Source | Posts to | Event types seen | Last event |
|---|---|---|---|
| shop.example.com | relay.example.com/in/shop | order.created order.shipped | 09:42:31 |
| billing.example.com | relay.example.com/in/billing | invoice.paid refund.issued | 09:42:18 |
| crm.example.com | relay.example.com/in/crm | customer.updated contact.merged | 09:41:55 |
| forms.example.com | relay.example.com/in/forms | form.submitted | 09:39:40 |
All four deliver to https://example.com/hooks
100.000 peristiwa gratis per bulan
Hubungkan handler bertipe
Respons 200 menandai keberhasilan. Respons lain akan dicoba ulang.
app/hooks/billing/route.tsYour endpoint
import type { InvoicePaid } from "./invoice-paid";
export async function POST(req: Request) {
const event = (await req.json()) as InvoicePaid;
console.log(event.id, event.amount, event.currency);
return new Response(null, { status: 200 });
}
evt_1042.