@@ -11,64 +11,86 @@ Webhooks provide real-time notifications when payment and request events occur,
11
11
12
12
<CardGroup cols = { 2 } >
13
13
<Card title = " Payment Events" icon = " credit-card" >
14
- Payment confirmation, processing, failures
14
+ ** Core events:** confirmed, partial, failed, refunded
15
+
16
+ Immediate notification when payments are processed or fail
17
+ </Card >
18
+
19
+ <Card title = " Processing Events" icon = " spinner" >
20
+ ** Crypto-to-fiat:** payment.processing with detailed subStatus
21
+
22
+ Track multi-step fiat conversion progress
15
23
</Card >
16
24
17
25
<Card title = " Request Events" icon = " file-invoice" >
18
- Recurring request generation
26
+ ** Recurring:** request.recurring
27
+
28
+ Automatic subscription renewal generation
19
29
</Card >
20
30
21
31
<Card title = " Compliance Events" icon = " shield-check" >
22
- KYC status and bank account verification
23
- </Card >
32
+ ** KYC & verification:** compliance.updated, payment_detail.updated
24
33
25
- <Card title = " Crypto-to-fiat Events" icon = " exchange-alt" >
26
- Offramp processing and settlement
34
+ User verification and bank account status changes
27
35
</Card >
28
36
</CardGroup >
29
37
30
38
## How It Works
31
39
32
40
``` mermaid
33
41
graph LR
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]
42
+ A[Event Occurs] --> B[HMAC Signed POST]
43
+ B --> C[Your Endpoint]
44
+ C --> D[Verify & Process]
45
+ D --> E[Return 200 OK]
40
46
```
41
47
42
48
** Process:**
43
49
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
50
+ 2 . ** Secure delivery:** HMAC SHA-256 signed POST to your configured endpoint
51
+ 3 . ** Your processing:** Verify ` x-request-network-signature ` , update application state
52
+ 4 . ** Reliable delivery:** 3 retries (1s, 5s, 15s delays) with 5-second timeout
53
+
54
+ ## Key Features
55
+
56
+ ### Reliability
57
+ - ** Idempotency support:** Use ` x-request-network-delivery ` header for duplicate detection
58
+ - ** Delivery confirmation:** Monitor ` x-request-network-retry-count ` header to track attempts
47
59
48
- ## Development Setup
60
+ ### Security
61
+ - ** HMAC SHA-256 signatures:** Every webhook includes ` x-request-network-signature ` header
62
+ - ** HTTPS required:** Production endpoints must use secure connections
63
+ - ** Test webhook identification:** ` x-request-network-test ` header for development
49
64
50
- ### Local Testing
51
- - ** Portal testing:** Send test webhooks from Request Portal
65
+ ### Development Tools
66
+ - ** Portal testing:** Send test webhooks from [ Request Portal] ( https://portal.request.network )
52
67
- ** ngrok integration:** Receive webhooks locally during development
53
- - ** Signature verification :** Always validate ` x-request-network-signature ` header
68
+ - ** Comprehensive logging :** Request API logs all delivery failures with attempt details
54
69
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.)
70
+ ## Common Use Cases
59
71
60
- ## Used In
72
+ - ** Invoice systems:** Automatically mark invoices as paid when ` payment.confirmed ` received
73
+ - ** Order fulfillment:** Release goods or services immediately after payment confirmation
74
+ - ** Subscription management:** Handle ` request.recurring ` for automatic billing renewals
75
+ - ** Compliance workflows:** Update user permissions when ` compliance.updated ` shows KYC approval
76
+ - ** Real-time dashboards:** Display live payment status using ` payment.processing ` subStatus values
77
+
78
+ ## Implementation
61
79
62
80
<CardGroup cols = { 2 } >
63
- <Card title = " EasyInvoice Demo " href = " /use-cases/invoicing " >
64
- Complete webhook implementation example
81
+ <Card title = " Webhook Reference " href = " /api-reference/webhooks " >
82
+ Complete technical documentation with setup, payloads, and code examples
65
83
</Card >
66
-
67
- <Card title = " Real-time Dashboards " href = " /use-cases/checkout " >
68
- Instant payment status updates
84
+
85
+ <Card title = " EasyInvoice Demo " href = " /use-cases/invoicing " >
86
+ Working webhook implementation example with Express.js
69
87
</Card >
70
- </CardGroup >
71
88
72
- ## Implementation Details
89
+ <Card title = " Request Portal" href = " https://portal.request.network" icon = " browser" >
90
+ Configure webhooks and test delivery
91
+ </Card >
73
92
74
- See [ API Reference - Webhooks] ( /api-reference/webhooks ) for complete technical documentation, payload schemas, and signature verification examples.
93
+ <Card title = " Request Scan" href = " https://scan.request.network" icon = " magnifying-glass" >
94
+ Explore payment transactions and request details
95
+ </Card >
96
+ </CardGroup >
0 commit comments