We want to add webhook support for Razorpay in tern. Razorpay sends events for payments, refunds, orders, and more via webhook integrations.
Tasks
Webhook Handler
- Implement
/src/platforms/razorpay.ts.
- Normalize payloads into tern’s event format.
Platform Config
- Add
platformConfigs.razorpay with supported events (e.g., payment.captured, payment.failed, order.paid, refund.processed).
Test Cases
- Add JSON fixtures for 3+ events (payment captured, order paid, refund processed).
- Write Jest tests in
/tests/razorpay.test.ts.
Docs
Acceptance Criteria
- Razorpay handler implemented
- Manual webhook verification supported
- Tests with 3+ event types
- Docs updated
Helpful Links: Razorpay Webhooks Docs
We want to add webhook support for Razorpay in tern. Razorpay sends events for payments, refunds, orders, and more via webhook integrations.
Tasks
Webhook Handler
/src/platforms/razorpay.ts.Platform Config
platformConfigs.razorpaywith supported events (e.g.,payment.captured,payment.failed,order.paid,refund.processed).Test Cases
/tests/razorpay.test.ts.Docs
/docs/platforms.mdwith setup steps.Acceptance Criteria
Helpful Links: Razorpay Webhooks Docs