Authentication & Security

Learn about the required headers and security validation steps for Amwal webhook requests.

Required Headers

Webhook requests from Amwal include these headers:

HeaderDescriptionExample
X-API-KeyAPI key fingerprint8a7d42f1c4e6ba957beec92f2cad51d0b3ec4f8c9a1529e8f35e53a1de1a8b3b
X-SignatureBase64-encoded RSA-PSS signatureeyJhbGciOiJSUzI1NiJ9...
Content-TypeAlways application/jsonapplication/json

Security Validation Steps

  1. Verify X-API-Key - Match with your stored API key fingerprint.
  2. Verify X-Signature - Use RSA-PSS with SHA-256 for payload validation.
  3. Check webhook enablement - Ensure webhooks are active.
  4. Validate payload structure - Confirm required fields.
  5. Implement idempotency - Manage duplicate deliveries.

Signature Verification

  • Algorithm: RSA-PSS (PKCS#1 PSS)
  • Hash Function: SHA-256
  • MGF: MGF1 with SHA-256
  • Salt Length: Auto
  • Encoding: Base64