Dietitian Website in PHP with Razorpay and Client Accounts
By Prakash Panthi, Founder · Published October 3, 2026
Most dietitians sell the same way: a post on Instagram, a UPI payment, a screenshot on WhatsApp, a spreadsheet of who paid, and a meal plan sent as a PDF. Each step is done by hand, and none of them is connected to the next. A small dietitian website in PHP can join them up: the site sells the programme, the payment creates the client, and the client reads their plan in their own account.
What the website needs to do
- Show programmes with a price, a duration and what is included.
- Take payment online (Razorpay: UPI, cards, net banking, wallets) or by transfer that you confirm.
- Create the client from the checkout details — sex, date of birth, height, goal and diet preference — so the first plan can start straight away.
- Give the client an account without a registration form: a paid order emails a link to set a password.
- Deliver the plan inside that account, with a weight log and a progress chart.
- Publish a blog so the site is found on Google for the questions your clients ask.
Taking payment with Razorpay, safely
Three rules keep online payment honest:
- Create the order on your server. The amount goes to Razorpay's Orders API with your key secret, so a buyer cannot change the price in the browser.
- Verify the signature. After payment Razorpay gives the browser a payment id and a signature. Your server recomputes HMAC-SHA256 of
order_id|payment_idwith the key secret and marks the order paid only if they match. - Listen to the webhook. If the buyer closes the tab before returning, Razorpay's signed
payment.capturedwebhook still confirms the order.
Because the browser and the webhook can both arrive, the step that marks an order paid must run once only — a single UPDATE … WHERE status = 'pending' does that, and only the request that changed the row creates the client and sends the email.
Manual payment still matters
Many clients still prefer to pay by UPI or at the clinic. A good setup shows your payment instructions after checkout and lets you mark the order paid from the panel with a reference; the client receives the same account email as an online buyer.
Building the meal plans
The plan builder is the part you use every day: a food database with values per 100 g, plans by day and meal, totals against the client's calorie target, a check that a vegetarian client is never given chicken, and a printable version. Our diet planner guide explains the formulas and the database in detail.
Ready-made option
The Diet & Meal Planner Pro is all of the above in plain PHP and MySQL: public website, programmes, Razorpay and manual checkout, coupons, orders panel with CSV export, client accounts, blog, enquiries and the full planner with 125 foods from the public-domain USDA database. It runs on any shared hosting and uses your own Razorpay keys. If you only need the planning panel, the Diet & Meal Planner is the lighter edition.
Plans built with any tool are general dietary guidance, not medical advice.
Our Diet & Meal Planner Pro
Includes the matching database file and email support — why that's worth it over a free download.
View Diet & Meal Planner Pro →