Skip to main content

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

  1. Navigate to Platform Settings → Webhooks in Request Portal
  2. Click Add webhook
  3. In the dialog that opens, enter URL and click Create webhook
  4. Click copy button to copy Signing Secret to clipboard (see Authentication for API key setup)
  5. 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 the x-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 an explorer field linking to Request Scan for transaction details. Common Fields:
  • requestId / requestID: Unique identifier for the payment request
  • paymentReference: Short reference, also unique to a request, used to link payments to the request
  • timestamp: ISO 8601 formatted event timestamp
  • paymentProcessor: Either request-network (crypto) or request-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.

Testing

Portal Testing

  1. Go to Platform Settings → Webhooks in Request Portal
  2. Create a webhook if you haven’t already
  3. Select the webhook event type and click Send test event
  4. Monitor your endpoint logs for test requests

Test Webhook Identification

Test webhooks include the x-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
Webhooks not received:
  • 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

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