Owner Abhishek P

V1 API Infrastructure

Source: OpenAPI 3.1.0 spec + src/api/v1/health_check/routes.py, src/api/v1/webhooks/routes.py Tag: Infrastructure - Health checks and webhooks.


GET /health

Summary: Health Check

Check the health status of the API and its dependencies.

Auth: None required (public endpoint)

Success Response

{
  "status": "success",
  "is_data_encrypted": 0,
  "data": {
    "message": "API is healthy",
    "version": "v1"
  },
  "error": null,
  "app_actions": null
}

POST /webhooks/razorpay

Summary: Razorpay Webhook

Handle Razorpay webhook events (payment.captured, payment.failed, etc.).

Auth: None required. Validated via Razorpay webhook signature verification.

Business Logic

  1. Validates the webhook signature using Razorpay’s secret
  2. Processes payment events:
    • payment.captured - marks order as paid, creates subscription
    • payment.failed - marks order as failed
  3. Idempotent - duplicate webhook deliveries are handled safely

Success Response

{
  "status": "success",
  "is_data_encrypted": 0,
  "data": null,
  "error": null,
  "app_actions": null
}