Onward tickets for AI agents

Let ChatGPT, Claude or your own agent search flights and buy an onward ticket, over MCP or an HTTP API paid in USDC with the Machine Payments Protocol

🤖 Ask your AI to do it

Paste this into ChatGPT, Claude or any assistant that can browse the web. It'll ask about your trip, find flights and get you a ticket.

Read https://onward.flights/index.php/prompt.md and follow it to get me an onward ticket

MCP server

Add Onward Flights as a tool so your agent can search flights and buy tickets itself. It's a remote MCP server with no sign up or API key.

Server URL

https://onward.flights/index.php/mcp

Claude Code

claude mcp add --transport http onward-flights https://onward.flights/index.php/mcp

Cursor, Windsurf, Claude Desktop and others

{"mcpServers": {"onward-flights": {"type": "http", "url": "https://onward.flights/index.php/mcp"}}}

In ChatGPT or Claude on the web, add it as a custom connector with the server URL.

Tools: find_airports, search_flights and buy_ticket.

Let your bot pay

Tickets are paid for with the Machine Payments Protocol or x402, so an agent with a wallet can buy without a human. A ticket costs $5 in USDC on Base, Ethereum, Optimism or Polygon.

  1. Calling buy_ticket, or POST /api/purchase, without payment returns the price, the wallet address and a payment challenge for each chain (JSON-RPC error -32042, or HTTP 402 with WWW-Authenticate: Payment).
  2. The agent sends the USDC to 0xF846dbB11d80E5065B4f7566C803bbA79eA0eE53.
  3. Once it's mined, the agent calls again with the transaction hash, either as an MPP credential or plain tx_hash and chain. The payment is checked on-chain, and it gets back the ticket link and PDF with a receipt.

With x402 the agent signs the payment instead of sending it, so it doesn't need ETH for gas. The 402 carries the offers in PAYMENT-REQUIRED (or error.data.x402 over MCP). The agent pays with PAYMENT-SIGNATURE (or _meta["x402/payment"]).

No wallet? The agent gets a link the human can open to pay in their browser.

HTTP API

curl 'https://onward.flights/index.php/api/airports?q=bangkok'
curl 'https://onward.flights/index.php/api/flights?origin=BKK&destination=SIN&date=2026-11-12'
curl -X POST https://onward.flights/index.php/api/purchase \
  -H 'Content-Type: application/json' \
  -d '{"ticket_id": "…", "first_name": "Jane", "last_name": "Doe"}'
# 402 Payment Required, pay, then repeat with
#   -H 'Authorization: Payment <credential>'
# or add "tx_hash": "0x…", "chain": "base" to the JSON

Docs for LLMs: llms.txt. OpenAPI with payment discovery: openapi.json. Every page is also Markdown if you add .md to the URL.