@@ -5,76 +5,70 @@ description: "Real-time notifications for payment lifecycle events and request s
5
5
6
6
## Overview
7
7
8
- Webhooks provide real-time notifications when payment and request events occur, enabling immediate response to status changes without polling.
8
+ Webhooks provide real-time notifications when payment and request events occur, enabling immediate response to status changes without constant polling.
9
9
10
- ## Supported Events
10
+ ## Event Categories
11
11
12
12
<CardGroup cols = { 2 } >
13
13
<Card title = " Payment Events" icon = " credit-card" >
14
- Payment detected, confirmed, failed
14
+ Payment confirmation, processing, failures
15
15
</Card >
16
-
16
+
17
17
<Card title = " Request Events" icon = " file-invoice" >
18
- Request created, updated, cancelled
18
+ Recurring request generation
19
+ </Card >
20
+
21
+ <Card title = " Compliance Events" icon = " shield-check" >
22
+ KYC status and bank account verification
23
+ </Card >
24
+
25
+ <Card title = " Crypto-to-fiat Events" icon = " exchange-alt" >
26
+ Offramp processing and settlement
19
27
</Card >
20
28
</CardGroup >
21
29
22
30
## How It Works
23
31
24
32
``` mermaid
25
33
graph LR
26
- A[Event Occurs] --> B[Webhook Triggered]
27
- B --> C[HTTP POST]
28
- C --> D[Your Endpoint]
29
- D --> E[Process Event]
34
+ A[Payment/Request Event] --> B[Webhook Triggered]
35
+ B --> C[HMAC Signature]
36
+ C --> D[HTTP POST to Your Endpoint]
37
+ D --> E[Signature Verification]
38
+ E --> F[Process Event]
39
+ F --> G[Return 200 OK]
30
40
```
31
41
32
- ** Flow :**
33
- 1 . ** Event:** Payment or request status changes
34
- 2 . ** Trigger :** Automatic webhook activation
35
- 3 . ** Delivery :** HTTP POST to your endpoint
36
- 4 . ** Process :** Handle event in your application
42
+ ** Process :**
43
+ 1 . ** Event occurs :** Payment confirmed, request created, compliance updated
44
+ 2 . ** Secure delivery :** HMAC-signed POST to your configured endpoint
45
+ 3 . ** Your processing :** Verify signature, update application state
46
+ 4 . ** Reliable delivery :** Automatic retries with exponential backoff
37
47
38
- ## Event Types
48
+ ## Development Setup
39
49
40
- ### Payment Events
41
- - ` payment.detected ` - Payment transaction found
42
- - ` payment.confirmed ` - Payment confirmed on blockchain
43
- - ` payment.failed ` - Payment transaction failed
50
+ ### Local Testing
51
+ - ** Portal testing: ** Send test webhooks from Request Portal
52
+ - ** ngrok integration: ** Receive webhooks locally during development
53
+ - ** Signature verification: ** Always validate ` x-request-network-signature ` header
44
54
45
- ### Request Events
46
- - ` request.created ` - New request created
47
- - ` request.updated ` - Request information changed
48
- - ` request.cancelled ` - Request cancelled by creator
55
+ ### Security Requirements
56
+ - ** HTTPS endpoints only ** for production webhook URLs
57
+ - ** SHA-256 HMAC verification ** using your webhook signing secret
58
+ - ** Return 2xx status code ** for successful processing (200, 201, etc.)
49
59
50
- ## Webhook Configuration
51
-
52
- ### Endpoint Requirements
53
- - ** HTTPS Only:** Secure webhook endpoints required
54
- - ** Response Codes:** Return 200-299 for successful processing
55
- - ** Timeout:** Respond within 30 seconds
56
-
57
- ### Retry Logic
58
- - ** Automatic Retries:** Failed deliveries retried with backoff
59
- - ** Maximum Attempts:** Up to 5 retry attempts
60
- - ** Retry Schedule:** 1min, 5min, 25min, 2hr, 12hr
61
-
62
- ## Security Features
60
+ ## Used In
63
61
64
62
<CardGroup cols = { 2 } >
65
- <Card title = " Signature Verification " icon = " shield-check " >
66
- HMAC signatures for authenticity
63
+ <Card title = " EasyInvoice Demo " href = " /use-cases/invoicing " >
64
+ Complete webhook implementation example
67
65
</Card >
68
66
69
- <Card title = " IP Allowlisting " icon = " network-wired " >
70
- Restrict webhook sources
67
+ <Card title = " Real-time Dashboards " href = " /use-cases/checkout " >
68
+ Instant payment status updates
71
69
</Card >
72
70
</CardGroup >
73
71
74
- ## Implementation Examples
75
-
76
- See EasyInvoice webhook handling for real-world integration patterns.
77
-
78
72
## Implementation Details
79
73
80
- See [ API Reference - Webhooks] ( /api-reference/webhooks ) for complete technical documentation.
74
+ See [ API Reference - Webhooks] ( /api-reference/webhooks ) for complete technical documentation, payload schemas, and signature verification examples .
0 commit comments