Developer guide

Error Codes

Understand validation, availability, payment, fulfillment, and platform errors.

1

Read error payloads

Configure this step in the console, test it in sandbox, and promote it when your operational checks pass.

2

Retry idempotently

Configure this step in the console, test it in sandbox, and promote it when your operational checks pass.

3

Escalate support cases

Configure this step in the console, test it in sandbox, and promote it when your operational checks pass.

Production checklist

Validate credentials, enable required products, configure webhooks, verify settlement settings, and assign team roles.

checkout.ts
import { CrownRoute } from "@crownroute/sdk";

const client = new CrownRoute({
  apiKey: process.env.CROWNROUTE_API_KEY,
  environment: "sandbox"
});

const offers = await client.flights.search({
  origin: "DXB",
  destination: "LHR",
  departureDate: "2026-07-18",
  travelers: [{ type: "adult" }]
});

const booking = await client.bookings.create({
  offerId: offers.data[0].id,
  products: ["flight", "insurance", "esim"],
  settlementWallet: "primary"
});
Start Sandbox