Taking money online turns a booking form into a financial system. A patient pays a consultation deposit or a package advance, the bank debits them, and something in the chain fails: the page times out, the payment succeeds but the booking does not, or the appointment is cancelled and the refund state is unclear. The patient sees a debit and no confirmation, then calls the hospital, and the front desk has no reliable answer.
This post is for health tech founders, hospital product teams and the developers who build their booking and payment flows. It assumes you know how a payment gateway works and focuses on what is specific to healthcare bookings: deposits that may be partly refundable, package prices that are revised after a consultation, and the refund timelines Indian payment rules set. It is not legal or tax advice; your finance and legal teams must approve the policy, and the hospital's own refund and cancellation terms govern.
We link to RBI primary sources where we have confirmed them. We could not confirm every current detail of RBI's payment aggregator directions during writing, so where a point depends on them, we say so and tell you what to check.
Decide what you are charging for
Three payment types need different handling, even if they use the same gateway.
| Type | Purpose | Typical refund logic | Design risk |
|---|---|---|---|
| Consultation fee | Pay for a visit | Refund if the hospital cancels or the slot is lost; policy for patient cancellations | Pay-before-book creates a debit with no booking if the slot is taken |
| Booking deposit | Hold a slot or a procedure date | Partly or fully refundable by a stated rule | Ambiguity about what the deposit covers |
| Package advance | Part payment on a quoted package | Adjusted against the final bill; refunded under policy | Quote changes after clinical assessment |
For elective surgery, the price is rarely fixed at the moment of booking. The final plan depends on the surgeon's assessment. A good flow takes a modest deposit tied to a consultation or a date hold, labels it clearly, and defers the package amount to the stage where the quote is confirmed by the clinical team. Avoid any wording that implies a price or outcome the clinician has not agreed. Claims about packages must pass the same review as other advertising, as set out in the NMC compliance handbook.
Choosing a payment gateway
Do the selection as a checklist, not a feature comparison.
Regulated status. A payment aggregator in India needs RBI authorisation, and the framework has been revised recently. Ask any gateway to state its authorisation in writing and check it against RBI's published list before you integrate. Do not rely on a sales deck.
Settlement and refunds. Ask how long settlement takes, whether refunds are deducted from future settlement or need a pre-funded balance, and whether partial refunds are supported. A deposit with a partial refund rule needs partial refund by API.
Methods. UPI, cards, net banking and wallets each fail differently. UPI has collect and intent flows and relies on the patient's app; cards can hit additional authentication; net banking redirects can time out. Offer the methods your patients use and test each in the gateway's sandbox.
Webhooks and reconciliation. You need reliable server-to-server notifications of payment success, failure and refund, with signatures you can verify and a way to fetch status on demand. The browser redirect alone is not proof of payment.
Recurring or instalment collection. If a package is paid in instalments by auto-debit, a separate set of rules applies. RBI's e-mandate framework for recurring online transactions is referenced in its circular on e-mandates; read the framework document it links to and ask the gateway how it implements it. For most booking deposits, a one-time payment is simpler and safer.
Data handling. Patient health details should not travel in payment metadata. Pass an opaque booking reference, not a diagnosis or procedure name.
The payment state machine
The most common bug is treating "payment" as a flag. It is a lifecycle, and your ledger should model it.
| State | Meaning | Who moves it |
|---|---|---|
created | Order created, nothing paid | Your server |
authorised or pending | Patient initiated; bank has not finalised | Gateway webhook |
captured | Money received | Gateway webhook |
failed | Payment did not complete | Gateway webhook |
refund_initiated | You asked for a refund | Your server |
refund_processed | Gateway has sent the refund | Gateway webhook |
refund_failed | Refund could not be completed | Gateway webhook, needs human |
reversed_by_bank | Auto-reversal of a failed debit | Bank, gateway report |
Two rules keep the model honest. First, only a verified webhook or a status fetch from the gateway moves a payment to captured, never the redirect URL. Second, every state change writes an immutable row with a timestamp and the source, so the finance team can answer "what happened to this payment" without guessing.
The three problems that cause support calls
Debited but not booked. The payment is captured and the slot booking failed, or the slot was taken between selection and payment. Design for it: create the booking hold before payment, make the payment bound to the hold, and have a job that finds captured payments with no confirmed booking and either completes the booking, offers alternatives, or refunds. Tell the patient on screen what is happening while it resolves.
Booked but not paid. The patient completed the payment, but the webhook is delayed. The booking page shows "payment pending". Poll the gateway for status for a short period, then show a clear message and send an SMS or WhatsApp update when it resolves. Do not release the slot instantly while the payment is in an unknown state.
Cancelled and refund unclear. The patient cancels, the doctor is unavailable, or the hospital reschedules. The refund begins and then vanishes into silence. Give the patient a refund reference, the method and the expected timeline, and let the front desk see the same state.




