Ask your AI to do it
Paste this into ChatGPT, Claude or any assistant that can browse the web, fill in the brackets, and it'll find flights and get you a ticket.
I need an onward flight ticket (proof of onward travel) for my trip. Get me one from https://onward.flights – read https://onward.flights/llms.txt first, it explains how. - I'm flying into: [CITY OR COUNTRY] - I arrive on: [DATE] - The airline I'm flying in with: [AIRLINE] - My name, as on my passport: [FIRST NAME] [LAST NAME] Find a few one-way flights out of that country a week or two after I arrive, with a different airline from the one I'm flying in with, to a different country from the one I'm coming from. Show me the options with times and airlines, then buy the one I choose (it's about $5 in USDC). If you can't pay, send me the link so I can pay myself.
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/mcp
Claude Code
claude mcp add --transport http onward-flights https://onward.flights/mcp
Cursor, Windsurf, Claude Desktop and others
{"mcpServers": {"onward-flights": {"type": "http", "url": "https://onward.flights/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, so an agent with a wallet can buy without a human. A ticket costs $5 in USDC on Base, Ethereum, Optimism or Polygon.
- Calling
buy_ticket, orPOST /api/purchase, without payment returns the price, the wallet address and a payment challenge for each chain (JSON-RPC error-32042, or HTTP402withWWW-Authenticate: Payment). - The agent sends the USDC to
0xF846dbB11d80E5065B4f7566C803bbA79eA0eE53. - Once it's mined, the agent calls again with the transaction hash, either as an MPP credential or plain
tx_hashandchain. The payment is checked on-chain, and it gets back the ticket link and PDF with a receipt.
No wallet? The agent gets a link the human can open to pay in their browser.
HTTP API
curl 'https://onward.flights/api/airports?q=bangkok'
curl 'https://onward.flights/api/flights?origin=BKK&destination=SIN&date=2026-11-10'
curl -X POST https://onward.flights/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 MPP discovery: openapi.json.
Every page is also Markdown if you add .md to the URL.