techrar docs
Home
Solutions
Solutions
  • eCommerce SaaS
  • Meals SaaS
  • Meals Marketplaces
API
API
  • Merchant APIs
  • Customer App APIs
  • Meals APIs
Techrar Connect
Home
Solutions
Solutions
  • eCommerce SaaS
  • Meals SaaS
  • Meals Marketplaces
API
API
  • Merchant APIs
  • Customer App APIs
  • Meals APIs
Techrar Connect
  1. GETTING STARTED
  • GETTING STARTED
    • Marketplaces Overview
    • Account Setup
    • Authentication
    • Webhooks
    • Sales Channel Profile
  • Offerings & Listings
    • Display Providers
    • Plan Categories
    • Plans & Versions
    • Display Menus
  • Customer Profiles
    • Authenticating Customers
    • Customer Profile
    • Customer Location
  • Placing Orders
    • Place Subscription Order
    • Order Payment
  • Subscriptions
    • Subscription Lifecycle
    • Subscription Management
  • Complaints
    • Complaint Lifecycle
    • Complaint Management
  1. GETTING STARTED

Webhooks

Configure webhooks to receive real-time notifications about orders, subscriptions, payments, and other critical events in your Sales Channel.

Overview#

Webhooks allow Techrar to push event notifications to your server in real-time. Instead of polling our APIs for status changes, we'll send HTTP POST requests to your configured endpoint whenever important events occur.

Setup Methods#

You can register webhooks in two ways:
1.
Via Portal (Recommended for quick setup)
2.
Via API (Coming Soon)

Register Webhook via Portal#

1.
Log in to your Techrar merchant portal
2.
Navigate to Settings → Webhooks
3.
Click Create Webhook
4.
Configure your webhook:
URL: Your endpoint that will receive webhook notifications
Events: Select which events to subscribe to
Custom Headers: Add optional headers (e.g., authentication tokens)
Active Status: Enable or disable the webhook
5.
Save and copy your Secret Key (used for signature verification)

List of techrar Meals Events#

NameDescription
m.order.completedThis is triggered when an order has been succesfully paid
m.subscription.startedThis is triggered when a subscription is started
m.subscription.canceledThis is triggered when a subscription is canceled
m.subscription.endedThis is triggered when a subscription is ended
m.subscription.reopenedThis is triggered when a subscription is re-opened again
m.complaint.issuedThis is triggered when a complaint is issued
m.complaint.updatedThis is triggered when a complaint is updated by the merchant

Webhook Payload Structure#

All webhook requests include:
{
  "app_id": 123,
  "timestamp": 1640000000,
  "event": "subscription.created",
  "data": {
    // Event-specific data object
  }
}

Signature Verification#

Every webhook request includes an X-Signature header for security verification.

Verify Signature#

Always verify signatures before processing webhook data to ensure the request is from Techrar.

Handling Webhooks#

Best Practices#

1.
Respond Quickly: Return 200 OK immediately, then process asynchronously
2.
Verify Signatures: Always validate the X-Signature header
3.
Handle Idempotency: Use event IDs to prevent duplicate processing
4.
Implement Retry Logic: We retry failed webhooks with exponential backoff
5.
Log Everything: Keep webhook logs for debugging and auditing

Retry Policy (Coming Soon)#

If your endpoint returns a non-2xx status or times out:
Attempt 1: Immediate retry
Attempt 2: 1 minute later
Attempt 3: 5 minutes later
After 3 failed attempts, the webhook is marked as failed and will not be retried automatically.
We currently send a webhook notification only once. We are working on a retry logic.

Monitoring & Logs#

View Webhook Logs#

Access webhook delivery logs via Portal -> Settings → Webhooks → View Logs
Logs include:
Timestamp
Event type
HTTP status code
Response body
Delivery status (success/failed/pending)

Duplicate Events#

Use event timestamps and IDs to detect duplicates
Implement idempotency keys in your processing logic
Store processed event IDs to skip duplicates
Modified at 2025-12-02 09:06:21
Previous
Authentication
Next
Sales Channel Profile
Built with