paypal-frontdesk — conversational booking and payments

Demo status: The recorded demo uses the bundled mock PayPal server and deterministic rules-based extraction. Separate checks on November 2 verified the real PayPal sandbox payment lifecycle and live LLM intake inside the application; these checks are documented in the repository and are not shown in the existing video.

Missed calls lose bookings; no-shows leave empty appointment slots. paypal-frontdesk explores a single conversational workflow for appointment intake, deposits, cancellation refunds, and balance invoices.

  • Book + deposit: the agent quotes a deposit from the business configuration, requests a PayPal order through its REST client, presents an approval link, and requests capture before marking the booking confirmed.
  • Cancel + refund: confirmed cancellation requests a refund against the deposit capture.
  • Bill + invoice: the agent creates and sends a balance invoice through the invoicing client, then reports the invoice ID, amount, and recipient in the conversation.

The offline demo exercises this complete lifecycle against a local mock, including the order, capture, invoice, and refund IDs. No real money moves in the recording.

How it's built

The backend uses Python 3.11+ and the standard library. A dialogue state machine collects booking details and queues payment actions; a separate orchestrator calls the PayPal REST client and records the payment trail. The browser widget uses AG Grid Community for its sortable, filterable bookings table. AG Grid is MIT licensed and vendored locally, so the mock demo works offline.

An optional OpenAI-compatible adapter handles intent and slot extraction when configured with OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL. Without a key, or if the LLM request fails, extraction falls back to deterministic rules. The recorded demo shows rules mode. A separate live check with a free OpenRouter model filled a customer-name field the rules parser missed and advanced the application to booking confirmation, at reported cost $0. Free-only configuration enforces zero-price provider routes.

The PayPal client implements Orders v2, Payments v2 refunds, and Invoicing v2. The actual sandbox client completed an order approval, USD 1.00 capture and refund, plus a separate test invoice verified SENT. The live runs exposed and helped fix a capture media-type mismatch and an invoice response-shape mismatch. The GitHub Pages link is a static replay; use the repository commands below for the executable demo.

Try it locally

Install Python 3.11+ and Git, then run:

git clone https://github.com/ntoledo319/paypal-frontdesk
cd paypal-frontdesk
python3 -m paypal_frontdesk.cli --demo
python3 -m paypal_frontdesk.web --mock

The CLI command runs the scripted offline journey. The web command starts the interactive mock simulator at http://127.0.0.1:8080. No API credentials are needed for either mock demo.

For the regression suite, install pytest in your Python environment and run python3 -m pytest. The current suite has 90 passing offline tests, covering conversation states, extraction, payment-client round trips, failure paths, and sandbox-runner preflight checks.

The README documents sandbox credentials, buyer approval, and the optional LLM configuration. See SANDBOX-VERIFICATION.md for transaction IDs, test scope, and limitations. Payment lifecycle and AI intake were verified separately; a single recorded end-to-end AI + sandbox conversation is not yet available.

Disclosure: This project was built by an AI agent (Ledger) on behalf of Toledo Technologies LLC and subsequently reviewed and corrected with Codex. Nick Toledo is the LLC's authorized representative. AI assistance in development is separate from the application's optional LLM extraction mode.

Built with: Python standard library, PayPal REST API client, optional OpenAI-compatible LLM adapter, AG Grid Community. MIT licensed.

Built With

Share this project:

Updates

Submission history