Skip to main content
OnArrival

Build on the platform travel runs on.

One SDK, the same shape on every product. Sandbox in five minutes; production in days. Full reference, recipes, and a transparent status-reporting model.

Quickstart

Search a flight in ~12 lines.

Stays, ground, activities and Travel Fintech take the same call shape. Learn the auth header and the offer model once; they don't change between products.

Install
npm i @onarrival/sdk
One SDK · every product
SDKoneflightsstaysgroundactivitiesfintechpayments
flights-quickstart.ts
import { OnArrival } from '@onarrival/sdk';

const client = new OnArrival({
  apiKey: process.env.ONARRIVAL_KEY,
  env: 'sandbox',
});

// Search across every connected supplier
const offers = await client.flights.search({
  from: 'BLR', to: 'LIS',
  depart: '2027-03-12',
  cabin: 'economy',
  pax: { adults: 1 },
});
Recipes

Build something real.

The products compose. Each recipe is an end-to-end outcome and the exact call chain that ships it. Copy the shape, swap the inputs.

01

Sell a flight + insurance bundle in one checkout

Shop live air inventory, price a CFAR policy against the exact offer, and settle both on one payment intent. One booking comes back.

flights.searchbundles.createfintech.quotepayments.capture
02

Rebook a disrupted passenger automatically

Subscribe to schedule changes and cancellations, then exchange the affected segment for the best protected alternative inside your own SLA. No agent in the loop.

disruption.subscribeflights.exchangewebhooks.deliver
03

Settle multi-currency payouts to suppliers

Capture the traveller in their currency, lock FX at booking, and reconcile each supplier leg to the cent against a double-entry ledger you can export nightly.

payments.capturefx.lockledger.settlewarehouse.sync
04

Embed a full trip: air, stay and ground

Air, stay and transfer share one offer schema, so you can search all three in parallel and compose the trip. The themed React checkout drops straight in.

flights.searchstays.searchground.searchbundles.create
Errors & idempotency

How the SDK handles the hard parts.

Travel infrastructure lives or dies on what happens when a supplier drops a connection mid-booking. One error shape, idempotency on every mutation, and failure modes you can rehearse in sandbox.

502 · the one error object
retryable
{
  "error": {
    "code": "supplier_connection_dropped",
    "primitive": "flights",
    "message": "Supplier closed the session before capture confirmed.",
    "retryable": true,
    "retry_after_ms": 1200,
    "idempotency_key": "ik_8f2c1a90b4e7",
    "booking_state": "pending",
    "request_id": "req_01HX9Z4ABCDEF",
    "docs": "https://www.onarrival.com/docs"
  }
}
01

Idempotency keys

Every mutating call takes an idempotency key. Replay a capture after a timeout and you get the original result back, never a second booking, never a double charge. Keys are retained 24h.

02

Typed errors

One error model across flights, stays, ground, activities and fintech. Same fields, same codes, same retryable flag, so your handler is written once and works everywhere.

03

Webhook replay

Missed an event during a deploy? Re-deliver any event or range from the dashboard or API. Signed, ordered, and deduplicated by event id so consumers stay exactly-once.

04

Sandbox parity

Trigger the failure modes on demand with magic inputs: dropped sessions, slow suppliers, declined cards, schedule changes. The errors you handle in sandbox are the errors you get in prod.

Full error reference
CLIENTik_8f2cdroppedretry · same keyorder×1ledger

Same fields on every product. Pass the same idempotency_key on retry and the capture resolves once. The second request returns the first result, not a second booking.

Reference

What's in the docs.

These are the sections the full API reference covers. Create a sandbox account to get access.

Illustration: two builders at a workbench assemble a miniature travel network — a paper plane, a model train and a small hotel — one placing the last piece while the other reads an open manual.
Get started
Quickstart
From signup to first booked offer in under 15 minutes.
Authentication
API keys, OAuth flows for embedded partners, and per-tenant scoping.
Sandbox vs production
How sandbox supplier inventory works, and the path to going live.
Products
Flights API
Shop, offer, book, exchange, refund across NDC, GDS and LCC.
Stays API
Hotel, apartment and serviced inventory with dedupe and best-rate.
Ground API
Bus, rail and intercity ground operators in one schema.
Activities API
Tours, day passes and experience inventory with availability holds.
Travel Fintech API
CFAR engine, real-time underwriting, claims.
Payments & ledger
Capture, settlement, FX-lock, virtual cards.
Embedded
React SDK
Drop-in components themed to your design system.
React Native
Native checkout for iOS and Android, sharing one backend.
Web components
Framework-agnostic embeds for non-React stacks.
Operate
Webhooks
Every booking event, with delivery and replay guarantees.
Warehouse sync
Stream events to BigQuery, Snowflake, Redshift, or your own S3.
Disruption hooks
Schedule changes, cancellations and rebooks as code.
Trust
SOC 2 Type II
Annual report, available under NDA.
GDPR + DPA
Per-tenant DPA, DSAR tooling, sub-processor registry.
Customer-managed keys
BYOK on Enterprise tier, with key-rotation hooks.
Start building
Ready to spin up a sandbox? Five minutes, no sales call.

Related reading

All field notes →