Webhooks and signatures
We POST events to your server as they happen. Check the signature on every one.
Add an address under Settings › Developers › Webhooks and choose events (or all). Each event is JSON:
{
"id": "evt_…",
"type": "charge.success",
"livemode": false,
"created_at": "2026-11-17T09:30:00.000Z",
"data": { … }
}Check the signature
Each request has Paygent-Signature: t=<unix seconds>,v1=<hex>, where v1 is the HMAC-SHA256 of <t>.<raw body> with your endpoint's secret. Compare it in constant time and refuse old timestamps:
import { createHmac, timingSafeEqual } from 'node:crypto';
export function verify(rawBody, header, secret) {
const { t, v1 } = Object.fromEntries(header.split(',').map(p => p.split('=')));
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const want = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
return want.length === v1.length && timingSafeEqual(Buffer.from(want), Buffer.from(v1));
}Also sent: Paygent-Event-Id and Paygent-Event-Type. Use the event id to ignore repeats.
Retries
Answer with any 2xx within a few seconds. Otherwise we retry after 1, 5, 30, 120 and 480 minutes and a day. You can resend any event from the dashboard.
Events
charge.success, charge.failed, transfer.success, transfer.failed, payout.paid, payout.failed, refund.processed, refund.failed, dispute.created, dispute.closed, invoice.sent, invoice.paid, subscription.created, subscription.cancelled, card.transaction.
paygent