Event Service Overview
Overview
The Event Service processes inbound webhook notifications from payment processors using the Node.js SDK. Instead of polling for status updates, webhooks deliver real-time notifications when payment states change.
Business Use Cases:
Payment completion - Receive instant notification when payments succeed
Failed payment handling - Get notified of declines for retry logic
Refund tracking - Update systems when refunds complete
Dispute alerts - Immediate notification of new chargebacks
Operations
Process webhook from payment processor. Verifies and parses incoming connector notifications.
Receiving webhook POST from Stripe, Adyen, etc.
SDK Setup
const { EventClient } = require('hyperswitch-prism');
const eventClient = new EventClient({
connector: 'stripe',
apiKey: 'YOUR_API_KEY',
environment: 'SANDBOX'
});Common Patterns
Webhook Processing Flow
Flow Explanation:
Provider sends - When a payment updates, the provider sends a webhook to your endpoint.
Verify and parse - Pass the raw payload to
handleEventfor verification and transformation.Process event - Receive a structured event object with unified format.
Update systems - Update your database, fulfill orders, or trigger notifications.
Webhook Security Example
Next Steps
Payment Service - Handle payment webhooks
Refund Service - Process refund notifications
Dispute Service - Handle dispute alerts
Last updated
Was this helpful?

