Webhooks
Signed payment events, retries और duplicate-safe consumers।
Payment success event
After an order is authoritatively settled, the webhook service queues a payment.success event. It is sent only for a verified transaction. Current payload fields are:
{
"id": "evt_REPLACE_UUID",
"type": "payment.success",
"created_at": "2026-10-08T12:01:00.000000Z",
"data": {
"payment_id": "pay_REPLACE_UUID",
"merchant_order_id": "order_2026_0001",
"status": "SUCCESS",
"amount": "499.00",
"currency": "INR",
"utr": "PROVIDER_REFERENCE",
"provider": "paytm",
"verified_at": "2026-10-08T12:01:00.000000Z"
}
}
Signature headers
Deliveries use X-iPay-Event-Id, X-iPay-Timestamp, and X-iPay-Signature. The signature is sha256= followed by HMAC-SHA256 of timestamp + "." + canonical JSON body, using the endpoint secret. The secret is encrypted at rest by the application and is not returned after creation.
$timestamp = $_SERVER['HTTP_X_IPAY_TIMESTAMP'] ?? '';
$signature = $_SERVER['HTTP_X_IPAY_SIGNATURE'] ?? '';
$body = file_get_contents('php://input');
$expected = 'sha256=' . hash_hmac('sha256', $timestamp . '.' . $body, $webhookSecret);
$valid = hash_equals($expected, $signature);
Retries and idempotency
Queued delivery accepts any 2xx response. Failures are retried with delays of 60, 300, 900, and 3600 seconds, up to the configured maximum (five by default). Store the event ID and ignore an already-processed event before applying business effects. A browser success redirect is not a webhook acknowledgement.
The current merchant workspace exposes a webhook page, while endpoint delivery is handled by the server-side webhook service. Endpoint provisioning and event selection should be treated as deployment/configuration work until the corresponding merchant management route is enabled.