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.
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 |