Troubleshooting Webhook Delivery & Timeout Failures
When an installment payment link is paid or a refund is processed, Amwal sends an HTTP POST event to your configured Webhook URL. If your server is not receiving events, use the troubleshooting steps below.
This retry schedule disagrees with the Webhook Overview page
Webhook Overview documents a 5-attempt schedule of 1 min / 5 min / 30 min / 2 hours (~2.5 hours total). This page below says 1 min / 5 min / 15 min / 1 hour / 6 hours. Neither was confirmed against real retry behavior in live testing — what was confirmed is that Amwal delivered every successful event twice on the first attempt (duplicate delivery, not a retry after failure — see Refund an Installment and the pipeline's live findings). Treat the exact retry timing on this page as unverified until reconciled with the Overview page.
Webhook Delivery Lifecycle & Retry Policy
Amwal Gateway enforces an exponential backoff retry policy for endpoints that fail or time out:
Common Root Causes & Resolutions
1. Endpoint Timeout (> 5,000ms)
- Symptom: Amwal records an
ETIMEDOUTorHTTP 504status for your webhook endpoint. - Root Cause: Your server performs synchronous, heavy database transactions or 3rd-party ERP calls before returning an HTTP response to Amwal.
- Resolution:
- Immediately respond with
HTTP 200 OKupon receiving and verifying the webhook signature. - Offload order fulfillment, inventory adjustments, and email notifications to an asynchronous background job queue (e.g. BullMQ, Celery, Laravel Queue).
- Immediately respond with
2. Invalid or Self-Signed SSL Certificate
- Symptom: Webhook status displays
SSL_CERT_UNTRUSTED. - Root Cause: Amwal's security layer requires valid, trusted SSL/TLS certificates (Let's Encrypt, Cloudflare, DigiCert) and rejects self-signed certificates or expired intermediate chains.
- Resolution:
- Test your SSL health using SSL Labs. Ensure TLS 1.2 or TLS 1.3 is enabled.
3. Firewall or Cloudflare Blocking Amwal IPs
- Symptom: Amwal receives
HTTP 403 Forbiddenfrom Cloudflare or AWS WAF. - Root Cause: Web Application Firewall (WAF) bot-management rules flag incoming server-to-server POST requests without browser cookies.
- Resolution:
- Whitelist Amwal Gateway IP ranges in your Cloudflare / AWS WAF security rules.
- Exclude
/webhook/amwalfrom CSRF token verification in frameworks like Laravel, Django, or Rails.
4. Receiving the Same Event Twice
- Symptom: Your handler processes what looks like the same
order.successororder.updatedevent, twice, with identical payloads and no failure or timeout in between. - Root Cause: Confirmed live — webhook delivery is at-least-once, not exactly-once. A successful delivery can still be sent twice, independent of the retry-on-failure policy above.
- Resolution:
- Make your webhook handler idempotent. The payload doesn't include a dedicated delivery id — the most reliable dedupe key available is a combination of the transaction id and the event's
statusfield, though this is imperfect for events whose payload doesn't change between deliveries (likeorder.success). - Also note: setting
callback_urlalone on a payment link does not deliver anything at all — confirmed live, no webhook and no browser redirect either, until a webhook endpoint is separately registered first via the (currently undocumented in api-reference) API. This page should eventually link to that setup step once it's published — for now, see the pipeline'sreports/live-findings.mdfor the full writeup.
- Make your webhook handler idempotent. The payload doesn't include a dedicated delivery id — the most reliable dedupe key available is a combination of the transaction id and the event's
Viewing Webhook Logs in Merchant Portal
- Log in to Amwal Merchant Portal.
- Go to Developers -> Webhook Endpoints.
- Click on your endpoint to open the Delivery Log.
- Inspect the exact HTTP status code, request payload, response body, and retry history.
- Click "Re-send Event" to manually trigger immediate delivery during testing.
Troubleshooting Webhook Signature Verification Failures
Resolving RSA-PSS SHA-256 signature verification mismatches when receiving webhook events from Amwal Tech.
Troubleshooting Rate Limits & Duplicate Transactions
Handling HTTP 429 Too Many Requests, implementing exponential backoffs, and preventing duplicate charges with idempotency guards.
