API reference

Build on the same engine the dashboard runs on.

REST API with OpenAPI 3.1 schema, signed webhooks, idempotency keys, and SDKs in Node / Python / PHP / Go. p95 latency under 200 ms, 99.97% uptime SLO.

p95 latency

< 200 ms

Uptime SLO

99.97%

Idempotency

On every write

Regions

ap-south-1 (Mumbai)

Quickstart

Three minutes to your first call.

  1. 1

    Generate an API key

    Dashboard → Settings → Developers → Create key. Scope it to flights:search if that's all you need.

  2. 2

    Authenticate

    Pass the key as Bearer in the Authorization header. Rotate keys without downtime — two keys can be live at once.

  3. 3

    Make a call

    POST /api/v1/search/flights with a SearchRequest body. Response is a SearchResponse with ranked results across suppliers.

curl · first search

v1
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

64 endpoints. Same shape across the board.

Download OpenAPI
POST

/api/v1/auth/login

Exchange credentials + TOTP for access + refresh tokens.

Auth
POST

/api/v1/auth/refresh

Rotate the refresh token; receive a fresh access token.

Auth
POST

/api/v1/search/flights

Fan out search across series + LCC + FSC suppliers.

Search
POST

/api/v1/bookings/hold

Lock a fare for 30 minutes. Wallet pre-authorised.

Booking
POST

/api/v1/bookings/ticket

Ticket a held PNR. Returns ticket numbers + e-ticket URL.

Booking
POST

/api/v1/bookings/:id/cancel

Cancel a booking. Refund posts atomically to the wallet.

Booking
GET

/api/v1/wallet/me

Real-time wallet balance, credit limit, last 5 transactions.

Wallet
POST

/api/v1/wallet/topups

Initiate a UPI / NEFT top-up via Razorpay.

Wallet
GET

/api/v1/reports/gstr-1

Download a month's GSTR-1 ready JSON / CSV.

Reports

Webhooks

Push notifications you can audit.

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.

Signature recipe

SDKs

Skip the boilerplate. Ship.

NODEv0.6.0

Node.js

npm i @tripbng/sdk
GitHub
PYv0.4.2

Python

pip install tripbng
GitHub
PHPv0.3.1

PHP

composer require tripbng/sdk
GitHub
GOv0.2.0

Go

go get github.com/tripbng/sdk-go
GitHub

Postman collection

64 endpoints with environments + auth pre-wired.

Download