API reference
p95 latency
< 200 ms
Uptime SLO
99.97%
Idempotency
On every write
Regions
ap-south-1 (Mumbai)
Quickstart
Dashboard → Settings → Developers → Create key. Scope it to flights:search if that's all you need.
Pass the key as Bearer in the Authorization header. Rotate keys without downtime — two keys can be live at once.
POST /api/v1/search/flights with a SearchRequest body. Response is a SearchResponse with ranked results across suppliers.
curl · first search
curl -X POST https://api.tripbng.com/api/v1/search/flights \
-H "Authorization: Bearer $TRIPBNG_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"tripType": "ONEWAY",
"segments": [
{ "origin": "BOM", "destination": "DEL", "date": "2026-08-22" }
],
"pax": { "adults": 1, "children": 0, "infants": 0 },
"travelClass": "ECONOMY"
}'Endpoints
/api/v1/auth/login
Exchange credentials + TOTP for access + refresh tokens.
/api/v1/auth/refresh
Rotate the refresh token; receive a fresh access token.
/api/v1/search/flights
Fan out search across series + LCC + FSC suppliers.
/api/v1/bookings/hold
Lock a fare for 30 minutes. Wallet pre-authorised.
/api/v1/bookings/ticket
Ticket a held PNR. Returns ticket numbers + e-ticket URL.
/api/v1/bookings/:id/cancel
Cancel a booking. Refund posts atomically to the wallet.
/api/v1/wallet/me
Real-time wallet balance, credit limit, last 5 transactions.
/api/v1/wallet/topups
Initiate a UPI / NEFT top-up via Razorpay.
/api/v1/reports/gstr-1
Download a month's GSTR-1 ready JSON / CSV.
Webhooks
Every webhook is HMAC-signed with your secret, retried with exponential back-off for 24 hours, and lands in a tamper-evident audit log.
booking.confirmed
PNR + ticket numbers issued.
booking.failed
Supplier rejected; wallet auto-refunded.
booking.cancelled
Cancellation completed; refund posted.
wallet.credit
Top-up captured; balance updated.
wallet.debit
Booking debit posted (atomic with booking).
invoice.created
GST invoice ready; URL + JSON included.
Verify X-TripBng-Signature on every request with HMAC-SHA256.