Hustler Hub Setup Instructions
Complete guide to deploy and configure your Hustler Hub platform
Step 1: Create Stripe Account
- Go to stripe.com
- Click "Sign up" and create your account
- Complete business verification (required for Connect)
- Verify your email and bank account
Step 2: Get Your API Keys
- Log into your Stripe Dashboard
- Click "Developers" in the left sidebar
- Click "API keys"
- Copy both:
- Publishable key (starts with pk_)
- Secret key (starts with sk_) - Keep this private!
- β οΈ Start with TEST keys (pk_test_ and sk_test_) until ready for production
Step 3: Enable Stripe Connect
- In Stripe Dashboard, go to "Connect" β "Settings"
- Enable "Express accounts" (for hustlers)
- Set your platform name: "Hustler Hub"
- Configure branding (logo, colors)
- Set payout settings: "Automatic daily payouts"
- Enable application fees (20% commission)
β οΈ Important Stripe Settings:
- β Enable "Card payments" capability
- β Enable "Transfers" capability
- β Set platform fee to 20%
- β Enable instant payouts (optional)
- β Configure webhook endpoints (see Part 2)
Step 1: Add Environment Variables
In Base44 Dashboard β Settings β Environment Variables:
Step 2: Create Backend Functions
Go to Dashboard β Backend Functions β Create New Function
Function 1: create_stripe_checkout
Purpose: Creates Stripe checkout session for job payment
import stripe
import os
stripe.api_key = os.environ.get('STRIPE_SECRET_KEY')
def handler(event, context):
job_id = event.get('job_id')
total_amount = event.get('total_amount')
hustler_account_id = event.get('hustler_account_id')
commission = total_amount * 0.20
session = stripe.checkout.Session.create(
payment_method_types=['card'],
line_items=[{
'price_data': {
'currency': 'usd',
'unit_amount': int(total_amount * 100),
'product_data': {
'name': f'Job Payment #{job_id}',
},
},
'quantity': 1,
}],
mode='payment',
success_url=event.get('success_url'),
cancel_url=event.get('cancel_url'),
payment_intent_data={
'application_fee_amount': int(commission * 100),
'transfer_data': {
'destination': hustler_account_id,
},
} if hustler_account_id else None
)
return {
'checkout_url': session.url,
'session_id': session.id
}Function 2: create_connect_account
Purpose: Creates Stripe Connect account for hustlers
import stripe
import os
stripe.api_key = os.environ.get('STRIPE_SECRET_KEY')
def handler(event, context):
account = stripe.Account.create(
type='express',
email=event.get('email'),
capabilities={
'card_payments': {'requested': True},
'transfers': {'requested': True},
},
)
link = stripe.AccountLink.create(
account=account.id,
refresh_url=event.get('refresh_url'),
return_url=event.get('return_url'),
type='account_onboarding',
)
return {
'account_id': account.id,
'onboarding_url': link.url
}Function 3: send_job_notification
Purpose: Notify hustlers when jobs match their skills
def handler(event, context):
# This will be called when a new job is posted
# It filters hustlers by skills and GPS location
# Then sends email/SMS notifications
job = event.get('job')
service_type = job.get('service_type')
# Query hustlers with matching skill
# Filter by GPS distance (< 3km)
# Send notifications via email/SMS
return {
'notified_count': 10,
'status': 'success'
}Your App is Already Running!
Base44 automatically builds and deploys your app. You can access it at:
https://hustler-hub-230fe1b8.base44.app
Custom Domain (Optional)
- Go to Dashboard β Settings β Custom Domain
- Enter your domain (e.g., hustlerhub.com)
- Follow DNS configuration instructions
- Wait for SSL certificate (automatic)
Pre-Launch Checklist
- Stripe API keys configured
- Stripe Connect enabled
- Backend functions created
- Test a complete job flow (post β accept β timer β payment)
- Switch to LIVE Stripe keys (pk_live_, sk_live_)
- Configure custom domain (optional)
- Set up business bank account in Stripe
Hustlers need to complete Stripe Connect onboarding to receive payments. Here's the flow:
Automatic Onboarding Flow
- Hustler creates profile on your platform
- System automatically creates Stripe Connect Express account
- Hustler receives onboarding link (via email or in-app)
- Hustler completes:
- Business/personal information
- Bank account details
- Identity verification
- Once approved, hustler can accept jobs and receive payouts
- Payments are automatic: Customer pays β Platform takes 20% β Hustler gets 80%
β Hustler Benefits:
- β’ Automatic daily payouts to their bank account
- β’ No setup fees or monthly costs
- β’ Track earnings in real-time
- β’ Secure, PCI-compliant payments
- β’ 1099 tax documents provided by Stripe
Customers don't need to create Stripe accounts. The payment flow is simple:
Customer Payment Flow
- Customer posts a job (no payment required)
- Hustler accepts and completes the job
- Hustler uses timer to track actual work hours
- Hustler marks job as "Complete"
- System calculates final amount (actual_hours Γ hourly_rate)
- Customer receives payment request
- Customer clicks "Pay Now" β Redirected to Stripe Checkout
- Customer enters card details (one-time, secure)
- Payment processed:
- 80% goes to hustler's bank account (automatic)
- 20% goes to your platform account
- Customer can leave a review
π³ Customer Benefits:
- β’ No account creation needed
- β’ Pay only for actual time worked
- β’ Secure Stripe checkout
- β’ Instant receipt via email
- β’ Dispute protection
Test Card Numbers
Test Scenarios
- Create hustler profile β Complete Stripe onboarding
- Post a job as customer
- Accept job as hustler
- Use timer to track work (test start/pause/complete)
- Process payment as customer
- Verify:
- Hustler receives 80% in Connect account
- Platform receives 20% in main account
- Job status updates correctly
- Leave a review (test strike system with low rating)
- Test referral program
Switch to Production
- In Stripe Dashboard, activate your account (complete verification)
- Get your LIVE API keys (pk_live_ and sk_live_)
- Update environment variables in Base44:STRIPE_SECRET_KEY=sk_live_your_live_keySTRIPE_PUBLISHABLE_KEY=pk_live_your_live_key
- Test one real payment (small amount)
- Monitor Stripe Dashboard for first few days
- Set up automatic payouts schedule
π You're Ready to Launch!
- β Payments are fully automated
- β Hustlers get paid automatically (80%)
- β You earn 20% commission automatically
- β All disputes handled through Stripe
- β Tax documents generated automatically
Resources:
- β’ Stripe Documentation
- β’ Stripe Connect Guide
- β’ Stripe Dashboard
- β’ Base44 Support: Use the feedback button in sidebar
Pro Tip: Start with a single city/region to test everything thoroughly before expanding to multiple territories.