Skip to content

Environments

Everything in this documentation points at HGN's sandbox. Build against it, test against it, then swap the hosts when you go live.

Production hosts are not published here

They are handed over with your live credentials, over WhatsApp or another secure channel agreed with your account manager. Nothing in this portal names them, and you should not guess them.


Sandbox hosts

Host What it is Where you meet it
apitest.himalayanguardian.com The REST API. Partner API under /api/external/v1, public booking endpoints under /api/public API Integration, Payment Verification
book.hgn.com.np The booking widget itself — the URL your iframe loads Booking Widget
testpay.hgn.com.np The hosted payment session the customer is sent to. Returned to you as paymentUrl Payments

You will not touch testpay.hgn.com.np directly — the API returns it and the browser follows it. It is listed so you recognise it in logs and in redirect chains, and so you know it changes when you go live.


Moving to production

Three things change, and none of them is code:

  1. The hosts, replaced with the ones issued to you.
  2. Your credentials — a live publishable key for the widget, and live client credentials for the Partner API. Sandbox keys do not work in production, and the reverse is also true.
  3. Your return_url, if it still points at a staging page on your side.

Keep hosts in configuration, never inline

HGN_API_BASE_URL=https://apitest.himalayanguardian.com/api/external/v1
HGN_WIDGET_BASE_URL=https://book.hgn.com.np

Read them from the environment and the switch to production is a deployment setting. Hard-code them and it is a code change, a review, and a release — for every environment, every time.

The widget's Embed URL is the exception

Do not assemble the widget URL from a host and a slug by hand. Copy the Embed URL from Booking Widget › Settings in the dashboard — it already carries the correct host, your slug, and your publishable key for whichever environment that account belongs to.


How to tell which environment you are in

Signal Sandbox Production
Bookings appear in your sandbox dashboard your live dashboard
Payments test cards and test QR only, no money moves real charges
Order references issued from the sandbox sequence issued from the live sequence

A sandbox host in production fails silently

It does not error. A live payment simply will not resolve against sandbox data, so verification returns nothing and your result page holds its "confirming your payment" state indefinitely. Check the hosts first when a confirmation never arrives.