Skip to main content

Overview

Webhooks allow you to receive real-time notifications when events occur in your TribeMade store. When a customer successfully places an order, TribeMade automatically sends a POST request to all your configured webhook URLs with complete order details.
No polling required! Webhooks push data to you automatically, saving API calls and providing instant notifications.

How Webhooks Work

Event Details

  • Event: order.created
  • When: Immediately after payment verification succeeds
  • What: Complete order and customer details
  • Method: POST request with JSON payload
  • Recipients: All configured webhook URLs (up to 5)

Configure Webhooks

Step 1: Set Up Your Endpoint

Create an endpoint on your server to receive webhook notifications:

Step 2: Add Webhook URL to Dashboard

  1. Log in to TribeMade Dashboard
  2. Navigate to Developer section
  3. Add your webhook URL (e.g., https://yourdomain.com/webhook/orders)
  4. You can add up to 5 webhook URLs
Important: Your webhook endpoint must use HTTPS (not HTTP) with a valid SSL certificate.

Step 3: Test Your Webhook

Place a test order in your store to verify your webhook receives the notification.

Webhook Payload

HTTP Request

Method: POST
Content-Type: application/json

Payload Structure

string
required
Event type. Always "order.created" for new orders.
string
required
Unique order identifier (UUID)
string
required
Your store’s unique identifier (UUID)
string
required
Ordered product identifier (UUID)
string
required
Order status. Always "started" for new orders.
string
required
Order creation timestamp (ISO 8601 format, UTC)
object
required
Customer information
object
required
Order details

Example Payload

Webhook Requirements

Your Webhook Endpoint Must:

  • Listen for POST method
  • Parse JSON request body
  • Handle Content-Type: application/json
  • Any status 200-299 is considered success
  • Common: 200 OK, 201 Created, 202 Accepted
  • Return quickly (within 5 seconds)
  • Timeout after 5 seconds
  • Process asynchronously if needed
  • Return response immediately, then process
  • HTTP endpoints are not accepted
  • Must have valid SSL certificate
  • Self-signed certificates won’t work

Example Implementations

Complete Python Implementation

Complete Node.js Implementation

Security Best Practices

  • Never use HTTP endpoints
  • Ensure valid SSL certificate
  • Self-signed certificates won’t work
  • HTTPS protects customer data in transit
Always validate webhook payload before processing:
Save original webhook payload for debugging and audit trails:
Same webhook may be sent multiple times. Use order_id to prevent duplicate processing:
Track webhook delivery and processing:
  • Success/failure rates
  • Processing time
  • Error patterns
  • Alert on failures

Performance Best Practices

Process webhooks asynchronously to respond within 5 seconds:❌ Bad: Synchronous processing
✅ Good: Asynchronous processing
Implement a queue system (RabbitMQ, Redis, Celery, BullMQ):
  • Webhook returns 200 immediately
  • Background workers process orders
  • Handle high-volume periods
  • Retry failed processing
Retry failed operations with exponential backoff:
Track how long webhook processing takes:

Troubleshooting

Common Issues

Cause: Endpoint not found or server errorFix:
  • Verify URL is correct
  • Check server is running
  • Review server logs for errors
  • Test endpoint with curl or Postman
Cause: Processing takes too longFix:
  • Process asynchronously
  • Return 200 immediately
  • Use background queue
  • Optimize database queries
Cause: Endpoint URL starts with http://Fix:
  • Use HTTPS URL with valid SSL
  • Get SSL certificate (Let’s Encrypt is free)
  • Configure server for HTTPS
Cause: Expired or self-signed certificateFix:
  • Use valid SSL from trusted CA
  • Renew expired certificates
  • Don’t use self-signed certificates
Causes:
  • Endpoint not configured in dashboard
  • Server is down or unreachable
  • Firewall blocking requests
  • Port not open
Fix:
  • Verify webhook URL in dashboard
  • Check server status
  • Configure firewall rules
  • Ensure port is accessible

Testing Webhooks

Test your endpoint before going live:
  1. Webhook.site: https://webhook.site
    • Get instant webhook URL
    • Inspect raw requests
    • No server setup needed
  2. RequestBin: https://requestbin.com
    • Similar to webhook.site
    • View request details
  3. ngrok: Expose local server to internet
Simulate webhook locally:
The most reliable test:
  1. Create test product in your store
  2. Place order as customer
  3. Verify webhook received
  4. Check all fields present
  5. Validate processing works

Webhook vs. Polling

Why Webhooks Are Better

Example: Cost Comparison

Scenario: 100 orders per day With Polling (every minute):
  • API calls per day: 1,440 (24 hours × 60 minutes)
  • Most calls return no new orders
  • Wastes API rate limit
  • Delayed notifications
With Webhooks:
  • API calls per day: 0
  • Instant notifications
  • No wasted calls
  • Better customer experience

Next Steps

Get Order Details

Fetch complete order information after webhook

Update Order Status

Update order status and add tracking

Authentication

Learn about API authentication

Error Handling

Handle webhook errors gracefully