V1 API Infrastructure
Source: OpenAPI 3.1.0 spec +
src/api/v1/health_check/routes.py,src/api/v1/webhooks/routes.pyTag: 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
- Validates the webhook signature using Razorpay’s secret
- Processes payment events:
payment.captured- marks order as paid, creates subscriptionpayment.failed- marks order as failed
- Idempotent - duplicate webhook deliveries are handled safely
Success Response
{
"status": "success",
"is_data_encrypted": 0,
"data": null,
"error": null,
"app_actions": null
}