Webhooks
Turno LMS accepts payment webhooks from Razorpay and Cashfree. Webhooks are validated, enqueued to RQ, and processed asynchronously.
Razorpay
POST /webhooks/razorpaySupported Lenders
| Lender | Razorpay Webhook |
|---|---|
| UGRO | Yes |
| VIVRITI | Yes |
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
- Webhook received → signature validated
- Payload enqueued to RQ
- HTTP 200 returned immediately (~50ms)
- RQ worker saves to
RAW_*_RAZORPAY_APItable - Every 30 min: dbt transforms →
CORE_TRANSACTION_DATA→ Fineract repayment
Cashfree
POST /webhooks/cashfreeSupported Lenders
| Lender | Cashfree Webhook |
|---|---|
| UGRO | Yes |
| GB | Yes |
Signature Validation
WARNING
Cashfree signature validation is currently disabled.
Processing Flow
- Webhook received
- Payload enqueued to RQ
- HTTP 200 returned immediately
- RQ worker saves to
RAW_*_CASHFREE_APItable - 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:
- Detects the new table
- Updates
sources.yml - Generates the corresponding BASE dbt model
- Includes it in the next pipeline run
Lender-Gateway Matrix
| Lender | Razorpay | Cashfree |
|---|---|---|
| UGRO | Yes | Yes |
| VIVRITI | Yes | - |
| GB | - | Yes |
| DMI | - | - |
| ARTHMATE | - | - |
| SHIVALIK | - | - |
| IKF | - | - |