What is x402 and how do AI agents pay for hotels?
x402 is an open payment protocol that lets AI agents pay trip1 for a hotel in USDC on Base. The agent signs the payment and the booking settles in about 2 seconds.
Updated
What is trip1 MCP?
trip1 is a hotel booking platform with over 3 million hotels in 190+ countries, payable in Bitcoin, Ethereum, USDC, and 120+ other cryptocurrencies. trip1 also runs a public MCP (Model Context Protocol) server, so AI agents like Claude, ChatGPT, and Cursor can search and book hotels for you. x402 is how an agent completes the payment without a checkout page.
How an x402 hotel payment works - step by step
Step 1: The agent requests the booking
Your agent calls trip1's purchase_hotel tool with a rate ID and the guest details it collected from you.
Step 2: trip1 returns a payment challenge
Instead of confirming right away, trip1 responds with HTTP 402 and a payment challenge. The challenge states the amount, the recipient, and an expiry time.
Step 3: The agent signs the payment
The agent signs a USDC authorization on Base from its x402 wallet. There's no wallet pop-up or QR code.
Step 4: The agent retries with the signature
The agent sends the same request again with the signed payment attached. A facilitator submits the transfer on-chain, which usually settles in about 2 seconds.
Step 5: trip1 confirms the booking
trip1 completes the reservation and returns a confirmation. The agent can call get_order_details until the hotel's supplier reference appears.
Who holds the money?
trip1 is non-custodial for agent payments. We never see your wallet keys or card details, and the payment settles through the facilitator your agent's wallet uses.
Important: Only give an agent a wallet with a spending amount you're comfortable with. On-chain payments can't be reversed once they settle.
x402 and AI agent hotel payments - FAQ
x402 refers to the HTTP 402 "Payment Required" status code. The protocol uses it to request and complete payments between software.
trip1's x402 payments use USDC on Base. For other coins, use the CoinGate payment link instead.
Settlement usually takes about 2 seconds. trip1 then completes the booking and returns a confirmation to the agent.
No. trip1 is non-custodial and never sees your wallet keys or card details.
