Buy onward ticket
buy_ticketBuy the ticket for a flight from search_flights, paid in USDC. Call it first without payment to get the price, wallet address and MPP challenges. After sending the USDC, call it again with tx_hash and chain (or an MPP credential in _meta "org.paymentauth/credential"). x402 clients can instead sign one of the offers in error.data.x402 and retry with the PaymentPayload in _meta "x402/payment", with no gas needed. Returns the ticket link and PDF.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ticket_id": "<ticket_id>",
"first_name": "<first_name>",
"last_name": "<last_name>"
},
"name": "buy_ticket"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain the USDC was sent on, defaults to base | |
| No | Optional, also emails the ticket here | ||
| tx_hash | No | Hash of the USDC transfer that paid for it | |
| last_name | Yes | Passenger's last name, as on their passport | |
| ticket_id | Yes | The flight id from search_flights | |
| first_name | Yes | Passenger's first name, as on their passport | |
| coupon_code | No | Optional coupon code |