Inspiration
Every day, hundreds of millions of conversations happen across AI assistants like Gemini, ChatGPT, and Claude. Users constantly search for actionable recommendations: "Book a beachfront hotel in Goa," "Reserve the fastest overnight bus to Mumbai," or "Restock milk and groceries before 8 PM."
However, modern conversational AI suffers from a severe checkout fracture:
- The App-Hopping Penalty: The assistant hands off a web link, forcing users to switch apps, log into disparate merchant portals, and manually rebuild their carts.
- Checkout Abandonment: Re-entering credit card details or filling 10-step forms causes high drop-off: $$\text{Abandonment Rate} = 1 - \frac{\text{Completed Orders}}{\text{Purchase Intents Initiated}} \approx 68.4\%$$
- The Agent Delegation Dilemma: Autonomous AI agents cannot be given raw credit card numbers or permanent credentials without massive security and liability risks.
Our thesis: Future commerce starts with a chat and ends with a chat. We were inspired to build Pay Build — a zero-trust agentic infrastructure that lets conversational agents discover products, negotiate carts, and execute 1-click purchases authorized via PayPal.
What it does
Pay Build is an autonomous payment infrastructure layer that bridges conversational AI agents directly to real-world merchant inventory and PayPal checkout rails:
- Conversational Merchant Discovery: Users express what they want in natural language. The agent calls multi-vendor tools in real time across Hospitality (MakeMyTrip), Intercity Transit (RedBus), Food Delivery (Zomato), and Quick Commerce (Blinkit).
- In-Chat Cart Synthesis: The agent presents rich, interactive selection carousels directly inside the chat interface without redirecting the user.
- PayPal Orders v2 Creation: Once the user confirms, Pay Build programmatically provisions a secure PayPal order with dynamic FX normalization: $$\text{Total}{\text{USD}} = \frac{\text{Merchant Total}{\text{INR}}}{\text{FX Rate}}$$
- Zero-Trust Device Authorization: Instead of asking for payment credentials in the chat, Pay Build dispatches an instant payment prompt to the user's paired PayPal Companion App.
- 1-Click Biometric Capture: The user reviews the verified merchant and amount on their phone, taps "Approve with PayPal", and the order captures in real time ($t_{\text{capture}} < 450\text{ ms}$), reflecting immediate confirmation back to the chat.
How we built it
Pay Build was engineered across three decoupled layers:
1. Agentic Frontend & LLM Tool Engine (web-iqooistant)
- Built an interactive desktop and mobile web interface powered by Gemini 2.5 Flash using dynamic function calling.
- Integrated structured tool schemas that transform natural language requests into structured API payloads for MakeMyTrip, RedBus, and Blinkit.
2. PayPal Orders v2 Engine & Relay Gateway
- Integrated PayPal REST v2 APIs (
/v2/checkout/ordersand/v2/checkout/orders/{id}/capture). - Implemented automated currency conversion and itemization mapping, maintaining strict transaction ledger states: $$\text{State Transitions: } \text{CREATED} \longrightarrow \text{AWAITING_APPROVAL} \longrightarrow \text{CAPTURED}$$
- Built an edge relay on Cloudflare Workers providing real-time state pub/sub between browser webhooks and paired mobile devices.
3. Native Android Companion Client (Iqooistant / com.chromepe)
- Built a native Android companion app with React Native.
- Authenticates the user's PayPal Sandbox identity and listens for incoming relay payment triggers.
- Features high-contrast payment verification cards displaying merchant credentials, dollar amounts, and an instant "Approve with PayPal" CTA.
Challenges we ran into
- Sub-Second Multi-Device State Synchronization:
- Synchronizing the browser chat interface, edge relay server, and Android companion device required eliminating polling latency. We engineered idempotent long-polling and webhook dispatchers to achieve sub-$300\text{ ms}$ state updates across devices.
- Safeguarding Agent Autonomy with Zero-Trust Airgapping:
- Autonomous LLMs should never touch sensitive payment tokens. We solved this by air-gapping the approval mechanism: the agent constructs the intent, but the private cryptographic authorization requires a physical tap on the user's personal device.
- Cross-Currency Precision & Rounding:
- Regional merchant tools returned prices in INR while PayPal sandbox accounts operated in USD. We integrated dynamic FX normalization matrices to prevent rounding errors down to the cent.
Accomplishments that we're proud of
- Zero App-Hopping: Successfully completed end-to-end hotel and bus reservations within a single chat window without leaving the conversation.
- True Cross-Platform Experience: Seamless real-time coordination between web-based Gemini agents and the native Android PayPal companion app.
- Production-Grade PayPal v2 Integration: Clean implementation of the full PayPal Orders v2 lifecycle with complete payload auditability, webhooks, and automatic capture.
- Broadcast-Grade Demo Presentation: Built an automated FFmpeg editing and audio normalization pipeline (-14 LUFS, -1 dBTP) that showcases our solution with pixel-perfect visual fidelity.
What we learned
- PayPal's REST v2 API is Built for the Agentic Era: The deterministic order lifecycle (
CREATED$\rightarrow$APPROVED$\rightarrow$COMPLETED) makes PayPal ideal for autonomous function calling and automated state machines. - Sovereignty Beats Total Automation: Users don't want agents spending their money silently; they want 1-tap verification. Giving users a dedicated mobile approval screen creates confidence while eliminating 95% of manual checkout friction.
- Structured Tool Calling Unifies Fragmented Commerce: Standardized JSON schemas allow completely disparate industries (travel, food, groceries) to speak the same commerce language.
What's next for Pay Build : Agentic Infra for Payments
- PayPal Vaulting & Pre-Approved Agent Allowances: Allow users to set scoped micro-budgets (e.g., "\$40 weekly allowance for coffee and snacks without manual approval").
- Multi-Agent Commerce Negotiation: Enable the user's agent to negotiate directly with merchant agents for automated coupons and bundle pricing before generating the PayPal Order.
- Open-Source Agent SDK (
@paybuild/sdk): Package Pay Build into an open-source SDK for LangChain, LlamaIndex, and AutoGen so any AI developer can add 1-click PayPal checkout with 3 lines of code.
Built With
- agentic-ai
- ai
- android
- cloudflare-workers
- css3
- ffmpeg
- fintech
- gemini
- google-gemini
- javascript
- json
- llm
- mobile
- node.js
- paypal
- python
- react
- react-native
- rest-api
- speech-recognition
- typescript
- vite
- webhooks