Webhook Integration
Receive real-time notifications for events in your RocketSavvy account with secure, reliable webhook delivery.
๐ What are Webhooks?
Webhooks are HTTP callbacks that RocketSavvy sends to your application when events occur in your account. Instead of constantly polling our API for changes, webhooks allow you to receive real-time notifications about important events like successful payments, failed transactions, new customers, subscription changes, and more.
โ Real-time Updates
Receive instant notifications when events occur, eliminating the need for constant API polling and reducing server load.
๐ Secure Delivery
All webhooks are signed with HMAC SHA-256 signatures and support HTTPS endpoints for secure data transmission.
๐ Reliable Retry Logic
Automatic retry mechanism with exponential backoff ensures delivery even if your endpoint is temporarily unavailable.
๐ Webhook Statistics
โ๏ธ Create Webhook Endpoint
๐ Your Webhook Endpoints
| URL | Events | Status | Last Delivery | Success Rate | Actions |
|---|---|---|---|---|---|
|
https://api.yourapp.com/webhooks/rs
|
8 events | Active | 2 minutes ago | 99.8% | |
|
https://staging.yourapp.com/hooks
|
3 events | Active | 1 hour ago | 97.2% | |
|
https://old.endpoint.com/webhook
|
5 events | Failed | 3 days ago | 0% |
๐ Available Event Types
RocketSavvy sends webhooks for various events across our platform. Each event includes detailed payload data relevant to the specific action.
-
payment.succeededPayment processed successfully
-
payment.failedPayment processing failed
-
payment.refundedPayment refund processed
-
payment.disputedPayment dispute initiated
-
subscription.createdNew subscription started
-
subscription.updatedSubscription plan or details changed
-
subscription.cancelledSubscription cancelled by customer
-
subscription.reactivatedCancelled subscription reactivated
-
customer.createdNew customer account created
-
customer.updatedCustomer information updated
-
customer.deletedCustomer account deleted
-
invoice.createdNew invoice generated
-
invoice.paidInvoice payment received
-
invoice.overdueInvoice payment overdue
-
invoice.voidedInvoice cancelled or voided
-
call.startedVoIP call initiated
-
call.endedVoIP call completed
-
voicemail.receivedNew voicemail message
-
order.createdNew order placed
-
order.fulfilledOrder shipped/delivered
-
order.cancelledOrder cancelled
๐ Example Webhook Payload
{
"id": "evt_rs_1234567890",
"type": "payment.succeeded",
"created": "2025-06-27T10:30:00Z",
"data": {
"object": {
"id": "pay_rs_abcdef123456",
"amount": 2999,
"currency": "USD",
"customer_id": "cust_rs_789012",
"description": "Monthly subscription payment",
"status": "succeeded",
"payment_method": "card_ending_4242",
"metadata": {
"subscription_id": "sub_rs_345678",
"plan": "enterprise_pro"
}
}
},
"request": {
"id": "req_rs_unique_request_id",
"idempotency_key": null
}
}
๐งช Test Your Webhook Endpoints
Send test events to your webhook endpoints to verify they're working correctly and handle various event types properly.
๐ง Webhook Verification
Verify webhook authenticity using HMAC SHA-256 signatures. Here's how to implement verification in your application:
Node.js Example
const crypto = require('crypto');
function verifyWebhookSignature(payload, signature, secret) {
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(payload, 'utf8')
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature, 'hex'),
Buffer.from(expectedSignature, 'hex')
);
}
// Express.js middleware
app.use('/webhooks/rocketsavvy', express.raw({ type: 'application/json' }));
app.post('/webhooks/rocketsavvy', (req, res) => {
const signature = req.headers['x-rocketsavvy-signature'];
const payload = req.body;
if (!verifyWebhookSignature(payload, signature, process.env.WEBHOOK_SECRET)) {
return res.status(401).send('Unauthorized');
}
const event = JSON.parse(payload);
console.log('Received webhook:', event.type, event.id);
res.status(200).send('OK');
});
Python Example
import hmac
import hashlib
import json
from flask import Flask, request
app = Flask(__name__)
def verify_webhook_signature(payload, signature, secret):
expected_signature = hmac.new(
secret.encode('utf-8'),
payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected_signature)
@app.route('/webhooks/rocketsavvy', methods=['POST'])
def webhook():
signature = request.headers.get('X-RocketSavvy-Signature')
payload = request.get_data()
if not verify_webhook_signature(payload, signature, WEBHOOK_SECRET):
return 'Unauthorized', 401
event = json.loads(payload)
print(f"Received webhook: {event['type']} {event['id']}")
return 'OK', 200
๐ Delivery Monitoring
Monitor webhook delivery status and performance in real-time. Track successful deliveries, failures, and response times.
๐ Retry Configuration
RocketSavvy automatically retries failed webhook deliveries with exponential backoff:
- Attempt 1: Immediate delivery
- Attempt 2: 30 seconds later
- Attempt 3: 2 minutes later
- Attempt 4: 8 minutes later
- Attempt 5: 32 minutes later
- Final attempt: 2 hours later