Skip to main content
Webhooks are HTTP callbacks that notify your application when events occur in Zentra. Use them to update your database, trigger workflows, and keep your app in sync.

What You’ll Learn

  • Set up webhook endpoints
  • Verify webhook signatures
  • Handle different event types
  • Build reliable webhook processing
  • Debug common issues

Prerequisites

  • A publicly accessible server (or ngrok for local development)
  • Webhook endpoint URL configured in the Developer Console

Webhook Flow

Step 1: Create Your Webhook Endpoint

Set up an endpoint to receive webhook events:
Always verify webhook signatures. Without verification, attackers could send fake events to your endpoint.

Step 2: Handle Event Types

Process different events based on their type:

Step 3: Implement Event Handlers

Payment Success

Virtual Account Credited

Transfer Completed

Webhook Events Reference

Payment Events

Transfer Events

Virtual Account Events

Card Events

Identity Events

Best Practices

1. Respond Quickly

Return a 200 status immediately, then process asynchronously:

2. Handle Retries

Zentra retries failed webhooks with exponential backoff:
  • 1st retry: 5 minutes
  • 2nd retry: 30 minutes
  • 3rd retry: 2 hours
  • 4th retry: 8 hours
  • 5th retry: 24 hours
After 5 failed attempts, the webhook is marked as failed. You can manually retry from the dashboard.

3. Store Raw Events

Save raw webhook data for debugging:

4. Use Idempotency

Always check if you’ve already processed an event:

Testing Webhooks

Local Development with ngrok

Trigger Test Events

Use the dashboard or CLI to send test webhooks:

Next Steps

Webhook API

API reference

Event Types

All event types

Verify Signatures

Signature verification

Going Live

Production checklist