iChiangrai B2B Tour & Hotel Syndication Gateway
A modern, high-throughput RESTful JSON syndication gateway enabling domestic and international tour operators, OTAs, travel agencies, and tech platforms to query catalogs, check real-time seat/room allotments, issue instant bookings with wallet deduction, and receive automated webhooks.
Sub-2ms Latency
Direct PDO connection on local NVMe storage delivering ultra-fast responses.
3 Native Languages
Complete dynamic content in Thai, English, and Simplified Chinese (?lang=zh).
Automated Net Rates
Instant wholesale discount calculation per partner tier with guaranteed commission margins.
Wallet & Webhooks
Pre-deposit wallet balance deduction, instant vouchers, and HMAC-SHA256 push hooks.
Authentication & Security
All requests to the iChiangrai B2B Gateway require a valid API Key provided in HTTP request headers.
Supported Authorization Headers:
Wholesale Partner Net Tiers
The pricing engine automatically applies wholesale net discount tiers to public rack rates for all tours and rooms.
Entry-level registered travel agencies and boutique inbound operators.
Established domestic operators and regional wholesalers (e.g. Bangkok Discovery Holidays).
High-volume international OTAs and crossborder charter partners (e.g. Yunnan-Lanna Travel).
Phase 2: Allotment & Real-time Quota Engine
Automated seat and vehicle allocation for Chiang Rai day tours, plus seasonal room tariff overrides for hotels.
Each tour date is initialized with 18 seats (2 VIP Commuter Minivans). The availability engine deducts seats booked in real time, displays remaining capacity, returns vehicle recommendations (VIP Sedan for 1-2 pax vs Commuter for 3-9 pax), and flags limited (≤ 4 seats) or sold_out.
The hotel engine identifies seasonal periods: Regular Season, High Season (Nov 1 – Feb 28), and Peak Festival Season (Dec 20 – Jan 5 / Songkran). Nightly rates are calculated, stop-sale status verified, and net total quotes returned instantly.
Phase 3: Instant Booking, Wallet & Webhooks
End-to-end automated two-way syndication workflow with instant voucher issuance, partner credit deduction, and real-time event webhooks.
Bookings deduct wholesale net amounts directly from the agency's pre-funded deposit balance (credit_balance). If balance is insufficient, HTTP 400 is returned immediately.
Generates a unique Booking Reference (CRHB-YYYYMMDD-XXXX) and digital Voucher (VCH-XXXXXXXX), updates seat/room allotments, and alerts operations team via LINE.
Cancellations made ≥ 48 hours before travel date automatically refund 100% of the wholesale amount back to the agency's credit balance and restore inventory allotment.
🔔 Webhook Signature Verification (HMAC-SHA256)
When events occur (e.g. booking.created, booking.cancelled), iChiangrai Gateway dispatches an HTTP POST to your configured Webhook URL. Each webhook payload includes an X-Signature header generated with your partner's Secret Key:
$computed_signature = hash_hmac('sha256', $raw_payload, $partner_secret_key);
if (hash_equals($computed_signature, $_SERVER['HTTP_X_SIGNATURE'])) {
// Signature verified! Process webhook event
}
🧪 Interactive API Sandbox & Live Tester
Test real API requests against production with real-time response parsing