๐Ÿ”” 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

99.8%
Delivery Success Rate
1,247
Events Today
142ms
Average Response Time
3
Active Endpoints

โš™๏ธ Create Webhook Endpoint

Must be a valid HTTPS URL that can receive POST requests
Optional description to help identify this webhook
Select which events you want to receive notifications for
Used to verify webhook authenticity. Auto-generated if left empty.

๐Ÿ“‹ 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 Events
  • payment.succeeded
    Payment processed successfully
  • payment.failed
    Payment processing failed
  • payment.refunded
    Payment refund processed
  • payment.disputed
    Payment dispute initiated
๐Ÿ“„ Subscription Events
  • subscription.created
    New subscription started
  • subscription.updated
    Subscription plan or details changed
  • subscription.cancelled
    Subscription cancelled by customer
  • subscription.reactivated
    Cancelled subscription reactivated
๐Ÿ‘ฅ Customer Events
  • customer.created
    New customer account created
  • customer.updated
    Customer information updated
  • customer.deleted
    Customer account deleted
๐Ÿ“ง Invoice Events
  • invoice.created
    New invoice generated
  • invoice.paid
    Invoice payment received
  • invoice.overdue
    Invoice payment overdue
  • invoice.voided
    Invoice cancelled or voided
๐Ÿ“ž Communication Events
  • call.started
    VoIP call initiated
  • call.ended
    VoIP call completed
  • voicemail.received
    New voicemail message
๐Ÿ“ฆ Order Events
  • order.created
    New order placed
  • order.fulfilled
    Order shipped/delivered
  • order.cancelled
    Order 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
Note: Webhooks are considered failed if your endpoint returns a non-2xx status code or doesn't respond within 30 seconds.

๐Ÿ“ˆ Performance Metrics

2,847
Events Sent Today
+12% from yesterday
99.8%
Success Rate
Last 7 days
142ms
Avg Response Time
From your endpoints
6
Failed Deliveries
Last 24 hours