Webhooks API
Overview
Webhooks provide real-time notifications about events in the Okinus system, allowing your application to respond immediately to changes in application status, payment events, and order updates.
Event Types and Payloads
Common Event Types
application.approvedapplication.declinedcheckout.completedpayment.processedorder.funded
Validating Webhook Events
🔐 Security: Always validate webhook signatures to ensure events are from Okinus.
const crypto = require('crypto');
function validateWebhook(payload, signature, secret) {
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return signature === expectedSignature;
}
🚨 Common Issues:
- Invalid signatures: Check secret key and payload formatting
- Timeout errors: Ensure your endpoint responds quickly
- SSL certificate issues: Verify HTTPS configuration
- Duplicate processing: Implement idempotency using
tracked_event_id
