Skip to content

Add web UI for payment workflow#1

Merged
juntao merged 3 commits intomainfrom
feature/add-web-ui
Feb 1, 2026
Merged

Add web UI for payment workflow#1
juntao merged 3 commits intomainfrom
feature/add-web-ui

Conversation

@juntao
Copy link
Member

@juntao juntao commented Feb 1, 2026

Summary

  • Add static/index.html with MetaMask wallet integration
  • Web UI allows users to:
    • Create payment links
    • Connect wallet and pay using x402 protocol
    • Check payment status
  • Update FastAPI app to serve static files
  • Update Dockerfile to include static directory

Features

  1. Create Payment Link: Enter amount in USD, generates payment URL
  2. Pay: Connect MetaMask, enter payment URL, signs ERC-3009 transferWithAuthorization
  3. Check Status: View payment status (paid/pending) and transaction hash

Test plan

  • Build and run Docker container
  • Open http://localhost:8000 in browser
  • Create a payment link
  • Connect MetaMask (switch to Base Sepolia)
  • Complete payment flow
  • Verify transaction on block explorer

🤖 Generated with Claude Code

Juntao Yuan and others added 3 commits February 1, 2026 21:18
- Add static/index.html with wallet integration (MetaMask)
- Create Payment Link section
- Pay section with x402 workflow handling
- Check Status section
- Update main.py to serve static files
- Update Dockerfile to include static directory
- Update tests and CI for new root endpoint

Co-Authored-By: Claude <noreply@anthropic.com>
- Add required `receiver` parameter to /create-payment-link endpoint
- Store receiver address in database with each payment
- Use receiver from database in /pay endpoint (not from .env)
- Remove PAY_TO_ADDRESS from .env and config
- Update web UI to include receiver input field
- Update all documentation (README, TEST_PLAN)
- Update tests and CI workflow

Co-Authored-By: Claude <noreply@anthropic.com>
- Add getPaymentUrl() helper to normalize input to full URL
- Add prefillFromQueryParams() to pre-fill from ?pid= query param
- Update processPayment() and checkStatus() to use helper
- Update labels and placeholders for clarity

Co-Authored-By: Claude <noreply@anthropic.com>
@juntao juntao merged commit 68579de into main Feb 1, 2026
1 check passed
@juntao juntao deleted the feature/add-web-ui branch February 1, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant