๐ API Integration
Konnect Payment Webhook Documentation
Endpoint Overview
When a payment is processed through Konnect, a webhook is triggered to notify your system about the payment status.
Webhook Request Details
Request Type
- Method: GET
- Endpoint:
https://your_webhook.com
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
payment_ref | String | Unique payment reference ID | Yes |
Example of your endpoint
https://www.monsite.tn/module/konnect/webhook?payment_ref=5f9498735289e405fc7c18ac
Handling the Webhook
Step 1: Retrieve Payment Reference
Extract the payment_ref
from the query parameters of the webhook request.
Step 2: Check Payment Status
Use the retrieved payment_ref
to fetch the payment status:
Common Errors
Error | Possible Cause | Solution |
---|---|---|
Invalid Payment Reference | Incorrect or expired payment_ref | Verify the reference ID, ensure it's valid and recent |
Webhook Not Received | Network issues, firewall blocking | Check network configuration, ensure webhook endpoint is accessible |
Authentication Failure | Incorrect API credentials | Verify API keys and permissions |
Timeout | Slow server response | Implement proper timeout handling, check server performance |
Debugging Tips
- Log all incoming webhook requests
- Implement robust error handling
- Verify webhook endpoint accessibility
- Check network and firewall configurations
Best Practices
- Always validate the
payment_ref
- Implement idempotency to handle duplicate webhooks
- Use secure HTTPS for webhook endpoint
- Log and monitor webhook interactions