Skip to content

Webhooks

Turno LMS accepts payment webhooks from Razorpay and Cashfree. Webhooks are validated, enqueued to RQ, and processed asynchronously.

Razorpay

POST /webhooks/razorpay

Supported Lenders

LenderRazorpay Webhook
UGROYes
VIVRITIYes

Signature Validation

Razorpay webhooks use HMAC-SHA256 signature validation. The signature is sent in the X-Razorpay-Signature header and verified against the configured webhook secret.

INFO

Signature validation is optional and can be configured per-lender in config.py.

Processing Flow

  1. Webhook received → signature validated
  2. Payload enqueued to RQ
  3. HTTP 200 returned immediately (~50ms)
  4. RQ worker saves to RAW_*_RAZORPAY_API table
  5. Every 30 min: dbt transforms → CORE_TRANSACTION_DATA → Fineract repayment

Cashfree

POST /webhooks/cashfree

Supported Lenders

LenderCashfree Webhook
UGROYes
GBYes

Signature Validation

WARNING

Cashfree signature validation is currently disabled.

Processing Flow

  1. Webhook received
  2. Payload enqueued to RQ
  3. HTTP 200 returned immediately
  4. RQ worker saves to RAW_*_CASHFREE_API table
  5. Every 30 min: dbt transforms → CORE_TRANSACTION_DATA → Fineract repayment

Auto-Discovery

New webhook lender/gateway combinations are auto-discovered - no manual dbt or code changes needed.

When a new RAW_*_RAZORPAY_API or RAW_*_CASHFREE_API table appears, sync_webhook_sources.py automatically:

  1. Detects the new table
  2. Updates sources.yml
  3. Generates the corresponding BASE dbt model
  4. Includes it in the next pipeline run

Lender-Gateway Matrix

LenderRazorpayCashfree
UGROYesYes
VIVRITIYes-
GB-Yes
DMI--
ARTHMATE--
SHIVALIK--
IKF--

Turno Fineract LMS Documentation