# BRIJ Air Booking Intent Creator

> BRIJ Air Booking Intent Creator is a paid API for AI agents from travel.brij.fi, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-10).

Creates a local flight booking intent and initializes a Solana escrow account for a selected air offer, without funding or ticketing.

## Facts

- Endpoint: POST https://travel.brij.fi/air/intents?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402, shopping
- Canonical page: https://www.zero.xyz/c/brij-air-booking-intent-creator-24ecafb8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XBXLrM0-K8mQYgo9lPQaU

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brij-air-booking-intent-creator-24ecafb8 -d '<json body>'
```

Example prompt: Lock in flight offer offer_abc123 for me using my Solana wallet 7xKp...MnQ2 as the funding wallet, and use wallet 9zRt...BcD1 for any refunds — I want to create the BRIJ booking intent and get the escrow set up so I can fund it next.

## When to prefer this

Use this endpoint when you have a specific flight offer ID from the BRIJ /air/search endpoint and you are ready to begin the booking checkout flow on Solana. This is the required first step before funding the escrow and completing the ticket purchase. Prefer this over generic booking APIs when working within the BRIJ x402/Solana payment flow.

## Known failure modes

- 402 Payment Required — no valid PAYMENT-SIGNATURE header provided
- Invalid offer_id — offer not found or already expired
- Invalid Solana wallet address for funding_wallet or refund_wallet
- Offer already locked by another intent — conflict
- Intent creation succeeds but escrow initialization fails on-chain
- Expired offer — the offer from /air/search is no longer available

## How this service works

Paid x402 endpoint. Send a valid `PAYMENT-SIGNATURE` header to create
the intent. Without payment, the API returns `402 Payment Required`.

Optional request field referrer: an affiliate code (see POST /affiliates) — the resolved affiliate wallet is frozen on the intent and credited a share of the platform fee once the booking captures and the journey is flown without refund; unknown or self-referring codes are silently ignored.

Creates the local booking intent and initializes its Solana escrow.
This does not fund the escrow, pay the airline, or issue a ticket.

**Lowcost (trip.com: offers).** These book through a browser-driven fulfiller, not an airline API, so a few rules differ. The escrow amount is the offer's own price (fare menus from POST /air/offer-details are bookable: an offer_id like "trip.com:<flight>##<n>@s<search>" locks fare n and the escrow prices at that fare). A fare offer_id is only bookable while its menu is fresh (~30 min) — a stale one returns 409 fare_menu_expired, re-open the fares and retry. If the most recent fare check (POST /air/offer-details) for the offer failed within the last ~30 min, intent creation returns 409 fare_check_failed — a failed fare check temporarily blocks booking that offer; retry POST /air/offer-details in a few minutes and book once it answers. If that supplier is not currently selling, intent creation returns 409 browser_booking_unavailable — book a fastbooking offer, or retry later. An unknown/expired browser-tier offer_id returns 404 offer_not_found. **Send an offer_id back EXACTLY as received.** A browser-tier id is derived from the flight, so it is the same string for every buyer; the trailing "@s<search>" is what ties it to YOUR search, and therefore to the cabin, the party and the fare menu your price came from. Strip it and the offer resolves against whoever searched that flight most recently. Booking then requires the travel document at POST /air/book (see there).

## Output

Returns a booking intent object containing a unique intent ID, escrow address, vault address, expected escrow and ticket amounts (in USDC), fee amount, expiration timestamp, escrow slot ID, and current status (active/booked/refunded). The intent represents a locked offer reservation pending escrow funding.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "funding_wallet",
  "offer_id"
 ],
 "properties": {
  "offer_id": {
   "type": "string",
   "example": "fastbooking:off_0000000000000000000000",
   "description": "The offer to book, sent back EXACTLY as received from POST /air/search or POST /air/offer-details — never reassembled by hand."
  },
  "refund_wallet": {
   "type": "string",
   "description": "Optional Solana wallet for refunds. Defaults to funding_wallet."
  },
  "funding_wallet": {
   "type": "string",
   "description": "Solana wallet expected to fund the escrow."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "intent"
 ],
 "properties": {
  "intent": {
   "type": "object",
   "required": [
    "id",
    "funding_wallet",
    "refund_wallet",
    "offer_id",
    "expected_ticket_amount",
    "expected_ticket_currency",
    "expected_escrow_amount",
    "expected_escrow_mint",
    "fee_amount",
    "status",
    "expires_at",
    "escrow_slot_id",
    "created_at",
    "updated_at"
   ],
   "properties": {
    "id": {
     "type": "string",
     "example": "intent_0000000000000000"
    },
    "status": {
     "enum": [
      "active",
      "booked",
      "refunded"
     ],
     "type": "string"
    },
    "offer_id": {
     "type": "string"
    },
    "created_at": {
     "type": "string",
     "format": "date-time"
    },
    "expires_at": {
     "type": "string",
     "format": "date-time"
    },
    "fee_amount": {
     "type": "integer",
     "format": "int64"
    },
    "updated_at": {
     "type": "string",
     "format": "date-time"
    },
    "captured_at": {
     "type": "string",
     "format": "date-time"
    },
    "refunded_at": {
     "type": "string",
     "format": "date-time"
    },
    "ticketed_at": {
     "type": "string",
     "format": "date-time"
    },
    "refund_reason": {
     "type": "string"
    },
    "refund_wallet": {
     "type": "string"
    },
    "vault_address": {
     "type": "string"
    },
    "escrow_address": {
     "type": "string"
    },
    "escrow_slot_id": {
     "type": "integer",
     "format": "int64"
    },
    "funding_wallet": {
     "type": "string"
    },
    "refund_tx_hash": {
     "type": "string"
    },
    "capture_tx_hash": {
     "type": "string"
    },
    "passenger_count": {
     "type": "integer",
     "description": "How many passengers the offer was priced for; /air/book must supply exactly this many."
    },
    "airline_order_id": {
     "type": "string"
    },
    "escrow_funded_at": {
     "type": "string",
     "format": "date-time"
    },
    "payment_required_by": {
     "type": "string",
     "format": "date-time"
    },
    "expected_escrow_mint": {
     "type": "string"
    },
    "observed_escrow_mint": {
     "type": "string"
    },
    "escrow_init_signature": {
     "type": "string"
    },
    "escrow_initialized_at": {
     "type": "string",
     "format": "date-time"
    },
    "expected_escrow_amount": {
     "type": "integer",
     "format": "int64"
    },
    "expected_ticket_amount": {
     "type": "integer",
     "format": "int64"
    }
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brij-air-booking-intent-creator-24ecafb8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from travel.brij.fi](https://www.zero.xyz/host/travel.brij.fi/llms.txt)
