AstroWhatsApp Backend

WhatsApp Astrology API is live.

This server handles WappBoost incoming messages, Razorpay payment callbacks, registration flow, daily astrology reports, and admin data APIs. It is a backend service, so the important URLs are the API routes below.

Current Setup

These are the main live URLs you will use after deployment.

Base URL

https://astrowhatsapp.ctrlab.in

WappBoost Webhook

https://astrowhatsapp.ctrlab.in/api/webhooks/wappboost?secret=YOUR_SECRET

Razorpay Webhook

https://astrowhatsapp.ctrlab.in/api/webhooks/razorpay

Daily Scheduler

https://astrowhatsapp.ctrlab.in/api/scheduler/daily

Main Routes

These are the important endpoints currently available in the project.

GET /health

Simple JSON status check for the running API.

POST /api/webhooks/wappboost

Receives incoming WhatsApp messages from your WappBoost setup.

POST /api/webhooks/razorpay

Receives Razorpay payment events and activates subscriptions.

GET /api/payments/plans

Returns current subscription plans and pricing.

POST /api/payments/orders

Creates a Razorpay order for a registered user and selected plan.

POST /api/scheduler/daily

Triggers the daily astrology report send job.

GET /api/admin/users

Protected admin endpoint for user list and search.

GET /api/admin/subscriptions

Protected admin endpoint for subscriptions overview.

How This Backend Works

A quick beginner-friendly flow for understanding the project.

1. User messages WhatsApp

WappBoost sends the incoming text to this backend webhook.

2. Registration is collected

Name, DOB, birth time, and birth place are stored before service starts.

3. AI generates astrology

Gemini and your business logic generate daily readings and question replies.

4. Payments unlock plans

Razorpay webhooks update the user subscription after successful payment.

Useful Test Links

Open these to quickly check that the deployment is working.