Skip to content

Commit 895057b

Browse files
committed
fix: increase accuracy of webhook reference docs
1 parent 9a10e5a commit 895057b

File tree

1 file changed

+18
-34
lines changed

1 file changed

+18
-34
lines changed

api-reference/webhooks.mdx

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Request API logs all webhook delivery failures with:
134134
```json
135135
{
136136
"event": "payment.confirmed",
137-
"requestId": "req_test123456789abcdef",
138-
"requestID": "req_test123456789abcdef",
139-
"paymentReference": "0x1234567890abcdef1234567890abcdef12345678",
140-
"explorer": "https://scan.request.network/request/req_test123456789abcdef",
137+
"requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
138+
"requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
139+
"paymentReference": "0x2c3366941274c34c",
140+
"explorer": "https://scan.request.network/request/0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
141141
"amount": "100.0",
142142
"totalAmountPaid": "100.0",
143143
"expectedAmount": "100.0",
@@ -163,15 +163,15 @@ Request API logs all webhook delivery failures with:
163163
```json
164164
{
165165
"event": "payment.processing",
166-
"requestId": "req_test123456789abcdef",
167-
"requestID": "req_test123456789abcdef",
168-
"paymentReference": "0x1234567890abcdef1234567890abcdef12345678",
166+
"requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
167+
"requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
168+
"paymentReference": "0x2c3366941274c34c",
169169
"offrampId": "offramp_test123456789",
170170
"timestamp": "2025-10-03T14:35:00Z",
171-
"subStatus": "processing",
171+
"subStatus": "ongoing_checks",
172172
"paymentProcessor": "request_tech",
173173
"rawPayload": {
174-
"status": "processing",
174+
"status": "ongoing_checks",
175175
"providerId": "provider_test123"
176176
}
177177
}
@@ -181,10 +181,10 @@ Request API logs all webhook delivery failures with:
181181
```json
182182
{
183183
"event": "payment.partial",
184-
"requestId": "req_test123456789abcdef",
185-
"requestID": "req_test123456789abcdef",
186-
"paymentReference": "0x1234567890abcdef1234567890abcdef12345678",
187-
"explorer": "https://scan.request.network/request/req_test123456789abcdef",
184+
"requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
185+
"requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
186+
"paymentReference": "0x2c3366941274c34c",
187+
"explorer": "https://scan.request.network/request/0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
188188
"amount": "50.0",
189189
"totalAmountPaid": "50.0",
190190
"expectedAmount": "100.0",
@@ -204,9 +204,9 @@ Request API logs all webhook delivery failures with:
204204
```json
205205
{
206206
"event": "payment.failed",
207-
"requestId": "req_test123456789abcdef",
208-
"requestID": "req_test123456789abcdef",
209-
"paymentReference": "0x1234567890abcdef1234567890abcdef12345678",
207+
"requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
208+
"requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
209+
"paymentReference": "0x2c3366941274c34c",
210210
"subStatus": "insufficient_funds",
211211
"paymentProcessor": "request_network"
212212
}
@@ -218,7 +218,7 @@ Request API logs all webhook delivery failures with:
218218
"event": "compliance.updated",
219219
"clientUserId": "user_test123456789",
220220
"kycStatus": "approved",
221-
"agreementStatus": "signed",
221+
"agreementStatus": "completed",
222222
"isCompliant": true,
223223
"timestamp": "2025-10-03T14:30:00Z",
224224
"rawPayload": {
@@ -371,18 +371,9 @@ ngrok http 3000
371371
### Error Handling
372372
- **Implement idempotency:** Use delivery IDs to prevent duplicate processing
373373
- **Graceful degradation:** Handle unknown event types without errors
374-
- **Comprehensive logging:** Log all webhook events for debugging
375-
- **Database transactions:** Ensure atomic updates when processing events
376374

377-
### Performance
378-
- **Async processing:** Queue heavy operations, respond quickly
375+
### Performance
379376
- **Timeout management:** Complete processing within 5 seconds
380-
- **Resource limits:** Handle high-volume webhook bursts appropriately
381-
382-
### Security
383-
- **Rate limiting:** Protect your webhook endpoints from abuse
384-
- **IP allowlisting:** Consider restricting to Request Network IPs if needed
385-
- **Audit trails:** Log all webhook processing for compliance
386377

387378
## Troubleshooting
388379

@@ -395,17 +386,10 @@ ngrok http 3000
395386

396387
**Webhooks not received:**
397388
- Confirm endpoint URL is accessible via HTTPS
398-
- Check firewall and network restrictions
399389
- Verify endpoint returns 2xx status codes
400390

401-
**Duplicate events:**
402-
- Implement idempotency using delivery IDs
403-
- Check for multiple webhook endpoints configured
404-
- Review retry logic in your error handling
405-
406391
### Debugging Tips
407392
- Use ngrok request inspector to see raw webhook data
408-
- Check Portal webhook logs for delivery status
409393
- Monitor retry counts in headers to identify issues
410394
- Test with Portal's "Send test webhooks" feature
411395

0 commit comments

Comments
 (0)