Skip to content

Commit 30a142d

Browse files
committed
feat: re-write webhooks-events.mdx page
1 parent 9264da3 commit 30a142d

File tree

2 files changed

+40
-46
lines changed

2 files changed

+40
-46
lines changed

api-features/webhooks-events.mdx

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,76 +5,70 @@ description: "Real-time notifications for payment lifecycle events and request s
55

66
## Overview
77

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.
99

10-
## Supported Events
10+
## Event Categories
1111

1212
<CardGroup cols={2}>
1313
<Card title="Payment Events" icon="credit-card">
14-
Payment detected, confirmed, failed
14+
Payment confirmation, processing, failures
1515
</Card>
16-
16+
1717
<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
1927
</Card>
2028
</CardGroup>
2129

2230
## How It Works
2331

2432
```mermaid
2533
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]
3040
```
3141

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
3747

38-
## Event Types
48+
## Development Setup
3949

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
4454

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.)
4959

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
6361

6462
<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
6765
</Card>
6866

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
7169
</Card>
7270
</CardGroup>
7371

74-
## Implementation Examples
75-
76-
See EasyInvoice webhook handling for real-world integration patterns.
77-
7872
## Implementation Details
7973

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.

docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
]
7676
},
7777
{
78-
"group": "Payment Types",
78+
"group": "Payments",
7979
"pages": [
8080
"api-features/payment-types-overview",
8181
"api-features/standard-payments",

0 commit comments

Comments
 (0)