HolidaySG App
Book attractions faster
GET
🔥 Happy Friday ends in
🔥 Happy Friday · 3 deals ends in See deals →

B2B Partner API

B2B Partner APIhttps://holidaysg.com/api/b2b/v1Sandbox · Live · Webhooks · IP allowlist

🔌 Connect: sandbox, live, webhooks

One base URL, three things to set up. Pick a tab.

Sandbox for building and testing. Send a sandbox key to https://holidaysg.com/api/b2b/v1.

  • Bookings are simulated: the reference starts with SBX-, no wallet is charged and no supplier ticket is issued.
  • Webhooks are sent for sandbox bookings too, so you can test your endpoint before going live.
  • Attractions have a checklist: run GET /certification to see which checks you have passed; an attractions production key is issued after it. eSIM, hotels and ferry have no checklist: we switch them on for your account after you have run a sandbox test (for eSIM, see the test scenarios).

What you can test on a sandbox key

ServiceOn a sandbox key
Attractions & toursFull test quote, book and cancel are simulated (SBX- references, no charge, no ticket).
HotelsFull test a booking is confirmed as a simulation. Nothing is sent to the hotel and nothing is charged.
FerryFull test bookings are simulated (SBX- ids) and can be read back for 7 days.
eSIMSimulated orders, top-ups, usage and cancel work as a simulation: no supplier call, no charge, and the eSIM returned is a test one (ICCID starts with 89000SIM, no QR, cannot be installed). A plan with a phone number is not simulated (503 SANDBOX_UNAVAILABLE). To test a real order use a live key (paid from your wallet).

Live real money, real tickets. Same base URL, a production key and its own signing secret.

  • Wallet or credit is charged when a booking is made, and a real ticket is issued.
  • Enabled by us after your sandbox certification. Keep sandbox and live keys in separate config.
  • Refunds are never automatic. A cancellation is handled by our team.

Webhook goes from us to you. It is not part of the API you call.

  • Set your HTTPS URL in the B2B portal, under Webhook (/b2b/webhook), and switch it on.
  • Event: BOOKING_TRANSACTION_UPDATE. Headers X-Webhook-Event and X-Webhook-Signature (base64 HMAC-SHA256 of the raw body with your webhook secret).
  • Body: event (for example booking.confirmed), booking_id, status, total, currency, gt_booking_ref, timestamp.
  • Answer 2xx within 15 seconds. Otherwise we retry up to 5 times, after about 10 s, 30 s, 1 min, 5 min and 15 min. Delivery is at-least-once, so dedupe on booking id and status.
  • If your firewall restricts inbound traffic, allow our server address 187.127.107.96.

What you need to call the API:

  • X-Api-Key: hsg_b2b_... on every call. Writes are also signed: X-Api-Timestamp, X-Api-Nonce, X-Api-Signature (see Request signing), plus an Idempotency-Key on bookings.
  • A key is limited to the services it has been granted (attractions, hotels, eSIM, ferry). A service not granted answers 403 AUTH_SCOPE_FORBIDDEN.
  • IP allowlist (required, 1 to 3 addresses): every key is locked to the server IPs you call from. Type them in the Allowed IPs box when you create a key or request one in the B2B portal (Staff & API keys, API users tab), one per line. Exact addresses only, no ranges (CIDR). A call from any other address answers 401 AUTH_UNAUTHORIZED. You can change the list later in the same place, but it can never be empty.
  • Keys are per API. In the portal (Staff & API keys, API users tab) create a sandbox key for each API you want to test (attractions, hotels, eSIM, ferry). It works at once. When you are ready, press Request live key for that API; we review it, and once it is approved you create the live key yourself in the same place (we never see it).
Never put a key or secret in browser or app code. Call the API from your server.

🧭 Start here

New to the API? Read this block, then jump to the service you sell. Everything else on this page is reference.

  1. Apply for a B2B partner account. Once approved we issue a sandbox key and its signing secret (details).
  2. Build on sandbox: same host as live, nothing is charged and nothing is booked (sandbox).
  3. Test: run the full flow once on sandbox (attractions: the certification checklist; eSIM, hotels, ferry: your own test, we review it) and we issue a production key and, if agreed, a credit line.
  4. Fund your wallet (or use your credit line) and go live by swapping the key and secret.

Which service do you need?

ServiceWhat you sellYou pay fromSwitched onSection
Attractions & toursTickets and experiences, by dateWallet or credit lineWith your accountCatalog to Cancel
HotelsHotel rooms, by dates and guestsWallet or credit linePer partner, ask your account managerHotels
HolidaySG eSIMData plans and top-upsWalletPer partner, ask your account managereSIM
FerryFerry tickets, one way or two wayWallet onlyFerry access on your key, ask your account managerFerry

What every service shares

  • One base URL, one API key, scopes, rate limits and the same response envelope.
  • Money-moving calls are signed and carry an Idempotency-Key, so a retry never books twice.
  • Prices are your nett price in SGD; you set your own selling price. Hotel and ferry cancellations and refunds are reviewed by our team, never automatic.
  • Machine-readable spec: OpenAPI file (every path, verb and scope for attractions, hotels, eSIM and ferry, plus the main request fields; this page has the full field lists).

◉ Overview

A REST API over HTTPS. JSON in, JSON out. Every response uses a consistent { data, meta, errors } envelope.

The API exposes HolidaySG's bookable inventory — attractions, tours and tickets — sourced from our suppliers and normalised into a single catalog. You browse products, check live availability, lock a price, and book. Money settles through your wallet or an approved credit line. SEO/marketing content is never exposed; you receive only the fields you need to transact.

PropertyValue
Base URLhttps://holidaysg.com/api/b2b/v1
ProtocolHTTPS only · TLS 1.2+
FormatJSON request & response (UTF-8)
AuthX-Api-Key header on every request (+ HMAC signature on money-moving calls)
CurrencySGD (all prices, one currency — no FX)
VersioningPath-pinned /v1; breaking changes ship as a new version

➜ API workflow

Five steps from browsing to a confirmed ticket. Each maps to one endpoint.

1
Browse catalog
GET /products
➜
2
Check availability
GET /availability
➜
3
Lock a price
POST /quotes
➜
4
Book & pay
POST /bookings
➜
5
Fulfil & notify
webhook + GET /bookings/{id}
  1. Understand product structure and map our products to yours (Product → Option → Ticket Type).
  2. Get live availability & pricing for a date (availability) then lock the price.
  3. Provide booking information (quote + customer) to create a paid transaction (book).
  4. Receive fulfilment — the e-ticket is delivered to the customer and you are notified by webhook.

🚀 Getting access

  1. Apply for a B2B partner account. Once approved you are placed in a commission group (default 1%).
  2. In the B2B portal (Staff & API keys, API users tab) create a sandbox API key for each API you need, with 1 to 3 static server IPs. You see the key and its signing secret once — store the secret securely.
  3. Build against sandbox (no real money or inventory) and complete the certification checklist.
  4. When you are ready, press Request live key for each API. After we approve it, create the live key yourself in the portal. Attractions need the certification checklist first; a credit line is agreed separately.

Health check

Check service availability (authenticated):

curl https://holidaysg.com/api/b2b/v1/ping -H "X-Api-Key: <your-key>"

→ { "data": { "status": "ok", "service": "HolidaySG B2B API", "version": "v1" } }

Verify your key

Verify a key at any time:

curl https://holidaysg.com/api/b2b/v1/me -H "X-Api-Key: <your-key>"

→ { "data": { "partner": { "id": 12, "name": "Acme Travel", "tier": 2, "currency": "SGD" },
      "api_key": { "name": "Prod", "prefix": "hsg_b2b_ab12", "scopes": [], "last_used_at": "..." } } }

🧩 Environments

There is one base URL for everything. Sandbox vs production is decided by which key you send — not by a different host.

EnvironmentHowMoney & inventory
SandboxUse a sandbox key against the same base URLSimulated — bookings are recorded but no wallet is charged and no supplier ticket is issued
ProductionUse a production keyReal — wallet/credit is charged and a real ticket is issued
Because the host is identical, you flip an integration from test to live simply by swapping the key and its signing secret. Keep the two key pairs in separate config.

🔑 Authentication

Send your API key on every request.

X-Api-Key: hsg_b2b_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keys are stored hashed — we never see the raw key after issue. Money-moving requests additionally require a signature.

ConditionResponse
Missing / invalid / revoked / expired key, or a source IP outside your allowlist401 AUTH_UNAUTHORIZED
Valid key calling an endpoint outside its scopes403 AUTH_SCOPE_FORBIDDEN

🎚 Scopes

Each key carries a set of scopes. An empty scope list means full access (backward-compatible default); a non-empty list is strictly enforced per endpoint.

ScopeGrants
catalog:readProducts & availability
quote:writeCreate quotes
booking:readList & retrieve bookings
booking:writeCreate bookings
booking:cancelCancel bookings
statement:readStatements

✍ Request signing

Money-moving calls — POST /bookings and POST /bookings/{id}/cancel — require an HMAC-SHA256 signature (plus /signature/verify to test it).

X-Api-Timestamp: <unix seconds>
X-Api-Nonce:     <unique per request>
X-Api-Signature: hex( hmac_sha256(canonical, signing_secret) )

canonical = timestamp "\n" METHOD "\n" path "\n" nonce "\n" rawBody
  • path includes the leading slash, no query string (e.g. /api/b2b/v1/bookings).
  • rawBody is the exact JSON bytes you send — sign the string you transmit.
  • Timestamp must be within 5 minutes of server time; each nonce is single-use (replays are rejected).

Dry-run: POST /signature/verify

Validate your signing implementation with no side effects. Note that /signature/verify is itself a signed endpoint — send the same three signature headers you would on a booking, computed over this request's own canonical string (path = /api/b2b/v1/signature/verify). The server recomputes the signature and confirms the match.

POST /signature/verify
Headers: X-Api-Key, X-Api-Timestamp, X-Api-Nonce, X-Api-Signature
{ ...any JSON body (may be empty)... }

→ 200 { "data": { "verified": true,
        "echo": { "method": "POST", "path": "/api/b2b/v1/signature/verify",
                  "timestamp": "...", "nonce": "...", "body_sha256": "..." } } }
Calling /signature/verify — or any signed endpoint — without the three signature headers returns 401 SIGNATURE_MISSING. A bad signature is 401 SIGNATURE_INVALID, a timestamp more than 5 minutes off is 401 SIGNATURE_TIMESTAMP_SKEW, and a reused nonce is 409 SIGNATURE_REPLAY. All are rejected before the request runs, so /signature/verify is the safe place to shake these out.

♻ Idempotency

Booking is safe to retry. Send a unique Idempotency-Key header on POST /bookings.

Idempotency-Key: 2f9c1e77-....-per-booking-attempt
  • First call → 201 and the booking is created.
  • Any retry with the same key → 200 returning the original booking. You are never charged twice.
  • Reuse the same key only for the same logical booking. Use a fresh key for a new booking.
  • Missing the header → 400 IDEMPOTENCY_KEY_REQUIRED.
  • Same key with different quote/customer → 409 IDEMPOTENCY_KEY_MISMATCH.

⏱ Rate limits

Per-partner, by tier. Every response carries the current window.

TierRequests / min
1 (default)60
2300
3600
41200
X-RateLimit-Limit: 60     # your tier's per-minute quota
X-RateLimit-Remaining: 57
Retry-After: 12           # present on 429

Over the limit → 429 RATE_LIMIT_EXCEEDED. Back off and honour Retry-After.

A flood guard of 300 requests / minute per source IP also runs before authentication (invalid-key requests count). Tier 3–4 integrations calling from a single IP should contact us to align the per-IP guard with their tier.

✉ Envelope & pagination

Every response — success or error — has the same shape.

{ "data": ... ,
  "meta": { "request_id": "01J...", "timestamp": "2026-08-15T07:57:00+00:00" },
  "errors": [ { "code": "...", "message": "..." } ] }

Quote request_id when contacting support — it identifies the exact call in our logs.

Cursor pagination

List endpoints are cursor-paginated. meta carries the cursors; pass one back as ?cursor=.

"meta": { "per_page": 25, "next_cursor": "eyJpZCI6...", "prev_cursor": null }

GET /products?per_page=25&cursor=eyJpZCI6...

⚠ Errors

Errors return the standard envelope with a machine code in errors[].code and a matching HTTP status.

CodeHTTPMeaning
AUTH_UNAUTHORIZED401Bad / missing / IP-blocked key
AUTH_SCOPE_FORBIDDEN403Key lacks the required scope
SIGNATURE_MISSING401A signed endpoint was called without the X-Api-Timestamp/X-Api-Nonce/X-Api-Signature headers
SIGNATURE_INVALID401Signature does not match the canonical string
SIGNATURE_TIMESTAMP_SKEW401Timestamp is more than 5 minutes from server time
SIGNATURE_REPLAY409Nonce already used within the signing window
VALIDATION_FAILED422Bad or missing parameters
RATE_LIMIT_EXCEEDED429Slow down; honour Retry-After
PRODUCT_NOT_FOUND404No such product
SOURCE_UNAVAILABLE503Availability source temporarily down — retry
QUOTE_EXPIRED409Quote expired or already used
INSUFFICIENT_FUNDS402Wallet too low — no money moved
CREDIT_LIMIT_EXCEEDED402Over credit line — no money moved
BOOKING_CONFIRM_FAILED502Supplier rejected at confirm — fully refunded
BOOKING_NOT_CANCELLABLE409Already cancelled or past cut-off — no money moved
IDEMPOTENCY_KEY_REQUIRED400Missing Idempotency-Key header on POST /bookings
IDEMPOTENCY_KEY_MISMATCH409Same idempotency key used with different quote or customer
BOOKING_NOT_FOUND404No booking matches the given id for this partner
BOOKING_RESERVE_FAILED502Upstream source could not reserve — no funds debited
TRAVELLER_ANSWERS_REQUIRED422Ticket types require per-traveller details (passport name, gender, DOB) — see availability for required questions

▦ Product structure

Every product is organised as Product → Option → Ticket Type. You map these ids to your own catalog, then reference them when quoting and booking.

Product— the attraction/experience  ·  product_id: hsgp_1
└─Option— a variant (e.g. 1-Day Pass)  ·  option_id: opt_60
    └─Ticket Type— the priced unit (ADULT / CHILD)  ·  ticket_type_id: tt_94
LevelRepresentsYou use it to…
ProductThe bookable attraction, tour or ticketList & display; the unit of a catalog page
OptionA bookable variant of the product (duration, package, session)Show the choices for a product/date
Ticket TypeThe smallest priced unit within an option (pax category)Quote & book — you pass ticket_type_id + quantity
Availability tells you which options and ticket types are bookable for a given date — always drive quoting from a live availability response rather than cached ids.

▤ Catalog

GET/productsList active, bookable products. Cursor-paginated.
GET/products/{product_id}A single product with its options.

Query parameters

ParamDescription
countryoptFilter by country, e.g. Singapore
cityoptFilter by city
category_idoptFilter by category
is_bookableopttrue to return only live-bookable products
per_page / cursoroptPagination (see envelope)
curl "https://holidaysg.com/api/b2b/v1/products?country=Singapore&per_page=20" -H "X-Api-Key: <key>"
from_price in the catalog is indicative only and must not be sold on. Always take the real price from a quote.

📅 Availability

GET/products/{id}/availabilityLive bookability for a date, with option / ticket-type detail.
ParamDescription
datereqVisit date, YYYY-MM-DD, today or later
paxoptParty size to check capacity against

Returns the options and their ticket_type_ids that are bookable for that date — this is where you get the ticket_type_id to quote and book (they are not on the catalog/product record). Availability is fetched live from the source at request time — if the source is unreachable you get 503 SOURCE_UNAVAILABLE (retry), never a stale “available”.

A missing or malformed date, or a date the product does not operate on (many run only on certain weekdays), returns 422 VALIDATION_FAILED — not an empty list. Read the operating days from the product before probing, or step the date forward until availability returns available: true.
curl "https://holidaysg.com/api/b2b/v1/products/hsgp_1/availability?date=2026-08-20&pax=2" -H "X-Api-Key: <key>"

💲 Pricing model

Simple and transparent: one currency, your price only. You never see supplier nett cost or the margin — your commission is already baked into what you pay.

FieldMeaning
unit_priceYour all-in price per ticket, in SGD, with your commission applied
sub_totalunit_price × quantity for a line
totalSum of all line sub-totals — the amount debited on booking
currencyAlways SGD

There is no separate tax or FX step — total is exactly what leaves your wallet/credit. Your own selling price and margin to your customer are yours to set on top.

🔒 Quotes

A quote locks the price for 15 minutes and returns a single-use quote_id you pass to booking. This guarantees the price you saw is the price you pay.

POST/quotesPrice-lock a set of ticket types for a date.
POST /quotes
{ "product_id": "hsgp_1",
  "date": "2026-08-20",
  "items": [ { "ticket_type_id": "tt_94", "quantity": 2 } ] }

→ { "data": {
     "quote_id": "q_XXXX", "product_id": "hsgp_1", "date": "2026-08-20", "currency": "SGD",
     "lines": [ { "ticket_type_id":"tt_94", "name":"ADULT", "quantity":2, "unit_price":56.41, "sub_total":112.82 } ],
     "total": 112.82,
     "expires_at": "2026-08-20T07:57:00+00:00" } }
  • A quote is consumed by exactly one successful booking; a used or expired quote → 409 QUOTE_EXPIRED.
  • Re-quote if the customer takes longer than the 15-minute window.

🔁 Booking lifecycle

One call books money-safely. Internally we debit first, then confirm with the supplier, and compensate automatically if anything fails — so you are never left paying for an unconfirmed ticket.

A
reserved
debited, confirming
➜
B
confirmed
ticket being issued
➜
C
cancelled
refunded to source
StatusHTTPMeaning
reserved—Transient — payment taken, confirming with supplier
confirmed201Booked & paid; e-ticket being fulfilled
confirmed (replay)200Idempotent retry returned the original booking
pending202Accepted; outcome being reconciled — watch the webhook
failed_pending_refund502Supplier rejected after debit; refund issued back to source
cancelled200Cancelled by you; refunded
Money safety: if confirmation fails or is ambiguous, the debit is reversed automatically. A 402 (insufficient funds / credit) means nothing was ever charged. You can rely on “charged ⇔ confirmed (or refunded)”.

🎫 Create a booking

POST/bookingsSigned + Idempotency-Key. Consumes a quote, charges wallet or credit, books the supplier.
FieldDescription
quote_idreqA live, unused quote
payment_methodoptwallet (default) or credit
customer.namereqLead traveller name
customer.emailreqWhere the e-ticket is sent
customer.phoneoptContact phone number (max 30 chars)
customer.mobile_codeoptCountry dial code, e.g. +65 (max 10 chars)
traveller_answersopt*Per-traveller details keyed by ticket type, with nested per-pax answers. Required when the product's availability response includes questions (e.g. passport name, gender, DOB). Omitting when required → 422 TRAVELLER_ANSWERS_REQUIRED.
POST /bookings
Headers: X-Api-Key, X-Api-Timestamp, X-Api-Nonce, X-Api-Signature, Idempotency-Key
{ "quote_id": "q_XXXX", "payment_method": "wallet",
  "customer": { "name": "Jane Tan", "email": "jane@example.com" } }

→ 201 { "data": { "booking_id": "b_XXXX", "status": "confirmed",
        "total": 112.82, "currency": "SGD",
        "customer": { "name": "Jane Tan", "email": "jane@example.com" },
        "note": null } }

See the lifecycle for the 200 / 202 / 402 / 502 paths.

🔎 Retrieve bookings

GET/bookingsYour bookings, newest first. Cursor-paginated.
GET/bookings/{booking_id}A single booking and its current status.

Query parameters (listing)

ParamDescription
per_pageoptResults per page, 1–100. Default 25.
cursoroptCursor from a previous response's meta.next_cursor / meta.prev_cursor.

Response fields

FieldDescription
booking_idYour reference for the booking
statusSee lifecycle statuses
total / currencyAmount charged, in SGD
customer{ name, email }
created_atISO-8601 timestamp (listing only — not present on create/show/cancel responses)
Note: The listing returns bookings in statuses reserved, confirmed, cancelled, and failed_pending_refund. Transient pending bookings are not included — poll GET /bookings/{id} by id to follow a 202 pending booking to its terminal state, or rely on the webhook.

↩ Cancel & refunds

POST/bookings/{booking_id}/cancelSigned. Cancels and refunds to the paying account.
  • 200 cancelled — refund returned to the source of payment (wallet, or credit reversed). Idempotent: cancelling an already-cancelled booking returns 200 without a second refund.
  • 409 BOOKING_NOT_CANCELLABLE — already cancelled, or past the supplier cut-off. No money moves.
Refunds always return to the account that paid: wallet bookings refund to the wallet; credit bookings reverse the credit charge. Cut-off windows follow the underlying supplier's policy for that product.

📩 Vouchers & fulfilment

HolidaySG fulfils the ticket — you don't have to.

On confirmed, the e-ticket / voucher is issued by the supplier and delivered by email to the customer.email on the booking. You can:

The booking response returns the booking record (id, status, total, customer) — it does not embed the raw QR/PDF. If your product experience needs to render the voucher in-app, ask your account manager to enable voucher-payload delivery for your key.

🔔 Webhooks

We push booking updates to your endpoint so you don't have to poll. Deliveries retry with backoff and dead-letter after repeated failures.

Event (X-Webhook-Event)Fires when
BOOKING_TRANSACTION_UPDATEA booking is confirmed, refunded, or otherwise changes state

Verifying a webhook

Each POST to your URL carries a signature over the raw request body, keyed by your webhook secret:

X-Webhook-Event:     BOOKING_TRANSACTION_UPDATE
X-Webhook-Signature: base64( hmac_sha256(rawBody, webhook_secret) )

# verify (pseudo)
expected = base64(hmac_sha256(request.rawBody, webhook_secret))
if !constant_time_equal(expected, header["X-Webhook-Signature"]) -> reject 400
  • Respond 2xx quickly to acknowledge; non-2xx (or timeout) triggers retries.
  • Treat delivery as at-least-once — dedupe on the booking id + state.

📶 eSIM overview

Sell HolidaySG eSIM data plans to your travellers through the same API: browse plans, order one eSIM per order from your wallet, hand the install code to your customer.

PropertyValue
Base URLhttps://holidaysg.com/api/b2b/v1/esim — same X-Api-Key, IP allowlist, rate limits and request signing on writes as the rest of the API
MoneyPrices in SGD, paid from your HolidaySG wallet (credit lines are not used for eSIM)
Order sizeOne eSIM per order
IDsPlans hsg_plan_{n} · eSIMs hsg_esim_{n} (or the ICCID) · orders HSGE-YYYYMMDD-XXXXXX
AccountsCompany accounts and their staff keys. Sub-agent accounts cannot use eSIM (403 AUTH_SCOPE_FORBIDDEN).
B2B portalOrders your team places in the B2B portal (eSIM menu) appear in the same lists and statements with "channel": "portal"; API orders have "channel": "api".
Partner orders are not held for review. The one exception: if a wallet charge could only be confirmed after a timeout, the order waits for our team's approval ("held": true) so you are never sent a second eSIM you did not want.
GET/esim/countriesCountries with plans on sale.
GET/esim/regionsRegional (multi-country) groups.
GET/esim/plansPlans for one country or one region.
GET/esim/plans/{id}One plan.
GET/esim/catalog-versionChanges when the catalogue was refreshed.
POST/esim/ordersBuy an eSIM (signed).
GET/esim/ordersYour orders, or one by ?ref=.
GET/esim/orders/{id}One order.
GET/esim/esims/{id}One eSIM and its install details.
GET/esim/esims/{id}/usageData used / left.
GET/esim/esims/{id}/topupsTop-up packs for this eSIM.
POST/esim/esims/{id}/topupAdd data (signed).
POST/esim/esims/{id}/cancelAsk to cancel an unused eSIM (signed).
GET/esim/statementsMonthly statement.
GET/esim/webhooksYour webhook endpoints.
POST/esim/webhooksAdd an endpoint (signed).
POST/esim/webhooks/{id}/testSend a test event (signed).
POST/esim/webhooks/{id}/rotate-secretNew signing secret, shown once (signed).
DELETE/esim/webhooksRemove an endpoint (signed).

🗺 eSIM catalog

Scope catalog:read. Send exactly one of country (ISO-2, e.g. JP) or region (a slug from GET /esim/regions).

GET /esim/plans?country=JP

→ 200 { "data": [ {
    "plan_id": "hsg_plan_123", "name": "Japan 5 GB 7 days", "scope": "country",
    "country_code": "JP", "country_name": "Japan",
    "data_gb": 5, "is_unlimited": false, "fair_usage": null,
    "validity_days": 7, "validity_note": "Validity starts when the eSIM first connects to a network.",
    "network_type": "...", "networks": [ ... ],
    "supports_topup": true, "supports_cancel": true, "supports_hotspot": true, "ip_export": "...",
    "requires_kyc": false,
    "price": 12.40, "currency": "SGD", "suggested_retail_price": 15.90
  } ], ... }
FieldMeaning
priceYour partner price in SGD — what your wallet is charged for this plan.
suggested_retail_priceThe price HolidaySG sells the same plan at on holidaysg.com/esim. You set your own selling price.
requires_kycThe destination needs the traveller's ID for this plan. Such plans are sold through the API only (not the portal); you keep your customers' documents.
supports_cancel / supports_topup / supports_hotspotWhether an unused eSIM can be cancelled, whether data can be added, whether tethering works.
validity_daysCounted from the first network connection, not from purchase.

🛒 eSIM orders

Scope booking:write, signed. The wallet is debited before the eSIM is ordered.

POST /esim/orders
{ "plan_id": "hsg_plan_123",
  "partner_ref": "your-order-9F2K",          // required: your idempotency key
  "end_user_email": "traveller@example.com",  // optional, kept for your records; we never e-mail your customer
  "end_user_name": "A. Traveller",            // optional
  "expected_sgd": 12.40 }                     // optional: refuse if the price is no longer this

→ 201 { "data": { "id": "HSGE-20261014-7Q2M4X", "partner_ref": "your-order-9F2K",
         "status": "processing", "payment": "paid", "held": false,
         "total": 12.40, "currency": "SGD", "sandbox": false, "channel": "api",
         "end_user_name": "A. Traveller", "end_user_email": "traveller@example.com",
         "created_at": "...", "esims": [ { "esim_id": "hsg_esim_88", "status": "processing", ... } ] },
       "meta": { "timestamp": "...", "replayed": false }, "errors": [] }
  • partner_ref: 1–100 characters from A-Z a-z 0-9 . _ -. The Idempotency-Key header is accepted when the body has none.
  • A partner_ref is unique across your orders and top-ups. Retry with the same one → 200 with the original order and meta.replayed: true; never a second charge. The same ref for a different plan or for a top-up → 409 PARTNER_REF_REUSED.
  • 502 WALLET_UNCONFIRMED, a timeout or a 500: retry with the same partner_ref (after 5 minutes for WALLET_UNCONFIRMED). We check the wallet and finish or close the order; you are never charged twice.
  • payment: paid (wallet charged, refunds included) · checking (charge still being confirmed) · not_charged (cancelled before any charge, or a sandbox order).
  • Order status: completed every eSIM issued · processing being prepared — poll GET /esim/orders/{id} or use a webhook · failed not issued (if your wallet was charged, it is credited back after our team's review).

Listing

  • GET /esim/orders?page=1&per_page=25 — page-based, per_page up to 100; meta carries page, per_page, total.
  • GET /esim/orders?ref=your-order-9F2K — returns one order object for that partner_ref, or 404 NOT_FOUND.
  • GET /esim/orders/{id} — by our order id HSGE-…. Scope booking:read for every read.

📱 eSIMs, usage, top-ups, cancel

{id} is hsg_esim_{n} or the ICCID. Only eSIMs of your own orders are found.

FieldMeaning
statusprocessing · ready (issued, not installed) · installed · active · used_up · expired · suspended · revoked · failed · cancelled
iccid, lpa, qr_urlInstall details, once issued. lpa is the manual activation code; qr_url is a HolidaySG link to the QR image. Treat both like a password: anyone holding them can install the eSIM.
ios_install_url, android_install_urlOne-tap install links for the traveller's phone.
install_by, expires_atInstall before this date; the plan's end once active.
GET/esim/esims/{id}/usagedata_total_mb, data_used_mb, data_remaining_mb, tracking. Refreshes every 2–3 hours upstream; on unlimited plans use status.
GET/esim/esims/{id}/topupsPacks you can add: topup_id, name, data_gb, validity_days, price (SGD).
POST/esim/esims/{id}/topupSigned, booking:write. Body { "topup_id": "...", "partner_ref": "..." }. Wallet debited first; same replay rules as orders. Use the same kind of key (sandbox or live) the eSIM was bought with, else 409 SANDBOX_MISMATCH.
POST/esim/esims/{id}/cancelSigned, booking:cancel. Only an unused eSIM on a plan with supports_cancel. Answers 202 with cancel_requested: true and a refund_request id.
A refund is never automatic. A cancellation is a request: our team reviews it and your wallet is credited only after approval. An installed, used or expired eSIM cannot be cancelled (409 NOT_CANCELLABLE).

📄 eSIM statements

GET/esim/statements?month=YYYY-MMScope statement:read. Orders paid in that month, Singapore time.
  • Each row: date, order_id, partner_ref, plans, amount, status, payment_status, refunded. Totals: orders, amount, refunded, net (SGD).
  • A sandbox key sees sandbox orders only; a live key sees live orders only.
  • Orders placed in the B2B portal are included.

🔔 eSIM webhooks

eSIM events have their own endpoints and signature, separate from booking webhooks.

GET/esim/webhooksYour endpoints (id, url, events, is_active, fail_count).
POST/esim/webhooks{ "url": "https://...", "events": ["*"] }. The URL must be https and resolve to a public internet address; at most 5 endpoints. The signing_secret is shown once.
DELETE/esim/webhooks{ "id": 12 } in the body.
POST/esim/webhooks/{id}/testSends test.ping now and answers delivered: true|false.
POST/esim/webhooks/{id}/rotate-secretLost the secret? Makes a new signing_secret for the same endpoint, shown once. The old secret stops signing at once, so update your server first or right after.
Event (X-HSG-Event)Sent when
esim.readyThe eSIM was issued (install details available)
topup.completedA top-up was added
esim.installed · esim.activeInstalled on a phone · first connected
esim.low_data · esim.expiring · esim.expiredUsage and validity milestones
esim.cancelledThe eSIM was cancelled
test.pingYour test call
order.failed · topup.failedReserved, not sent yet — poll the order
POST https://your-endpoint
X-HSG-Event:     esim.ready
X-HSG-Signature: t=1760420000,v1=<hex hmac_sha256( t + "." + rawBody, signing_secret )>
User-Agent:      HolidaySG-Webhooks/1.0
Content-Type:    application/json

{ "event": "esim.ready", "created": "2026-10-14T08:00:00+08:00", "data": { ... } }
  • Sent from a queue, usually within a minute; 8-second timeout, redirects not followed. A failed delivery is retried up to 5 times, after 10 s, 30 s, 1 min, 5 min and 15 min, so the same event can arrive twice. Poll the order if you still missed one.
  • An endpoint is switched off after 10 failed deliveries in a row (a delivery counts as failed only after its last retry).
  • Verify with a constant-time comparison, reject a t older than 5 minutes, and de-duplicate on event + data.id (order events) or data.esim_id (eSIM events) and use created to order deliveries; there is no separate event id.

Verify in PHP

$raw = file_get_contents('php://input');
preg_match('/t=(\d+),v1=([a-f0-9]+)/', $_SERVER['HTTP_X_HSG_SIGNATURE'] ?? '', $m);
$ok = $m && abs(time() - (int) $m[1]) <= 300
    && hash_equals(hash_hmac('sha256', $m[1] . '.' . $raw, $secret), $m[2]);
if (! $ok) { http_response_code(400); exit; }

Verify in Node

const crypto = require('crypto');
// rawBody = the exact bytes received (Buffer), before JSON parsing
const m = /t=(\d+),v1=([a-f0-9]+)/.exec(req.get('X-HSG-Signature') || '');
const expected = m && crypto.createHmac('sha256', secret).update(m[1] + '.' + rawBody).digest('hex');
const ok = m && Math.abs(Date.now() / 1000 - Number(m[1])) <= 300
  && m[2].length === expected.length
  && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(m[2]));
if (!ok) return res.status(400).end();

🧾 eSIM sample responses

Complete examples of what the API returns. Values are examples; the fields and types are what you get. Every answer is wrapped as { "data": ..., "meta": { "timestamp": "..." }, "errors": [] }; only data is shown below.

Order (POST /esim/orders, GET /esim/orders/{id})

{ "id": "HSGE-20261108-7Q2M4X",
  "partner_ref": "your-order-9F2K",
  "status": "completed",              // processing | completed | failed
  "total": 12.40, "currency": "SGD",
  "sandbox": false,
  "channel": "api",                   // api | portal
  "payment": "paid",                  // paid | checking | not_charged
  "held": false,
  "end_user_name": "A. Traveller",
  "end_user_email": "traveller@example.com",
  "created_at": "2026-11-08T09:15:02+08:00",
  "esims": [ {
    "esim_id": "hsg_esim_88",
    "plan_id": "hsg_plan_123",
    "plan": "Japan 1GB / 7 days",
    "status": "ready",                // processing | ready | installed | active | used_up | expired | suspended | revoked
    "iccid": "8981100022152967123",
    "lpa": "LPA:1$smdp.example$ABCD-1234",
    "qr_url": "https://holidaysg.com/esim/qr/456/abc123",
    "ios_install_url": "https://esimsetup.apple.com/esim_qrcode_provisioning?carddata=...",
    "android_install_url": "https://esimsetup.android.com/esim_qrcode_provisioning?carddata=...",
    "install_by": "2026-12-08T09:15:02+08:00",
    "expires_at": null,
    "has_phone_number": false } ] }

While an eSIM is still being prepared, status is processing and iccid, lpa, qr_url and the install links are null.

Usage (GET /esim/esims/{id}/usage)

{ "esim_id": "hsg_esim_88", "status": "active",
  "data_total_mb": 1024, "data_used_mb": 312, "data_remaining_mb": 712,
  "tracking": true,
  "note": "Usage refreshes every 2-3 hours upstream. On unlimited plans use status." }

On an unlimited plan the three data_* figures can be null and tracking is false.

Top-up list (GET /esim/esims/{id}/topups)

[ { "topup_id": "TP-1GB-7D", "name": "1 GB / 7 days", "data_gb": 1, "validity_days": 7,
    "price": 6.30, "currency": "SGD" } ]

POST /esim/esims/{id}/topup answers 201 with an order object like the one above (the order is a top-up; its esims list shows the eSIM that was topped up).

Cancel (POST /esim/esims/{id}/cancel)

// live key: a request only, answered 202
{ "esim_id": "hsg_esim_88", "cancel_requested": true, "refund_request": 31,
  "note": "Cancellation is reviewed by our team; your wallet is credited after approval." }

// sandbox key
{ "esim_id": "hsg_esim_88", "cancelled": true, "sandbox": true }

Statement (GET /esim/statements?month=2026-11)

{ "month": "2026-11", "timezone": "Asia/Singapore", "currency": "SGD", "sandbox": false,
  "orders": [ { "date": "2026-11-08", "order_id": "HSGE-20261108-7Q2M4X", "partner_ref": "your-order-9F2K",
                "plans": [ "Japan 1GB / 7 days" ], "amount": 12.40, "currency": "SGD",
                "status": "completed", "payment_status": "paid", "refunded": 0 } ],
  "totals": { "orders": 1, "amount": 12.40, "refunded": 0, "net": 12.40 } }

Error (any call)

HTTP 402
{ "data": null, "meta": { "timestamp": "..." },
  "errors": [ { "code": "INSUFFICIENT_BALANCE", "message": "..." } ] }

⏱ eSIM limits, retries and going live

Rate limits

  • eSIM calls use the same per-partner limit as every other call on your key, by tier: tier 1 = 60, tier 2 = 300, tier 3 = 600, tier 4 = 1200 requests a minute. They share one counter with attractions, hotels and ferry.
  • Every answer carries X-RateLimit-Limit and X-RateLimit-Remaining. Over the limit you get 429 RATE_LIMIT_EXCEEDED with Retry-After: wait that long.
  • A flood guard of 300 requests a minute per source IP runs before authentication.

Webhook delivery

  • A failed delivery is retried up to 5 times (after 10 s, 30 s, 1 min, 5 min, 15 min), the same as booking webhooks; an 8-second timeout, redirects not followed. Make your handler safe to run twice.
  • An endpoint is switched off after 10 failed deliveries in a row, each counted after its last retry (fail_count on GET /esim/webhooks).
  • Treat webhooks as a hint and poll GET /esim/orders/{id} as the source of truth: if you miss esim.ready, the order still shows the eSIM.

The live-key ordering flow

  1. Fund your wallet in the partner portal. A live order is paid from it; there is no credit line unless we agreed one.
  2. List plans with GET /esim/plans and note the price.
  3. POST /esim/orders with a new partner_ref and, if you like, expected_sgd (refused with 409 PRICE_CHANGED if the price moved). The wallet is debited first; 402 INSUFFICIENT_BALANCE means nothing was charged.
  4. The answer is processing or completed. Wait for the esim.ready webhook or poll the order until completed, then give the traveller the qr_url or lpa.
  5. After a timeout or a 5xx, retry with the same partner_ref: you get the original order back and are never charged twice.
  6. Refunds are never automatic: a cancel is a request that our team approves, then your wallet is credited.

⚠ eSIM errors

Same envelope: { data, meta: { timestamp, replayed? }, errors: [ { code, message } ] }. Every refusal before a charge says "Nothing was charged".

HTTPCodeMeaning
401AUTH_UNAUTHORIZEDBad / missing / IP-blocked key
403AUTH_SCOPE_FORBIDDENKey lacks the scope, or a sub-agent account
401 / 409SIGNATURE_*See request signing
429RATE_LIMIT_EXCEEDEDSlow down; honour Retry-After
422VALIDATION_ERRORBad or missing parameters (e.g. both country and region, a bad webhook URL)
422INVALID_PARTNER_REFpartner_ref missing or not 1–100 allowed characters
422PLAN_UNAVAILABLEPlan not found or not on sale right now
422TOPUP_UNAVAILABLEThat top-up pack is not available for this eSIM
422LIMIT_REACHEDAlready 5 webhook endpoints
404PLAN_NOT_FOUND / NOT_FOUNDNo such plan, order, eSIM or webhook for your account
409PARTNER_REF_REUSEDThat partner_ref already names a different order or a top-up
409PRICE_CHANGEDThe price is no longer your expected_sgd
409SANDBOX_MISMATCHTop-up with a different kind of key than the eSIM was bought with
409NOT_CANCELLABLEInstalled / used / expired, or the plan does not support cancel
402INSUFFICIENT_BALANCEWallet too low — nothing was charged; top up in the partner portal
502WALLET_UNAVAILABLEThe wallet could not be checked — nothing was charged; retry with the same partner_ref
502WALLET_UNCONFIRMEDThe charge could not be confirmed — retry with the same partner_ref in 5 minutes; never charged twice
503ESIM_B2B_CLOSEDLive partner orders are paused
503LIVE_NOT_READYLive orders open shortly; use your sandbox key
503SANDBOX_UNAVAILABLEA sandbox key asked for a plan with a phone number, which cannot be simulated — use your live key
503SANDBOX_CLOSEDB2B portal: test orders are closed now that eSIM is live
503ESIM_UNAVAILABLEeSIM service temporarily unavailable — retry; a write is safe to retry with the same partner_ref
500INTERNAL_ERRORSomething failed on our side — retry with the same partner_ref

🧪 eSIM sandbox

  • A sandbox key can order and top up as a simulation. HolidaySG eSIM is live, so a sandbox order is answered by us without asking the supplier: nothing is charged, no wallet is debited, and no real eSIM is made. The eSIM it returns is a test one (its ICCID starts with 89000SIM, the install address cannot be installed and there is no QR image).
  • Reading usage, listing top-ups, topping up and cancelling work on a simulated eSIM too, with fixed test figures (one top-up, SIM-TOPUP-1GB; a cancel is accepted and no refund is made). The esim.ready and topup.completed webhooks are sent for simulated orders, so you can test your endpoint.
  • A plan with a phone number is not simulated: a sandbox key gets 503 SANDBOX_UNAVAILABLE for it. The B2B portal test tick is closed now that eSIM is live (503 SANDBOX_CLOSED). To test a real order, use a live key: it is paid from your wallet, so start with the smallest plan.
  • Statements keep sandbox and live orders apart.
  • Test scenarios to run on a sandbox key:
    #Do thisYou should see
    1GET /esim/countries, /esim/plansPlans with price and plan_id
    2POST /esim/orders with a new partner_ref201, sandbox: true, payment: not_charged, one eSIM ready with an 89000SIM ICCID
    3Send the same partner_ref again200, same order, meta.replayed: true
    4Send the same partner_ref for a different plan409 PARTNER_REF_REUSED
    5GET /esim/esims/{id}/usageFixed test figures (1024 MB total, 0 used)
    6GET /esim/esims/{id}/topups, then POST .../topup with SIM-TOPUP-1GBOne pack; 201 with a top-up order
    7POST /esim/esims/{id}/cancelcancelled: true, sandbox: true, no refund
    8POST /esim/webhooks, then POST /esim/webhooks/{id}/test and place an ordertest.ping, then esim.ready (and topup.completed for a top-up), signed
    9GET /esim/statements?month=YYYY-MMYour sandbox orders only
    10Order with an unknown plan_id; a wrong signature422 PLAN_UNAVAILABLE; a signature error
    The wallet-balance error (402 INSUFFICIENT_BALANCE) and PRICE_CHANGED need a live key, because a sandbox key has no wallet. There are no special test plans: use any plan on sale.

🏨 Hotels overview

Search hotels, read live room rates, lock a price with a quote and book from your HolidaySG wallet or credit line — through the same API, keys and signing as the rest of this reference.

PropertyValue
Base URLhttps://holidaysg.com/api/b2b/v1/hotels — same X-Api-Key, IP allowlist, rate limits and request signing on writes
AccessHotels are enabled for your key by your account manager. Until then every hotel path answers 403 AUTH_SCOPE_FORBIDDEN.
MoneyPrices are your nett price in SGD (what you pay), paid from your wallet or credit line (payment_method). You set your own selling price.
Sandbox keysA booking made with a sandbox key is confirmed as a simulation: nothing is sent to the hotel and nothing is charged.
IDsHotels by slug · rates by rate_id · quotes quote_id · bookings by booking_id (our order reference)
PolicyEvery booking follows the Hotel Booking Policy and its Partner Hotel Terms (policy_url in the answers).
GET/hotelsSearch a destination for dates (scope catalog:read).
GET/hotels/{slug}/ratesEvery bookable rate of one hotel (scope catalog:read).
POST/hotels/quotesLock one rate's price (scope quote:write).
POST/hotels/bookingsBook a quote (scope booking:write, signed, Idempotency-Key).
GET/hotels/bookings/{id}One booking (scope booking:read).
POST/hotels/bookings/{id}/cancelCancel a booking (scope booking:cancel, signed).

🔒 Hotel quotes

A quote re-checks the rate with the hotel and locks its price until expires_at. Book before it expires.

POST /hotels/quotes
{ "slug": "...", "rate_id": "...", "checkin": "2026-11-21", "checkout": "2026-11-23",
  "rooms": [ { "adults": 2, "children": [7] } ], "residency": "sg", "expected_total": 412.30 }

→ 201 { "data": { "quote_id": "...", "slug": "...", "checkin": "2026-11-21", "checkout": "2026-11-23",
    "room": "...", "meal": "...", "total": 412.30, "currency": "SGD", "price_changed": false,
    "taxes_at_hotel": [ ... ], "cancellation": { ... }, "expires_at": "...",
    "important_information": { ... }, "important_notes": "...", "policy_url": "..." } }

When price_changed is true, the hotel's price moved since your rates call: show the new total to your customer before booking. A rate the hotel can no longer confirm answers 409 QUOTE_PRICE_UNAVAILABLE — call /rates again for fresh rate IDs.

📘 Hotel bookings

Signed request with an Idempotency-Key header. One key = one booking: repeating the same request returns the same booking.

POST /hotels/bookings
Idempotency-Key: 6f1c…
{ "quote_id": "...", "payment_method": "wallet",
  "customer": { "name": "Lead Guest", "email": "guest@example.com", "phone": "+6591234567",
                "special_requests": "High floor, late arrival" },
  "guests": [ { "room": 1, "first_name": "Lead", "last_name": "Guest" },
              { "room": 1, "first_name": "Child", "last_name": "Guest", "is_child": true, "age": 7 } ] }

→ 201 { "data": { "booking_id": "HSG-…", "status": "confirmed", "hotel": { ... }, "checkin": "...", "checkout": "...",
    "room": "...", "meal": "...", "guests": [ ... ], "total": 412.30, "currency": "SGD",
    "taxes_at_hotel": [ ... ], "cancellation": { "summary": "...", ... },
    "hotel_confirmation_number": null, "refunded": false, "refund_status": null,
    "invoice_number": null, "credit_note_number": null, "created_at": "..." } }
AnswerMeaning
201 status: confirmedBooked and paid.
202 BOOKING_PENDING_CONFIRMATIONPaid and sent to the hotel; the hotel has not confirmed yet. Poll GET /hotels/bookings/{id}. Do not retry.
502 BOOKING_CONFIRM_FAILEDThe hotel did not confirm. Our team reviews it and credits your wallet / credit line after approval (refund_status: pending_approval).
402 INSUFFICIENT_FUNDS / CREDIT_LIMIT_EXCEEDEDNot enough wallet balance / credit. Nothing was charged.
404 QUOTE_NOT_FOUND · 409 QUOTE_EXPIREDRequest a new quote.
400 IDEMPOTENCY_KEY_REQUIRED · 409 IDEMPOTENCY_KEY_MISMATCHMissing key, or the key was used for a different booking.

Guest names: letters, spaces, hyphens and apostrophes only, as on the passport; at least one adult with a full name per room. hotel_confirmation_number is filled when the hotel sends it, which can be after the booking is confirmed. status is one of processing, confirmed, failed, cancelled. invoice_number: your invoice from HolidaySG, downloadable on the booking in the B2B portal.

↩️ Hotel cancellation & refunds

POST /hotels/bookings/{id}/cancel

→ 200 { "data": { "booking_id": "HSG-…", "status": "cancelled", ..., "refund": 380.10, "refund_status": "pending_approval" } }
  • The refund is the nett price you paid minus the hotel's penalty at the time you cancel. There is no HolidaySG cancellation fee for partners.
  • Refunds are never automatic. Our team checks and approves every refund, then credits your wallet or credit line; refund_status moves from pending_approval to refunded and credit_note_number is filled.
  • No-shows and early departures are not refunded. A booking past its cancellation deadline, or already cancelled, answers 409 BOOKING_NOT_CANCELLABLE (nothing moved); if the hotel could not confirm the cancellation in time you get BOOKING_CANCEL_UNCONFIRMED — our team follows up.
  • Names, dates and rooms cannot be changed: cancel and book again.

💬 Special requests & questions

  • When booking: customer.special_requests (up to 250 characters) is sent to the hotel with the booking. The hotel decides; requests are not guaranteed.
  • After booking: there is no messaging endpoint. Use "Ask about this booking" on the booking in the B2B portal, or contact our team with the booking_id; we contact the hotel for you.

⛴️ Ferry overview

Search ferry sailings, get the exact price for a chosen sailing and book from your HolidaySG wallet — through the same API, keys and signing as the rest of this reference.

PropertyValue
Base URLhttps://holidaysg.com/api/b2b/v1/ferry — same X-Api-Key, IP allowlist, rate limits and request signing on writes
AccessYour key needs the ferry supplier scope; otherwise every ferry path answers 403 AUTH_SCOPE_FORBIDDEN.
MoneyPrices are set by HolidaySG, in SGD, and worked out on our server. You pay from your wallet only. You set your own selling price.
Sandbox keysA booking made with a sandbox key is checked and priced, then answered as a simulation (booking_id starts SBX-, sandbox: true). Nothing is booked and nothing is charged. A simulated booking can be read with GET /ferry/bookings/SBX-… for 7 days (your key only); a cancel request on it is answered but sent to nobody. Repeating the same Idempotency-Key with the same request returns the same SBX- booking (200); a different request on the same key answers 409 IDEMPOTENCY_KEY_MISMATCH.
Not available hereVisa and flight reservation services are not part of the partner API.
GET/ferry/sectorsRoutes and nationality codes (scope catalog:read).
POST/ferry/searchSailings and per-person prices (scope catalog:read).
POST/ferry/quoteExact price of the chosen sailing(s) (scope quote:write).
POST/ferry/bookingsBook (scope booking:write, signed, Idempotency-Key).
GET/ferry/bookings/{id}One booking (scope booking:read).
POST/ferry/bookings/{id}/cancelAsk us to cancel (scope booking:cancel, signed).

🎫 Ferry bookings

Send the quote fields plus the contact and one entry per traveller (adults and children together). Send expected_total = the quote total: if our price has moved you get 409 PRICE_CHANGED and nothing is charged.

POST /ferry/bookings          (signed, Idempotency-Key required)
{ "sector_id": "SIN-BAT", "depart_date": "2026-12-05", "trip_id": "...", "adult_qty": 2, "child_qty": 1,
  "expected_total": 81.00,
  "contact": { "name": "...", "email": "...", "mobile": "..." },
  "passengers": [ { "name": "...", "gender": "M", "birthDate": "1990-04-02",
                    "passportNo": "...", "passportExpiryDate": "2030-01-01", "nationalityId": "SG" } ] }

→ 201 { "data": { "booking_id": 123, "booking_ref": "...", "supplier_ref": "... (deprecated, same as booking_ref)", "status": "...", "sector": "SIN-BAT",
                  "depart_date": "2026-12-05", "return_date": null, "adults": 2, "children": 1,
                  "total": 81.00, "currency": "SGD" }, ... }
AnswerMeaning
201 / 200Booked / the same booking again (same Idempotency-Key).
202Paid but under review by our team. Do not retry; read the booking later.
402 INSUFFICIENT_FUNDS / PAYMENT_FAILEDWallet too low / payment failed. Nothing was booked.
409 SAILING_UNAVAILABLE · PRICE_CHANGEDSearch or quote again.
409 REQUEST_IN_PROGRESS · PAYMENT_UNDER_REVIEWSame key still running / payment taken but the booking needs review: do not retry, contact us.
422 IDEMPOTENCY_KEY_REQUIRED · PASSENGER_COUNT · RETURN_DATE_REQUIREDFix the request.
500 BOOKING_REVIEWWallet was debited but the booking needs review. Do not retry; our team follows up.

Passenger names: letters, spaces, hyphens, apostrophes and full stops, as on the passport. Passport details are stored encrypted and masked after travel. GET /ferry/bookings/{id} returns the same fields for your own bookings; others answer 404.

↩️ Ferry cancellation

POST /ferry/bookings/{id}/cancel     (signed)   { "reason": "optional, up to 300 characters" }

→ 202 { "data": { "booking_id": 123, ..., "cancel_requested": true, "note": "Request received. ..." } }
  • This is a request. Our team reviews it; nothing is cancelled or refunded automatically.
  • A refund, if any, follows the normal review and is credited to your wallet after a person approves it.
  • Repeating the call returns the same request. An already cancelled booking answers 409 ALREADY_CANCELLED.

👛 Wallet & credit

Two ways to settle. Both are debited atomically at booking time.

MethodHow it works
WalletPre-fund by card; each booking debits the balance; refunds credit it back. Too low → 402 INSUFFICIENT_FUNDS (nothing charged).
CreditBook now, settle later against an approved limit; refunds reverse the charge. Over limit → 402 CREDIT_LIMIT_EXCEEDED.

Top-ups are done by card in the partner portal (not via this API — card handling stays on our PCI surface).

📄 Statements

GET/statementsYour monthly statements.
GET/statements/{YYYY-MM}One period: bookings, refunds, credit charged/settled, closing outstanding.

Statements are the source of truth for reconciliation. They are generated at month close and available for every period you were active. The listing returns the most recent 36 months.

🧪 Sandbox & certification

Build safely on a sandbox key — bookings are simulated (no real inventory, no real money) — then certify to go live.

Sandbox, live, webhooks and IP allowlist in tabs: open the Connect section.
Sandbox keyProduction key
BookingsSimulated — confirmed instantly, no supplier ticket issuedReal supplier reservation
MoneyNo wallet charge, no refund — nothing movesWallet is debited / refunded
Booking refPrefixed SBX-Real supplier reference
The host is identical — flip from test to live by swapping the API key and signing secret. Run the full flow as many times as you like at zero cost.

Certification checklist

GET/certificationYour integration checklist and whether the key is sandbox.
{ "data": { "sandbox_key": true, "certified": false, "completed": 4, "total": 7,
    "steps": [ {"key":"auth","done":true}, {"key":"catalog","done":true},
               {"key":"availability","done":true}, {"key":"quote","done":true},
               {"key":"signing","done":false}, {"key":"booking","done":false}, {"key":"cancel","done":false} ] } }
Going live: exercise every step — auth · catalog · availability · quote · signing · booking · cancel. The checklist is computed from your real request log. Once certified is true, your account manager issues a production key (and credit line, if agreed).

Sandbox test products

The sandbox contains a set of test products designed to cover all integration scenarios. Use these product ids in your sandbox calls:

Product IDNameScenario
hsgp_test_1Test Attraction — StandardStandard flow: single option, ADULT + CHILD ticket types, always available
hsgp_test_2Test Attraction — Multi-optionMultiple options (Half-Day, Full-Day, VIP), each with different ticket types
hsgp_test_3Test Attraction — Traveller detailsRequires per-traveller answers (passport name, gender, DOB) — tests traveller_answers handling
hsgp_test_4Test Attraction — Capacity limitedMax 2 pax per booking — tests capacity validation
hsgp_test_5Test Attraction — Weekday onlyAvailable Mon–Fri only — tests date validation and operating-day handling
hsgp_test_errTest Attraction — Error scenariosUsed with special inputs to trigger specific error codes (see test cases below)

Mandatory test cases

Partners must complete these test scenarios before going live. Progress is tracked automatically from your sandbox API calls.

1 — Happy path: full booking lifecycle

Complete the standard flow end to end with hsgp_test_1.

StepCallExpected result
1. AuthGET /ping or GET /me200 with partner details
2. CatalogGET /products200 with product list including hsgp_test_1
3. AvailabilityGET /products/hsgp_test_1/availability?date=<tomorrow>&pax=2200 with available: true and at least one ticket_type_id
4. QuotePOST /quotes with the returned ticket_type_id, quantity 2200 with quote_id, total, expires_at ~15 min in the future
5. SigningPOST /signature/verify with valid HMAC headers200 with verified: true
6. BookPOST /bookings (signed + Idempotency-Key) with the quote_id201 with status: "confirmed", booking_id prefixed SBX-
7. CancelPOST /bookings/{id}/cancel (signed)200 with status: "cancelled"

2 — Idempotent booking retry

StepCallExpected result
1. BookPOST /bookings with a fresh quote + Idempotency-Key: idem-test-1201 confirmed
2. RetryRepeat the exact same request with the same Idempotency-Key200 returning the original booking — no double charge

3 — Expired quote

StepCallExpected result
1. QuotePOST /quotes for hsgp_test_1200 with quote_id
2. WaitWait for the quote to expire (15 min), or use quote_id value q_expired_test—
3. BookPOST /bookings with the expired quote409 QUOTE_EXPIRED — no funds moved

4 — Insufficient funds

StepCallExpected result
1. BookPOST /bookings with a valid quote and customer name containing INSUFFICIENT (e.g. "name": "Test INSUFFICIENT")402 INSUFFICIENT_FUNDS — no funds moved

5 — Duplicate idempotency key with different payload

StepCallExpected result
1. BookPOST /bookings with Idempotency-Key: idem-conflict-1 and a valid quote201 confirmed
2. MismatchPOST /bookings with same key idem-conflict-1 but a different quote_id409 IDEMPOTENCY_KEY_MISMATCH

6 — Traveller answers required

StepCallExpected result
1. AvailabilityGET /products/hsgp_test_3/availability?date=<tomorrow>200 with questions array on ticket types (passport name, gender, DOB)
2. QuotePOST /quotes for hsgp_test_3200 with quote_id
3. Book without answersPOST /bookings without traveller_answers422 TRAVELLER_ANSWERS_REQUIRED
4. Book with answersPOST /bookings with valid traveller_answers201 confirmed

7 — Signature validation errors

ScenarioHow to triggerExpected result
Missing signatureCall POST /bookings without X-Api-Signature headers401 SIGNATURE_MISSING
Bad signatureSend a X-Api-Signature computed with the wrong secret401 SIGNATURE_INVALID
Timestamp skewSet X-Api-Timestamp to a value >5 minutes in the past401 SIGNATURE_TIMESTAMP_SKEW
ReplayRe-send the exact same X-Api-Nonce on a second signed request409 SIGNATURE_REPLAY

8 — Cancelling a non-cancellable booking

StepCallExpected result
1. Cancel twicePOST /bookings/{id}/cancel on an already-cancelled booking200 (idempotent — no second refund)
2. Past cut-offCancel a booking with customer name containing NOCANCEL409 BOOKING_NOT_CANCELLABLE — no funds moved

9 — Scope and auth errors

ScenarioHow to triggerExpected result
No API keyCall any endpoint without X-Api-Key401 AUTH_UNAUTHORIZED
Invalid keySend a made-up key value401 AUTH_UNAUTHORIZED
Missing scopeCall POST /bookings with a key that only has catalog:read403 AUTH_SCOPE_FORBIDDEN

10 — Validation and not-found errors

ScenarioHow to triggerExpected result
Invalid productGET /products/nonexistent/availability?date=2026-09-30404 PRODUCT_NOT_FOUND
Missing dateGET /products/hsgp_test_1/availability (no date param)422 VALIDATION_FAILED
Past dateGET /products/hsgp_test_1/availability?date=2020-01-01422 VALIDATION_FAILED
Unknown bookingGET /bookings/b_nonexistent404 BOOKING_NOT_FOUND
Missing idempotency keyPOST /bookings without Idempotency-Key header400 IDEMPOTENCY_KEY_REQUIRED
Automated tracking: all test scenarios are tracked from your actual API calls — no manual reporting needed. Call GET /certification at any time to see which steps remain. Once all 7 steps pass and your account manager has reviewed your integration, a production key is issued.

📘 Glossary

TermMeaning
ProductA bookable attraction, tour or ticket in the catalog
OptionA variant of a product (duration/package/session)
Ticket typeThe smallest priced unit within an option (pax category)
QuoteA 15-minute, single-use price lock
Nett costSupplier cost — never exposed to partners
CommissionYour margin band, baked into unit_price
Idempotency keyA per-attempt token that makes booking retries safe
NonceA single-use value that stops signed-request replays

Need a key, a higher tier, a credit line, or voucher-payload delivery? Contact your HolidaySG account manager.

Ask me anything!
HolidaySG panda mascot

Luna
Luna — HolidaySG

We use cookies

Read our Cookie Policy