This guide will get you up and running with the H World Pro subscription and payment system.
npm install- Create or use existing Ethereum wallet (MetaMask, Rainbow, etc.)
- Get your wallet address (starts with "0x...")
- Add to
.env.local:
NEXT_PUBLIC_PAYMENT_RECIPIENT_ADDRESS=0xYourWalletAddressHerenpm run devOpen http://localhost:3000 in your browser
- Navigate to "Communities" tab
- See 5 pre-seeded communities
- Join/leave communities
- Membership saves to database
- View community feeds
- Navigate to "Earnings" tab
- See Free vs Pro plan comparison
- Click "Upgrade Now" button
- Payment flow initiates (requires World App)
- Post Limits: Free users limited to 10 posts/day
- Character Limits: Free 280 chars, Pro 1000 chars
- Fees: Free 20%, Pro 5%
- Limits enforced in real-time
- World Pay SDK integrated
- Payment intents created
- Transaction confirmation ready
- Error handling in place
# Communities are already seeded!
# Just navigate to Communities tab and try:
# 1. Join a community
# 2. Leave a community
# 3. Check membership persists on refresh# 1. Go to home feed
# 2. Create 10 posts
# 3. Try to create 11th post - should be blocked!
# 4. See upgrade prompt# 1. Start composing a post
# 2. Free plan: Limited to 280 characters
# 3. Pro plan: Can use up to 1000 characters
# 4. Counter shows remaining characters# 1. Open app in World App (not browser)
# 2. Navigate to Earnings tab
# 3. Click "Upgrade Now" on Pro plan
# 4. Confirm payment in World App
# 5. Subscription activates automatically/src/lib/worldpay.ts- Payment processing/src/lib/subscription-features.ts- Feature gates
/src/components/layout/MainApp.tsx- Main app with Earnings view/src/components/tweet/ComposeTweet.tsx- Post composer with limits
/src/app/api/communities/route.ts- Community list/src/app/api/communities/join/route.ts- Join community/src/app/api/communities/leave/route.ts- Leave community/src/app/api/subscriptions/status/route.ts- Subscription status/src/app/api/subscriptions/upgrade/route.ts- Initiate upgrade/src/app/api/subscriptions/confirm/route.ts- Confirm payment
/prisma/schema.prisma- Database schema/prisma/dev.db- SQLite database (seeded)
- β 10 posts per day
- β 280 characters per post
- β 20% withdrawal fees
- β Basic features only
- β Unlimited posts
- β 1000 characters per post
- β 5% withdrawal fees (75% savings!)
- β Priority support
- β Advanced analytics
- β Pro badge
- β Season 1 Human Badge
- β Early access to features
// API call
fetch('/api/subscriptions/status')
.then(res => res.json())
.then(data => console.log(data.plan)) // 'free' or 'pro'// API call
fetch('/api/communities')
.then(res => res.json())
.then(data => console.log(data.communities))
// Each community has 'isJoined' propertyimport { calculateWithdrawalFee } from '@/lib/subscription-features'
const amount = 100
const freeFee = calculateWithdrawalFee('free', amount) // $20
const proFee = calculateWithdrawalFee('pro', amount) // $5- Can view all communities
- Can join a community
- Can leave a community
- Membership persists after refresh
- Member count updates correctly
- Can view subscription status
- Free plan shows correct limits
- Pro plan shows "Active" badge
- Upgrade button works
- Payment intent is created
- Post limit enforced (Free: 10/day)
- Character limit enforced (Free: 280, Pro: 1000)
- Upgrade prompts appear when limited
- Pro users see unlimited features
- Limits reset daily
- Add your wallet address to
.env.local - Restart dev server
- Check database exists:
ls prisma/dev.db - Run migrations:
npx prisma migrate dev - Seed database:
npm run seed:full
- Payments require World App
- Generate QR code to open in World App
- Or use World App simulator
- Check API endpoint is running
- Check console for errors
- Verify database has Subscription table
- Communities working
- Subscription status showing
- Feature gates enforced
- Payment flow tested (need World App)
- Set up merchant wallet
- Add production wallet address
- Test with small payment first
- Set up hosting (Vercel, Railway, etc.)
- Configure production database
- Set environment variables
- Deploy!
- Track conversion rates
- Monitor payment success
- Gather user feedback
- Iterate on features
For detailed information, see:
MINIKIT_WORLDPAY_INTEGRATION.md- Complete payment guidePAYMENT_WALLET_SETUP.md- Wallet configurationPROJECT_STATUS_COMPLETE.md- Project overviewINTEGRATION_COMPLETE.md- Integration summary
- Check documentation files above
- Review console logs for errors
- Check API responses in Network tab
- Verify environment variables are set
Everything is set up and working. The only thing needed for production is configuring your payment recipient wallet address and testing the payment flow in World App.
Happy coding! π