Overview
Webhooks deliver real-time notifications when payment and request events occur. Configure your endpoints to receive HMAC-signed POST requests with automatic retry logic and comprehensive event data.Webhook Configuration
Setup in Portal
- Navigate to Platform Settings → Webhooks in Request Portal
- Click Add webhook
- In the dialog that opens, enter URL and click Create webhook
- Click copy button to copy Signing Secret to clipboard (see Authentication for API key setup)
- Enable/disable or delete webhooks as needed
Local Development
Use ngrok to receive webhooks locally:Event Types
See Payload Examples below for detailed webhook structures.
Payment Events
Processing Events
Request Events
Compliance Events
Security Implementation
Signature Verification
Every webhook includes an HMAC SHA-256 signature in thex-request-network-signature header:
Security Requirements
- HTTPS only: Production webhooks require HTTPS endpoints
- Always verify signatures: Never process unverified webhook requests
- Keep secrets secure: Store signing secrets as environment variables
- Return 2xx for success: Any 2xx status code confirms successful processing
Request Headers
Each webhook request includes these headers:Retry Logic
Automatic Retries
- Max attempts: 3 retries (4 total attempts)
- Retry delays: 1s, 5s, 15s
- Trigger conditions: Non-2xx response codes, timeouts, connection errors
- Timeout: 5 seconds per request
Response Handling
Error Logging
Request API logs all webhook delivery failures with:- Endpoint URL
- Attempt number
- Error details
- Final failure after all retries
Payload Examples
All payment events include anexplorer field linking to Request Scan for transaction details.
Common Fields:
requestId/requestID: Unique identifier for the payment requestpaymentReference: Short reference, also unique to a request, used to link payments to the requesttimestamp: ISO 8601 formatted event timestamppaymentProcessor: Eitherrequest-network(crypto) orrequest-tech(fiat)
Payment Confirmed
Payment Processing
Payment Partial
Payment Failed
Compliance Updated
Implementation Examples
For a complete working example, see the EasyInvoice demo which implements webhook handling for payment notifications.- Express.js
- Next.js
Testing
Portal Testing
- Go to Platform Settings → Webhooks in Request Portal
- Create a webhook if you haven’t already
- Select the webhook event type and click Send test event
- Monitor your endpoint logs for test requests
Test Webhook Identification
Test webhooks include thex-request-network-test: true header:
Best Practices
Error Handling
- Implement idempotency: Use delivery IDs to prevent duplicate processing
- Graceful degradation: Handle unknown event types without errors
Performance
- Timeout management: Complete processing within 5 seconds
Troubleshooting
Common Issues
Signature verification fails:- Check your signing secret matches Portal configuration
- Ensure you’re using the raw request body for signature calculation
- Verify HMAC SHA-256 implementation
- Confirm endpoint URL is accessible via HTTPS
- Verify endpoint returns 2xx status codes
Debugging Tips
- Use ngrok request inspector to see raw webhook data
- Monitor retry counts in headers to identify issues
- Test with Portal’s “Send test webhooks” feature
Related Documentation
Webhooks & Events
High-level webhook concepts and workflow
EasyInvoice Demo
Complete webhook implementation example
Authentication
API key setup and webhook security
Payment Processing
Understanding payment lifecycle events
Request Portal
Configure webhooks and manage API keys
Request Scan
Explore transactions and request details