Built a Corporate Travel Booking Slack Bot powered by x402 Agentic Payments — <1-5-cent micropayments over HTTP
I shipped a Slack bot in a day that searches flights for multiple people simultaneously — no API keys, no subscriptions, just 5-cent USDC micropayments over HTTP.
Earlier this week, I shipped Flock Travel in a day — a Slack bot that helps teams plan group trips. Type /flocktravel search AUS LAX 2025-10-13 and you get real-time flight results from the same system that powers Expedia and Booking.com, posted directly into your Slack channel with prices, layovers, and a one-click link to book on Google Flights.
The interesting part isn’t the travel search. It’s how it pays for the data.
There are no API keys. No OAuth flows. No subscription tiers. Every time FlockTravel queries a flight, it sends five cents in USDC over a blockchain and gets the data back in the same HTTP response. The bot pays for its own resources, autonomously, in real time. Payment is authentication.
This is x402 — a protocol that finally gives meaning to HTTP’s “402 Payment Required” status code, which has sat unused since 1997. And the reason I could build this in a single day is precisely because x402 eliminates the integration overhead that normally slows you down.
Let me walk you through the build.
The Problem: Corporate Travel Is Still Stuck in 2005
Existing tools either cost hundreds per month for enterprise plans or require every traveler to use the same booking platform. For a 12-person startup trying to get everyone to Austin for a planning week, that’s overkill.
I wanted something simpler: search flights from Slack, compare prices, send each person a booking link, and track who’s actually booked. The interface should be where the team already works — a Slack channel.
The hard part wasn’t building the bot — I did that in a day. It was getting access to real flight data.
The API Key Problem (and Why x402 Solves It)
If you want real-time flight availability — not cached, not scraped, but actual GDS (Global Distribution System) data from the same Amadeus system that airlines and travel agents use — you traditionally have two paths:
Path 1: Amadeus Self-Service API. Sign up, get API keys, deal with rate limits, manage credentials rotation, and pay per call. This is fine, but you’re managing yet another credential, yet another billing relationship, yet another vendor dashboard.
Path 2: Enterprise Amadeus. Requires IATA/ARC accreditation or a host agency agreement. Not happening for a weekend project.
Then I found StableTravel — a service that wraps the full Amadeus GDS behind the x402 payment protocol. No sign-up. No API keys. You just send an HTTP request with a signed USDC payment attached in the header, and you get back flight data. Five cents per search. This is what made a one-day build possible.
This might sound like a small detail, but it fundamentally changes the developer experience. Here’s why.
How x402 Works in Practice
The protocol revives HTTP status code 402, which was reserved back in 1997 for exactly this purpose — native web payments — but never had the infrastructure to work. Credit card minimums made sub-dollar payments impossible. There was no way to do machine-to-machine payments without a human entering card details.
Stablecoins on L2 blockchains changed that. Transaction fees on Base (Coinbase’s Ethereum L2) are fractions of a cent, so you can profitably charge $0.05 per API call without the payment infrastructure eating the entire amount.
Here’s the actual flow inside FlockTravel:
Bot sends a normal HTTP GET to StableTravel’s flight search endpoint
Server responds with HTTP 402 — “Payment Required” — including the price ($0.05), the USDC token address, and the recipient wallet
FlockTravel’s CDP Server Wallet signs a USDC transfer authorization using the private key. Nothing leaves the device yet.
Bot retries the same request with the signed payment attached in an HTTP header
A facilitator verifies the signature and settles the transaction on-chain
Server delivers the flight data plus a settlement receipt with the transaction hash
All of this happens in under 2 seconds. The user in Slack sees a “Searching flights...” message, then results appear.
From a code perspective, the StableTravel client in FlockTravel handles this transparently. The rest of the application just calls searchFlights() and gets back normalized flight objects. The payment is invisible at the application layer — which is exactly how it should be.
Why This Matters Beyond “Cool Crypto Thing”
As a former CFO, I think about this through the lens of cost structure and vendor management. Consider what x402 eliminates:
No credentials to manage. No API key rotation, no secrets in your .env that could leak, no OAuth token refreshes. Payment is your authentication.
No billing relationship. No credit card on file, no invoices, no “your trial expired” emails, no vendor procurement process.
No commitment. Pay for exactly what you use, down to the individual request. Stop using it and your costs go to zero instantly. No cancellation flows.
No rate limit negotiation. If you can pay, you can query. Scale is a function of your wallet balance, not your pricing tier.
Auditable by default. Every payment is on-chain. Your CFO (or your CFO brain) can see exactly what was spent and when, down to the transaction.
For FlockTravel, this means the cost model is beautifully simple: every flight search costs $0.05 in USDC on Base. If my team runs 200 searches in a month planning a trip, that’s $10. Not $49/month for the “Pro plan.”
The Build: One Day, Start to Finish
A Slack bot that helps teams plan group travel with budget intelligence. Search flights, hotels, activities, and airport transfers from Slack — powered by real-time Amadeus data via StableTravel’s x402 micropayment API.
What it does
A coordinator types a command in Slack:
/flocktravel search AUS LAX 2025-10-13
Or uses natural language:
/flocktravel search flights from Austin to LA next Monday round trip returning Friday
FlockTravel searches hundreds of flight options in real-time, ranks them by price, and posts formatted results directly in Slack with a link to book on Google Flights.
Core features (v0.1)
Flight search — Query 400+ airlines via Amadeus GDS through StableTravel
Hotel search — Automatically included with round-trip searches, showing top 3 hotels at the destination
Combined results — Round-trip searches show flights AND hotels in one Slack message
Structured + natural language input — Accepts IATA codes or plain English (parsed by Claude API)
Budget-friendly results — Shows top 5 cheapest flights and top 3 cheapest hotels
Google deep links — One-click to open pre-filled searches on Google Flights and Google Hotels
Round-trip support — Search one-way (flights only) or round-trip (flights + hotels)
Travel class filtering — Economy, Premium Economy, Business, or First
Planned features
Multi-traveler group planning — Search flights for 12+ people from different cities, optimize for a shared budget
Budget optimizer — Automatically find the cheapest combination across a group, suggest date shifts or nearby airports
Booking tracker — Track who’s booked via self-report, confirmation email parsing, or Ramp transaction matching
Activity search — Extend search to activities and airport transfers
Slack DMs — Send each traveler their specific flight assignment with booking details
Stripe billing — Monthly plans for teams
Architecture
Slack (Block Kit)
↓
FlockTravel Server (Node.js / Bolt)
├── Command parser (structured + Claude NL)
├── Budget optimizer (coming soon)
├── Booking tracker (coming soon)
└── StableTravel API client (x402 micropayments)
↓
StableTravel API → Amadeus GDS
(USDC micropayments on Base chain via CDP Server Wallet)Tech stack
Setup
Prerequisites
Node.js 20+
A Slack workspace where you can install apps
A Coinbase Developer Platform account with a Server Wallet (~$5-10 USDC on Base for development)
An Anthropic API key
1. Clone and install
git clone https://github.com/jerryhsiang/FlockTravel.git
cd FlockTravel
npm install2. Create a Slack app
Go to api.slack.com/apps → Create New App → From scratch
Name it “FlockTravel” and pick your workspace
OAuth & Permissions → Add Bot Token Scopes:
chat:write,commandsSlash Commands → Create:
/flocktravelwith description “Plan group travel”Socket Mode → Enable it, generate an App-Level Token with scope
connections:writeInstall the app to your workspace
3. Set up Coinbase CDP Server Wallet
Go to portal.cdp.coinbase.com
Click API Keys → Create a Secret API Key → save the Key ID and Secret
Click Wallets → Accounts → Generate a Wallet Secret → download and save it
The CDP SDK will automatically create a wallet account on first run — fund the logged address with USDC on Base (~$5-10)
4. Configure environment
cp .env.example .envFill in your .env:
# Slack
SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
SLACK_SIGNING_SECRET=...
# Coinbase CDP (Server Wallet for x402 payments)
CDP_API_KEY_ID=...
CDP_API_KEY_SECRET=...
CDP_WALLET_SECRET=...
# StableTravel
STABLETRAVEL_BASE_URL=https://stabletravel.dev/api
# Anthropic
ANTHROPIC_API_KEY=sk-ant-...5. Run
npm run devThe bot connects via Socket Mode — no public URL needed. On first run it will log the wallet address — fund that address with USDC on Base to enable flight searches.
Usage
Structured search
/flocktravel search AUS LAX 2025-10-13
/flocktravel search AUS LAX 2025-10-13 2025-10-17
/flocktravel search AUS LAX 2025-10-13 2025-10-17 BUSINESS
Format: /flocktravel search ORIGIN DEST DEPARTURE [RETURN] [CLASS]
Natural language search
/flocktravel search flights from Austin to Los Angeles on October 13
/flocktravel search round trip NYC to San Francisco next Monday returning Friday
/flocktravel search business class Boston to Miami Dec 5
When structured parsing fails, the input is sent to Claude for extraction.
Travel classes
ECONOMY (default), PREMIUM_ECONOMY, BUSINESS, FIRST
API costs
FlockTravel uses StableTravel’s pay-per-request API. Each API call costs a small amount in USDC:
No API keys, no subscriptions — payment is authentication via the x402 protocol.
Project structure
flocktravel/
├── src/
│ ├── app.js — Bolt app init, socket mode, command routing
│ ├── commands/
│ │ └── search.js — /flocktravel search handler
│ ├── services/
│ │ ├── stableTravel.js — StableTravel API client with CDP wallet + x402
│ │ ├── flightSearch.js — Amadeus flight response normalizer
│ │ ├── hotelSearch.js — Hotel list caching, 2-step search, normalizer
│ │ ├── slackMessages.js — Slack Block Kit message builders (flights + hotels)
│ │ ├── googleFlights.js — Google Flights + Hotels URL builders
│ │ └── llm.js — Claude API wrapper for NL parsing
│ └── utils/
│ ├── airports.js — IATA code validation and lookup
│ ├── dates.js — Date parsing, formatting, duration helpers
│ └── currency.js — USD currency formatting
├── test/
│ └── fixtures/
│ └── amadeus-flight-response.json
├── .env.example
├── package.json
└── CLAUDE.md
How it works
User types
/flocktravel search AUS LAX 2025-10-13 2025-10-17in SlackBot tries structured parsing (ORIGIN DEST DATE); if that fails, sends to Claude for NL extraction
Validates parameters (valid airports, future dates, etc.)
For round-trips: searches flights AND hotels in parallel via
Promise.allSettled()Calls StableTravel endpoints — payment handled automatically via x402 (USDC on Base, signed by CDP Server Wallet)
Normalizes the Amadeus GDS responses into clean flight and hotel objects
Sorts by price, takes top 5 flights + top 3 hotels
Posts a combined Block Kit message to Slack with flight cards, hotel cards, and Google deep links
Hotel search failures are non-fatal — flights still show if hotels fail
What I Learned Shipping in a Day With x402
The Good
Developer experience is genuinely simpler — and it’s why this was a one-day build. Setting up a CDP wallet took about 15 minutes. Integrating with StableTravel took a couple of hours. Compare that to the typical API integration dance: register for an account, verify your email, create an “app,” get keys, figure out their auth scheme (API key? OAuth? Both?), handle token refresh, set up billing alerts. x402 collapses all of that into “have a funded wallet.” That’s easily half a day saved right there.
Cost transparency is immediate. I know exactly what each search costs because it’s a discrete on-chain transaction. There’s no “we’ll invoice you at the end of the month based on opaque metering” situation.
The protocol is genuinely stateless. Each request is self-contained. No sessions, no cookies, no “your token expired” errors at 2 AM. As a builder, this is refreshing.
The Tricky Parts
Wallet funding requires crypto on-ramps. If your team isn’t already in the crypto ecosystem, getting USDC onto Base is an extra step. Coinbase makes this fairly smooth, but it’s still a barrier compared to “enter your credit card.”
Error handling around payments is new territory. What happens when the wallet has $0.03 and the search costs $0.05? What if the facilitator is slow? These are different failure modes than traditional API integrations, and you need to think through the UX for each.
The ecosystem is early. StableTravel is one of a growing but still small number of x402-enabled services. You can’t replace all your API subscriptions with micropayments today. But the trajectory is clear — Cloudflare and Coinbase co-launched the x402 Foundation, and the list of partners includes Google, Visa, AWS, Circle, Anthropic, and Vercel.
What’s Next for FlockTravel
The v0.1 that’s live today handles the “search flights and post results” flow. The roadmap is where things get interesting:
Multi-city group optimization. Twelve people flying from different cities to a shared destination. The optimizer searches all combinations and finds the cheapest total package — potentially suggesting date shifts or alternate nearby airports to save the group money. This is where the CFO brain really kicks in. A $30 per-person savings across 12 people is $360 — and the search cost is $0.60 in micropayments.
Booking tracker with Ramp integration. Once travelers book, FlockTravel tracks completion via self-report, confirmation email parsing, or — and this is the part I’m most excited about — matching actual transactions from Ramp (our corporate card). The coordinator gets a dashboard of who’s booked and who’s still outstanding.
Hotels, activities, and transfers. StableTravel exposes the full Amadeus suite. Hotels are $0.03 per search, activities $0.05, and airport transfers $0.003. A complete trip planning flow — flights, hotel, dinner reservations, airport pickups — all from Slack, all paid in micropayments.
Slack DMs for flight assignments. Once the optimizer picks the best combination, it DMs each traveler their specific itinerary with a booking link. No more group-chat chaos.
The Bigger Picture: Agentic Payments Are Here
Here’s what excites me most about building on x402.
FlockTravel is a human-initiated Slack bot today. A person types a command, the bot searches, the person books. But look at the architecture: a piece of software holds a wallet, autonomously signs payments, acquires data from a third-party service, processes it, and delivers results. That’s an agent making payments. The human just happens to be in the loop right now.
Remove the human trigger and this same architecture powers a fully autonomous travel agent — one that monitors flight prices, buys data feeds when prices drop, and proactively rebooks your team on cheaper options. The wallet is the agent’s budget. The x402 protocol is how it pays for resources. No human needs to pre-negotiate API access or set up billing.
For 30 years, the web has had a status code for payments but no protocol to use it. APIs evolved an entire ecosystem of workarounds — API keys, OAuth, subscription tiers, rate limits — all of which are really just proxies for “did this person pay us.” These workarounds assume a human is in the loop. Agents break that assumption.
x402 makes payment a first-class part of HTTP, and the implications ripple outward:
Agents can autonomously acquire resources. An agent that can sign a USDC payment can access any x402-enabled API without a human setting up credentials first.
Micropayments become viable. Charging $0.003 for a transfer search is impossible with credit card rails. It’s trivial with stablecoins on an L2.
API businesses can launch faster. If you have data or compute to sell, wrapping it in x402 middleware is simpler than building a billing system.
Shipping speed accelerates. I built FlockTravel in a day. Without x402, the billing and auth integration alone would have taken longer than that.
I don’t think x402 replaces subscriptions everywhere. Subscriptions are great for predictable, high-volume usage. But for the long tail of API consumption — occasional use, experimentation, agent-driven access — micropayments are a better model. And x402 makes them practical for the first time.
Try It Yourself
FlockTravel is open source: github.com/jerryhsiang/FlockTravel (email me: jerryhsiang9@gmail.com)
You’ll need a Slack workspace, a CDP wallet with a few dollars of USDC on Base, and an Anthropic API key. The whole setup takes about 20 minutes — which means you could fork it, customize it, and have your own version running before lunch.
If you’re a builder exploring x402 or agentic payments, I’d love to hear what you’re working on. And if you’re a team that organizes travel regularly and wants to try FlockTravel, reach out — I’m looking for design partners as I build out the group optimization features.




